[PowerPC] Add support for TAR
[external/binutils.git] / gdb / ChangeLog
1 2018-10-26  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
2             Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
3
4         * arch/ppc-linux-tdesc.h (tdesc_powerpc_isa207_vsx32l)
5         (tdesc_powerpc_isa207_vsx64l): Declare.
6         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_TARREGSET): Define.
7         (struct ppc_linux_features) <isa207>: New field.
8         (ppc_linux_no_features): Add initializer for isa207 field.
9         * arch/ppc-linux-common.c (ppc_linux_match_description): Return
10         new tdescs.
11         * nat/ppc-linux.h (PPC_FEATURE2_ARCH_2_07, PPC_FEATURE2_TAR)
12         (NT_PPC_TAR): Define if not already defined.
13         * features/Makefile (WHICH): Add rs6000/powerpc-isa207-vsx32l and
14         rs6000/powerpc-isa207-vsx64l.
15         (XMLTOC): Add rs6000/powerpc-isa207-vsx32l.xml and
16         rs6000/powerpc-isa207-vsx64l.xml.
17         * features/rs6000/power-tar.xml: New file.
18         * features/rs6000/powerpc-isa207-vsx32l.xml: New file.
19         * features/rs6000/powerpc-isa207-vsx64l.xml: New file.
20         * features/rs6000/powerpc-isa207-vsx32l.c: Generate.
21         * features/rs6000/powerpc-isa207-vsx64l.c: Generate.
22         * regformats/rs6000/powerpc-isa207-vsx32l.dat: Generate.
23         * regformats/rs6000/powerpc-isa207-vsx64l.dat: Generate.
24         * ppc-linux-nat.c (fetch_register, fetch_ppc_registers): Call
25         fetch_regset with the TAR regset.
26         (store_register, store_ppc_registers): Call store_regset with the
27         TAR regset.
28         (ppc_linux_nat_target::read_description): Set isa207 field in the
29         features struct if needed.
30         * ppc-linux-tdep.c: Include
31         features/rs6000/powerpc-isa207-vsx32l.c and
32         features/rs6000/powerpc-isa207-vsx64l.c.
33         (ppc32_regmap_tar, ppc32_linux_tarregset): New globals.
34         (ppc_linux_iterate_over_regset_sections): Call back with the tar
35         regset.
36         (ppc_linux_core_read_description): Check if the tar section is
37         present and set isa207 in the features struct.
38         (_initialize_ppc_linux_tdep): Call
39         initialize_tdesc_powerpc_isa207_vsx32l and
40         initialize_tdesc_powerpc_isa207_vsx64l.
41         * ppc-linux-tdep.h (ppc32_linux_tarregset): Declare.
42         * ppc-tdep.h (gdbarch_tdep) <ppc_tar_regnum>: New field.
43         (enum) <PPC_TAR_REGNUM>: New enum value.
44         * rs6000-tdep.c (rs6000_gdbarch_init): Look for and validate tar
45         feature.
46         (ppc_process_record_op31): Record changes to TAR.
47
48 2018-10-26  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
49             Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
50
51         * arch/ppc-linux-tdesc.h (tdesc_powerpc_isa205_ppr_dscr_vsx32l)
52         (tdesc_powerpc_isa205_ppr_dscr_vsx64l): Declare.
53         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_PPRREGSET)
54         (PPC_LINUX_SIZEOF_DSCRREGSET): Define.
55         (struct ppc_linux_features) <ppr_dscr>: New field.
56         (ppc_linux_no_features): Add initializer for ppr_dscr field.
57         * arch/ppc-linux-common.c (ppc_linux_match_description): Return
58         new tdescs.
59         * nat/ppc-linux.h (PPC_FEATURE2_DSCR, NT_PPC_PPR, NT_PPC_DSCR):
60         Define if not already defined.
61         * features/Makefile (WHICH): Add
62         rs6000/powerpc-isa205-ppr-dscr-vsx32l and
63         rs6000/powerpc-isa205-ppr-dscr-vsx64l.
64         (XMLTOC): Add rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml and
65         rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml.
66         * features/rs6000/power-dscr.xml: New file.
67         * features/rs6000/power-ppr.xml: New file.
68         * features/rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml: New file.
69         * features/rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml: New file.
70         * features/rs6000/powerpc-isa205-ppr-dscr-vsx32l.c: Generate.
71         * features/rs6000/powerpc-isa205-ppr-dscr-vsx64l.c: Generate.
72         * regformats/rs6000/powerpc-isa205-ppr-dscr-vsx32l.dat: Generate.
73         * regformats/rs6000/powerpc-isa205-ppr-dscr-vsx64l.dat: Generate.
74         * ppc-linux-nat.c: Include <sys/uio.h>.
75         (fetch_regset, store_regset, check_regset): New functions.
76         (fetch_register, fetch_ppc_registers): Call fetch_regset with
77         DSCR and PPR regsets.
78         (store_register, store_ppc_registers): Call store_regset with
79         DSCR and PPR regsets.
80         (ppc_linux_get_hwcap2): New function.
81         (ppc_linux_nat_target::read_description): Call
82         ppc_linux_get_hwcap2 and check_regset, set ppr_dscr field in the
83         features struct if needed.
84         * ppc-linux-tdep.c: Include
85         features/rs6000/powerpc-isa205-ppr-dscr-vsx32l.c and
86         features/rs6000/powerpc-isa205-ppr-dscr-vsx64l.c.
87         (ppc32_regmap_ppr, ppc32_regmap_dscr, ppc32_linux_pprregset)
88         (ppc32_linux_dscrregset): New globals.
89         (ppc_linux_iterate_over_regset_sections): Call back with the ppr
90         and dscr regsets.
91         (ppc_linux_core_read_description): Check if the ppr and dscr
92         sections are present and set ppr_dscr in the features struct.
93         (_initialize_ppc_linux_tdep): Call
94         initialize_tdesc_powerpc_isa205_ppr_dscr_vsx32l and
95         initialize_tdesc_powerpc_isa205_ppr_dscr_vsx64l.
96         * ppc-linux-tdep.h (ppc32_linux_pprregset)
97         (ppc32_linux_dscrregset): Declare.
98         * ppc-tdep.h (struct gdbarch_tdep) <ppc_ppr_regnum>: New field.
99         <ppc_dscr_regnum>: New field.
100         (enum) <PPC_PPR_REGNUM, PPC_DSCR_REGNUM>: New enum values.
101         * rs6000-tdep.c (rs6000_gdbarch_init): Look for and validate ppr
102         and dscr features.
103         (ppc_process_record_op31): Record changes to PPR and DSCR.
104
105 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
106
107         * rs6000-tdep.c (rs6000_gdbarch_init): Replace line wrapping by a
108         second initializer line for the have_* variables.  Initialize
109         have_fpu to 0 instead of 1.
110
111 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
112
113         * arch/ppc-linux-common.c (ppc_linux_match_description):
114         Parenthesize tdesc assignements and indent them properly.
115
116 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
117
118         * ppc-linux-nat.c (fetch_register): Change if statement to else
119         if.
120         (store_register): Likewise.
121
122 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
123
124         * rs6000-tdep.c: Remove reggroups.h include.
125         (rs6000_pseudo_register_reggroup_p): Remove.
126         (rs6000_gdbarch_init): Remove call to
127         set_tdesc_pseudo_register_reggroup_p.
128
129 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
130
131         * reggroups.c (default_register_reggroup_p): Return true for
132         decfloat registers and float_reggroup.
133
134 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
135
136         * ppc-linux-tdep.c (ppc_linux_collect_vrregset): Remove.
137         (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): Replace
138         ppc_linux_collect_vrregset by regcache_collect_regset.
139
140 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
141
142         * linux-tdep.c (linux_collect_regset_section_cb): Use
143         std::vector<gdb_byte> instead of char * and malloc for buf.
144         Remove xfree.
145
146 2018-10-26  Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
147
148         * xcoffread.c (read_xcoff_symtab): Pass deduced language to
149         symtab_start instead of always using language_unknown.
150
151 2018-10-26  Andrew Burgess  <andrew.burgess@embecosm.com>
152
153         * riscv-tdep.c (riscv_read_misa_reg): Update comment, remove
154         READ_P parameter, catch and ignore register access errors from
155         either the old or new MISA location.
156         (riscv_has_feature): Update call to riscv_read_misa_reg.
157
158 2018-10-25  Andrew Burgess  <andrew.burgess@embecosm.com>
159
160         * python/py-function.c (convert_values_to_python): Return
161         gdbpy_ref<>.  Add header comment.
162         (fnpy_call): Adjust.
163
164 2018-10-25  Andrew Burgess  <andrew.burgess@embecosm.com>
165
166         * python/py-cmd.c (cmdpy_completer_helper): Return gdbpy_ref<>.
167         (cmdpy_completer_handle_brkchars): Adjust.
168         (cmdpy_completer): Adjust.
169
170 2018-10-25  Andrew Burgess  <andrew.burgess@embecosm.com>
171
172         * riscv-linux-nat.c (riscv_linux_nat_target::fetch_registers):
173         Pass correct regnum to raw_supply_zeroed.
174
175 2018-10-23  Hafiz Abid Qadeer  <abidh@codesourcery.com>
176
177         * regcache.c (cooked_read_test): Add CSKY to the list of
178         architectures with a save_reggroup
179
180 2018-10-23  Simon Marchi  <simon.marchi@polymtl.ca>
181
182         PR gdb/23368
183         * infrun.c (follow_exec): In the follow_exec_mode_new case,
184         transfer terminal state from old new new inferior.
185         * terminal.h (swap_terminal_info): New function.
186         * inflow.c (swap_terminal_info): New function.
187
188 2018-10-23  Tom Tromey  <tom@tromey.com>
189
190         * record-btrace.c (get_thread_current_frame_id): Rename from
191         get_thread_current_frame.  Return a frame_id.
192         (record_btrace_start_replaying): Update.
193
194 2018-10-23  Andrew Burgess  <andrew.burgess@embecosm.com>
195
196         * riscv-tdep.c (riscv_register_name): Use the user-friendly names
197         for CSRs.
198
199 2018-10-23  Joel Brobecker  <brobecker@adacore.com>
200
201         * riscv-tdep.c (riscv_gdbarch_init): Set the gdbarch's
202         have_nonsteppable_watchpoint attribute to 1.
203
204 2018-10-23  Andrew Burgess  <andrew.burgess@embecosm.com>
205
206         * riscv-tdep.c (riscv_gdb_reg_names): Update comment, and all
207         register names.
208         (struct register_alias): Rename to...
209         (struct riscv_register_alias): ...this, and update comment.
210         (riscv_register_aliases): Update type, and alias names.  Remove
211         CSR names from this list.
212         (riscv_register_name): Use riscv_gdb_reg_names for int and float
213         register names.  Add an extra assertion.
214         (riscv_is_regnum_a_named_csr): New function.
215         (riscv_register_reggroup_p): Use riscv_is_regnum_a_named_csr.
216
217 2018-10-22  Jim Wilson  <jimw@sifive.com>
218
219         * riscv-tdep.c (riscv_push_dummy_call) <in_reg>: Check for value in
220         FP reg smaller than FP reg size, and fill with -1 instead of 0.
221
222         * riscv-tdep.c (riscv_fpreg_d_type, riscv_fpreg_q_type): New.
223         (riscv_register_type): Use them.
224         (riscv_print_one_register_info): Handle union of floats same as float.
225         * riscv-tdep.h (struct gdbarch_tdep): Add riscv_fpreg_d_type and
226         riscv_fpreg_q_type fields.
227
228 2018-10-21  Simon Marchi  <simon.marchi@ericsson.com>
229
230         * gdbarch.sh (gdbarch_num_cooked_regs): New.
231         * gdbarch.h: Re-generate.
232         * ax-gdb.c (gen_expr): Use gdbarch_num_cooked_regs.
233         * dwarf2-frame.c (dwarf2_frame_cache): Likewise.
234         * eval.c (evaluate_subexp_standard): Likewise.
235         * findvar.c (value_of_register): Likewise.
236         (value_of_register_lazy): Likewise.
237         (address_from_register): Likewise.
238         * frame.c (get_frame_register_bytes): Likewise.
239         * gdbarch-selftests.c (register_to_value_test): Likewise.
240         * h8300-tdep.c (h8300_register_type): Likewise.
241         * i386-tdep.c (i386_dbx_reg_to_regnum): Likewise.
242         (i386_svr4_reg_to_regnum): Likewise.
243         * infcmd.c (default_print_registers_info): Likewise.
244         (registers_info): Likewise.
245         (print_vector_info): Likewise.
246         (default_print_float_info): Likewise.
247         * m68hc11-tdep.c (m68hc11_frame_unwind_cache): Likewise.
248         * mdebugread.c (mdebug_reg_to_regnum): Likewise.
249         * mi/mi-main.c (mi_cmd_data_list_register_names): Likewise.
250         (mi_cmd_data_list_changed_registers): Likewise.
251         (mi_cmd_data_list_register_values): Likewise.
252         (mi_cmd_data_write_register_values): Likewise.
253         (mi_cmd_trace_frame_collected): Likewise.
254         * mips-tdep.c (print_gp_register_row): Likewise.
255         (mips_print_registers_info): Likewise.
256         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
257         * regcache.c (init_regcache_descr): Likewise.
258         (register_size): Likewise.
259         (register_dump::dump): Likewise.
260         (cooked_read_test): Likewise.
261         (cooked_write_test): Likewise.
262         * rs6000-tdep.c (rs6000_register_sim_regno): Likewise.
263         (rs6000_gdbarch_init): Likewise.
264         * stabsread.c (stab_reg_to_regnum): Likewise.
265         * stack.c (info_frame_command): Likewise.
266         * target-descriptions.c (tdesc_register_name): Likewise.
267         * trad-frame.c (trad_frame_alloc_saved_regs): Likewise.
268         * tui/tui-regs.c (tui_show_register_group): Likewise.
269         * user-regs.c (user_reg_map_name_to_regnum): Likewise.
270         (user_reg_map_regnum_to_name): Likewise.
271         (value_of_user_reg): Likewise.
272         (maintenance_print_user_registers): Likewise.
273         * xtensa-tdep.c (xtensa_find_register_by_name): Likewise.
274         (xtensa_register_name): Likewise.
275         (xtensa_register_type): Likewise.
276         (xtensa_reg_to_regnum): Likewise.
277         (xtensa_pseudo_register_read): Likewise.
278         (xtensa_pseudo_register_write): Likewise.
279
280 2018-10-21  Simon Marchi  <simon.marchi@polymtl.ca>
281
282         * amd64-tdep.c (amd64_pseudo_register_read_value): Use
283         correctly-sized buffer with raw_read.
284         (amd64_pseudo_register_write): Use correctly-sized buffer for
285         raw_read/raw_write.
286
287 2018-10-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
288
289         * typeprint.c (_initialize_typeprint): Fix wrong prefixname arg
290         in add_prefix_cmd of set print type.
291
292 2018-10-19  Tom Tromey  <tom@tromey.com>
293
294         PR tui/18388:
295         * NEWS: Mention tabset deprecation.
296         * tui/tui-win.c (tui_tab_width, internal_tab_width): New globals.
297         (update_tab_width): New function.
298         (tui_set_tab_width, tui_show_tab_width): New functions.
299         (tui_set_tab_width_command): Use update_tab_width.
300         (_initialize_tui_win): Move to end of file.  Deprecate "tabset".
301         Add new "set tui tab-width" command.
302         * tui/tui-source.c (tui_set_source_content): Update.
303         * tui/tui-disasm.c (tui_set_disassem_content): Update.
304         * tui/tui-data.h (tui_default_tab_len, tui_set_default_tab_len):
305         Don't declare.
306         (tui_tab_width): Declare.
307         * tui/tui-data.c (default_tab_len, tui_default_tab_len)
308         (tui_set_default_tab_len): Remove.
309
310 2018-10-19  Tom Tromey  <tom@tromey.com>
311
312         * tui/tui-io.h (key_is_start_sequence, key_is_end_sequence)
313         (key_is_backspace, tui_getc): Don't declare.
314         * tui/tui-io.c (key_is_start_sequence): Now static.
315         (key_is_end_sequence, key_is_backspace): Remove.
316         (tui_getc): Now static.
317
318 2018-10-19  Tom Tromey  <tom@tromey.com>
319
320         * symfile.c (reread_symbols): Clear "static_links".
321
322 2018-10-19  Alan Hayward  <alan.hayward@arm.com>
323
324         * aarch64-linux-tdep.c (AARCH64_SIGCONTEXT_RESERVED_SIZE): New
325         define.
326         (aarch64_linux_sigframe_init): Extra boundary checks.
327
328 2018-10-19  Andreas Arnez  <arnez@linux.ibm.com>
329
330         * s390-tdep.c (s390_pseudo_register_type): For v0-v15 don't yield
331         the possibly non-existent tdesc type 'vec128', but the type of raw
332         register v16 instead.
333
334 2018-10-19  Gary Benson <gbenson@redhat.com>
335
336         * cli/cli-interp.c (cli_interp::~cli_interp): New function.
337
338 2018-10-18  Sergio Durigan Junior  <sergiodj@redhat.com>
339
340         PR cli/23785
341         * cli/cli-dump.c (restore_binary_file): Check if "file" is
342         NULL.
343
344 2018-10-17  Paul Koning  <paul_koning@dell.com>
345
346         * charset.c (convert_between_encodings): Fix unsigned overflow.
347
348 2018-10-17  John Baldwin  <jhb@FreeBSD.org>
349
350         * fbsd-nat.c (fbsd_nat_target::info_proc) Use
351         fbsd_info_proc_mappings_header and fbsd_info_proc_mappings_entry.
352         * fbsd-tdep.c (fbsd_vm_map_entry_flags): Mark static.
353         (fbsd_info_proc_mappings_header, fbsd_info_proc_mappings_entry):
354         New functions.
355         (fbsd_core_info_proc_mappings): Use fbsd_info_proc_mappings_header
356         and fbsd_info_proc_mappings_header.
357         * fbsd-tdep.h (fbsd_vm_map_entry_flags): Remove.
358         (fbsd_info_proc_mappings_header, fbsd_info_proc_mappings_entry):
359         New.
360
361 2018-10-17  Joel Brobecker  <brobecker@adacore.com>
362
363         * MAINTAINERS (Responsible Maintainers): Add Rainer Orth as
364         Solaris Maintainer.
365
366 2018-10-15  Tom Tromey  <tom@tromey.com>
367
368         * tui/tui.c (strcat_to_buf): Remove casts.
369         * tui/tui-winsource.c (tui_show_source_line)
370         (tui_set_is_exec_point_at, tui_line_is_displayed): Remove casts.
371         * tui/tui-wingeneral.c (tui_refresh_win, box_win): Remove casts.
372         * tui/tui-windata.c (tui_first_data_item_displayed)
373         (tui_delete_data_content_windows, tui_erase_data_content)
374         (tui_display_all_data, tui_display_data_from)
375         (tui_refresh_data_win, tui_vertical_data_scroll): Remove casts.
376         * tui/tui-win.c (tui_set_win_height)
377         (make_invisible_and_set_new_height, parse_scrolling_args): Remove
378         casts.
379         * tui/tui-win.c (tui_resize_all): Remove casts.
380         (tui_scroll_backward_command, tui_set_focus)
381         (tui_set_tab_width_command): Likewise.
382         * tui/tui-source.c (tui_vertical_source_scroll): Remove cast.
383         * tui/tui-regs.c (tui_show_register_group): Remove cast.
384         * tui/tui-layout.c (tui_set_layout_by_name): Remove cast.
385         * tui/tui-disasm.c (tui_vertical_disassem_scroll): Remove cast.
386         * tui/tui-data.c (tui_partial_win_by_name, tui_free_win_content):
387         Remove casts.
388
389 2018-10-15  Simon Marchi  <simon.marchi@ericsson.com>
390
391         * MAINTAINERS (Responsible Maintainers): Add Alan Hayward as
392         AArch64/ARM maintainer.
393
394 2018-10-11  Gary Benson <gbenson@redhat.com>
395
396         * interps.h (interp::m_name): Make private and mutable.
397         * interps.c (interp::~interp): Free m_name.
398
399 2018-10-10  Sergio Durigan Junior  <sergiodj@redhat.com>
400             Simon Marchi <simark@simark.ca>
401
402         * README (`configure' options): Add documentation for new
403         "--enable-unit-tests" option.
404         * acinclude.m4: Include "selftest.m4".
405         * configure: Regenerate.
406         * configure.ac: Use "GDB_AC_SELFTEST".
407         * maint.c (maintenance_selftest): Update message informing
408         that selftests have been disabled.
409         (maintenance_info_selftests): Likewise.
410         * selftest.m4: New file.
411
412 2018-10-10  Gary Benson <gbenson@redhat.com>
413
414         * remote.c (remote_target::remote_send_printf): Add
415         missing va_end found by Coverity.
416
417 2018-10-10  Markus Metzger  <markus.t.metzger@intel.com>
418
419         * btrace.c (ftrace_update_function): Add indirect jump heuristic.
420
421 2018-10-09  Tom Tromey  <tom@tromey.com>
422
423         * configure: Rebuild.
424         * sanitize.m4 (AM_GDB_UBSAN): Default to no.
425         * NEWS: Update --enable-ubsan documentation.
426
427 2018-10-09  Gary Benson <gbenson@redhat.com>
428
429         * dwarf2read.c (create_dwp_hash_table): Fix buffer overrun
430         found by Coverity.
431
432 2018-10-08  Tom Tromey  <tom@tromey.com>
433
434         * riscv-fbsd-tdep.c (riscv_fbsd_sigframe_init): Remove unused
435         variable.
436         (riscv_fbsd_init_abi): Likewise.
437
438 2018-10-08  Weimin Pan  <weimin.pan@oracle.com>
439         * valops.c (value_struct_elt_for_reference): Rename local variable
440         to work around the shadowing a previous local warning.
441
442 2018-10-08  John Baldwin  <jhb@FreeBSD.org>
443
444         * Makefile.in (ALLDEPFILES): Add riscv-fbsd-nat.c.
445         * NEWS: Mention new FreeBSD/riscv native configuration.
446         * configure.host: Add riscv*-*-freebsd*.
447         * configure.nat: Likewise.
448         * riscv-fbsd-nat.c: New file.
449
450 2018-10-08  John Baldwin  <jhb@FreeBSD.org>
451
452         * Makefile.in (ALL_TARGET_OBS): Add riscv-fbsd-tdep.o.
453         (HFILES_NO_SRCDIR): Add riscv-fbsd-tdep.h.
454         (ALLDEPFILES): Add riscv-fbsd-tdep.c.
455         * NEWS: Mention new FreeBSD/riscv target.
456         * configure.tgt: Add riscv*-*-freebsd*.
457         * riscv-fbsd-tdep.c: New file.
458         * riscv-fbsd-tdep.h: New file.
459
460 2018-10-08  John Baldwin  <jhb@FreeBSD.org>
461
462         * regcache.h (struct regcache_map_entry): Note that this type can
463         be used with traditional frame caches.
464         * trad-frame.c (trad_frame_set_reg_regmap): New.
465         * trad-frame.h (trad_frame_set_reg_regmap): New.
466
467 2018-10-08  Weimin Pan  <weimin.pan@oracle.com>
468
469         PR c++/16841
470         * valops.c (get_virtual_base_offset): New function.
471         (value_struct_elt_for_reference): Use it to get virtual base offset
472         and add it in calculating class member address.
473
474 2018-10-08   John Darrington <john@darrington.wattle.id.au>
475
476     * dwarf2read.c (dwarf2_cu) <producer_is_codewarrior>: New field.
477       (check_producer): Check if the producer is codewarrior.
478       (producer_is_codewarrior): New function.
479       (lnp_state_machine::record_line): Ignore is_stmt flag for records
480        produced by codewarrior.
481       (dwarf2_cu::dwarf2_cu): Initialize producer_is_codewarrior.
482
483 2018-10-06  Tom Tromey  <tom@tromey.com>
484
485         PR python/19399:
486         * python/py-inferior.c: Add "architecture" entry.
487         (infpy_architecture): New function.
488
489 2018-10-06  Tom Tromey  <tom@tromey.com>
490
491         PR python/21765:
492         * python/py-symbol.c (gdbpy_initialize_symbols): Redefine
493         SYMBOL_VARIABLES_DOMAIN, SYMBOL_FUNCTIONS_DOMAIN,
494         SYMBOL_TYPES_DOMAIN.  Define SYMBOL_MODULE_DOMAIN,
495         SYMBOL_COMMON_BLOCK_DOMAIN, SYMBOL_LOC_COMMON_BLOCK.
496
497 2018-10-06  Tom Tromey  <tom@tromey.com>
498
499         PR build/17077:
500         * Makefile.in (OPCODES_CFLAGS): Remove "-I$(OPCODES_SRC)/..".
501         * arc-tdep.c, frv-tdep.c, lm32-tdep.c, mep-tdep.c,
502         microblaze-tdep.c, or1k-tdep.h: Use ../opcodes, not opcodes, in
503         #include.
504
505 2018-10-06  Tom Tromey  <tom@tromey.com>
506
507         * python/py-breakpoint.c (bppy_get_location): Handle a
508         bp_breakpoint without a location.
509
510 2018-10-06  Tom Tromey  <tom@tromey.com>
511
512         * python/lib/gdb/function/strfns.py (_MemEq, _StrLen, _StrEq)
513         (_RegEx): Reformat help text.
514         * python/lib/gdb/function/caller_is.py (CallerIs, CallerMatches)
515         (AnyCallerIs, AnyCallerMatches): Reformat help text.
516         * python/lib/gdb/function/as_string.py (_AsString): Reformat help
517         text.
518         * python/lib/gdb/command/xmethods.py (InfoXMethod)
519         (EnableXMethod, DisableXMethod): Remove help indentation.
520         Capitalize meta-syntactic variables.
521         * python/lib/gdb/command/unwinders.py (InfoUnwinder)
522         (EnableUnwinder, DisableUnwinder): Remove help indentation.
523         Capitalize meta-syntactic variables.
524         * python/lib/gdb/command/explore.py (ExploreCommand)
525         (ExploreValueCommand, ExploreTypeCommand): Reformat help text.
526         * python/lib/gdb/command/type_printers.py (InfoTypePrinter)
527         (EnableTypePrinter, DisableTypePrinter): Remove help indentation.
528         * python/lib/gdb/command/pretty_printers.py (InfoPrettyPrinter):
529         Remove help indentation.
530         (EnablePrettyPrinter, DisablePrettyPrinter): Likewise.
531         * python/lib/gdb/command/frame_filters.py (EnableFrameFilter)
532         (DisableFrameFilter, SetFrameFilterPriority)
533         (ShowFrameFilterPriority, InfoFrameFilter): Reword help text.
534
535 2018-10-06  Tom Tromey  <tom@tromey.com>
536
537         PR tui/28819:
538         * tui/tui-io.c (gdb_wgetch): New function.
539         (tui_mld_getc, tui_getc): Use it.
540
541 2018-10-05  Tom Tromey  <tom@tromey.com>
542
543         * sol-thread.c (sol_thread_target::wait): Rename inner
544         "save_ptid".
545
546 2018-10-04  Tom Tromey  <tom@tromey.com>
547
548         * configure: Rebuild.
549         * warning.m4 (AM_GDB_WARNINGS): Add -Wshadow=local.
550
551 2018-10-04  Tom Tromey  <tom@tromey.com>
552
553         * guile/scm-frame.c (gdbscm_frame_read_var): Remove inner
554         declaration of "block".
555
556 2018-10-04  Tom Tromey  <tom@tromey.com>
557
558         * common/filestuff.c (fdwalk): Remove inner declaration of
559         "result".
560
561 2018-10-04  Tom Tromey  <tom@tromey.com>
562
563         * msp430-tdep.c (msp430_push_dummy_call): Rename inner
564         "structs_addr" and hoist declaration.
565
566 2018-10-04  Tom Tromey  <tom@tromey.com>
567
568         * linux-tdep.c (linux_make_mappings_corefile_notes): Introduce new
569         variable "size".
570
571 2018-10-04  Tom Tromey  <tom@tromey.com>
572
573         * mdebugread.c (parse_partial_symbols): Use std::string.
574
575 2018-10-04  Tom Tromey  <tom@tromey.com>
576
577         * ctf.c (SET_ARRAY_FIELD): Rename "u32".
578         * p-valprint.c (pascal_val_print): Split inner "i" variable.
579         * xtensa-tdep.c (xtensa_push_dummy_call): Declare "i" in loop
580         header.
581         * xstormy16-tdep.c (xstormy16_push_dummy_call): Declare "val" in
582         more inner scope.
583         * xcoffread.c (read_xcoff_symtab): Rename inner "symbol".
584         * varobj.c (varobj_update): Rename inner "newobj",
585         "type_changed".
586         * valprint.c (generic_emit_char): Rename inner "buf".
587         * valops.c (find_overload_match): Rename inner "temp".
588         (value_struct_elt_for_reference): Declare "v" in more inner
589         scope.
590         * v850-tdep.c (v850_push_dummy_call): Rename "len".
591         * unittests/array-view-selftests.c (run_tests): Rename inner
592         "vec".
593         * tui/tui-stack.c (tui_show_frame_info): Declare "i" in loop
594         header.
595         * tracepoint.c (merge_uploaded_trace_state_variables): Declare
596         "tsv" in more inner scope.
597         (print_one_static_tracepoint_marker): Rename inner
598         "tuple_emitter".
599         * tic6x-tdep.c (tic6x_analyze_prologue): Declare "inst" lower.
600         (tic6x_push_dummy_call): Don't redeclare "addr".
601         * target-float.c: Declare "dto" lower.
602         * symtab.c (lookup_local_symbol): Rename inner "sym".
603         (find_pc_sect_line): Rename inner "pc".
604         * stack.c (print_frame): Don't redeclare "gdbarch".
605         (return_command): Rename inner "gdbarch".
606         * s390-tdep.c (s390_prologue_frame_unwind_cache): Renam inner
607         "sp".
608         * rust-lang.c (rust_internal_print_type): Declare "i" in loop
609         header.
610         * rs6000-tdep.c (ppc_process_record): Rename inner "addr".
611         * riscv-tdep.c (riscv_push_dummy_call): Declare "info" in inner
612         scope.
613         * remote.c (remote_target::update_thread_list): Don't redeclare
614         "tp".
615         (remote_target::process_initial_stop_replies): Rename inner
616         "thread".
617         (remote_target::remote_parse_stop_reply): Don't redeclare "p".
618         (remote_target::wait_as): Don't redeclare "stop_reply".
619         (remote_target::get_thread_local_address): Rename inner
620         "result".
621         (remote_target::get_tib_address): Likewise.
622
623         * regcache.c (cooked_read_test): Rename "regnum".
624         * record-btrace.c (cmd_record_btrace_start): Rename inner
625         "exception".
626         * ppc-sysv-tdep.c (ppc64_sysv_abi_return_value): Declare "i" in
627         loop header.
628         * ppc-linux-tdep.c (ppc_linux_syscall_record): Declare "i" in loop
629         header.
630         (ppu2spu_sniffer): Rename inner "buf".
631         * parse.c (operator_check_standard): Rename inner "type",
632         "objfile".
633         * p-valprint.c (pascal_val_print): Introduce new scope for
634         "low_bound", "high_bound".
635         * p-exp.y (yylex): Declare "i" in loop header.
636         * objfiles.c (objfile_relocate1): Declare "i" in loop header.
637         Lower declaration of "s".
638         * nios2-tdep.c (nios2_analyze_prologue): Declare "i" in loop
639         header.
640         (nios2_push_dummy_call): Rename "len".
641         * nat/linux-osdata.c (linux_xfer_osdata_cpus): Rename static
642         "buf".
643         (linux_xfer_osdata_fds, linux_xfer_osdata_shm)
644         (linux_xfer_osdata_sem, linux_xfer_osdata_msg)
645         (linux_xfer_osdata_modules): Likewise.
646         * mips-tdep.c (mips_eabi_push_dummy_call): Rename outer "len".
647         (mips_n32n64_push_dummy_call, mips_o32_push_dummy_call)
648         (mips_o64_push_dummy_call): Likewise.
649         * microblaze-tdep.c (microblaze_analyze_prologue): Rename inner
650         "op".
651         * mi/mi-main.c (list_available_thread_groups): Rename inner
652         "tuple_emitter".
653         (mi_cmd_data_read_memory): Rename inner "opts".
654         * mi/mi-cmd-var.c (varobj_update_one): Rename inner
655         "tuple_emitter".
656         * mep-tdep.c (mep_analyze_prologue): Declare "rn" in loop header.
657         * mdebugread.c (parse_symbol): Rename inner "b".  Declare "f" in
658         more inner scope.
659         (parse_partial_symbols): Rename inner "pst", "p", "name"
660         * main.c (captured_main_1): Rename inner "i"s.
661         * machoread.c (macho_symfile_read_all_oso): Don't redeclare
662         "oso2".
663         * linux-tdep.c (linux_info_proc): Rename inner "filename".
664         * linespec.c (linespec_lexer_lex_string): Rename inner "p".
665         * infrun.c (handle_no_resumed): Don't redeclare "thread".
666         (handle_signal_stop): Rename inner "gdbarch".
667         (handle_command): Declare "signum" in loop header.
668         * ia64-tdep.c (ia64_pseudo_register_read): Don't redeclare
669         "status".
670         (examine_prologue): Rename inner "sol" and "sof".
671         (ia64_extract_return_value): Rename inner "val".  Declare another
672         "val" in a more inner scope.
673         * hppa-bsd-tdep.c (hppabsd_find_global_pointer): Declare "buf" in
674         inner scope.
675         * guile/scm-symbol.c (gdbscm_lookup_symbol): Rename inner
676         "except".
677         * findvar.c (default_read_var_value): Don't redeclare "addr".
678         * f-exp.y (yylex): Declare "i" in loop header.
679         * eval.c (evaluate_subexp_standard): Don't redeclare "type".
680         Rename inner "type", "expect_type".
681         (evaluate_subexp_for_sizeof): Rename inner "pc".
682         * elfread.c (elf_symfile_read): Rename inner "abfd".
683         * dwarf2read.c (read_debug_names_from_section): Don't redeclare
684         "bytes_read".
685         (process_psymtab_comp_unit_reader): Don't redeclare "gdbarch".
686         (add_partial_subprogram): Rename inner "lowpc" and "highpc".
687         (dwarf_decode_line_header): Rename inner "lh".
688         * dwarf2loc.c (dwarf2_compile_expr_to_ax): Don't redeclare
689         "offset".  Declare "i" in loop header.
690         (disassemble_dwarf_expression): Rename inner "addr_size".
691         * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Rename
692         inner "result".
693         (dwarf_expr_context::execute_stack_op): Rename inner "offset".
694         * dwarf2-frame.c (decode_frame_entry_1): Rename inner "length"s.
695         * disasm.c (do_mixed_source_and_assembly_deprecated): Rename inner
696         "inner_list_emitter".
697         (do_mixed_source_and_assembly): Rename inner "tuple_emitter".
698         * disasm-selftests.c (print_one_insn_test): Wrap "bplen"
699         declaration in a block.
700         * csky-tdep.c (csky_analyze_prologue): Declare "offset" lower.
701         * cp-valprint.c (cp_print_value_fields): Don't redeclare
702         "obstack_final_size".
703         * cp-support.c (inspect_type): Declare "i" in loop header.
704         * compile/compile.c (compile_instance::insert_symbol_error):
705         Rename inner "e".
706         * common/agent.c (agent_run_command): Remove inner "ret"
707         declaration.
708         * coffread.c (coff_symfile_read): Rename inner "name".
709         (coff_symfile_read): Rename inner "abfd".
710         * cli/cli-utils.c (get_number_trailer): Rename inner "val".
711         * cli/cli-cmds.c (print_disassembly): Rename inner "low" and
712         "high".
713         * c-exp.y (lex_one_token): Move "len" declaration lower.
714         * breakpoint.c (create_longjmp_master_breakpoint): Don't redeclare
715         "gdbarch".
716         (create_exception_master_breakpoint): Likewise.  Don't redeclare
717         "b".
718         (watch_command_1): Declare "mark" later.
719         (clear_command): Don't shadow "a" or "b".
720         (delete_command): Rename inner "b".
721         (delete_trace_command): Likewise.
722         * arm-tdep.c (thumb_process_displaced_32bit_insn): Rename inner
723         "op".
724         (arm_gdbarch_init): Remove inner "e_flags".
725         * arch/arm-get-next-pcs.c (thumb_get_next_pcs_raw): Declare
726         "offset" in inner blocks.
727
728 2018-10-04  Simon Marchi  <simon.marchi@ericsson.com>
729
730         * dwarf-index-write.c (file_write): Don't write if the vector is
731         empty.
732
733 2018-10-05  Tom de Vries  <tdevries@suse.de>
734
735         * python/py-progspace.c (pspy_solib_name): Fix type mismatch in
736         PyArg_ParseTuple call.
737
738 2018-10-05  Tom de Vries  <tdevries@suse.de>
739
740         * python/py-record-btrace.c (recpy_bt_goto): Fix type mismatch in
741         PyArg_ParseTuple call.
742
743 2018-10-04  Joel Brobecker  <brobecker@adacore.com>
744
745         * psymtab.c (recursively_search_psymtabs): Reformat parameters
746         to avoid exceeding 80 characters per line limit.
747
748 2018-10-04  Tom Tromey  <tom@tromey.com>
749
750         * symfile.c (syms_from_objfile_1, finish_new_objfile)
751         (reread_symbols): Update.
752         * complaints.h (clear_complaints): Remove argument.
753         * complaints.c (enum complaint_series): Remove.
754         (series): Remove global.
755         (complaint_internal): Update.
756         (clear_complaints): Remove argument.
757
758 2018-10-04  Tom Tromey  <tom@tromey.com>
759
760         * symfile.c (symbol_file_add_with_addrs): Do not print "no
761         debugging symbols" message if there is a separate debug objfile.
762
763 2018-10-04  Tom Tromey  <tom@tromey.com>
764
765         PR cli/19551:
766         * symfile.c (symbol_file_add_with_addrs): Update output.
767         * psymtab.c (require_partial_symbols): Update output.
768
769 2018-10-04  Tom Tromey  <tom@tromey.com>
770
771         PR cli/22234:
772         * complaints.c: Emit \n.
773
774 2018-10-04  Tom Tromey  <tom@tromey.com>
775
776         * symfile.c (symbol_file_add_with_addrs, symbol_file_clear)
777         (separate_debug_file_exists, find_separate_debug_file)
778         (add_symbol_file_command, reread_symbols, allocate_symtab)
779         (allocate_compunit_symtab): Use filtered printing, not
780         unfiltered.
781         * psymtab.c (require_partial_symbols, dump_psymtab)
782         (allocate_psymtab): Use filtered printing, not unfiltered.
783
784 2018-10-04  Tom Tromey  <tom@tromey.com>
785
786         * complaints.c (complaint_internal): Correctly check complaint
787         count.
788
789 2018-10-04  Tom Tromey  <tom@tromey.com>
790
791         * complaints.h (struct complaints): Remove declaration.
792         * complaints.c (clear_complaints): Remove an unused variable.
793
794 2018-10-04  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
795
796         * MAINTAINERS (Write After Approval): Add self.
797
798 2018-10-03  Tom Tromey  <tom@tromey.com>
799
800         * guile/scm-value.c (gdbscm_value_to_string): Initialize
801         "buffer_contents".
802         * coffread.c (coff_symtab_read): Initialize "newobj".
803
804 2018-10-03  Simon Marchi  <simon.marchi@polymtl.ca>
805
806         * dwarf2read.c (read_func_scope): Remove struct keyword in
807         range-based for.
808
809 2018-10-03  Tom Tromey  <tom@tromey.com>
810
811         * README: Mention --enable-ubsan.
812         * NEWS: Mention --enable-ubsan.
813         * acinclude.m4: Include sanitize.m4.
814         * configure: Rebuild.
815         * configure.ac: Call AM_GDB_UBSAN.
816         * sanitize.m4: New file.
817
818 2018-10-03  Tom Tromey  <tom@tromey.com>
819
820         * expression.h (enum exp_opcode): Use uint8_t as base type.
821         * expprint.c (op_name): Handle invalid opcodes.
822
823 2018-10-03  Tom Tromey  <tom@tromey.com>
824
825         * parse.c (prefixify_expression): Add assert.
826         (parse_exp_in_context_1): Throw exception if the expression is
827         empty.
828
829 2018-10-03  Tom Tromey  <tom@tromey.com>
830
831         * dwarf2read.c (read_signed_leb128): Work in ULONGEST.
832
833 2018-10-03  Tom Tromey  <tom@tromey.com>
834
835         * c-exp.y (parse_number): Work in unsigned.  Remove casts.
836
837 2018-10-03  Tom Tromey  <tom@tromey.com>
838
839         * dwarf2read.c (read_subrange_type): Make "negative_mask"
840         unsigned.
841
842 2018-10-03  Tom Tromey  <tom@tromey.com>
843
844         * findvar.c (extract_integer): Do work in an unsigned type.
845
846 2018-10-03  Tom Tromey  <tom@tromey.com>
847
848         * common/enum-flags.h (enum_flags::operator~): Add static assert.
849         * symfile-add-flags.h (enum symfile_add_flag): Use unsigned as
850         base type.
851         * objfile-flags.h (enum objfile_flag): Use unsigned as base type.
852         * gdbtypes.h (enum type_instance_flag_value): Use unsigned as base
853         type.
854         * c-lang.h (enum c_string_type_values): Use unsigned as base
855         type.
856         * btrace.h (enum btrace_thread_flag): Use unsigned as base type.
857
858 2018-10-03  Tom Tromey  <tom@tromey.com>
859
860         * dwarf2-frame.h (dwarf2_frame_state_reg_info)
861         <~dwarf2_frame_state_reg_info>: Update.
862         <dwarf2_frame_state_reg_info>: Update.
863         <alloc_regs>: Add assertion.  Update.
864         <reg>: Now a std::vector.
865         <num_regs>: Remove.
866         <swap>: Update.
867         * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
868         (execute_cfa_program_test, dwarf2_frame_cache): Update.
869
870 2018-10-03  Tom Tromey  <tom@tromey.com>
871
872         * namespace.c (add_using_directive): Don't pass NULL to memcpy.
873
874 2018-10-03  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
875
876         * tid-parse.c (tid_is_in_list): Fix wrong 'See' comment.
877
878 2018-10-02  Tom Tromey  <tom@tromey.com>
879
880         * aarch64-linux-tdep.c (aarch64_linux_sigframe_init): Use pulongest.
881
882 2018-10-02  John Darrington <john@darrington.wattle.id.au>
883
884         * NEWS: Mention changed commands.
885         * ser-uds.c: New file.
886         * configure.ac (SER_HARDWIRE): Add ser-uds.o.
887         * configure: Regenerate.
888         * Makefile.in: Add new file.
889         * serial.c (serial_open): Check if filename is a socket
890           and lookup the appropriate interface accordingly.
891
892 2018-10-01  Alan Hayward  <alan.hayward@arm.com>
893
894         * aarch64-linux-tdep.c (AARCH64_SIGCONTEXT_RESERVED_OFFSET): Add
895         define.
896         (AARCH64_EXTRA_MAGIC): Likewise.
897         (AARCH64_FPSIMD_MAGIC): Likewise.
898         (AARCH64_SVE_MAGIC): Likewise.
899         (AARCH64_EXTRA_DATAP_OFFSET): Likewise.
900         (AARCH64_FPSIMD_FPSR_OFFSET): Likewise.
901         (AARCH64_FPSIMD_FPCR_OFFSET): Likewise.
902         (AARCH64_FPSIMD_V0_OFFSET): Likewise.
903         (AARCH64_FPSIMD_VREG_SIZE): Likewise.
904         (AARCH64_SVE_CONTEXT_VL_OFFSET): Likewise.
905         (AARCH64_SVE_CONTEXT_REGS_OFFSET): Likewise.
906         (AARCH64_SVE_CONTEXT_P_REGS_OFFSET): Likewise.
907         (AARCH64_SVE_CONTEXT_FFR_OFFSET): Likewise.
908         (AARCH64_SVE_CONTEXT_SIZE): Likewise.
909         (read_aarch64_ctx): Add function.
910         (aarch64_linux_sigframe_init): Detect FP registers.
911
912 2018-10-01  Alan Hayward  <alan.hayward@arm.com>
913
914         * aarch64-tdep.c (AARCH64_Q0_REGNUM): Move to here.
915         (AARCH64_D0_REGNUM): Likewise.
916         (AARCH64_S0_REGNUM): Likewise.
917         (AARCH64_H0_REGNUM): Likewise.
918         (AARCH64_B0_REGNUM): Likewise.
919         (AARCH64_SVE_V0_REGNUM): Likewise.
920         * arch/aarch64.h (AARCH64_Q0_REGNUM): Move from here.
921         (AARCH64_D0_REGNUM): Likewise.
922         (AARCH64_S0_REGNUM): Likewise.
923         (AARCH64_H0_REGNUM): Likewise.
924         (AARCH64_B0_REGNUM): Likewise.
925         (AARCH64_SVE_V0_REGNUM): Likewise.
926
927 2018-10-01  Gary Benson <gbenson@redhat.com>
928
929         * gdb_proc_service.h (gdb_prfpregset_t): Remove typedef.
930         * proc-service.c (ps_lgetfpregs, ps_lsetfpregs): Use
931         prfpregset_t instead of gdb_prfpregset_t.
932         * configure.ac (PRFPREGSET_T_BROKEN): Remove check.
933         * configure, config.in: Rebuild.
934
935 2018-10-01  Gary Benson <gbenson@redhat.com>
936
937         * common/gdb_proc_service.h: New file, factored out from...
938         * gdb_proc_service.h: Moved common code to the above file.
939         * Makefile.in (HFILES_NO_SRCDIR): Add the above new file.
940
941 2018-10-01  Gary Benson <gbenson@redhat.com>
942
943         * gdb_proc_service.h: Use elf_gregset_t if prgregset_t is
944         undefined.  Use elf_fpregset_t if prfpregset_t is undefined.
945
946 2018-10-01  Gary Benson <gbenson@redhat.com>
947
948         * configure.ac: Check if sys/procfs.h defines elf_fpregset_t.
949         (AC_CHECK_HEADERS): Check for linux/elf.h.
950         * configure, config.in: Rebuild.
951         * gdb_proc_service.h: Include linux/elf.h if sys/procfs.h
952         doesn't define elf_fpregset_t.
953
954 2018-10-01  Gary Benson <gbenson@redhat.com>
955
956         * gdb_proc_service.h: Whitespace change.
957
958 2018-10-01  Tom Tromey  <tom@tromey.com>
959
960         * unittests/scoped_mmap-selftests.c: Don't check HAVE_UNISTD_H.
961         * unittests/scoped_fd-selftests.c: Don't check HAVE_UNISTD_H.
962         * common/scoped_fd.h: Don't check HAVE_UNISTD_H.
963
964 2018-10-01  Tom Tromey  <tom@tromey.com>
965
966         * README: Minor change.
967
968 2018-09-30  Pedro Alves  <palves@redhat.com>
969
970         * darwin-nat-info.c (darwin_debug_regions_recurse)
971         (info_mach_exceptions_command): Remove unused local variables.
972         * darwin-nat.c (darwin_decode_notify_message)
973         (darwin_nat_target::resume, darwin_nat_target::mourn_inferior)
974         (darwin_stop_inferior, darwin_setup_exceptions)
975         (darwin_nat_target::kill, darwin_attach_pid, darwin_ptrace_him)
976         (darwin_nat_target::attach, darwin_nat_target::detach)
977         (darwin_read_write_inferior, darwin_read_dyld_info): Remove unused
978         local variables.
979         * i386-darwin-nat.c (i386_darwin_dr_set): Remove unused local
980         variables.
981
982 2018-09-29  Tom Tromey  <tom@tromey.com>
983
984         * README: Remove some leftover text.
985
986 2018-09-29  Tom Tromey  <tom@tromey.com>
987
988         * PROBLEMS: Rewrite.
989         * README: Update.
990
991 2018-09-28  John Baldwin  <jhb@FreeBSD.org>
992
993         * disasm-selftests.c (print_one_insn_test): Add bfd_arch_riscv to
994         case with explicit breakpoint kind.
995         * riscv-tdep.c (show_use_compressed_breakpoints): Remove
996         'additional_info' and related logic.
997         (riscv_debug_breakpoints): New variable.
998         (riscv_breakpoint_kind_from_pc): Use the length of the existing
999         instruction to determine the breakpoint kind.
1000         (_initialize_riscv_tdep): Add 'set/show debug riscv breakpoints'
1001         flag.  Update description of 'set/show riscv
1002         use-compressed-breakpoints' flag.
1003
1004 2018-09-28  Andrew Burgess  <andrew.burgess@embecosm.com>
1005
1006         (NEWS): Mention changes to frame related commands.
1007         * cli/cli-decode.c (add_cmd_suppress_notification): New function.
1008         (add_prefix_cmd_suppress_notification): New function.
1009         (add_com_suppress_notification): Call
1010         add_cmd_suppress_notification.
1011         * command.h (add_cmd_suppress_notification): Declare.
1012         (add_prefix_cmd_suppress_notification): Declare.
1013         * mi/mi-cmd-stack.c: Add 'safe-ctype.h' include.
1014         (parse_frame_specification): Moved from stack.c, with
1015         simplification to handle a single argument.
1016         (mi_cmd_stack_select_frame): Use parse_frame_specification, the
1017         switch to the selected frame.  Add a header comment.
1018         * stack.c: Remove 'safe-ctype.h' include.
1019         (find_frame_for_function): Add declaration.
1020         (find_frame_for_address): New function.
1021         (parse_frame_specification): Moved into mi/mi-cmd-stack.c.
1022         (frame_selection_by_function_completer): New function.
1023         (info_frame_command): Rename to...
1024         (info_frame_command_core): ...this, and update parameter types.
1025         (select_frame_command): Rename to...
1026         (select_frame_command_core): ...this, and update parameter types.
1027         (frame_command): Rename to...
1028         (frame_command_core): ...this, and update parameter types.
1029         (class frame_command_helper): New class to wrap implementations of
1030         frame related sub-commands.
1031         (frame_apply_cmd_list): New static global.
1032         (frame_cmd_list): Make static.
1033         (select_frame_cmd_list): New global for sub-commands.
1034         (info_frame_cmd_list): New global for sub-commands.
1035         (_initialize_stack): Register sub-commands for 'frame',
1036         'select-frame', and 'info frame'.  Update 'frame apply' commands
1037         to use frame_apply_cmd_list.  Move function local static
1038         frame_apply_list to file static frame_apply_cmd_list for
1039         consistency.
1040         * stack.h (select_frame_command): Delete declarationn.
1041         (select_frame_for_mi): Declare new function.
1042
1043 2018-09-26  Andrew Burgess  <andrew.burgess@embecosm.com>
1044
1045         * riscv-tdep.c (riscv_insn::decode): Decode c.lui.
1046         (riscv_scan_prologue): Split handling of AUIPC, LUI, ADD, ADDI,
1047         and NOP.
1048
1049 2018-09-26  Simon Marchi  <simon.marchi@ericsson.com>
1050
1051         * elf32-nds32.c (elf32_nds32_allocate_dynrelocs): Remove.
1052
1053 2018-09-26  Tom Tromey  <tom@tromey.com>
1054
1055         * valops.c (auto_abandon): Remove dead code.
1056
1057 2018-09-26  Tom Tromey  <tom@tromey.com>
1058
1059         * tui/tui-win.c (WIN_HEIGHT_USAGE): Remove extra ">"s.
1060
1061 2018-09-24  Tom Tromey  <tom@tromey.com>
1062
1063         * common/pathstuff.c (get_standard_cache_dir): Make
1064         "xdg_cache_home" and "home" const.
1065         * top.c (init_history): Make "tmpenv" const.
1066         * main.c (get_init_files): Make "homedir" const.
1067
1068 2018-09-23  Tom Tromey  <tom@tromey.com>
1069
1070         PR python/18852:
1071         * python/py-param.c (get_set_value): Use gdbpy_handle_exception.
1072
1073 2018-09-23  Tom Tromey  <tom@tromey.com>
1074
1075         * python/py-function.c (fnpy_call): Use gdbpy_handle_exception.
1076         * python/py-cmd.c (cmdpy_function): Use gdbpy_handle_exception.
1077         * python/python-internal.h (gdbpy_handle_exception): Declare.
1078         * python/py-utils.c (gdbpy_handle_exception): New function.
1079
1080 2018-09-23  Tom Tromey  <tom@tromey.com>
1081
1082         PR python/17284:
1083         * python/py-type.c (typy_template_argument): Check for negative
1084         argument number.
1085
1086 2018-09-23  Tom Tromey  <tom@tromey.com>
1087
1088         PR python/14062:
1089         * python/python.c (gdbpy_run_events): Do not ignore exceptions.
1090
1091 2018-09-23  Tom Tromey  <tom@tromey.com>
1092
1093         PR python/18170:
1094         * python/py-value.c (valpy_int): Allow conversion from pointer
1095         type.
1096
1097 2018-09-23  Tom Tromey  <tom@tromey.com>
1098
1099         PR python/20126:
1100         * python/py-value.c (valpy_int): Respect type sign.
1101
1102 2018-09-23  Tom Tromey  <tom@tromey.com>
1103
1104         PR python/18352;
1105         * python/py-value.c (valpy_float): Allow conversions from int or
1106         char.
1107         (valpy_int, valpy_long): Allow conversions from float.
1108
1109 2018-09-23  Tom Tromey  <tom@tromey.com>
1110
1111         * ctf.c (ctf_start): Use gdb_fopen_cloexec.
1112         * common/scoped_mmap.c (mmap_file): Use gdb_open_cloexec.
1113
1114 2018-09-23  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1115
1116         * amd64-sol2-tdep.c (amd64_sol2_sigtramp_p): Also recognize
1117         __sighndlr.
1118         * i386-sol2-tdep.c (i386_sol2_sigtramp_p): Likewise.
1119
1120 2018-08-02  Jon Turney  <jon.turney@dronecode.org.uk>
1121
1122         * windows-nat.c (windows_nat_target::wait): Remove a spurious
1123         target_terminal::ours().
1124
1125 2018-09-23  Simon Marchi  <simon.marchi@ericsson.com>
1126
1127         * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): Change type
1128         of vl to ULONGEST.
1129
1130 2018-09-21  Yacov Simhony  <ysimhony@gmail.com>
1131
1132         * breakpoint.c (update_inserted_breakpoint_locations): Remove
1133         redundant condition.
1134
1135 2018-09-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1136
1137         * proc-utils.h (PROC_CTL_WORD_TYPE): Remove.
1138
1139         * procfs.c: Don't check for PR_MODEL_NATIVE definition.
1140         * sparc-sol2-nat.c: Likewise.  Remove Linux, __arch64__ references.
1141         * sol-thread.c (ps_pdmodel): Don't guard definition.
1142
1143         * procfs.c: Fix formatting.
1144
1145         * procfs.c (sysset_t_alloc): Remove.
1146         (create_procinfo): Use XNEW instead of sysset_t_alloc.
1147         (procfs_debug_inferior): Likewise.
1148         (procfs_set_exec_trap): Likewise.
1149         (proc_set_traced_sysentry): Don't allocate argp dynamically.
1150         (proc_set_traced_sysexit): Likewise.
1151
1152         * procfs.c (create_procinfo): Use xsnprintf to fix ARI warning.
1153         (dead_procinfo): Likewise.
1154         (proc_warn): Likewise.
1155         (proc_error): Likewise.
1156         (proc_get_LDT_entry): Likewise.
1157         (do_attach): Likewise.
1158         (procfs_target::pid_to_str): Likewise.
1159         (iterate_over_mappings): Likewise.
1160
1161         * procfs.c (create_procinfo): Fix ARI warning.
1162         (proc_get_status): Likewise.
1163         (proc_stop_process): Likewise.
1164         (proc_run_process): Likewise.
1165         (proc_kill): Likewise.
1166         (proc_get_LDT_entry): Likewise.
1167         (procfs_find_LDT_entry): Likewise.
1168         (proc_update_threads): Likewise.
1169         (proc_iterate_over_threads): Likewise.
1170         (do_attach): Likewise.
1171         (procfs_xfer_memory): Likewise.
1172         (invalidate_cache): Likewise.
1173         (procfs_target::resume): Likewise.
1174         (procfs_init_inferior): Likewise.
1175         (procfs_set_exec_trap): Likewise.
1176         (procfs_target::thread_alive): Likewise.
1177         (procfs_target::pid_to_exec_file): Likewise.
1178         (iterate_over_mappings): Likewise.
1179         (procfs_target::make_corefile_notes): Likewise.
1180         * sol-thread.c (sol_thread_target::thread_alive): Likewise.
1181
1182         * procfs.c (procfs_find_LDT_entry): Silence ARI warning.
1183         (procfs_find_LDT_entry): Likewise.
1184         * sol-thread.c (ps_lgetLDT): Likewise.
1185
1186 2018-09-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1187
1188         PR tdep/17903
1189         * procfs.c (procfs_target): Declare pid_to_exec_file.
1190         (procfs_target::pid_to_exec_file): New.
1191
1192 2018-09-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1193
1194         * auxv.c (default_print_auxv_entry): Reflect AT_SUN_CAP_HW1
1195         renaming.
1196         Handle AT_SUN_EMULATOR, AT_SUN_BRANDNAME, AT_SUN_BRAND_AUX1,
1197         AT_SUN_BRAND_AUX2, AT_SUN_BRAND_AUX3, AT_SUN_CAP_HW2.
1198
1199 2018-09-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1200
1201         * i386-v4-nat.c (regmap, supply_gregset, fill_gregset)
1202         (supply_fpregset, fill_fpregset): Move ...
1203         * i386-sol2-nat.c [PR_MODEL_NATIVE != PR_MODEL_LP64]: ... here.
1204         Remove HAVE_GREGSET_T, HAVE_FPREGET_T guards.
1205         Remove references to ioctl-based procfs.
1206         Include <sys/reg.h>.
1207         Remove PR_MODEL_NATIVE guards.
1208         * configure.nat <sol2, i386> (NATDEPFILES): Remove i386-v4-nat.o.
1209         * Makefile.in (ALLDEPFILES): Remove i386-v4-nat.c.
1210
1211 2018-09-19  Xavier Roirand  <roirand@adacore.com>
1212
1213         PR gdb/20981:
1214         * solib-darwin.c (darwin_get_dyld_bfd): New function.
1215         (darwin_solib_get_all_image_info_addr_at_init): Update call.
1216         (darwin_solib_create_inferior_hook): Handle unrelocated dyld.
1217
1218 2018-09-19  John Baldwin  <jhb@FreeBSD.org>
1219
1220         * fbsd-tdep.c (fbsd_print_sockaddr_in): Style fix.
1221         (fbsd_print_sockaddr_in6): Likewise.
1222
1223 2018-09-19  Richard Bunt  <richard.bunt@arm.com>
1224             Chris January  <chris.january@arm.com>
1225
1226         * eval.c (skip_undetermined_arglist): Skip argument list helper.
1227         (evaluate_subexp_standard): Return a dummy type when
1228         honoring EVAL_SKIP in OP_VAR_VALUE and handle skipping in the
1229         OP_F77_UNDETERMINED_ARGLIST case.
1230         * expression.h (enum noside): Update comment.
1231
1232 2018-09-19  George Vasick <george.vasick@oracle.com>
1233
1234         * solib-svr4.c (svr4_same_1): Also handle amd64 ld.so.1.
1235
1236 2018-09-19  Stefan Teleman <stefan.teleman@oracle.com>
1237             April Chin <april.chin@oracle.com>
1238             Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1239
1240         * procfs.c (MAX_PROC_NAME_SIZE): Allow for 6-digit PID_MAX and
1241         uint_t lwpid_t.
1242         (create_procinfo): Print pids in /proc without leading zeros.
1243
1244 2018-09-18  Sandra Loosemore  <sandra@codesourcery.com>
1245
1246         * nios2-tdep.c (nios2_gcc_target_options): New.
1247         (nios2_gdb_arch_init): Install new hook.
1248
1249 2018-09-18  Simon Marchi  <simon.marchi@ericsson.com>
1250
1251         * patches/0001-Fix-PR-gdb-23558-Use-system-s-getcwd-when-cross-comp.patch:
1252         New file.
1253         * update-gnulib.sh: Apply patch.
1254         * configure: Re-generate.
1255
1256 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
1257
1258         * infcmd.c (_initialize_infcmd): Remove "running" from "info proc"
1259         description.  Make "info proc" command descriptions more
1260         consistent.
1261
1262 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
1263
1264         * NEWS: Mention 'info proc files' command.
1265
1266 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
1267
1268         * fbsd-nat.c (fbsd_nat_target::info_proc): List open file
1269         descriptors for IP_FILES and IP_ALL.
1270
1271 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
1272
1273         * fbsd-tdep.c (KF_FLAGS, KF_OFFSET, KF_VNODE_TYPE, KF_SOCK_DOMAIN)
1274         (KF_SOCK_TYPE, KF_SOCK_PROTOCOL, KF_SA_LOCAL, KF_SA_PEER)
1275         (KINFO_FILE_TYPE_SOCKET, KINFO_FILE_TYPE_PIPE)
1276         (KINFO_FILE_TYPE_FIFO, KINFO_FILE_TYPE_KQUEUE)
1277         (KINFO_FILE_TYPE_CRYPTO, KINFO_FILE_TYPE_MQUEUE)
1278         (KINFO_FILE_TYPE_SHM, KINFO_FILE_TYPE_SEM, KINFO_FILE_TYPE_PTS)
1279         (KINFO_FILE_TYPE_PROCDESC, KINFO_FILE_FD_TYPE_ROOT)
1280         (KINFO_FILE_FD_TYPE_JAIL, KINFO_FILE_FD_TYPE_TRACE)
1281         (KINFO_FILE_FD_TYPE_CTTY, KINFO_FILE_FLAG_READ)
1282         (KINFO_FILE_FLAG_WRITE, KINFO_FILE_FLAG_APPEND)
1283         (KINFO_FILE_FLAG_ASYNC, KINFO_FILE_FLAG_FSYNC)
1284         (KINFO_FILE_FLAG_NONBLOCK, KINFO_FILE_FLAG_DIRECT)
1285         (KINFO_FILE_FLAG_HASLOCK, KINFO_FILE_FLAG_EXEC)
1286         (KINFO_FILE_VTYPE_VREG, KINFO_FILE_VTYPE_VDIR)
1287         (KINFO_FILE_VTYPE_VCHR, KINFO_FILE_VTYPE_VLNK)
1288         (KINFO_FILE_VTYPE_VSOCK, KINFO_FILE_VTYPE_VFIFO, FBSD_AF_UNIX)
1289         (FBSD_AF_INET, FBSD_AF_INET6, FBSD_SOCK_STREAM, FBSD_SOCK_DGRAM)
1290         (FBSD_SOCK_SEQPACKET, FBSD_IPPROTO_ICMP, FBSD_IPPROTO_TCP)
1291         (FBSD_IPPROTO_UDP, FBSD_IPPROTO_SCTP): New defines.
1292         (struct fbsd_sockaddr_in, struct fbsd_sockaddr_in6)
1293         (struct fbsd_sockaddr_un): New types.
1294         (fbsd_file_fd, fbsd_file_type, fbsd_file_flags, fbsd_ipproto)
1295         (fbsd_print_sockaddr_in, fbsd_print_sockaddr_in6)
1296         (fbsd_info_proc_files_header, fbsd_info_proc_files_entry)
1297         (fbsd_core_info_proc_files): New functions.
1298         (fbsd_core_info_proc): List open file descriptors for IP_FILES and
1299         IP_ALL.
1300         * fbsd-tdep.h (fbsd_info_proc_files_header)
1301         (fbsd_info_proc_files_entry): New.
1302
1303 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
1304
1305         * defs.h (enum info_proc_what) [IP_FILES]: New value.
1306         * infcmd.c (info_proc_cmd_files): New function.
1307         (_initialize_infcmd): Register 'info proc files' command.
1308
1309 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
1310
1311         * gnulib/aclocal-m4-deps.mk: Re-generate.
1312         * gnulib/aclocal.m4: Re-generate.
1313         * gnulib/config.in: Re-generate.
1314         * gnulib/configure: Re-generate.
1315         * gnulib/import/Makefile.am: Re-generate.
1316         * gnulib/import/Makefile.in: Re-generate.
1317         * gnulib/import/m4/gnulib-cache.m4: Re-generate.
1318         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
1319         * gnulib/import/arpa_inet.in.h: New file.
1320         * gnulib/import/inet_ntop.c: New file.
1321         * gnulib/import/m4/arpa_inet_h.m4: New file.
1322         * gnulib/import/m4/inet_ntop.m4: New file.
1323         * gnulib/import/m4/netinet_in_h.m4: New file.
1324         * gnulib/import/m4/socklen.m4: New file.
1325         * gnulib/import/m4/sockpfaf.m4: New file.
1326         * gnulib/import/m4/stdalign.m4: New file.
1327         * gnulib/import/m4/sys_uio_h.m4: New file.
1328         * gnulib/import/netinet_in.in.h: New file.
1329         * gnulib/import/stdalign.in.h: New file.
1330         * gnulib/import/sys_socket.c: New file.
1331         * gnulib/import/sys_socket.in.h: New file.
1332         * gnulib/import/sys_uio.in.h: New file.
1333         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add inet_ntop
1334         module.
1335
1336 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
1337
1338         * gnulib/aclocal-m4-deps.mk: New file.
1339         * gnulib/update-gnulib.sh: Generate "aclocal-m4-deps.mk"
1340         deterministically.
1341
1342 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
1343
1344         * fbsd-tdep.c (fbsd_core_vnode_path): Use KF_PATH instead of
1345         KVE_PATH.
1346
1347 2018-09-18  Tom Tromey  <tom@tromey.com>
1348
1349         * compile/compile-object-load.c (struct
1350         link_hash_table_cleanup_data): Add constructor and destructor.
1351         Use DISABLE_COPY_AND_ASSIGN.
1352         (~link_hash_table_cleanup_data): Rename from
1353         link_hash_table_free.  Now a destructor.
1354         (copy_sections): Use gdb::unique_xmalloc_ptr.  Remove cleanups.
1355
1356 2018-09-18  Tom Tromey  <tom@tromey.com>
1357
1358         * compile/compile-object-run.c (do_module_cleanup): Use delete.
1359         * compile/compile-object-load.c (struct munmap_list): Move to
1360         header file.
1361         (munmap_list::add): Rename from munmap_list_add; rewrite.
1362         (munmap_list::~munmap_list): Rename from munmap_list_free.
1363         (munmap_listp_free_cleanup): Remove.
1364         (compile_object_load): Update.
1365         * compile/compile-object-load.h (struct munmap_list): Move from
1366         compile-object-load.c.  Rewrite.
1367
1368 2018-09-18  Alan Hayward  <alan.hayward@arm.com>
1369
1370         * aarch64-tdep.c (pass_in_v): Use register size.
1371         (aarch64_extract_return_value): Likewise.
1372         (aarch64_store_return_value): Likewise.
1373
1374 2018-09-18  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1375
1376         * utils.c (dump_core) [HAVE_SETRLIMIT]: Cast RLIM_INFINITY to
1377         rlim_t.
1378
1379 2018-09-17  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1380
1381         * python/lib/gdb/command/frame_filters.py (EnableFrameFilter):
1382         Fix short help line.
1383
1384 2018-09-17  Tom Tromey  <tom@tromey.com>
1385
1386         PR python/20445:
1387         * configure: Rebuild.
1388         * configure.ac: Conditionally use -DNDEBUG for Python.
1389
1390 2018-09-17  Tom Tromey  <tom@tromey.com>
1391
1392         * configure: Rebuild.
1393         * configure.ac: Use gmp as a library dependency when checking for
1394         mpfr.
1395
1396 2018-09-17  Pedro Alves  <palves@redhat.com>
1397
1398         * python/py-inferior.c (find_inferior_object): Delete.
1399
1400 2018-09-17  Simon Marchi  <simon.marchi@ericsson.com>
1401
1402         * compile/compile-cplus-types.c
1403         (compile_cplus_instance::enter_scope): Don't use new_scope after
1404         std::move.
1405
1406 2018-09-17  Tom Tromey  <tom@tromey.com>
1407
1408         * common/pathstuff.c (get_standard_cache_dir): Use
1409         ~/Library/Caches on macOS.
1410         * common/pathstuff.h (get_standard_cache_dir): Update comment.
1411
1412 2018-09-17  Simon Marchi  <simon.marchi@polymtl.ca>
1413
1414         PR python/23669
1415         * breakpoint.c (commands_cmd_element): New.
1416         (_initialize_breakpoint): Assign commands_cmd_element.
1417         * breakpoint.h (commands_cmd_element): New.
1418         * cli/cli-script.c (while_cmd_element, if_command,
1419         define_cmd_element): New.
1420         (command_name_equals): Remove.
1421         (process_next_line): Compare commands by pointer, not by name.
1422         (_initialize_cli_script): Assign the various cmd_list_element
1423         variables.
1424         * compile/compile.c (compile_cmd_element): New.
1425         (_initialize_compile): Assign compile_cmd_element.
1426         * compile/compile.h (compile_cmd_element): New.
1427         * guile/guile.c (guile_cmd_element): New.
1428         (install_gdb_commands): Assign guile_cmd_element.
1429         * guile/guile.h (guile_cmd_element): New.
1430         * python/python.c (python_cmd_element): New.
1431         (_initialize_python): Assign python_cmd_element.
1432         * python/python.h (python_cmd_element): New.
1433         * tracepoint.c (while_stepping_cmd_element): New.
1434         (_initialize_tracepoint): Assign while_stepping_cmd_element.
1435         * tracepoint.h (while_stepping_cmd_element): New.
1436
1437 2018-09-17  Tom Tromey  <tom@tromey.com>
1438
1439         * infrun.c (save_infcall_suspend_state): Return
1440         infcall_suspend_state_up.
1441         (save_infcall_control_state): Return infcall_control_state_up.
1442         * inferior.h (save_infcall_suspend_state)
1443         (save_infcall_control_state): Declare later.  Return unique
1444         pointers.
1445
1446 2018-09-17  Tom Tromey  <tom@tromey.com>
1447
1448         * infrun.c (struct stop_context): Declare constructor,
1449         destructor, "changed" method.
1450         (stop_context::stop_context): Rename from save_stop_context.
1451         (stop_context::~stop_context): Rename from
1452         release_stop_context_cleanup.
1453         (normal_stop): Update.
1454         (stop_context::changed): Rename from stop_context_changed.  Return
1455         bool.
1456
1457 2018-09-17  Tom Tromey  <tom@tromey.com>
1458
1459         * inferior.h (struct infcall_suspend_state_deleter): New.
1460         (infcall_suspend_state_up): New typedef.
1461         (struct infcall_control_state_deleter): New.
1462         (infcall_control_state_up): New typedef.
1463         (make_cleanup_restore_infcall_suspend_state)
1464         (make_cleanup_restore_infcall_control_state): Don't declare.
1465         * infcall.c (call_function_by_hand_dummy): Update.
1466         * infrun.c (do_restore_infcall_suspend_state_cleanup)
1467         (make_cleanup_restore_infcall_suspend_state): Remove.
1468         (do_restore_infcall_control_state_cleanup)
1469         (make_cleanup_restore_infcall_control_state): Remove.
1470
1471 2018-09-17  Tom Tromey  <tom@tromey.com>
1472
1473         * gdbthread.h (struct thread_control_state): Add initializer.
1474         (class thread_info) <control>: Remove initializer.
1475         * inferior.h (struct inferior_control_state): Add initializer.
1476         (class inferior) <control>: Remove initializer.
1477         (exit_inferior_1): Update.
1478         * infrun.c (struct infcall_control_state): Add constructors.
1479         (save_infcall_control_state): Use new.
1480         (restore_infcall_control_state, discard_infcall_control_state):
1481         Use delete.
1482
1483 2018-09-17  Tom Tromey  <tom@tromey.com>
1484
1485         * infrun.c (struct infcall_suspend_state) <registers>: Now a
1486         unique_ptr.
1487         <siginfo_data>: Now a unique_xmalloc_ptr.
1488         (save_infcall_suspend_state, restore_infcall_suspend_state)
1489         (discard_infcall_suspend_state)
1490         (get_infcall_suspend_state_regcache): Update.
1491
1492 2018-09-17  Tom Tromey  <tom@tromey.com>
1493
1494         * gdbthread.h (struct thread_suspend_state): Add initializers.
1495         (class thread_info) <suspend>: Remove initializer.
1496         * infrun.c (struct infcall_suspend_state): Add initializers.
1497         (save_infcall_suspend_state): Use new.
1498         (discard_infcall_suspend_state): Use delete.
1499
1500 2018-09-16  Tom Tromey  <tom@tromey.com>
1501
1502         * python/python-internal.h (CPYCHECKER_STEALS_REFERENCE_TO_ARG):
1503         Remove.
1504         * python/py-varobj.c (py_varobj_iter_ctor): Change pyiter to
1505         rvalue reference.  Remove CPYCHECKER_STEALS_REFERENCE_TO_ARG.
1506         (py_varobj_iter_new): Likewise.
1507         (py_varobj_get_iterator): Use gdbpy_ref.
1508
1509 2018-09-16  Tom Tromey  <tom@tromey.com>
1510
1511         * python/py-threadevent.c (py_get_event_thread): Simplify.
1512         * python/py-inferior.c (infpy_thread_from_thread_handle):
1513         Return immediately after calling thread_to_thread_object.  Use
1514         Py_RETURN_NONE.
1515         (thread_to_thread_object): Set the exception on a NULL return.
1516
1517 2018-09-16  Simon Marchi  <simon.marchi@polymtl.ca>
1518
1519         * Makefile.in (LIBGDB_OBS): Sort COMMON_OBS.
1520
1521 2018-09-16  Tom Tromey  <tom@tromey.com>
1522
1523         * python/python-internal.h (CPYCHECKER_RETURNS_BORROWED_REF):
1524         Remove.
1525
1526 2018-09-16  Tom Tromey  <tom@tromey.com>
1527
1528         * python/python-internal.h (thread_to_thread_object): Change
1529         return type.
1530         * python/py-inferior.c (thread_to_thread_object): Return a new
1531         reference.
1532         (infpy_thread_from_thread_handle): Update.
1533         * python/py-infthread.c (gdbpy_selected_thread): Update.
1534         * python/py-stopevent.c (create_stop_event_object): Update.
1535         * python/py-threadevent.c (py_get_event_thread): Return a new
1536         reference.
1537         (py_get_event_thread): Update.
1538         * python/py-event.h (py_get_event_thread): Change return type.
1539         * python/py-continueevent.c (create_continue_event_object):
1540         Update.
1541
1542 2018-09-16  Tom Tromey  <tom@tromey.com>
1543
1544         * python/py-progspace.c (pspy_get_objfiles): Update.
1545         * python/python-internal.h (objfile_to_objfile_object): Change
1546         return type.
1547         * python/py-newobjfileevent.c (create_new_objfile_event_object):
1548         Update.
1549         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers):
1550         Update.
1551         * python/python.c (gdbpy_get_current_objfile): Update.
1552         (gdbpy_objfiles): Update.
1553         * python/py-objfile.c (objfpy_get_owner, gdbpy_lookup_objfile):
1554         Update.
1555         (objfile_to_objfile_object): Return a new reference.
1556         * python/py-symtab.c (stpy_get_objfile): Update.
1557         * python/py-prettyprint.c (find_pretty_printer_from_objfiles):
1558         Update.
1559
1560 2018-09-16  Tom Tromey  <tom@tromey.com>
1561
1562         * python/py-inferior.c (infpy_get_progspace): Update.
1563         * python/python-internal.h (pspace_to_pspace_object): Change
1564         return type.
1565         * python/py-newobjfileevent.c
1566         (create_clear_objfiles_event_object): Update.
1567         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers):
1568         Update.
1569         * python/python.c (gdbpy_get_current_progspace): Update.
1570         (gdbpy_progspaces): Update.
1571         * python/py-progspace.c (pspace_to_pspace_object): Return a new
1572         reference.
1573         * python/py-objfile.c (objfpy_get_progspace): Update.
1574         * python/py-prettyprint.c (find_pretty_printer_from_progspace):
1575         Update.
1576
1577 2018-09-16  Tom Tromey  <tom@tromey.com>
1578
1579         * python/lib/gdb/__init__.py (current_progspace, objfiles)
1580         (solib_name, block_for_pc, find_pc_line): New functions.
1581         (execute_unwinders): Update.
1582         * python/py-block.c (gdbpy_block_for_pc): Remove.
1583         * python/py-inferior.c (infpy_get_progspace): New function.
1584         (inferior_object_getset) <progspace>: Add.
1585         * python/py-progspace.c (pspy_objfiles): Rewrite.
1586         (pspy_solib_name, pspy_block_for_pc)
1587         (pspy_find_pc_line, pspy_is_valid): New functions.
1588         (progspace_object_methods): Add entries for solib_name,
1589         block_for_pc, find_pc_line, is_valid.
1590         * python/python-internal.h (gdbpy_block_for_pc)
1591         (build_objfiles_list): Don't declare.
1592         * python/python.c: Don't include solib.h.
1593         (gdbpy_solib_name, gdbpy_find_pc_line)
1594         (gdbpy_get_current_progspace, build_objfiles_list)
1595         (gdbpy_objfiles): Remove.
1596         (GdbMethods) <current_progspace, objfiles, block_for_pc,
1597         solib_name, find_pc_line>: Remove entries.
1598
1599 2018-09-16  Tom Tromey  <tom@tromey.com>
1600
1601         * top.c (new_ui_command): Use GNU style for metasyntactic
1602         variables.
1603         * breakpoint.c (stopat_command): Use GNU style for metasyntactic
1604         variables.
1605         * maint.c (maintenance_translate_address): Remove "<>" around
1606         text.
1607         * interps.c (interpreter_exec_cmd): Use GNU style for
1608         metasyntactic variables.
1609         * nto-procfs.c (nto_procfs_target_info): Use GNU style for
1610         metasyntactic variables.
1611         * tracepoint.c (tfind_range_command): Use GNU style for
1612         metasyntactic variables.
1613         (tfind_outside_command): Likewise.
1614         (_initialize_tracepoint): Likewise.
1615         * remote.c (extended_remote_target::create_inferior): Use GNU
1616         style for metasyntactic variables.
1617         * sparc64-tdep.c (adi_examine_command): Use GNU style for
1618         metasyntactic variables.
1619         (adi_assign_command): Likewise.
1620
1621 2018-09-16  Tom Tromey  <tom@tromey.com>
1622
1623         * disasm.c (show_disassembler_options_sfunc): Use GNU style for
1624         metasyntactic variables.  Print message if no disassembler options
1625         are available.
1626
1627 2018-09-15  Tom Tromey  <tom@tromey.com>
1628
1629         * infcmd.c (get_inferior_args): Return const char *.
1630         * inferior.h (get_inferior_args): Return type now const.
1631         * linux-tdep.c (linux_fill_prpsinfo): Update.
1632         * procfs.c (procfs_target::make_corefile_notes): Update.
1633
1634 2018-09-07  Tom Tromey  <tom@tromey.com>
1635
1636         * python/python.c (execute_gdb_command): Call bpstat_do_actions
1637         inside the TRY.
1638
1639 2018-09-14  Sandra Loosemore  <sandra@codesourcery.com>
1640
1641         * nios2-tdep.c (nios2_type_align): New.
1642         (nios2_gdb_arch_init): Install type_align hook.
1643
1644 2018-09-10  Andrew Burgess  <andrew.burgess@embecosm.com>
1645
1646         * eval.c (fake_method::fake_method): Call xzalloc directly for a
1647         type that is neither object file owned, nor gdbarch owned.
1648         * gdbtypes.c (get_type_gdbarch): Add an assert that returned
1649         gdbarch is non-NULL.
1650         (alloc_type_instance): Allocate non-objfile owned types on the
1651         gdbarch obstack.
1652         (copy_type_recursive): Allocate TYPE_FIELDS and TYPE_RANGE_DATA
1653         using TYPE_ALLOC to ensure memory is allocated on the correct
1654         obstack.
1655         * gdbtypes.h (TYPE_ALLOC): Allocate space on either the objfile
1656         obstack, or the gdbarch obstack.
1657         (TYPE_ZALLOC): Rewrite using TYPE_ALLOC.
1658
1659 2018-09-14  Tom Tromey  <tom@tromey.com>
1660
1661         * infcall.c (call_function_by_hand_dummy): Remove unnecessary
1662         block.
1663
1664 2018-09-14  Tom Tromey  <tom@tromey.com>
1665
1666         * nat/fork-inferior.c (get_startup_shell): Remove "static".
1667
1668 2018-09-13  Tom Tromey  <tom@tromey.com>
1669
1670         * python/py-inferior.c (infpy_thread_from_thread_handle): Now
1671         static.
1672
1673 2018-09-13  Tom Tromey  <tom@tromey.com>
1674
1675         * exec.c (try_open_exec_file): Use std::string.
1676
1677 2018-09-13  Tom Tromey  <tom@tromey.com>
1678
1679         * utils.h (gdb_bfd_errmsg): Return std::string.
1680         * exec.c (exec_file_attach): Update.
1681         * compile/compile-object-load.c (compile_object_load): Update.
1682         * utils.c (gdb_bfd_errmsg): Return std::string.
1683
1684 2018-09-13  Tom Tromey  <tom@tromey.com>
1685
1686         * procfs.c (struct procinfo_deleter): New.
1687         (procinfo_up): New typedef.
1688         (do_destroy_procinfo_cleanup): Remove.
1689         (procfs_target::info_proc): Use procinfo_up.  Remove cleanups.
1690
1691 2018-09-13  Tom Tromey  <tom@tromey.com>
1692
1693         * source.c (add_path): Use gdb::unique_xmalloc_ptr.
1694
1695 2018-09-13  Simon Marchi  <simon.marchi@ericsson.com>
1696 2018-09-13  Tom Tromey  <tom@tromey.com>
1697
1698         * python/py-progspace.c (PSPY_REQUIRE_VALID): New macro.
1699         (pspy_get_objfiles): New function.
1700         (progspace_object_methods): New.
1701         (pspace_object_type): Add tp_methods callback.
1702         * python/python-internal.h (build_objfiles_list): New
1703         declaration.
1704         * python/python.c (build_objfiles_list): New function.
1705         (gdbpy_objfiles): Implement using build_objfiles_list.
1706         * NEWS: Mention the Progspace.objfiles method.
1707
1708 2018-09-13  Simon Marchi  <simon.marchi@ericsson.com>
1709
1710         * python/py-inferior.c (infpy_get_progspace): New function.
1711         (inferior_object_getset): Add progspace property.
1712         * NEWS: Mention the new property.
1713
1714 2018-09-13  Tom Tromey  <tom@tromey.com>
1715
1716         PR rust/23650:
1717         * rust-lang.c (rust_evaluate_subexp): Use field name, not "foo".
1718
1719 2018-09-13  Tom Tromey  <tom@tromey.com>
1720
1721         PR rust/23626:
1722         * rust-lang.c (rust_enum_variant): Now static.
1723         (rust_empty_enum_p): New function.
1724         (rust_print_enum, rust_evaluate_subexp, rust_print_struct_def):
1725         Handle empty enum.
1726
1727 2018-09-13  Simon Marchi  <simon.marchi@ericsson.com>
1728
1729         * python/py-inferior.c (infpy_repr): New.
1730         (inferior_object_type): Register infpy_repr.
1731         * python/py-objfile.c (objfpy_repr): New.
1732         (objfile_object_type): Register objfpy_repr.
1733
1734 2018-09-12  John Baldwin  <jhb@FreeBSD.org>
1735
1736         * fbsd-nat.c (fbsd_nat_target::info_proc): Remove unused variable.
1737
1738 2018-09-12  John Baldwin  <jhb@FreeBSD.org>
1739
1740         * aarch64-fbsd-tdep.h (AARCH64_FBSD_SIZEOF_GREGSET): Fix comment
1741         typo.
1742
1743 2018-09-12  Sergio Durigan Junior  <sergiodj@redhat.com>
1744
1745         * common/common-utils.c: Don't include '<sys/stat.h>'.
1746         (is_regular_file): Move to...
1747         * common/filestuff.c (is_regular_file): ... here.
1748         * common/common-utils.h (is_regular_file): Move to...
1749         * common/filestuff.h (is_regular_file): ... here.
1750
1751 2018-09-12  Simon Marchi  <simon.marchi@ericsson.com>
1752
1753         * skip.c (debug_skip): New variable.
1754         (skiplist_entry::do_skip_file_p): Add debug output.
1755         (skiplist_entry::do_skip_gfile_p): Likewise.
1756         (skiplist_entry::skip_function_p): Likewise.
1757         (_initialize_step_skip): Create debug command.
1758         * NEWS: Mention set/show debug skip.
1759
1760 2018-09-11  Xavier Roirand  <roirand@adacore.com>
1761
1762         * darwin-nat.c (should_disable_startup_with_shell):
1763         New function.
1764         (darwin_nat_target::create_inferior): Add call.
1765
1766 2018-09-11  Xavier Roirand  <roirand@adacore.com>
1767
1768         * darwin-nat.h (struct darwin_thread_info) <gdb_port,
1769         inf_port, msg_state>: Initialize.
1770         (struct darwin_thread_info) <signaled, single_step>: Change
1771         type and initialize.
1772         (struct darwin_thread_info) <event>: Initialize.
1773
1774 2018-09-10  Sergio Durigan Junior  <sergiodj@redhat.com>
1775
1776         PR gdb/23555
1777         PR gdb/23558
1778         * gnulib/import/m4/getcwd-path-max.m4: Add cross-compilation
1779         guesses.
1780
1781 2018-09-10  Sergio Durigan Junior  <sergiodj@redhat.com>
1782
1783         Revert:
1784         2018-08-29  Sergio Durigan Junior  <sergiodj@redhat.com>
1785
1786         PR gdb/23555
1787         PR gdb/23558
1788         * gnulib/aclocal.m4: Regenerate.
1789         * gnulib/config.in: Regenerate.
1790         * gnulib/configure: Regenerate.
1791         * gnulib/import/Makefile.am: Update.
1792         * gnulib/import/Makefile.in: Update.
1793         * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
1794         * gnulib/import/_Noreturn.h: ... this.
1795         * gnulib/import/alloca.in.h: Update.
1796         * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
1797         * gnulib/import/arg-nonnull.h: ... this.
1798         * gnulib/import/assure.h: Update.
1799         * gnulib/import/at-func.c: Update.
1800         * gnulib/import/basename-lgpl.c: Update.
1801         * gnulib/import/extra/snippet/c++defs.h: Rename to...
1802         * gnulib/import/c++defs.h: ... this.
1803         * gnulib/import/canonicalize-lgpl.c: Update.
1804         * gnulib/import/cdefs.h: Update.
1805         * gnulib/import/chdir-long.c: Update.
1806         * gnulib/import/chdir-long.h: Update.
1807         * gnulib/import/cloexec.c: Update.
1808         * gnulib/import/cloexec.h: Update.
1809         * gnulib/import/close.c: Update.
1810         * gnulib/import/closedir.c: Update.
1811         * gnulib/import/config.charset: Update.
1812         * gnulib/import/dirent-private.h: Update.
1813         * gnulib/import/dirent.in.h: Update.
1814         * gnulib/import/dirfd.c: Update.
1815         * gnulib/import/dirname-lgpl.c: Update.
1816         * gnulib/import/dirname.h: Update.
1817         * gnulib/import/dosname.h: Update.
1818         * gnulib/import/dup-safer-flag.c: Update.
1819         * gnulib/import/dup-safer.c: Update.
1820         * gnulib/import/dup.c: Update.
1821         * gnulib/import/dup2.c: Update.
1822         * gnulib/import/errno.in.h: Update.
1823         * gnulib/import/error.c: Update.
1824         * gnulib/import/error.h: Update.
1825         * gnulib/import/exitfail.c: Update.
1826         * gnulib/import/exitfail.h: Update.
1827         * gnulib/import/extra/update-copyright: Update.
1828         * gnulib/import/fchdir.c: Update.
1829         * gnulib/import/fcntl.c: Update.
1830         * gnulib/import/fcntl.in.h: Update.
1831         * gnulib/import/fd-hook.c: Update.
1832         * gnulib/import/fd-hook.h: Update.
1833         * gnulib/import/fd-safer-flag.c: Update.
1834         * gnulib/import/fd-safer.c: Update.
1835         * gnulib/import/fdopendir.c: Update.
1836         * gnulib/import/filename.h: Update.
1837         * gnulib/import/filenamecat-lgpl.c: Update.
1838         * gnulib/import/filenamecat.h: Update.
1839         * gnulib/import/flexmember.h: Update.
1840         * gnulib/import/float+.h: Update.
1841         * gnulib/import/float.c: Update.
1842         * gnulib/import/float.in.h: Update.
1843         * gnulib/import/fnmatch.c: Update.
1844         * gnulib/import/fnmatch.in.h: Update.
1845         * gnulib/import/fnmatch_loop.c: Update.
1846         * gnulib/import/fpucw.h: Update.
1847         * gnulib/import/frexp.c: Update.
1848         * gnulib/import/frexpl.c: Update.
1849         * gnulib/import/fstat.c: Update.
1850         * gnulib/import/fstatat.c: Update.
1851         * gnulib/import/getcwd-lgpl.c: Update.
1852         * gnulib/import/getcwd.c: Update.
1853         * gnulib/import/getdtablesize.c: Update.
1854         * gnulib/import/getlogin_r.c: Update.
1855         * gnulib/import/getprogname.c: Update.
1856         * gnulib/import/getprogname.h: Update.
1857         * gnulib/import/gettext.h: Update.
1858         * gnulib/import/gettimeofday.c: Update.
1859         * gnulib/import/glob-libc.h: Update.
1860         * gnulib/import/glob.c: Update.
1861         * gnulib/import/glob.in.h: Update.
1862         * gnulib/import/glob_internal.h: Update.
1863         * gnulib/import/glob_pattern_p.c: Update.
1864         * gnulib/import/globfree.c: Update.
1865         * gnulib/import/hard-locale.c: Update.
1866         * gnulib/import/hard-locale.h: Update.
1867         * gnulib/import/intprops.h: Update.
1868         * gnulib/import/inttypes.in.h: Update.
1869         * gnulib/import/isnan.c: Update.
1870         * gnulib/import/isnand-nolibm.h: Update.
1871         * gnulib/import/isnand.c: Update.
1872         * gnulib/import/isnanl-nolibm.h: Update.
1873         * gnulib/import/isnanl.c: Update.
1874         * gnulib/import/itold.c: Update.
1875         * gnulib/import/libc-config.h: Update.
1876         * gnulib/import/limits.in.h: Update.
1877         * gnulib/import/localcharset.c: Update.
1878         * gnulib/import/localcharset.h: Update.
1879         * gnulib/import/localtime-buffer.c: Update.
1880         * gnulib/import/localtime-buffer.h: Update.
1881         * gnulib/import/lstat.c: Update.
1882         * gnulib/import/m4/00gnulib.m4: Update.
1883         * gnulib/import/m4/__inline.m4: Update.
1884         * gnulib/import/m4/absolute-header.m4: Update.
1885         * gnulib/import/m4/alloca.m4: Update.
1886         * gnulib/import/m4/builtin-expect.m4: Update.
1887         * gnulib/import/m4/canonicalize.m4: Update.
1888         * gnulib/import/m4/chdir-long.m4: Update.
1889         * gnulib/import/m4/close.m4: Update.
1890         * gnulib/import/m4/closedir.m4: Update.
1891         * gnulib/import/m4/configmake.m4: Update.
1892         * gnulib/import/m4/d-ino.m4: Update.
1893         * gnulib/import/m4/d-type.m4: Update.
1894         * gnulib/import/m4/dirent_h.m4: Update.
1895         * gnulib/import/m4/dirfd.m4: Update.
1896         * gnulib/import/m4/dirname.m4: Update.
1897         * gnulib/import/m4/double-slash-root.m4: Update.
1898         * gnulib/import/m4/dup.m4: Update.
1899         * gnulib/import/m4/dup2.m4: Update.
1900         * gnulib/import/m4/eealloc.m4: Update.
1901         * gnulib/import/m4/environ.m4: Update.
1902         * gnulib/import/m4/errno_h.m4: Update.
1903         * gnulib/import/m4/error.m4: Update.
1904         * gnulib/import/m4/exponentd.m4: Update.
1905         * gnulib/import/m4/exponentl.m4: Update.
1906         * gnulib/import/m4/extensions.m4: Update.
1907         * gnulib/import/m4/extern-inline.m4: Update.
1908         * gnulib/import/m4/fchdir.m4: Update.
1909         * gnulib/import/m4/fcntl-o.m4: Update.
1910         * gnulib/import/m4/fcntl.m4: Update.
1911         * gnulib/import/m4/fcntl_h.m4: Update.
1912         * gnulib/import/m4/fdopendir.m4: Update.
1913         * gnulib/import/m4/filenamecat.m4: Update.
1914         * gnulib/import/m4/flexmember.m4: Update.
1915         * gnulib/import/m4/float_h.m4: Update.
1916         * gnulib/import/m4/fnmatch.m4: Update.
1917         * gnulib/import/m4/fnmatch_h.m4: Update.
1918         * gnulib/import/m4/fpieee.m4: Update.
1919         * gnulib/import/m4/frexp.m4: Update.
1920         * gnulib/import/m4/frexpl.m4: Update.
1921         * gnulib/import/m4/fstat.m4: Update.
1922         * gnulib/import/m4/fstatat.m4: Update.
1923         * gnulib/import/m4/getcwd-abort-bug.m4: Update.
1924         * gnulib/import/m4/getcwd-path-max.m4: Update.
1925         * gnulib/import/m4/getcwd.m4: Update.
1926         * gnulib/import/m4/getdtablesize.m4: Update.
1927         * gnulib/import/m4/getlogin.m4: Update.
1928         * gnulib/import/m4/getlogin_r.m4: Update.
1929         * gnulib/import/m4/getpagesize.m4: Update.
1930         * gnulib/import/m4/getprogname.m4: Update.
1931         * gnulib/import/m4/gettimeofday.m4: Update.
1932         * gnulib/import/m4/glibc21.m4: Update.
1933         * gnulib/import/m4/glob.m4: Update.
1934         * gnulib/import/m4/glob_h.m4: Update.
1935         * gnulib/import/m4/gnulib-cache.m4: Update.
1936         * gnulib/import/m4/gnulib-common.m4: Update.
1937         * gnulib/import/m4/gnulib-comp.m4: Update.
1938         * gnulib/import/m4/gnulib-tool.m4: Update.
1939         * gnulib/import/m4/hard-locale.m4: Update.
1940         * gnulib/import/m4/include_next.m4: Update.
1941         * gnulib/import/m4/inttypes-pri.m4: Update.
1942         * gnulib/import/m4/inttypes.m4: Update.
1943         * gnulib/import/m4/isnand.m4: Update.
1944         * gnulib/import/m4/isnanl.m4: Update.
1945         * gnulib/import/m4/largefile.m4: Update.
1946         * gnulib/import/m4/limits-h.m4: Update.
1947         * gnulib/import/m4/localcharset.m4: Update.
1948         * gnulib/import/m4/locale-fr.m4: Update.
1949         * gnulib/import/m4/locale-ja.m4: Update.
1950         * gnulib/import/m4/locale-zh.m4: Update.
1951         * gnulib/import/m4/localtime-buffer.m4: Update.
1952         * gnulib/import/m4/longlong.m4: Update.
1953         * gnulib/import/m4/lstat.m4: Update.
1954         * gnulib/import/m4/malloc.m4: Update.
1955         * gnulib/import/m4/malloca.m4: Update.
1956         * gnulib/import/m4/math_h.m4: Update.
1957         * gnulib/import/m4/mbrtowc.m4: Update.
1958         * gnulib/import/m4/mbsinit.m4: Update.
1959         * gnulib/import/m4/mbsrtowcs.m4: Update.
1960         * gnulib/import/m4/mbstate_t.m4: Update.
1961         * gnulib/import/m4/memchr.m4: Update.
1962         * gnulib/import/m4/memmem.m4: Update.
1963         * gnulib/import/m4/mempcpy.m4: Update.
1964         * gnulib/import/m4/memrchr.m4: Update.
1965         * gnulib/import/m4/mkdir.m4: Update.
1966         * gnulib/import/m4/mkstemp.m4: Update.
1967         * gnulib/import/m4/mmap-anon.m4: Update.
1968         * gnulib/import/m4/mode_t.m4: Update.
1969         * gnulib/import/m4/msvc-inval.m4: Update.
1970         * gnulib/import/m4/msvc-nothrow.m4: Update.
1971         * gnulib/import/m4/multiarch.m4: Update.
1972         * gnulib/import/m4/nocrash.m4: Update.
1973         * gnulib/import/m4/off_t.m4: Update.
1974         * gnulib/import/m4/onceonly.m4: Update.
1975         * gnulib/import/m4/open-cloexec.m4: Update.
1976         * gnulib/import/m4/open.m4: Update.
1977         * gnulib/import/m4/openat.m4: Update.
1978         * gnulib/import/m4/opendir.m4: Update.
1979         * gnulib/import/m4/pathmax.m4: Update.
1980         * gnulib/import/m4/rawmemchr.m4: Update.
1981         * gnulib/import/m4/readdir.m4: Update.
1982         * gnulib/import/m4/readlink.m4: Update.
1983         * gnulib/import/m4/realloc.m4: Update.
1984         * gnulib/import/m4/rename.m4: Update.
1985         * gnulib/import/m4/rewinddir.m4: Update.
1986         * gnulib/import/m4/rmdir.m4: Update.
1987         * gnulib/import/m4/save-cwd.m4: Update.
1988         * gnulib/import/m4/secure_getenv.m4: Update.
1989         * gnulib/import/m4/setenv.m4: Update.
1990         * gnulib/import/m4/signal_h.m4: Update.
1991         * gnulib/import/m4/ssize_t.m4: Update.
1992         * gnulib/import/m4/stat-time.m4: Update.
1993         * gnulib/import/m4/stat.m4: Update.
1994         * gnulib/import/m4/std-gnu11.m4: Update.
1995         * gnulib/import/m4/stdbool.m4: Update.
1996         * gnulib/import/m4/stddef_h.m4: Update.
1997         * gnulib/import/m4/stdint.m4: Update.
1998         * gnulib/import/m4/stdio_h.m4: Update.
1999         * gnulib/import/m4/stdlib_h.m4: Update.
2000         * gnulib/import/m4/strchrnul.m4: Update.
2001         * gnulib/import/m4/strdup.m4: Update.
2002         * gnulib/import/m4/strerror.m4: Update.
2003         * gnulib/import/m4/string_h.m4: Update.
2004         * gnulib/import/m4/strstr.m4: Update.
2005         * gnulib/import/m4/strtok_r.m4: Update.
2006         * gnulib/import/m4/sys_socket_h.m4: Update.
2007         * gnulib/import/m4/sys_stat_h.m4: Update.
2008         * gnulib/import/m4/sys_time_h.m4: Update.
2009         * gnulib/import/m4/sys_types_h.m4: Update.
2010         * gnulib/import/m4/tempname.m4: Update.
2011         * gnulib/import/m4/time_h.m4: Update.
2012         * gnulib/import/m4/unistd-safer.m4: Update.
2013         * gnulib/import/m4/unistd_h.m4: Update.
2014         * gnulib/import/m4/warn-on-use.m4: Update.
2015         * gnulib/import/m4/wchar_h.m4: Update.
2016         * gnulib/import/m4/wchar_t.m4: Update.
2017         * gnulib/import/m4/wctype_h.m4: Update.
2018         * gnulib/import/m4/wint_t.m4: Update.
2019         * gnulib/import/malloc.c: Update.
2020         * gnulib/import/malloc/scratch_buffer.h: Update.
2021         * gnulib/import/malloc/scratch_buffer_grow.c: Update.
2022         * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
2023         * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
2024         * gnulib/import/malloca.c: Update.
2025         * gnulib/import/malloca.h: Update.
2026         * gnulib/import/malloca.valgrind: Update.
2027         * gnulib/import/math.in.h: Update.
2028         * gnulib/import/mbrtowc.c: Update.
2029         * gnulib/import/mbsinit.c: Update.
2030         * gnulib/import/mbsrtowcs-impl.h: Update.
2031         * gnulib/import/mbsrtowcs-state.c: Update.
2032         * gnulib/import/mbsrtowcs.c: Update.
2033         * gnulib/import/memchr.c: Update.
2034         * gnulib/import/memmem.c: Update.
2035         * gnulib/import/mempcpy.c: Update.
2036         * gnulib/import/memrchr.c: Update.
2037         * gnulib/import/mkdir.c: Update.
2038         * gnulib/import/mkstemp.c: Update.
2039         * gnulib/import/msvc-inval.c: Update.
2040         * gnulib/import/msvc-inval.h: Update.
2041         * gnulib/import/msvc-nothrow.c: Update.
2042         * gnulib/import/msvc-nothrow.h: Update.
2043         * gnulib/import/open.c: Update.
2044         * gnulib/import/openat-die.c: Update.
2045         * gnulib/import/openat-priv.h: Update.
2046         * gnulib/import/openat-proc.c: Update.
2047         * gnulib/import/openat.c: Update.
2048         * gnulib/import/openat.h: Update.
2049         * gnulib/import/opendir.c: Update.
2050         * gnulib/import/pathmax.h: Update.
2051         * gnulib/import/pipe-safer.c: Update.
2052         * gnulib/import/rawmemchr.c: Update.
2053         * gnulib/import/readdir.c: Update.
2054         * gnulib/import/readlink.c: Update.
2055         * gnulib/import/realloc.c: Update.
2056         * gnulib/import/ref-add.sin: Update.
2057         * gnulib/import/ref-del.sin: Update.
2058         * gnulib/import/rename.c: Update.
2059         * gnulib/import/rewinddir.c: Update.
2060         * gnulib/import/rmdir.c: Update.
2061         * gnulib/import/same-inode.h: Update.
2062         * gnulib/import/save-cwd.c: Update.
2063         * gnulib/import/save-cwd.h: Update.
2064         * gnulib/import/scratch_buffer.h: Update.
2065         * gnulib/import/secure_getenv.c: Update.
2066         * gnulib/import/setenv.c: Update.
2067         * gnulib/import/signal.in.h: Update.
2068         * gnulib/import/stat-time.c: Update.
2069         * gnulib/import/stat-time.h: Update.
2070         * gnulib/import/stat-w32.c: Update.
2071         * gnulib/import/stat-w32.h: Update.
2072         * gnulib/import/stat.c: Update.
2073         * gnulib/import/stdbool.in.h: Update.
2074         * gnulib/import/stddef.in.h: Update.
2075         * gnulib/import/stdint.in.h: Update.
2076         * gnulib/import/stdio.in.h: Update.
2077         * gnulib/import/stdlib.in.h: Update.
2078         * gnulib/import/str-two-way.h: Update.
2079         * gnulib/import/strchrnul.c: Update.
2080         * gnulib/import/strdup.c: Update.
2081         * gnulib/import/streq.h: Update.
2082         * gnulib/import/strerror-override.c: Update.
2083         * gnulib/import/strerror-override.h: Update.
2084         * gnulib/import/strerror.c: Update.
2085         * gnulib/import/string.in.h: Update.
2086         * gnulib/import/stripslash.c: Update.
2087         * gnulib/import/strnlen1.c: Update.
2088         * gnulib/import/strnlen1.h: Update.
2089         * gnulib/import/strstr.c: Update.
2090         * gnulib/import/strtok_r.c: Update.
2091         * gnulib/import/sys_stat.in.h: Update.
2092         * gnulib/import/sys_time.in.h: Update.
2093         * gnulib/import/sys_types.in.h: Update.
2094         * gnulib/import/tempname.c: Update.
2095         * gnulib/import/tempname.h: Update.
2096         * gnulib/import/time.in.h: Update.
2097         * gnulib/import/unistd--.h: Update.
2098         * gnulib/import/unistd-safer.h: Update.
2099         * gnulib/import/unistd.in.h: Update.
2100         * gnulib/import/unsetenv.c: Update.
2101         * gnulib/import/verify.h: Update.
2102         * gnulib/import/extra/snippet/warn-on-use.h: Update.
2103         * gnulib/import/wchar.in.h: Update.
2104         * gnulib/import/wctype.in.h: Update.
2105         * gnulib/import/xalloc-oversized.h: Update.
2106         * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
2107         "53e2c179f26a890fa6685af4b6c1397ee370433b".
2108
2109 2018-09-10  Simon Marchi  <simon.marchi@ericsson.com>
2110
2111         * record-btrace.c (get_thread_current_frame): Remove
2112         old_inferior_ptid.
2113
2114 2018-09-10  Jerome Guitton  <guitton@adacore.com>
2115
2116         * ada-lang.c (ada_value_struct_elt): Call ada_to_fixed_type
2117         with check_tag to 1 if and only if the type is tagged and the
2118         component being searched cannot been found in the current
2119         view. Otherwise, always call ada_to_fixed_type with
2120         check_tag to 0.
2121
2122 2018-09-10  Xavier Roirand  <roirand@adacore.com>
2123
2124         * ada-lang.c (ada_is_access_to_unconstrained_array): Remove static
2125         declaration.
2126         * ada-lang.h: add ada_is_access_to_unconstrained_array prototype.
2127         * ada-varobj.c (ada_varobj_get_number_of_children,
2128         ada_varobj_describe_child, ada_value_is_changeable_p): Cleanup code.
2129
2130 2018-09-10  Xavier Roirand  <roirand@adacore.com>
2131
2132         * ada-valprint.c (ada_value_print): Use type instead of
2133         enclosing type.
2134
2135 2018-09-10  Xavier Roirand  <roirand@adacore.com>
2136
2137         * ada-lang.c (ada_value_subscript): Handle case when parameter is
2138         an array of access to unconstrained array.
2139
2140 2018-09-10  Xavier Roirand  <roirand@adacore.com>
2141
2142         * ada-lang.c (ada_is_access_to_unconstrained_array): New function.
2143         (ada_check_typedef): Use it.
2144
2145 2018-09-10  Xavier Roirand  <roirand@adacore.com>
2146
2147         * ada-varobj.c (ada_varobj_describe_struct_child)
2148         (ada_varobj_describe_child): Handle union case like struct one.
2149
2150 2018-09-10  Tom Tromey  <tom@tromey.com>
2151
2152         PR python/18380:
2153         * python/python.c (_initialize_python): Make example in "python"
2154         help work in Python 3.
2155
2156 2018-09-10  Eli Zaretskii  <eliz@gnu.org>
2157
2158         * Makefile.in (transformed_name): Use INSTALL_SCRIPT instead of
2159         INSTALL_PROGRAM to install gdb-add-index.sh.  Don't append
2160         $(EXEEXT) to the script, as it is not a program.
2161
2162 2018-09-09  Simon Marchi  <simon.marchi@ericsson.com>
2163
2164         * python/py-prettyprint.c (pretty_print_one_value): Return
2165         gdbpy_ref<>.
2166         (print_string_repr): Adjust.
2167         (apply_varobj_pretty_printer): Return gdbpy_ref<>.
2168         * python/python-internal.h (apply_varobj_pretty_printer): Return
2169         gdbpy_ref<>.
2170         * varobj.c (varobj_value_get_print_value): Adjust.
2171
2172 2018-09-08  Tom Tromey  <tom@tromey.com>
2173
2174         PR python/16047:
2175         * python/py-prettyprint.c (pretty_print_one_value): Check for
2176         to_string method.
2177
2178 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
2179
2180         * ada-lang.c (resolve_subexp): Pass correct OPLEN in call to
2181         replace_operator_with_call.
2182
2183 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
2184
2185         * ada-lang.c (ada_value_cast): Remove unnecessary parentheses.
2186
2187 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
2188
2189         * ada-typeprint.c (print_range): Print the bounds using TYPE
2190         rather than its TYPE_TARGET_TYPE.
2191
2192 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
2193
2194         * ada-lang.c (ada_to_fixed_value): Minor reformatting in
2195         call to ada_to_fixed_value_create.
2196
2197 2018-09-08  Jerome Guitton  <guitton@adacore.com>
2198
2199         * ada-lang.c (ada_decode): strip dot prefix in symbol name.
2200
2201 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
2202
2203         * ada-lang.c (ada_exception_sal): Replace gdb_assert calls
2204         by calls to error.
2205
2206 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
2207
2208         * ada-lang.c (ada_unhandled_exception_name_addr_from_raise):
2209         Move update of loop variable "fi".
2210
2211 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
2212
2213         * ada-lang.c (value_assign_to_component): In the case of
2214         big-endian targets, extract the bits of the given VAL
2215         using an src_offset of zero if container is not a scalar.
2216
2217 2018-09-06  Simon Ser  <contact@emersion.fr>
2218
2219         PR gdb/23105
2220         * fbsd-nat.c (fbsd_nat_target::xfer_partial): Add support for
2221         TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
2222         * fbsd-tdep.c (fbsd_make_note_desc): New.
2223         (fbsd_make_corefile_notes): Write NT_PROCSTAT_AUXV,
2224         NT_PROCSTAT_VMMAP and NT_PROCSTAT_PS_STRINGS notes.
2225         * target.h (enum target_object) Add FreeBSD-specific
2226         TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
2227
2228 2018-09-06  Simon Marchi  <simon.marchi@ericsson.com>
2229
2230         * compile/compile-c.h (generate_c_for_variable_locations):
2231         Change reference to pointer.
2232         * compile/compile-c-support.c (compile_program) <compute>:
2233         Likewise.
2234         * compile/compile-c-symbols.c (generate_vla_size): Likewise.
2235         (generate_c_for_for_one_variable): Likewise
2236         (generate_c_for_variable_locations): Likewise
2237         * compile/compile-c-types.c (compile_c_instance::convert_type):
2238         Likewise
2239         * compile/compile-cplus-symbols.c (convert_one_symbol):
2240         std::move the scope passed to enter_scope.
2241         * compile/compile-cplus-types.c
2242         (compile_cplus_instance::enter_scope): Make parameter
2243         rvalue-reference.
2244         (compile_cplus_instance::new_scope): Change reference to
2245         pointer.
2246         (compile_cplus_instance::convert_type): Likewise
2247         (compile_cplus_convert_typedef): std::move the scope passed to
2248         enter_scope.
2249         (compile_cplus_convert_struct_or_union): Likewise.
2250         (compile_cplus_convert_enum): Likewise.
2251         (compile_cplus_convert_namespace): Likewise.
2252         * compile/compile-cplus.h (compile_cplus_instance)
2253         <enter_scope>: Make parameter rvalue-reference.
2254         * compile/compile-internal.h (compile_instance)
2255         <get_cached_type>: Likewise
2256         * compile/compile-loc2c.c (push): Likewise
2257         (pushf): Likewise
2258         (unary): Likewise
2259         (binary): Likewise
2260         (print_label): Likewise
2261         (pushf_register_address): Likewise
2262         (pushf_register): Likewise
2263         (do_compile_dwarf_expr_to_c): Likewise
2264         (compile_dwarf_expr_to_c): Likewise
2265         (compile_dwarf_bounds_to_c): Likewise
2266         * compile/compile.c (compile_instance::get_cached_type):
2267         Likewise
2268         * compile/compile.h (compile_dwarf_expr_to_c): Likewise.
2269         (compile_dwarf_bounds_to_c): Likewise
2270         * dwarf2loc.c (locexpr_generate_c_location): Likewise.
2271         (dwarf2_compile_property_to_c): Likewise
2272         * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise
2273         * symtab.h (struct symbol_computed_ops) <generate_c_location>:
2274         Likewise
2275
2276 2018-09-06  Simon Marchi  <simon.marchi@ericsson.com>
2277
2278         * tui/tui-data.h (struct tui_win_element) <highlight>: Remove.
2279         * tui/tui-data.c (init_content_element): Don't initialize it.
2280
2281 2018-09-06  Simon Marchi  <simon.marchi@ericsson.com>
2282
2283         * tui/tui-data.h (struct tui_win_info)
2284         <detail::opaque>: Remove.
2285         * tui/tui-data.c (init_win_info): Remove assignment.
2286
2287 2018-09-05  Tom Tromey  <tom@tromey.com>
2288
2289         * warning.m4 (AM_GDB_WARNINGS): Add -Wformat when testing
2290         -Wformat-nonliteral.
2291         * target-float.c (host_float_ops<T>::to_string)
2292         (host_float_ops<T>::from_string): Use
2293         DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
2294         * configure: Rebuild.
2295
2296 2018-09-05  Simon Marchi  <simon.marchi@ericsson.com>
2297
2298         * printcmd.c (printf_c_string): Use
2299         DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
2300         (printf_wide_c_string, printf_pointer, ui_printf): Likewise.
2301
2302 2018-09-05  Tom Tromey  <tom@tromey.com>
2303
2304         * cli/cli-cmds.c (shell_escape, edit_command): Remove cast.
2305
2306 2018-09-05  Tom de Vries  <tdevries@suse.de>
2307
2308         * dwarf2loc.c (sect_variable_value): Call indirect_synthetic_pointer
2309         with resolve_abstract_p == true.
2310         (indirect_synthetic_pointer): Add resolve_abstract_p parameter,
2311         defaulting to false. Propagate resolve_abstract_p to
2312         dwarf2_fetch_die_loc_sect_off.
2313         * dwarf2loc.h (dwarf2_fetch_die_loc_sect_off): Add resolve_abstract_p
2314         parameter, defaulting to false.
2315         * dwarf2read.c (read_variable): Add variable to abstract_to_concrete.
2316         (dwarf2_fetch_die_loc_sect_off): Add and handle resolve_abstract_p
2317         parameter.
2318         * dwarf2read.h (struct die_info): Forward-declare.
2319         (die_info_ptr): New typedef.
2320         (struct dwarf2_per_objfile): Add abstract_to_concrete field.
2321
2322 2018-09-05  Joel Brobecker  <brobecker@adacore.com>
2323
2324         GDB 8.2 released.
2325
2326 2018-09-04  Sergio Durigan Junior  <sergiodj@redhat.com>
2327             Pedro Alves  <palves@redhat.com>
2328
2329         * gnulib/Makefile.in (aclocal_m4_deps): Move to
2330         "aclocal-m4-deps.mk".  Include file here.
2331         $(srcdir)/aclocal.m4: Add "configure.ac".
2332         * gnulib/aclocal-m4-deps.mk: New file.
2333         * gnulib/update-gnulib.sh: Automatically update
2334         "aclocal-m4-deps.mk".
2335
2336 2018-09-04  Tom Tromey  <tom@tromey.com>
2337
2338         * configure: Rebuild.
2339         * configure.ac: Remove multi-ice code.
2340
2341 2018-09-04  Tom Tromey  <tom@tromey.com>
2342
2343         * Makefile.in (GDB_WARN_CFLAGS_NO_DEFS): Remove.
2344         (ada-exp.o): Update.
2345
2346 2018-09-04  Tom Tromey  <tom@tromey.com>
2347
2348         * Makefile.in (printcmd.o, target-float.o): Remove.
2349         (GDB_WARN_CFLAGS_NO_FORMAT): Remove.
2350
2351 2018-09-04  Tom Tromey  <tom@tromey.com>
2352
2353         * gnulib/Makefile.in: Remove obsolete comment.
2354         * Makefile.in: Remove obsolete comment.
2355
2356 2018-09-04  Andrew Burgess  <andrew.burgess@embecosm.com>
2357
2358         * riscv-tdep.c (riscv_frame_cache): Fix ARI warning, don't end a
2359         line with '+'.
2360
2361 2018-09-03  Andrew Burgess  <andrew.burgess@embecosm.com>
2362
2363         * riscv-tdep.c: Add 'prologue-value.h' include.
2364         (struct riscv_unwind_cache): New struct.
2365         (riscv_debug_unwinder): New global.
2366         (riscv_scan_prologue): Update arguments, capture register details
2367         from prologue scan.
2368         (riscv_skip_prologue): Reformat arguments line, move end of
2369         prologue calculation into riscv_scan_prologue.
2370         (riscv_frame_cache): Update return type, create
2371         riscv_unwind_cache, scan the prologue, and fill in remaining cache
2372         details.
2373         (riscv_frame_this_id): Use frame id computed in riscv_frame_cache.
2374         (riscv_frame_prev_register): Use the trad_frame within the
2375         riscv_unwind_cache.
2376         (_initialize_riscv_tdep): Add 'set/show debug riscv unwinder'
2377         flag.
2378
2379 2018-09-03  Andrew Burgess  <andrew.burgess@embecosm.com>
2380
2381         * trad-frame.h (trad_frame_set_realreg): Declare.
2382         (trad_frame_set_addr): Declare.
2383         * trad-frame.c (trad_frame_set_realreg): Define new function.
2384         (trad_frame_set_addr): Define new function.
2385         (trad_frame_set_reg_realreg): Use new function.
2386         (trad_frame_set_reg_addr): Use new function.
2387
2388 2018-09-01  Keith Seitz  <keiths@redhat.com>
2389
2390         * compile/compile-cplus-types.c (compile_cplus_debug_output_1): Use
2391         pulongest instead of "%lld".
2392         * compile/compile-cplus-symbols.c (gcc_cplus_convert_symbol): Remove
2393         ATTRIBUTE_UNUSED.
2394
2395 2018-08-31  Tom Tromey  <tom@tromey.com>
2396
2397         * dwarf2read.c (dwarf2_add_field): Set the TYPE_LENGTH of the
2398         variant part type.
2399
2400 2018-08-31  Pedro Alves  <palves@redhat.com>
2401
2402         * gdbarch.h: Regenerate.
2403
2404 2018-08-31  Pedro Alves  <palves@redhat.com>
2405
2406         * gdbarch.sh (have_nonsteppable_watchpoint): Add comment.
2407         * target.h (Hardware watchpoint interfaces): Describe
2408         continuable/steppable/non-steppable watchpoints.
2409         * gdbarch.h, gdbarch.c: Regenerate.
2410
2411 2018-08-31  Pedro Alves  <palves@redhat.com>
2412
2413         * nto-procfs.c (nto_procfs_target::have_continuable_watchpoint):
2414         Delete.
2415         * s390-linux-nat.c
2416         (s390_linux_nat_target::have_continuable_watchpoint): Delete.
2417         * target.h (target_ops::have_continuable_watchpoint): Delete.
2418         (target_have_continuable_watchpoint): Delete.
2419         * x86-nat.h (x86_nat_target::have_continuable_watchpoint): Delete.
2420         * target-delegates.c: Regenerate.
2421
2422 2018-08-31  Sergio Durigan Junior  <sergiodj@redhat.com>
2423
2424         * gnulib/Makefile.in (aclocal_m4_deps): Update according to
2425         the files present in "gnulib/import/m4/".
2426
2427 2018-08-30  Andrew Burgess  <andrew.burgess@embecosm.com>
2428
2429         * riscv-tdep.c (riscv_insn::decode): Decode c.addi4spn, c.sd,
2430         c.sw, c.swsp, and c.sdsp.
2431
2432 2018-08-30  Andrew Burgess  <andrew.burgess@embecosm.com>
2433
2434         * riscv-tdep.c (struct riscv_inferior_data): Delete.
2435         (riscv_read_misa_reg): Don't cache value read into inferior data.
2436         (riscv_new_inferior_data): Delete.
2437         (riscv_inferior_data_cleanup): Delete.
2438         (riscv_inferior_data): Delete.
2439         (riscv_invalidate_inferior_data): Delete.
2440         (_initialize_riscv_tdep): Remove initialisation of inferior data.
2441
2442 2018-08-30  Simon Marchi  <simon.marchi@ericsson.com>
2443
2444         * compile/compile-cplus-types.c
2445         (compile_cplus_instance::leave_scope): Take the address of scope
2446         object.
2447         (compile_cplus_instance::convert_qualified_base): Compare quals
2448         to 0.
2449
2450 2018-08-30  Keith Seitz  <keiths@redhat.com>
2451
2452         * compile/compile-cplus-types.c (compile_cplus_instance::enter_scope):
2453         Use "%s" and host_address_to_string instead of "%p" in printf.
2454
2455 2018-08-29  Keith Seitz  <keiths@redhat.com>
2456
2457         * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Add compile-cplus-symbols.c
2458         and compile-cplus-types.c.
2459         (HFILES_NO_SRCDIR): Add gcc-cp-plugin.h.
2460         * c-lang.c (cplus_language_defn): Set C++ compile functions.
2461         * c-lang.h (cplus_get_compile_context, cplus_compute_program):
2462         Declare.
2463         * compile/compile-c-support.c: Include compile-cplus.h.
2464         (load_libcompile): Templatize.
2465         (get_compile_context): "New" function.
2466         (c_get_compile_context): Use get_compile_context.
2467         (cplus_get_compile_context): New function.
2468         (cplus_push_user_expression, cplus_pop_user_expression)
2469         (cplus_add_code_header, cplus_add_input, cplus_compile_program)
2470         (cplus_compute_program): Define new structs/functions.
2471         * compile/compile-cplus-symmbols.c: New file.
2472         * compile/compile-cplus-types.c: New file.
2473         * compile/compile-cplus.h: New file.
2474         * compile/compile-internal.h (debug_compile_oracle, GCC_TYPE_NONE):
2475         Declare.
2476         * compile/compile-object-load.c (get_out_value_type): Use
2477         strncmp_iw when comparing symbol names.
2478         (compile_object_load): Add mst_bss and mst_data.
2479         * compile/compile.c (_initialize_compile): Remove
2480         -Wno-implicit-function-declaration from `compile_args'.
2481         * compile/gcc-cp-plugin.h: New file.
2482         * NEWS: Mention C++ compile support and new debug options.
2483
2484 2018-08-29  Keith Seitz  <keiths@redhat.com>
2485
2486         * linespec.c (collect_info::add_symbol): Make virtual.
2487         (struct symbol_searcher_collect_info): New struct.
2488         (symbol_searcher::find_all_symbols): New method.
2489         * symtab.h (class symbol_searcher): New class.
2490
2491 2018-08-29  Keith Seitz  <keiths@redhat.com>
2492
2493         * linespec.c (struct linespec) <function_symbols, label_symbols>:
2494         Change to vector of block_symbol.  Update all users.
2495         (struct collect_info) <symbols>: Likewise.
2496         (collect_info::add_symbol): Take block_symbol as argument.
2497         Update all callers.
2498         (decode_compound_collector) <m_symbols>: Change type to vector
2499         of block_symbol.  Update all users.
2500         (decode_compound_collector::operator ()): Change parameter type
2501         to block_symbol.
2502         (find_method, find_function_symbols, find_linespec_symbols)
2503         (find_label_symbols_in_block, find_label_symbols): Change symbol
2504         vectors to block_symbol vectors.
2505         * symtab.h (symbol_found_callback_ftype): Change parameter type to
2506         block_symbol.
2507
2508 2018-08-29  Keith Seitz  <keiths@redhat.com>
2509
2510         * linespec.c (symbolp): Remove typedef and VEC definitions.
2511         (bound_minimal_symbol_d): Likewise.
2512
2513 2018-08-29  Keith Seitz  <keiths@redhat.com>
2514
2515         * linespec.c (decode_compound_collector::decode_compound_collector):
2516         Remove initialization for `m_symtabs'.
2517         (decode_compound_collector::release_symbols): Change return type
2518         to std::vector.  Update all callers.
2519         (class decode_compound_collector) <m_symbols>: Change type to
2520         std::vector.
2521         (lookup_prefix_sym): Change return type to std::vector.  Update all
2522         callers.
2523         (compare_symbols): Remove.
2524         (std_compare_symbols): Rename to `compare_symbols'.
2525         (find_method): Change `sym_classes' parameter to std::vector.
2526         Update all callers.  Use std::sort to sort sym_classes.
2527         (find_linespec_symbols): Remove cleanup.
2528
2529 2018-08-29  Keith Seitz  <keiths@redhat.com>
2530
2531         * linespec.c (struct linespec) <minimal_symbols>: Change type to
2532         std::vector.  Update all users.
2533         (convert_linespec_to_sals): Use std::sort to sort minimal symbols.
2534         (struct collect_info) <minimal_symbols>: Likewise.
2535         (compare_msymbols): Return bool.  Change parameters to const
2536         bound_minimal_symbol references.
2537         (find_method, find_function_symbols, find_linespec_symbols): Change
2538         `minsyms' parameter to std::vector.  Update all callers.
2539
2540 2018-08-29  Keith Seitz  <keiths@redhat.com>
2541
2542         * linespec.c (struct linespec) <label_symbols>: Change type to
2543         std::vector.  Update all users.
2544         (find_label_symbols_in_block): Change `result' parameter to
2545         std::vector.  Update all callers.
2546         (find_label_symbols): Return std::vector.  Update all callers.
2547
2548 2018-08-29  Keith Seitz  <keiths@redhat.com>
2549
2550         * linespec.c (struct linespec) <function_symbols>: Change type to
2551         std::vector.  Update all users.
2552         (struct collect_info) <function_symbols>: Likewise.
2553         (convert_linespec_to_sals): Use std::sort to sort function_symbols.
2554         (std_compare_symbols): New function.
2555         (find_method, find_function_symbols, find_linespec_symbols)
2556         (find_label_symbols_in_block): Change `symbols' parameter to
2557         std::vector.  Update all callers.
2558         (find_label_symbols): Likewise for `function_symbols' and
2559         `label_funcs_ret'.
2560
2561 2018-08-29  Keith Seitz  <keiths@redhat.com>
2562
2563         * linespec.c (symtab_vector_up): Define.
2564         (struct linespec) <file_symtabs>: Change type to std::vector *.
2565         Update all uses.
2566         (struct collect_info) <file_symtabs>: Likewise.
2567         (collect_symtabs_from_filename): Return symtab_vector_up.
2568         Update all callers.
2569         (decode_objc): Remove cleanup.
2570         (symtab_collector::symtab_collector): Initialize `m_symtabs'.
2571         (symtab_collector::release_symtabs): Return symtab_vector_up.
2572         Update all callers.
2573         (class symtab_collector) <m_symtabs>: Change type to symtab_vector_up.
2574         Update all users.
2575         (collect_symtabs_from_filename, symtabs_from_filename): Return
2576         symtab_vector_up.  Update all callers.
2577
2578 2018-08-29  Tom Tromey  <tom@tromey.com>
2579
2580         * csky-tdep.c (csky_analyze_prologue): Use
2581         core_addr_to_string_nz.
2582
2583 2018-08-29  Tom Tromey  <tom@tromey.com>
2584
2585         * windows-nat.c (struct xlate_exception) <them>: Change type to
2586         DWORD.
2587         (xlate): Fix formatting.  Remove last entry.
2588         (struct xlate_exception, xlate): Comment out.
2589         (windows_nat_target::resume): Use ranged for.
2590
2591 2018-08-29  Jim Wilson  <jimw@sifive.com>
2592
2593         * riscv-linux-nat.c: Include elf/common.h instead of elf.h.
2594         (riscv_linux_nat_target::fetch_registers): Use NT_FPREGSET instead
2595         of NT_PRFPREG.
2596         (riscv_linux_nat_target::store_registers): Likewise.
2597
2598 2018-08-29  Sergio Durigan Junior  <sergiodj@redhat.com>
2599
2600         PR gdb/23555
2601         PR gdb/23558
2602         * gnulib/aclocal.m4: Regenerate.
2603         * gnulib/config.in: Regenerate.
2604         * gnulib/configure: Regenerate.
2605         * gnulib/import/Makefile.am: Update.
2606         * gnulib/import/Makefile.in: Update.
2607         * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
2608         * gnulib/import/_Noreturn.h: ... this.
2609         * gnulib/import/alloca.in.h: Update.
2610         * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
2611         * gnulib/import/arg-nonnull.h: ... this.
2612         * gnulib/import/assure.h: Update.
2613         * gnulib/import/at-func.c: Update.
2614         * gnulib/import/basename-lgpl.c: Update.
2615         * gnulib/import/extra/snippet/c++defs.h: Rename to...
2616         * gnulib/import/c++defs.h: ... this.
2617         * gnulib/import/canonicalize-lgpl.c: Update.
2618         * gnulib/import/cdefs.h: Update.
2619         * gnulib/import/chdir-long.c: Update.
2620         * gnulib/import/chdir-long.h: Update.
2621         * gnulib/import/cloexec.c: Update.
2622         * gnulib/import/cloexec.h: Update.
2623         * gnulib/import/close.c: Update.
2624         * gnulib/import/closedir.c: Update.
2625         * gnulib/import/config.charset: Update.
2626         * gnulib/import/dirent-private.h: Update.
2627         * gnulib/import/dirent.in.h: Update.
2628         * gnulib/import/dirfd.c: Update.
2629         * gnulib/import/dirname-lgpl.c: Update.
2630         * gnulib/import/dirname.h: Update.
2631         * gnulib/import/dosname.h: Update.
2632         * gnulib/import/dup-safer-flag.c: Update.
2633         * gnulib/import/dup-safer.c: Update.
2634         * gnulib/import/dup.c: Update.
2635         * gnulib/import/dup2.c: Update.
2636         * gnulib/import/errno.in.h: Update.
2637         * gnulib/import/error.c: Update.
2638         * gnulib/import/error.h: Update.
2639         * gnulib/import/exitfail.c: Update.
2640         * gnulib/import/exitfail.h: Update.
2641         * gnulib/import/extra/update-copyright: Update.
2642         * gnulib/import/fchdir.c: Update.
2643         * gnulib/import/fcntl.c: Update.
2644         * gnulib/import/fcntl.in.h: Update.
2645         * gnulib/import/fd-hook.c: Update.
2646         * gnulib/import/fd-hook.h: Update.
2647         * gnulib/import/fd-safer-flag.c: Update.
2648         * gnulib/import/fd-safer.c: Update.
2649         * gnulib/import/fdopendir.c: Update.
2650         * gnulib/import/filename.h: Update.
2651         * gnulib/import/filenamecat-lgpl.c: Update.
2652         * gnulib/import/filenamecat.h: Update.
2653         * gnulib/import/flexmember.h: Update.
2654         * gnulib/import/float+.h: Update.
2655         * gnulib/import/float.c: Update.
2656         * gnulib/import/float.in.h: Update.
2657         * gnulib/import/fnmatch.c: Update.
2658         * gnulib/import/fnmatch.in.h: Update.
2659         * gnulib/import/fnmatch_loop.c: Update.
2660         * gnulib/import/fpucw.h: Update.
2661         * gnulib/import/frexp.c: Update.
2662         * gnulib/import/frexpl.c: Update.
2663         * gnulib/import/fstat.c: Update.
2664         * gnulib/import/fstatat.c: Update.
2665         * gnulib/import/getcwd-lgpl.c: Update.
2666         * gnulib/import/getcwd.c: Update.
2667         * gnulib/import/getdtablesize.c: Update.
2668         * gnulib/import/getlogin_r.c: Update.
2669         * gnulib/import/getprogname.c: Update.
2670         * gnulib/import/getprogname.h: Update.
2671         * gnulib/import/gettext.h: Update.
2672         * gnulib/import/gettimeofday.c: Update.
2673         * gnulib/import/glob-libc.h: Update.
2674         * gnulib/import/glob.c: Update.
2675         * gnulib/import/glob.in.h: Update.
2676         * gnulib/import/glob_internal.h: Update.
2677         * gnulib/import/glob_pattern_p.c: Update.
2678         * gnulib/import/globfree.c: Update.
2679         * gnulib/import/hard-locale.c: Update.
2680         * gnulib/import/hard-locale.h: Update.
2681         * gnulib/import/intprops.h: Update.
2682         * gnulib/import/inttypes.in.h: Update.
2683         * gnulib/import/isnan.c: Update.
2684         * gnulib/import/isnand-nolibm.h: Update.
2685         * gnulib/import/isnand.c: Update.
2686         * gnulib/import/isnanl-nolibm.h: Update.
2687         * gnulib/import/isnanl.c: Update.
2688         * gnulib/import/itold.c: Update.
2689         * gnulib/import/libc-config.h: Update.
2690         * gnulib/import/limits.in.h: Update.
2691         * gnulib/import/localcharset.c: Update.
2692         * gnulib/import/localcharset.h: Update.
2693         * gnulib/import/localtime-buffer.c: Update.
2694         * gnulib/import/localtime-buffer.h: Update.
2695         * gnulib/import/lstat.c: Update.
2696         * gnulib/import/m4/00gnulib.m4: Update.
2697         * gnulib/import/m4/__inline.m4: Update.
2698         * gnulib/import/m4/absolute-header.m4: Update.
2699         * gnulib/import/m4/alloca.m4: Update.
2700         * gnulib/import/m4/builtin-expect.m4: Update.
2701         * gnulib/import/m4/canonicalize.m4: Update.
2702         * gnulib/import/m4/chdir-long.m4: Update.
2703         * gnulib/import/m4/close.m4: Update.
2704         * gnulib/import/m4/closedir.m4: Update.
2705         * gnulib/import/m4/configmake.m4: Update.
2706         * gnulib/import/m4/d-ino.m4: Update.
2707         * gnulib/import/m4/d-type.m4: Update.
2708         * gnulib/import/m4/dirent_h.m4: Update.
2709         * gnulib/import/m4/dirfd.m4: Update.
2710         * gnulib/import/m4/dirname.m4: Update.
2711         * gnulib/import/m4/double-slash-root.m4: Update.
2712         * gnulib/import/m4/dup.m4: Update.
2713         * gnulib/import/m4/dup2.m4: Update.
2714         * gnulib/import/m4/eealloc.m4: Update.
2715         * gnulib/import/m4/environ.m4: Update.
2716         * gnulib/import/m4/errno_h.m4: Update.
2717         * gnulib/import/m4/error.m4: Update.
2718         * gnulib/import/m4/exponentd.m4: Update.
2719         * gnulib/import/m4/exponentl.m4: Update.
2720         * gnulib/import/m4/extensions.m4: Update.
2721         * gnulib/import/m4/extern-inline.m4: Update.
2722         * gnulib/import/m4/fchdir.m4: Update.
2723         * gnulib/import/m4/fcntl-o.m4: Update.
2724         * gnulib/import/m4/fcntl.m4: Update.
2725         * gnulib/import/m4/fcntl_h.m4: Update.
2726         * gnulib/import/m4/fdopendir.m4: Update.
2727         * gnulib/import/m4/filenamecat.m4: Update.
2728         * gnulib/import/m4/flexmember.m4: Update.
2729         * gnulib/import/m4/float_h.m4: Update.
2730         * gnulib/import/m4/fnmatch.m4: Update.
2731         * gnulib/import/m4/fnmatch_h.m4: Update.
2732         * gnulib/import/m4/fpieee.m4: Update.
2733         * gnulib/import/m4/frexp.m4: Update.
2734         * gnulib/import/m4/frexpl.m4: Update.
2735         * gnulib/import/m4/fstat.m4: Update.
2736         * gnulib/import/m4/fstatat.m4: Update.
2737         * gnulib/import/m4/getcwd-abort-bug.m4: Update.
2738         * gnulib/import/m4/getcwd-path-max.m4: Update.
2739         * gnulib/import/m4/getcwd.m4: Update.
2740         * gnulib/import/m4/getdtablesize.m4: Update.
2741         * gnulib/import/m4/getlogin.m4: Update.
2742         * gnulib/import/m4/getlogin_r.m4: Update.
2743         * gnulib/import/m4/getpagesize.m4: Update.
2744         * gnulib/import/m4/getprogname.m4: Update.
2745         * gnulib/import/m4/gettimeofday.m4: Update.
2746         * gnulib/import/m4/glibc21.m4: Update.
2747         * gnulib/import/m4/glob.m4: Update.
2748         * gnulib/import/m4/glob_h.m4: Update.
2749         * gnulib/import/m4/gnulib-cache.m4: Update.
2750         * gnulib/import/m4/gnulib-common.m4: Update.
2751         * gnulib/import/m4/gnulib-comp.m4: Update.
2752         * gnulib/import/m4/gnulib-tool.m4: Update.
2753         * gnulib/import/m4/hard-locale.m4: Update.
2754         * gnulib/import/m4/include_next.m4: Update.
2755         * gnulib/import/m4/inttypes-pri.m4: Update.
2756         * gnulib/import/m4/inttypes.m4: Update.
2757         * gnulib/import/m4/isnand.m4: Update.
2758         * gnulib/import/m4/isnanl.m4: Update.
2759         * gnulib/import/m4/largefile.m4: Update.
2760         * gnulib/import/m4/limits-h.m4: Update.
2761         * gnulib/import/m4/localcharset.m4: Update.
2762         * gnulib/import/m4/locale-fr.m4: Update.
2763         * gnulib/import/m4/locale-ja.m4: Update.
2764         * gnulib/import/m4/locale-zh.m4: Update.
2765         * gnulib/import/m4/localtime-buffer.m4: Update.
2766         * gnulib/import/m4/longlong.m4: Update.
2767         * gnulib/import/m4/lstat.m4: Update.
2768         * gnulib/import/m4/malloc.m4: Update.
2769         * gnulib/import/m4/malloca.m4: Update.
2770         * gnulib/import/m4/math_h.m4: Update.
2771         * gnulib/import/m4/mbrtowc.m4: Update.
2772         * gnulib/import/m4/mbsinit.m4: Update.
2773         * gnulib/import/m4/mbsrtowcs.m4: Update.
2774         * gnulib/import/m4/mbstate_t.m4: Update.
2775         * gnulib/import/m4/memchr.m4: Update.
2776         * gnulib/import/m4/memmem.m4: Update.
2777         * gnulib/import/m4/mempcpy.m4: Update.
2778         * gnulib/import/m4/memrchr.m4: Update.
2779         * gnulib/import/m4/mkdir.m4: Update.
2780         * gnulib/import/m4/mkstemp.m4: Update.
2781         * gnulib/import/m4/mmap-anon.m4: Update.
2782         * gnulib/import/m4/mode_t.m4: Update.
2783         * gnulib/import/m4/msvc-inval.m4: Update.
2784         * gnulib/import/m4/msvc-nothrow.m4: Update.
2785         * gnulib/import/m4/multiarch.m4: Update.
2786         * gnulib/import/m4/nocrash.m4: Update.
2787         * gnulib/import/m4/off_t.m4: Update.
2788         * gnulib/import/m4/onceonly.m4: Update.
2789         * gnulib/import/m4/open-cloexec.m4: Update.
2790         * gnulib/import/m4/open.m4: Update.
2791         * gnulib/import/m4/openat.m4: Update.
2792         * gnulib/import/m4/opendir.m4: Update.
2793         * gnulib/import/m4/pathmax.m4: Update.
2794         * gnulib/import/m4/rawmemchr.m4: Update.
2795         * gnulib/import/m4/readdir.m4: Update.
2796         * gnulib/import/m4/readlink.m4: Update.
2797         * gnulib/import/m4/realloc.m4: Update.
2798         * gnulib/import/m4/rename.m4: Update.
2799         * gnulib/import/m4/rewinddir.m4: Update.
2800         * gnulib/import/m4/rmdir.m4: Update.
2801         * gnulib/import/m4/save-cwd.m4: Update.
2802         * gnulib/import/m4/secure_getenv.m4: Update.
2803         * gnulib/import/m4/setenv.m4: Update.
2804         * gnulib/import/m4/signal_h.m4: Update.
2805         * gnulib/import/m4/ssize_t.m4: Update.
2806         * gnulib/import/m4/stat-time.m4: Update.
2807         * gnulib/import/m4/stat.m4: Update.
2808         * gnulib/import/m4/std-gnu11.m4: Update.
2809         * gnulib/import/m4/stdbool.m4: Update.
2810         * gnulib/import/m4/stddef_h.m4: Update.
2811         * gnulib/import/m4/stdint.m4: Update.
2812         * gnulib/import/m4/stdio_h.m4: Update.
2813         * gnulib/import/m4/stdlib_h.m4: Update.
2814         * gnulib/import/m4/strchrnul.m4: Update.
2815         * gnulib/import/m4/strdup.m4: Update.
2816         * gnulib/import/m4/strerror.m4: Update.
2817         * gnulib/import/m4/string_h.m4: Update.
2818         * gnulib/import/m4/strstr.m4: Update.
2819         * gnulib/import/m4/strtok_r.m4: Update.
2820         * gnulib/import/m4/sys_socket_h.m4: Update.
2821         * gnulib/import/m4/sys_stat_h.m4: Update.
2822         * gnulib/import/m4/sys_time_h.m4: Update.
2823         * gnulib/import/m4/sys_types_h.m4: Update.
2824         * gnulib/import/m4/tempname.m4: Update.
2825         * gnulib/import/m4/time_h.m4: Update.
2826         * gnulib/import/m4/unistd-safer.m4: Update.
2827         * gnulib/import/m4/unistd_h.m4: Update.
2828         * gnulib/import/m4/warn-on-use.m4: Update.
2829         * gnulib/import/m4/wchar_h.m4: Update.
2830         * gnulib/import/m4/wchar_t.m4: Update.
2831         * gnulib/import/m4/wctype_h.m4: Update.
2832         * gnulib/import/m4/wint_t.m4: Update.
2833         * gnulib/import/malloc.c: Update.
2834         * gnulib/import/malloc/scratch_buffer.h: Update.
2835         * gnulib/import/malloc/scratch_buffer_grow.c: Update.
2836         * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
2837         * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
2838         * gnulib/import/malloca.c: Update.
2839         * gnulib/import/malloca.h: Update.
2840         * gnulib/import/malloca.valgrind: Update.
2841         * gnulib/import/math.in.h: Update.
2842         * gnulib/import/mbrtowc.c: Update.
2843         * gnulib/import/mbsinit.c: Update.
2844         * gnulib/import/mbsrtowcs-impl.h: Update.
2845         * gnulib/import/mbsrtowcs-state.c: Update.
2846         * gnulib/import/mbsrtowcs.c: Update.
2847         * gnulib/import/memchr.c: Update.
2848         * gnulib/import/memmem.c: Update.
2849         * gnulib/import/mempcpy.c: Update.
2850         * gnulib/import/memrchr.c: Update.
2851         * gnulib/import/mkdir.c: Update.
2852         * gnulib/import/mkstemp.c: Update.
2853         * gnulib/import/msvc-inval.c: Update.
2854         * gnulib/import/msvc-inval.h: Update.
2855         * gnulib/import/msvc-nothrow.c: Update.
2856         * gnulib/import/msvc-nothrow.h: Update.
2857         * gnulib/import/open.c: Update.
2858         * gnulib/import/openat-die.c: Update.
2859         * gnulib/import/openat-priv.h: Update.
2860         * gnulib/import/openat-proc.c: Update.
2861         * gnulib/import/openat.c: Update.
2862         * gnulib/import/openat.h: Update.
2863         * gnulib/import/opendir.c: Update.
2864         * gnulib/import/pathmax.h: Update.
2865         * gnulib/import/pipe-safer.c: Update.
2866         * gnulib/import/rawmemchr.c: Update.
2867         * gnulib/import/readdir.c: Update.
2868         * gnulib/import/readlink.c: Update.
2869         * gnulib/import/realloc.c: Update.
2870         * gnulib/import/ref-add.sin: Update.
2871         * gnulib/import/ref-del.sin: Update.
2872         * gnulib/import/rename.c: Update.
2873         * gnulib/import/rewinddir.c: Update.
2874         * gnulib/import/rmdir.c: Update.
2875         * gnulib/import/same-inode.h: Update.
2876         * gnulib/import/save-cwd.c: Update.
2877         * gnulib/import/save-cwd.h: Update.
2878         * gnulib/import/scratch_buffer.h: Update.
2879         * gnulib/import/secure_getenv.c: Update.
2880         * gnulib/import/setenv.c: Update.
2881         * gnulib/import/signal.in.h: Update.
2882         * gnulib/import/stat-time.c: Update.
2883         * gnulib/import/stat-time.h: Update.
2884         * gnulib/import/stat-w32.c: Update.
2885         * gnulib/import/stat-w32.h: Update.
2886         * gnulib/import/stat.c: Update.
2887         * gnulib/import/stdbool.in.h: Update.
2888         * gnulib/import/stddef.in.h: Update.
2889         * gnulib/import/stdint.in.h: Update.
2890         * gnulib/import/stdio.in.h: Update.
2891         * gnulib/import/stdlib.in.h: Update.
2892         * gnulib/import/str-two-way.h: Update.
2893         * gnulib/import/strchrnul.c: Update.
2894         * gnulib/import/strdup.c: Update.
2895         * gnulib/import/streq.h: Update.
2896         * gnulib/import/strerror-override.c: Update.
2897         * gnulib/import/strerror-override.h: Update.
2898         * gnulib/import/strerror.c: Update.
2899         * gnulib/import/string.in.h: Update.
2900         * gnulib/import/stripslash.c: Update.
2901         * gnulib/import/strnlen1.c: Update.
2902         * gnulib/import/strnlen1.h: Update.
2903         * gnulib/import/strstr.c: Update.
2904         * gnulib/import/strtok_r.c: Update.
2905         * gnulib/import/sys_stat.in.h: Update.
2906         * gnulib/import/sys_time.in.h: Update.
2907         * gnulib/import/sys_types.in.h: Update.
2908         * gnulib/import/tempname.c: Update.
2909         * gnulib/import/tempname.h: Update.
2910         * gnulib/import/time.in.h: Update.
2911         * gnulib/import/unistd--.h: Update.
2912         * gnulib/import/unistd-safer.h: Update.
2913         * gnulib/import/unistd.in.h: Update.
2914         * gnulib/import/unsetenv.c: Update.
2915         * gnulib/import/verify.h: Update.
2916         * gnulib/import/extra/snippet/warn-on-use.h: Update.
2917         * gnulib/import/wchar.in.h: Update.
2918         * gnulib/import/wctype.in.h: Update.
2919         * gnulib/import/xalloc-oversized.h: Update.
2920         * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
2921         "53e2c179f26a890fa6685af4b6c1397ee370433b".
2922
2923 2018-08-16  Gary Benson <gbenson@redhat.com>
2924
2925         PR gdb/13000:
2926         * gdb/main.c (captured_main_1): Exit with nonzero status
2927         in batch mode if the last command to be executed failed.
2928         * NEWS: Mention the above.
2929
2930 2018-08-29  Simon Marchi  <simon.marchi@ericsson.com>
2931
2932         * csky-tdep.c (csky_memory_insert_breakpoint): Remove newline at
2933         end of warning message.
2934
2935 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
2936
2937         PR gdb/22943:
2938         * aarch64-tdep.c (is_hfa_or_hva): Remove function.
2939         (aarch64_extract_return_value): Use
2940         aapcs_is_vfp_call_or_return_candidate.
2941         (aarch64_return_in_memory): Likewise.
2942         (aarch64_store_return_value): Likewise.
2943
2944 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
2945
2946         * aarch64-tdep.c
2947         (aapcs_is_vfp_call_or_return_candidate): Make static
2948         (pass_in_v_or_stack): Remove function.
2949         (pass_in_v_vfp_candidate): New function.
2950         (aarch64_push_dummy_call): Check for float register candidates.
2951
2952 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
2953
2954         * aarch64-tdep.c (HA_MAX_NUM_FLDS): New macro.
2955         (aapcs_is_vfp_call_or_return_candidate_1): New function.
2956         (aapcs_is_vfp_call_or_return_candidate): Likewise.
2957
2958 2018-08-28  Simon Marchi  <simon.marchi@polymtl.ca>
2959
2960         PR build/23399
2961         * common/agent.c (IPA_SYM_STRUCT_NAME): Define.
2962         (struct ipa_sym_addresses): Rename to...
2963         (struct ipa_sym_addresses_common): ... this.
2964         * common/agent.h (IPA_SYM): Use IPA_SYM_STRUCT_NAME.
2965
2966 2018-08-28  Tom Tromey  <tom@tromey.com>
2967
2968         * c-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
2969         (token_fifo): Now a std::vector.
2970         (yylex, c_parse): Update.
2971         * d-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
2972         (token_fifo): Now a std::vector.
2973         (yylex, d_parse): Update.
2974         * go-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
2975         (token_fifo): Now a std::vector.
2976         (yylex, go_parse): Update.
2977
2978 2018-08-28  Simon Marchi  <simon.marchi@ericsson.com>
2979
2980         * parser-defs.h (struct type_stack) <elements>: Change type to
2981         std::vector<union type_stack_elt>.
2982         <depth, size>: Remove.
2983         * parse.c (parse_exp_in_context_1): Adjust.
2984         (type_stack_reserve): Remove.
2985         (check_type_stack_depth): Remove.
2986         (insert_into_type_stack): Adjust to std::vector.
2987         (insert_type): Likewise.
2988         (push_type): Likewise.
2989         (push_type_int): Likewise.
2990         (insert_type_address_space): Likewise.
2991         (pop_type): Likewise.
2992         (pop_type_int): Likewise.
2993         (pop_typelist): Likewise.
2994         (pop_type_stack): Likewise.
2995         (append_type_stack): Likewise.
2996         (push_type_stack): Likewise.
2997         (get_type_stack): Likewise.
2998         (type_stack_cleanup): Likewise.
2999         (push_typelist): Likewise.
3000         (follow_types): Likewise.
3001         (_initialize_parse): Likewise.
3002
3003 2018-08-28  Hafiz Abid Qadeer  <abidh@codesourcery.com>
3004
3005         * NEWS: Mention csky target.
3006
3007 2018-08-28  Jiangshuai Li  <jiangshuai_li@c-sky.com>
3008             Hafiz Abid Qadeer  <abidh@codesourcery.com>
3009             Don Breazeal  <donb@codesourcery.com>
3010
3011         * csky-linux-tdep.c: New file.
3012         * csky-tdep.c: Likewise.
3013         * csky-tdep.h: Likewise.
3014         * Makefile.in (ALL_TARGET_OBS): Add csky-linux-tdep.o and
3015         csky-tdep.o.
3016         (HFILES_NO_SRCDIR): Add csky-tdep.h.
3017         (ALLDEPFILES): Add csky-linux-tdep.c and csky-tdep.c
3018         * configure.tgt: Add csky support.
3019
3020 2018-08-27  Jan Vrany  <jan.vrany@fit.cvut.cz>
3021
3022         * python/py-framefilter.c (py_print_frame): Print frame architecture
3023         when printing on an MI output.
3024
3025 2018-08-27  Tom Tromey  <tom@tromey.com>
3026
3027         PR build/23087:
3028         * configure: Rebuild.
3029         * warning.m4 (AM_GDB_WARNINGS): Remove -Wno-narrowing.
3030
3031 2018-08-27  Tom Tromey  <tom@tromey.com>
3032
3033         * aarch64-linux-tdep.c
3034         (aarch64_linux_iterate_over_regset_sections) <sve_regmap>: Add
3035         casts to int.
3036
3037 2018-08-27  Tom Tromey  <tom@tromey.com>
3038
3039         * ppc64-tdep.c (insn_d, insn_ds, insn_xfx): Add casts to
3040         unsigned.
3041         (ppc64_standard_linkage1, ppc64_standard_linkage2)
3042         (ppc64_standard_linkage3, ppc64_standard_linkage4)
3043         (ppc64_standard_linkage5, ppc64_standard_linkage6)
3044         (ppc64_standard_linkage7, ppc64_standard_linkage8): Add casts to
3045         unsigned.
3046
3047 2018-08-27  Tom Tromey  <tom@tromey.com>
3048
3049         * xtensa-tdep.h (XTREG_END): Add cast to unsigned.
3050         (XTENSA_GDBARCH_TDEP_INSTANTIATE): Likewise.
3051
3052 2018-08-27  Tom Tromey  <tom@tromey.com>
3053
3054         * tramp-frame.h (TRAMP_SENTINEL_INSN): Redefine.
3055         * tilegx-linux-tdep.c (tilegx_linux_rt_sigframe): Use
3056         ULONGEST_MAX.
3057         * tic6x-linux-tdep.c (tic6x_linux_rt_sigreturn_tramp_frame): Use
3058         ULONGEST_MAX.
3059         * sparc64-linux-tdep.c (sparc64_linux_rt_sigframe): Use
3060         ULONGEST_MAX.
3061         * sparc-linux-tdep.c (sparc32_linux_sigframe)
3062         (sparc32_linux_rt_sigframe): Use ULONGEST_MAX.
3063         * ppc-nbsd-tdep.c (ppcnbsd_sigtramp, ppcnbsd2_sigtramp): Use
3064         ULONGEST_MAX.
3065         * ppc-linux-tdep.c (ppc32_linux_sigaction_tramp_frame)
3066         (ppc64_linux_sigaction_tramp_frame)
3067         (ppc32_linux_sighandler_tramp_frame)
3068         (ppc64_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
3069         * nios2-linux-tdep.c (nios2_r1_linux_rt_sigreturn_tramp_frame)
3070         (nios2_r2_linux_rt_sigreturn_tramp_frame): Use ULONGEST_MAX.
3071         * mn10300-linux-tdep.c (am33_linux_sigframe)
3072         (am33_linux_rt_sigframe): Use ULONGEST_MAX.
3073         * mips64-obsd-tdep.c (mips64obsd_sigframe): Use ULONGEST_MAX.
3074         * mips-linux-tdep.c (mips_linux_o32_sigframe)
3075         (mips_linux_o32_rt_sigframe, mips_linux_n32_rt_sigframe)
3076         (mips_linux_n64_rt_sigframe, micromips_linux_o32_sigframe)
3077         (micromips_linux_o32_rt_sigframe, micromips_linux_n32_rt_sigframe)
3078         (micromips_linux_n64_rt_sigframe): Use ULONGEST_MAX.
3079         * mips-fbsd-tdep.c (mips_fbsd_sigframe, mipsn32_fbsd_sigframe)
3080         (mips64_fbsd_sigframe): Use ULONGEST_MAX.
3081         * microblaze-linux-tdep.c
3082         (microblaze_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
3083         * i386-nbsd-tdep.c (i386nbsd_sigtramp_sc16, i386nbsd_sigtramp_sc2)
3084         (i386nbsd_sigtramp_si2, i386nbsd_sigtramp_si31)
3085         (i386nbsd_sigtramp_si4): Use ULONGEST_MAX.
3086         * hppa-nbsd-tdep.c (hppanbsd_sigtramp_si4): Use ULONGEST_MAX.
3087         * common/common-types.h (ULONGEST_MAX): New define.
3088         (CORE_ADDR_MAX): Fix formatting.
3089         * bfin-linux-tdep.c (bfin_linux_sigframe): Use ULONGEST_MAX.
3090         * arm-obsd-tdep.c (armobsd_sigframe): Use ULONGEST_MAX.
3091         * arm-linux-tdep.c (arm_linux_sigreturn_tramp_frame)
3092         (arm_linux_rt_sigreturn_tramp_frame)
3093         (arm_eabi_linux_sigreturn_tramp_frame)
3094         (arm_eabi_linux_rt_sigreturn_tramp_frame)
3095         (thumb2_eabi_linux_sigreturn_tramp_frame)
3096         (thumb2_eabi_linux_rt_sigreturn_tramp_frame)
3097         (arm_linux_restart_syscall_tramp_frame)
3098         (arm_kernel_linux_restart_syscall_tramp_frame): Use ULONGEST_MAX.
3099         * arm-fbsd-tdep.c (arm_fbsd_sigframe): Use ULONGEST_MAX.
3100         * aarch64-linux-tdep.c (aarch64_linux_rt_sigframe): Use
3101         ULONGEST_MAX.
3102         * aarch64-fbsd-tdep.c (aarch64_fbsd_sigframe): Use ULONGEST_MAX.
3103
3104 2018-08-27  Tom Tromey  <tom@tromey.com>
3105
3106         * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Use
3107         CORE_ADDR_MAX.
3108         * mips-tdep.c (mips_deal_with_atomic_sequence)
3109         (micromips_deal_with_atomic_sequence): Use CORE_ADDR_MAX.
3110         * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw)
3111         (arm_deal_with_atomic_sequence_raw): Use CORE_ADDR_MAX.
3112         * alpha-tdep.c (alpha_deal_with_atomic_sequence): Use
3113         CORE_ADDR_MAX.
3114         * aarch64-tdep.c (aarch64_software_single_step): Use
3115         CORE_ADDR_MAX.
3116
3117 2018-08-27  Tom Tromey  <tom@tromey.com>
3118
3119         * linespec.c (complete_linespec_component): Add cast to "char".
3120         * completer.c (completion_tracker::build_completion_result): Add
3121         cast to "char".
3122
3123 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
3124
3125         * solist.h (struct solist, struct target_so_ops): Fix
3126         indentation.
3127
3128 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
3129
3130         * ada-tasks.c (ada_task_info_s): Remove typedef.
3131         (DEF_VEC_O(ada_task_info_s)): Remove.
3132         (struct ada_tasks_inferior_data): Initialize fields.
3133         <task_list>: Make an std::vector.
3134         (get_ada_tasks_inferior_data): Allocate with new.
3135         (ada_get_task_number): Adjust.
3136         (get_task_number_from_id): Likewise.
3137         (valid_task_id): Likewise.
3138         (ada_get_task_info_from_ptid): Likewise.
3139         (iterate_over_live_ada_tasks): Likewise.
3140         (add_ada_task): Likewise.
3141         (read_known_tasks): Likewise.
3142         (ada_build_task_list): Likewise.
3143         (print_ada_task_info): Likewise.
3144         (info_task): Likewise.
3145         (task_command_1): Likewise.
3146
3147 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
3148
3149         * ada-lang.c (add_angle_brackets): Return std::string.
3150
3151 2018-08-25  Simon Marchi  <simon.marchi@polymtl.ca>
3152
3153         * python/py-threadevent.c (py_get_event_thread): Initialize
3154         pythread.
3155
3156 2018-08-24  Pedro Alves  <palves@redhat.com>
3157
3158         * python/py-bpevent.c (create_breakpoint_event_object): Use
3159         copy-initialization.
3160         * python/py-continueevent.c (emit_continue_event): Use
3161         copy-initialization.
3162         * python/py-exitedevent.c (create_exited_event_object): Return a
3163         gdbpy_ref<>.
3164         (emit_exited_event): Use copy-initialization.
3165         * python/py-inferior.c (python_new_inferior)
3166         (python_inferior_deleted, add_thread_object): Use
3167         copy-initialization.
3168         * python/py-infevents.c (create_inferior_call_event_object)
3169         (create_register_changed_event_object)
3170         (create_memory_changed_event_object): Return a gdbpy_ref<>.
3171         (emit_inferior_call_event, emit_memory_changed_event)
3172         (emit_register_changed_event): Use copy-initialization.
3173         * python/py-newobjfileevent.c (create_new_objfile_event_object):
3174         Return a gdbpy_ref<>.
3175         (emit_new_objfile_event): Use copy-initialization.
3176         (create_clear_objfiles_event_object): Return a gdbpy_ref<>.
3177         (emit_clear_objfiles_event): Use copy-initialization.
3178         * python/py-signalevent.c (create_signal_event_object): Use
3179         copy-initialization.
3180         * python/py-threadevent.c (create_thread_event_object): Use
3181         copy-initialization.
3182
3183 2018-08-24  Pedro Alves  <palves@redhat.com>
3184             Simon Marchi  <simon.marchi@ericsson.com>
3185
3186         PR gdb/23379
3187         * python/py-continueevent.c: Include "gdbthread.h".
3188         (create_continue_event_object): Add intro comment.  Add 'ptid'
3189         parameter.  Use it to find thread to pass to
3190         create_thread_event_object.
3191         (emit_continue_event): Pass PTID down to
3192         create_continue_event_object.
3193         * python/py-event.h (py_get_event_thread): Declare.
3194         (create_thread_event_object): Remove default from 'thread'
3195         parameter.
3196         * python/py-stopevent.c (create_stop_event_object): Use
3197         py_get_event_thread.
3198         * python/py-threadevent.c (get_event_thread): Rename to ...
3199         (py_get_event_thread): ... this, make extern, add 'ptid' parameter
3200         and use it to find the thread.
3201         (create_thread_event_object): Assert that THREAD isn't null.
3202         Don't find the event thread here.
3203
3204 2018-08-23  Kevin Buettner  <kevinb@redhat.com>
3205
3206         * block.h (blockrange, blockranges): New struct declarations.
3207         (struct block): Add new field named `ranges'.
3208         (BLOCK_RANGES, BLOCK_NRANGES, BLOCK_RANGE, BLOCK_CONTIGUOUS_P)
3209         (BLOCK_RANGE_START, BLOCK_RANGE_END, BLOCK_ENTRY_PC): New
3210         macros for accessing ranges in struct block.
3211         (make_blockranges): New declaration.
3212         block.c (make_blockranges): New function.
3213         * dwarf2read.c (dwarf2_record_block_ranges): Fill in BLOCK_RANGES
3214         for block.
3215         * symtab.h (find_pc_partial_function): Add new parameter `block'.
3216         * blockframe.c (cache_pc_function_block): New static global.
3217         (clear_pc_function_cache): Clear cache_pc_function_block.
3218         (find_pc_partial_function): Move comment to symtab.h.  Add
3219         support for non-contiguous blocks.
3220         * cli/cli-cmds.c (block.h): Include.
3221         (print_disassembly): Handle printing of non-contiguous blocks.
3222         (disassemble_current_function): Likewise.
3223         (disassemble_command): Likewise.
3224
3225         * ax-gdb.c (gen_var_ref): Use BLOCK_ENTRY_PC in place of
3226         BLOCK_START.
3227         * blockframe.c (get_pc_function_start): Likewise.
3228         * compile/compile-c-symbols.c (convert_one_symbol): Likewise.
3229         (gcc_symbol_address): Likewise.
3230         * compile/compile-object-run.c (compile_object_run): Likewise.
3231         * compile/compile.c (get_expr_block_and_pc): Likewise.
3232         * dwarf2loc.c (dwarf2_find_location_expression): Likewise.
3233         (func_addr_to_tail_call_list): Likewise.
3234         * findvar.c (default_read_var_value): Likewise.
3235         * inline-frame.c (inline_frame_this_id): Likewise.
3236         (skip-inline_frames): Likewise.
3237         * infcmd.c (until_next_command): Likewise.
3238         * linespec.c (convert_linespec_to_sals): Likewise.
3239         * parse.c (parse_exp_in_context_1): Likewise.
3240         * printcmd.c (build_address_symbolic): likewise.
3241         (info_address_command): Likewise.
3242         symtab.c (find_function_start_sal): Likewise.
3243         (skip_prologue_sal): Likewise.
3244         (find_function_alias_target): Likewise.
3245         (find_gnu_ifunc): Likewise.
3246         * stack.c (find_frame_funname): Likewise.
3247         * symtab.c (fixup_symbol_section): Likewise.
3248         (find_function_start_sal): Likewise.
3249         (skip_prologue_sal): Likewsie.
3250         (find_function_alias_target): Likewise.
3251         (find_gnu_ifunc): Likewise.
3252         * tracepoint.c (info_scope_command): Likewise.
3253         * value.c (value_fn_field): Likewise.
3254
3255         * infrun.c (fill_in_stop_func): Use find_function_entry_range_from_pc
3256         in place of find_pc_partial_function.
3257         * blockframe.c (find_function_entry_range_from_pc): New function.
3258         * symtab.h (find_function_entry_range_from_pc): Declare and document.
3259         * objfiles.c (objfile_relocate1): Relocate start and end addresses
3260         for each range in a block.
3261
3262
3263 2018-08-23  Xavier Roirand  <roirand@adacore.com>
3264
3265         * machoread.c (macho_symfile_read_all_oso): Remove uneeded
3266         incrementation.
3267
3268 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
3269
3270         * solib-svr4.c (read_program_headers_from_bfd): Return
3271         gdb::optional<gdb::byte_vector>.
3272         (svr4_exec_displacement): Adjust.
3273
3274 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
3275
3276         * solib-svr4.c (read_program_header): Return
3277         gdb::optional<gdb::byte_vector>, remove p_sect_size param.
3278         (find_program_interpreter): Return
3279         gdb::optional<gdb::byte_vector>.
3280         (scan_dyntag_auxv): Adjust.
3281         (enable_break): Adjust.
3282         (svr4_exec_displacement): Adjust.
3283
3284 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
3285
3286         * inf-child.h (inf_child_target) <terminal_save_inferior>: New.
3287         * inf-child.c (inf_child_target::terminal_save_inferior): New.
3288
3289 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
3290
3291         * guile/scm-string.c (gdbscm_scm_from_printf): Use
3292         string_vprintf.
3293         * guile/scm-utils.c (gdbscm_printf): Likewise.
3294         * serial.c (serial_printf): Likewise.
3295         * xml-support.c (gdb_xml_parser::vdebug): Likewise.
3296
3297 2018-08-22  Jan Vrany  <jan.vrany@fit.cvut.cz>
3298
3299         * stack.c (print_frame): Print frame architecture when printing on
3300         an MI output.
3301         * NEWS: Mention new "arch" attribute in frame output.
3302
3303 2018-08-21  Alan Hayward  <alan.hayward@arm.com>
3304
3305         * arch/aarch64.h (aarch64_regnum): Update comment.
3306
3307 2018-08-21  Alan Hayward  <alan.hayward@arm.com>
3308
3309         * NEWS: Add SVE to 8.2 section.
3310
3311 2018-08-21  Pedro Alves  <palves@redhat.com>
3312
3313         * guile/scm-utils.c (gdbscm_parse_function_args_1): New, factored
3314         out from gdbscm_parse_function_args.
3315         (gdbscm_parse_function_args): Rework to use gdbscm_wrap and
3316         gdbscm_parse_function_args_1.
3317
3318 2018-08-21  Simon Marchi  <simon.marchi@ericsson.com>
3319
3320         PR gdb/17816
3321         * m32c-tdep.c (m32c_decode_srcdest4): Remove unnecessary ternary
3322         operator.
3323
3324 2018-08-19  Simon Marchi  <simon.marchi@polymtl.ca>
3325
3326         * solib-svr4.c (svr4_exec_displacement): Fix formatting.
3327
3328 2018-08-19  Michael Spang  <spang@google.com>
3329
3330         PR gdb/11786
3331         * solib-svr4.c (svr4_exec_displacement): Ignore memsz fields
3332         for PT_TLS segments.
3333
3334 2018-08-18  Kevin Buettner  <kevinb@redhat.com>
3335
3336         * dwarf2expr.h (struct dwarf_expr_context): Add virtual method
3337         dwarf_variable_value.
3338         * dwarf2-frame.c (class dwarf_expr_executor):
3339         Add override for dwarf_variable_value.
3340         * dwarf2loc.c (class dwarf_evaluate_loc_desc): Likewise.
3341         (class symbol_needs_eval_context): Likewise.
3342         (indirect_synthetic_pointer): Add forward declaration.
3343         (sect_variable_value): New function.
3344         (dwarf2_compile_expr_to_ax): Add case for DW_OP_GNU_variable_value.
3345         * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Add case
3346         for DW_OP_GNU_variable_value.
3347
3348 2018-08-16  Tom Tromey  <tom@tromey.com>
3349
3350         * top.c (read_command_file): Update.
3351         (command_line_input): Remove "repeat" argument.
3352         * ada-lang.c (get_selections): Update.
3353         * linespec.c (decode_line_2): Update.
3354         * defs.h (command_line_input): Remove argument.
3355         * cli/cli-script.c (read_next_line): Update.
3356         * python/py-gdb-readline.c: Update.
3357
3358 2018-08-17  Tom Tromey  <tom@tromey.com>
3359
3360         * cli/cli-script.c (read_next_line): Pass 0 as repeat argument to
3361         command_line_input.
3362
3363 2018-08-15  Tom Tromey  <tom@tromey.com>
3364
3365         * aarch64-linux-tdep.c (aarch64_linux_core_read_vq): Use pulongest.
3366
3367 2018-08-14  Jan Vrany  <jan.vrany@fit.cvut.cz>
3368
3369         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Add -a option.
3370         If used, use find_pc_partial_function to find address range
3371         to disassemble.
3372         * mi/mi-main.c (mi_cmd_list_features): Report
3373         "data-disassemble-a-option" feature.
3374         * NEWS: Mention new -data-disassemble option -a.
3375
3376 2018-08-13  Tom Tromey  <tom@tromey.com>
3377
3378         * common/common-defs.h (_FORTIFY_SOURCE): Define.
3379
3380 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
3381
3382         * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): New function.
3383         (aarch64_linux_collect_sve_regset): Likewise.
3384         (aarch64_linux_iterate_over_regset_sections): Check for SVE.
3385         * regcache.h (regcache_map_entry_size): New function.
3386
3387 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
3388
3389         * aarch64-linux-tdep.c (SVE_HEADER_SIZE_LENGTH): Add define.
3390         (SVE_HEADER_MAX_SIZE_LENGTH): Likewise.
3391         (SVE_HEADER_VL_LENGTH): Likewise.
3392         (SVE_HEADER_MAX_VL_LENGTH): Likewise.
3393         (SVE_HEADER_FLAGS_LENGTH): Likewise.
3394         (SVE_HEADER_RESERVED_LENGTH): Likewise.
3395         (SVE_HEADER_SIZE_OFFSET): Likewise.
3396         (SVE_HEADER_MAX_SIZE_OFFSET): Likewise.
3397         (SVE_HEADER_VL_OFFSET): Likewise.
3398         (SVE_HEADER_MAX_VL_OFFSET): Likewise.
3399         (SVE_HEADER_FLAGS_OFFSET): Likewise.
3400         (SVE_HEADER_RESERVED_OFFSET): Likewise.
3401         (SVE_HEADER_SIZE): Likewise.
3402         (aarch64_linux_core_read_vq): Add function.
3403         (aarch64_linux_core_read_description): Check for SVE section.
3404
3405 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
3406
3407         * aarch64-fbsd-tdep.c
3408         (aarch64_fbsd_iterate_over_regset_sections): Add supply_size and
3409         collect_size.
3410         * aarch64-linux-tdep.c
3411         (aarch64_linux_iterate_over_regset_sections): Likewise.
3412         * alpha-linux-tdep.c
3413         (alpha_linux_iterate_over_regset_sections):
3414         * alpha-nbsd-tdep.c
3415         (alphanbsd_iterate_over_regset_sections): Likewise.
3416         * amd64-fbsd-tdep.c
3417         (amd64fbsd_iterate_over_regset_sections): Likewise.
3418         * amd64-linux-tdep.c
3419         (amd64_linux_iterate_over_regset_sections): Likewise.
3420         * arm-bsd-tdep.c
3421         (armbsd_iterate_over_regset_sections): Likewise.
3422         * arm-fbsd-tdep.c
3423         (arm_fbsd_iterate_over_regset_sections): Likewise.
3424         * arm-linux-tdep.c
3425         (arm_linux_iterate_over_regset_sections): Likewise.
3426         * corelow.c (get_core_registers_cb): Likewise.
3427         (core_target::fetch_registers): Likewise.
3428         * fbsd-tdep.c (fbsd_collect_regset_section_cb): Likewise.
3429         * frv-linux-tdep.c (frv_linux_iterate_over_regset_sections): Likewise.
3430         * gdbarch.h (void): Regenerate.
3431         * gdbarch.sh: Add supply_size and collect_size.
3432         * hppa-linux-tdep.c (hppa_linux_iterate_over_regset_sections): Likewise.
3433         * hppa-nbsd-tdep.c (hppanbsd_iterate_over_regset_sections): Likewise.
3434         * hppa-obsd-tdep.c (hppaobsd_iterate_over_regset_sections): Likewise.
3435         * i386-fbsd-tdep.c (i386fbsd_iterate_over_regset_sections): Likewise.
3436         * i386-linux-tdep.c (i386_linux_iterate_over_regset_sections): Likewise.
3437         * i386-tdep.c (i386_iterate_over_regset_sections): Likewise.
3438         * ia64-linux-tdep.c (ia64_linux_iterate_over_regset_sections): Likewise.
3439         * linux-tdep.c (linux_collect_regset_section_cb): Likewise.
3440         * m32r-linux-tdep.c (m32r_linux_iterate_over_regset_sections): Likewise.
3441         * m68k-bsd-tdep.c (m68kbsd_iterate_over_regset_sections): Likewise.
3442         * m68k-linux-tdep.c (m68k_linux_iterate_over_regset_sections): Likewise.
3443         * mips-fbsd-tdep.c (mips_fbsd_iterate_over_regset_sections): Likewise.
3444         * mips-linux-tdep.c (mips_linux_iterate_over_regset_sections): Likewise.
3445         * mips-nbsd-tdep.c (mipsnbsd_iterate_over_regset_sections): Likewise.
3446         * mips64-obsd-tdep.c (mips64obsd_iterate_over_regset_sections): Likewise.
3447         * mn10300-linux-tdep.c (am33_iterate_over_regset_sections): Likewise.
3448         * nios2-linux-tdep.c (nios2_iterate_over_regset_sections): Likewise.
3449         * ppc-fbsd-tdep.c (ppcfbsd_iterate_over_regset_sections): Likewise.
3450         * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections): Likewise.
3451         * ppc-nbsd-tdep.c (ppcnbsd_iterate_over_regset_sections): Likewise.
3452         * ppc-obsd-tdep.c (ppcobsd_iterate_over_regset_sections): Likewise.
3453         * riscv-linux-tdep.c (riscv_linux_iterate_over_regset_sections): Likewise.
3454         * rs6000-aix-tdep.c (rs6000_aix_iterate_over_regset_sections): Likewise.
3455         * s390-linux-tdep.c (s390_iterate_over_regset_sections): Likewise.
3456         * score-tdep.c (score7_linux_iterate_over_regset_sections): Likewise.
3457         * sh-tdep.c (sh_iterate_over_regset_sections): Likewise.
3458         * sparc-tdep.c (sparc_iterate_over_regset_sections): Likewise.
3459         * tilegx-linux-tdep.c (tilegx_iterate_over_regset_sections): Likewise.
3460         * vax-tdep.c (vax_iterate_over_regset_sections): Likewise.
3461         * xtensa-tdep.c (xtensa_iterate_over_regset_sections): Likewise.
3462
3463 2018-08-10  Simon Marchi  <simon.marchi@ericsson.com>
3464
3465         * nat/linux-osdata.c (commandline_from_pid): Replace xstrprintf
3466         with string_printf.
3467
3468 2018-08-10  Keith Seitz  <keiths@redhat.com>
3469
3470         * compile/compile-c-support.c (add_code_header, add_code_footer):
3471         Move into policy class.
3472         (c_push_user_expression, pop_user_expression_nop)
3473         (c_add_code_header, c_add_code_footer, c_add_input): New policy class.
3474         (compile_program): New host class.
3475         (c_compile_program): New typedef.
3476         (c_compute_porgram): Use c_compile_program.
3477
3478 2018-08-10  Keith Seitz  <keiths@redhat.com>
3479
3480         * compile/compile-internal.h (compile_instance::~compile_instance):
3481         Remove calls to htab_delete.
3482         <m_type_map, m_symbol_err_map>: Switch type to htab_up.
3483         * compile.c (compile_instance::compile_instance): Initialize
3484         htab unique pointers.
3485         (compile_instance::get_cached_type, compile_instance::insert_type)
3486         (compile_instance::error_symbol_once): Update for unique_ptr.
3487
3488 2018-08-10  Keith Seitz  <keiths@redhat.com>
3489
3490         * compile/compile-c-symbols.c (struct symbol_error)
3491         (hash_symbol_error, eq_symbol_error, del_symbol_error)
3492         (compile_instance::insert_symbol_error)
3493         (compile_instance::error_symbol_once): Move to ...
3494         * compile/compile.c: ... here.
3495
3496 2018-08-10  Keith Seitz  <keiths@redhat.com>
3497
3498         * compile/compile-c-support.c (c_get_compile_context): Use `new'
3499         instead of `new_compile_instance'.
3500         * compile/compile-c-symbols.c (compile_instance::insert_symbol_error):
3501         Update description.
3502         If the symbol error map is not initialized, create it.
3503         (generate_c_for_for_one_symbol): Do not check/initialize
3504         the symbol error map.
3505         * compile/compile-c-types.c (compile_c_instance): Make a class.
3506         Update all callers.
3507         (compile_instance::compile_instance): Initialize the type cache.
3508         (get_cached_type): New function.
3509         (insert_type): Update description.
3510         (compile_c_instance::m_default_cflags): Define.
3511         (convert_type): Update description.  Use get_cached_type.
3512         (delete_instance): Moved to destructor.
3513         (new_compile_instance): Moved to constructor.
3514         * compile/compile-c.h (compile_c_instance): Make class inheriting
3515         from compile_instance.
3516         <base>: Remove field.
3517         <type_map, symbol_err_map>: Move to base class.
3518         <c_plugin>: Rename to `m_plugin' and remove pointer type.
3519         * compile/compile-internal.h (compile_instance): Make class.
3520         <type_map_t, symbol_err_map_t>: Define.
3521         <fe>: Rename to `m_gcc_fe'.
3522         <scope, block, gcc_target_options>: Add `m_' prefix.
3523         <m_type_map, m_symbol_err_map>: New fields, moved from
3524         compile_c_instance.
3525         <destroy>: Remove.
3526         (convert_type, new_compile_instance): Remove.
3527         * compile/compile.c (cleanup_compile_instance): Remove.
3528         (compile_to_object): Use unique_ptr to eliminate cleanups.
3529         (compile_instance::set_print_callback, compile_instance::version)
3530         (compile_instance::set_verbose)
3531         (compile_instance::set_driver_filename)
3532         (compile_instance::set_triplet_regexp)
3533         (compile_instance::set_arguments)
3534         (compile_instance::set_source_file)
3535         (compile_instance::compile): Define.
3536
3537 2018-08-10  Keith Seitz  <keiths@redhat.com>
3538
3539         * Makefile.in (HFILES_NO_SRCDIR): Add compile/gcc-c-plugin.h.
3540         * compile/compile-c-types.c: Define GCC_METHODN macros and include
3541         gcc-c-fe.def to define C plugin.
3542         (delete_instance): Delete `c_plugin'.
3543         (new_compile_instance): Initialize `c_plugin'.
3544         * compile/compile-c.h: Include gcc_c_plugin.h.
3545         (struct compile_c_instance) <c_plugin>: New member.
3546         * gcc-c-plugin.h: New file.
3547         Update all callers with API change.
3548
3549 2018-08-10  Keith Seitz  <keiths@redhat.com>
3550
3551         * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Move header files ...
3552         (HFILES_NO_SRCDIR): ... to here.
3553         Add compile-internal.h and compile-c.h.
3554         * compile/compile-c-support.c: Include compile-c.h.
3555         * compile/compile-c-symbols.c: Include compile-c.h.
3556         (generate_c_for_variable_locations): Update comment.
3557         * compile/compile-c-types.c: Include compile-c.h.
3558         * compile/compile-c.h: New file -- moved C language declarations
3559         from other files here.
3560         * compile/compile-internal.h: Do not include hashtab.h or
3561         common/enum-flags.h.
3562         (gcc_qualifiers_flags, struct compile_c_instance, C_CTX)
3563         (gcc_convert_symbol, gcc_symbol_address)
3564         (generate_c_for_variable_locations, c_get_mode_for_size)
3565         (c_get_range_decl_name): Definitions moved to compile-c.h.
3566         * compile/compile-loc2c.c: Include compile-c.h.
3567
3568 2018-08-10  Keith Seitz  <keiths@redhat.com>
3569
3570         * compile/compile-c-symbols.c (symbol_substitution_name): Rename to ...
3571         (c_symbol_substitution_name): ... this.
3572         Update all callers.
3573
3574 2018-08-10  Keith Seitz  <keiths@redhat.com>
3575
3576         * compile/compile-c-support.c (c_compute_program): Use
3577         unique_xmalloc_ptr to eliminate cleanup.
3578         * compile/compile-c-symbols.c (generate_c_for_variable_locations):
3579         Return a unique_xmalloc_ptr and eliminate cleanup.
3580         * compile/compile-internal.h (generate_c_for_variable_locations):
3581         Return unique_xmalloc_ptr and update description.
3582
3583 2018-08-10  Alan Hayward  <alan.hayward@arm.com>
3584
3585         * corelow.c (core_target::get_core_register_section): Rename
3586         min_size to section_min_size.
3587
3588 2018-08-09  Jim Wilson  <jimw@sifive.com>
3589
3590         * Makefile.in (ALL_TARGET_OBS): Add riscv-linux-tdep.c.
3591         (ALLDEPFILES): Add riscv-linux-nat.c, and riscv-linux-tdep.c.
3592         * NEWS: Mention new GNU/Linux RISC-V target.
3593         * configure.host: Add riscv*-*-linux*.
3594         * configure.nat: Add riscv*.
3595         * configure.tgt: Add riscv*-*-linux*.
3596         * riscv-linux-nat.c: New file.
3597         * riscv-linux-tdep.c: New file.
3598
3599 2018-08-09  Andrew Burgess  <andrew.burgess@embecosm.com>
3600
3601         * infrun.c (resume): Make static, add forward declaration.
3602         (proceed): Update header comment.
3603         * infrun.h (resume): Delete declaration.
3604
3605 2018-08-09  Tom Tromey  <tom@tromey.com>
3606
3607         * riscv-tdep.h: Minor formatting fixes.
3608
3609 2018-08-09  Simon Marchi  <simon.marchi@ericsson.com>
3610
3611         * common/scoped_mmap.c (mmap_file): Silence ARI warning.
3612         * dwarf-index-cache.c (create_dir_and_check): Likewise.
3613         (test_mkdir_recursive): Likewise.
3614         * dwarf-index-write.c (write_psymtabs_to_index): Likewise.
3615
3616 2018-08-09  Andrew Burgess  <andrew.burgess@embecosm.com>
3617
3618         * valarith.c (value_subscripted_rvalue): If an array is not in
3619         memory, and we don't know the upper bound, then we can't know that
3620         the requested element exists or not.
3621
3622 2018-08-08  Simon Marchi  <simon.marchi@ericsson.com>
3623
3624         * target.c (str_comma_list_concat_elem): Fix typo in comment.
3625         (target_options_to_string): Add comment.
3626
3627 2018-08-08  Tom Tromey  <tom@tromey.com>
3628
3629         * unittests/scoped_mmap-selftests.c: Check result of "write".
3630
3631 2018-08-08  Jim Wilson  <jimw@sifive.com>
3632
3633         * riscv-tdep.c (enum opcode): Add jump, branch, lr, and sc opcodes.
3634         (decode_register_index_short): New.
3635         (decode_j_type_insn, decode_cj_type_insn): New.
3636         (decode_b_type_insn, decode_cb_type_insn): New.
3637         (riscv_insn::decode): Add support for jumps, branches, lr, and sc.  New
3638         local xlen.  Check xlen when decoding ambiguous compressed insns.  In
3639         compressed decode, use is_c_lui_insn instead of is_lui_insn, and
3640         is_c_sw_insn instead of is_sw_insn.
3641         (riscv_next_pc, riscv_next_pc_atomic_sequence): New.
3642         (riscv_software_single_step): New.
3643         * riscv-tdep.h (riscv_software_single_step): Declare.
3644
3645         * riscv-tdep.c (riscv_isa_xlen): Drop static.
3646         * riscv-tdep.h (riscv_isa_xlen): Add extern declaration.
3647
3648 2018-08-08  Andrew Burgess  <andrew.burgess@embecosm.com>
3649
3650         PR gdb/18050:
3651         * target.c (dispose_inferior): Don't dispose of inferiors that are
3652         already killed.
3653
3654 2018-08-08  Szabolcs Nagy  <szabolcs.nagy@arm.com>
3655
3656         * remote.c (remote_target::download_tracepoint): Change char* to
3657         const char*.
3658
3659 2018-08-07  Simon Marchi  <simon.marchi@polymtl.ca>
3660
3661         * target.h (target_options_to_string): Return an std::string.
3662         * target.c (str_comma_list_concat_elem): Return void, use
3663         std::string.
3664         (do_option): Likewise.
3665         (target_options_to_string): Return an std::string.
3666         * linux-nat.c (linux_nat_target::wait): Adjust.
3667         * target-debug.h (target_debug_print_options): Adjust.
3668
3669 2018-08-07  Tom Tromey  <tom@tromey.com>
3670
3671         * Makefile.in (CPPFLAGS): New variable.
3672         (INTERNAL_CPPFLAGS): Use it.
3673
3674 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
3675
3676         * NEWS: Mention the index cache.
3677
3678 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
3679
3680         * common/pathstuff.h (get_standard_cache_dir): New.
3681         * common/pathstuff.c (get_standard_cache_dir): New.
3682         * build-id.h (build_id_to_string): New.
3683         * dwarf-index-common.h (INDEX4_SUFFIX, INDEX5_SUFFIX,
3684         DEBUG_STR_SUFFIX): Move to here.
3685         * dwarf-index-write.c (INDEX4_SUFFIX, INDEX5_SUFFIX,
3686         DEBUG_STR_SUFFIX): Move from there.
3687         (write_psymtabs_to_index): Make non-static, add basename
3688         parameter.  Write to temporary files, rename when done.
3689         (save_gdb_index_command): Adjust call to
3690         write_psymtabs_to_index.
3691         * dwarf2read.h (dwarf2_per_objfile) <index_cache_res>: New
3692         field.
3693         * dwarf2read.c (dwz_file) <index_cache_res>: New field.
3694         (get_gdb_index_contents_from_cache): New.
3695         (get_gdb_index_contents_from_cache_dwz): New.
3696         (dwarf2_initialize_objfile): Read index from cache.
3697         (dwarf2_build_psymtabs): Save to index.
3698         * dwarf-index-cache.h: New file.
3699         * dwarf-index-cache.c: New file.
3700         * dwarf-index-write.h: New file.
3701
3702 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
3703
3704         * gnulib/aclocal.m4: Re-generate.
3705         * gnulib/config.in: Re-generate.
3706         * gnulib/configure: Re-generate.
3707         * gnulib/import/Makefile.am: Re-generate.
3708         * gnulib/import/Makefile.in: Re-generate.
3709         * gnulib/import/m4/gnulib-cache.m4: Re-generate.
3710         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
3711         * gnulib/import/m4/mkdir.m4: New file.
3712         * gnulib/import/mkdir.c: New file.
3713         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkdir
3714         module.
3715
3716 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
3717
3718         * Makefile.in (COMMON_SFILES): Add common/scoped_mmap.c.
3719         * common/scoped_mmap.c: New file.
3720         * common/scoped_mmap.h (destroy): New method.
3721         (~scoped_mmap, reset): Use destroy.
3722         (scoped_mmap): New move constructor.
3723         (mmap_file): New declaration.
3724         * unittests/scoped_mmap-selftests.c (test_normal,
3725         test_invalid_filename, run_tests): New functions.
3726         (_initialize_scoped_mmap_selftests): Register selftest.
3727
3728 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
3729
3730         * dwarf2read.c (read_gdb_index_from_section): Rename to...
3731         (read_gdb_index_from_buffer): ... this.  Remove section
3732         parameter, add buffer parameter.
3733         (get_gdb_index_contents_ftype,
3734         get_gdb_index_contents_dwz_ftype): New typedefs.
3735         (dwarf2_read_gdb_index): Add callback parameters to get the
3736         index contents.
3737         (get_gdb_index_contents_from_section): New.
3738         (dwarf2_initialize_objfile): Update call to
3739         dwarf2_read_gdb_index.
3740
3741 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
3742
3743         * common/filestuff.h (gdb_fopen_cloexec): New overload.
3744         (gdb_open_cloexec): Likewise.
3745         * nat/linux-osdata.c (command_from_pid): Use string_printf.
3746         (commandline_from_pid): Likewise.
3747         (linux_xfer_osdata_threads): Likewise.
3748         (linux_xfer_osdata_fds): Likewise.
3749         * ada-lang.c (is_package_name): Likewise.
3750         * auxv.c (procfs_xfer_auxv): Likewise.
3751         * breakpoint.c (print_one_breakpoint_location): Use
3752         uiout::field_fmt.
3753         (print_one_catch_solib): Use string_printf.
3754         * coff-pe-read.c (add_pe_exported_sym): Likewise.
3755         (add_pe_forwarded_sym): Likewise.
3756         * dwarf2read.c (create_type_unit_group): Likewise.
3757         (build_error_marker_type): Likewise.
3758         * infcall.c (get_function_name): Likewise.
3759         * valprint.c (print_converted_chars_to_obstack): Likewise.
3760         * xtensa-tdep.c (xtensa_register_type): Likewise.
3761
3762 2018-08-06  Simon Marchi  <simon.marchi@ericsson.com>
3763
3764         * remote.c (remote_target::download_tracepoint): Fix format
3765         string errors.
3766
3767 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
3768
3769         * tracefile.c: Include common/byte-vector.h.
3770         (trace_save): Change type of buf to gdb::byte_vector.  Initialize
3771         with trace_regblock_size if needed.  Update uses of buf.
3772
3773 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
3774
3775         * tracepoint.h (collection_list) <m_regs_mask>: Change type to
3776         std::vector<unsigned char>.
3777         * tracepoint.c (collection_list::collection_list): Remove
3778         m_regs_mask initializer from initializer list.  Resize
3779         m_regs_mask using the largest remote register number.
3780         (collection_list::add_remote_register): Remove size check on
3781         m_regs_mask.  Use at to access element.
3782         (collection_list::stringify): Change type of temp_buf to
3783         gdb::char_vector.  Update uses of temp_buf.  Resize if needed to
3784         stringify the register mask.  Use pack_hex_byte for the register
3785         mask.
3786
3787 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
3788
3789         * tracepoint.h (class collection_list) <add_register>: Remove.
3790         <add_remote_register, add_ax_registers, add_local_register>:
3791         Declare.
3792         <add_memrange>: Add scope parameter.
3793         * tracepoint.c (encode_actions_1): Likewise.
3794         (collection_list::add_register): Rename to ...
3795         (collection_list::add_remote_register): ... this.  Update
3796         comment.
3797         (collection_list::add_ax_registers, add_local_register): New
3798         methods.
3799         (collection_list::add_memrange): Add scope parameter.  Call
3800         add_local_register instead of add_register.
3801         (finalize_tracepoint_aexpr): New function.
3802         (collection_list::collect_symbol): Update calls to add_memrange.
3803         Call add_local_register instead of add_register.  Call
3804         add_ax_registers.  Call finalize_tracepoint_aexpr.
3805         (encode_actions_1): Get remote regnos for $reg action.  Call
3806         add_remote_register, add_ax_registers, and add_local_register.
3807         Update call to add_memrange.  Call finalize_tracepoint_aexpr.
3808         (validate_actionline): Call finalize_tracepoint_aexpr.
3809
3810 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
3811
3812         * remote.c (remote_target::download_tracepoint): Remove BUF_SIZE.
3813         Replace array buf with gdb::char_vector buf, of size
3814         get_remote_packet_size ().  Replace references to buf and
3815         BUF_SIZE to buf.data () and buf.size ().  Replace strcpy, strcat
3816         and xsnprintf with snprintf.  Raise errors if the buffer is too
3817         small.
3818
3819 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
3820
3821         * remote.c (remote_target::download_tracepoint): Fix the has_more
3822         predicate in the QTDP action list iteration.
3823
3824 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
3825
3826         * remote.c (remote_target::download_tracepoint): Fix indentation
3827         in for block.
3828
3829 2018-08-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
3830
3831         * proc-api.c (_initialize_proc_api): Remove c, unused.
3832         * procfs.c (procfs_init_inferior): Remove signals, unused.
3833         (procfs_target::make_corefile_notes): Remove old_chain, fpregs,
3834         unused.
3835
3836 2018-08-06  Sergey Korolev  <s.korolev@ndmsystems.com>
3837             Andrew Burgess  <andrew.burgess@embecosm.com>
3838
3839         * linux-nat.c (linux_nat_target::follow_fork): Avoid using
3840         'W_STOPCODE (0)' as this could be ambiguous.
3841
3842 2018-08-03  Sergio Durigan Junior  <sergiodj@redhat.com>
3843
3844         * ser-tcp.c (net_open): Fix thinko when deciding whether to
3845         disable TCP's Nagle algorithm (use "ai_protocol" instead of
3846         "ai_socktype").
3847
3848 2018-08-02  Tom Tromey  <tom@tromey.com>
3849
3850         PR symtab/16842.
3851         * dwarf2read.c (read_func_scope): Set symtab on template parameter
3852         symbols.
3853         (process_structure_scope): Likewise.
3854
3855 2018-08-02  Xavier Roirand  <roirand@adacore.com>
3856
3857         PR gdb/22629:
3858         * darwin-nat.c (darwin_kill_inferior): Fix handling of
3859         kill inferior.
3860
3861 2018-08-02  Tom Tromey  <tom@tromey.com>
3862
3863         * darwin-nat.c (find_inferior_task_it, darwin_find_thread)
3864         (darwin_suspend_inferior, darwin_resume_inferior)
3865         (darwin_decode_notify_message, darwin_resume_inferior_threads)
3866         (darwin_check_new_threads): Check result of get_darwin_inferior.
3867
3868 2018-07-31  Joel Brobecker  <brobecker@adacore.com>
3869
3870         GDB 8.1.1 released.
3871
3872 2018-07-31  Jan Vrany  <jan.vrany@fit.cvut.cz>
3873
3874         * varobj.c (varobj_get_path_expr_parent): Report an error if
3875         parent is a dynamic varobj.
3876
3877 2018-07-31  Simon Marchi  <simon.marchi@ericsson.com>
3878
3879         * gnulib/aclocal.m4: Re-generate.
3880         * gnulib/config.in: Re-generate.
3881         * gnulib/configure: Re-generate.
3882         * gnulib/import/Makefile.in: Re-generate.
3883         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
3884         * gnulib/import/m4/onceonly.m4: Re-generate.
3885
3886 2018-07-31  Simon Marchi  <simon.marchi@ericsson.com>
3887
3888         * target-descriptions.c (struct xml_test_tdesc): New.
3889         (xml_tdesc): Change type to std::vector<xml_test_tdesc>.
3890         (record_xml_tdesc): Update.
3891         (maintenance_check_xml_descriptions): Update.
3892         * target-descriptions.h (record_xml_tdesc): Update comment.
3893
3894 2018-07-30  Andrew Burgess  <andrew.burgess@embecosm.com>
3895
3896         * eval.c (evaluate_subexp_for_sizeof): Check for array type before
3897         checking array bounds are defined.
3898
3899 2018-07-30  Tom Tromey  <tom@tromey.com>
3900
3901         * nat/linux-osdata.c (pid_pgid_entry::operator<): Fix
3902         irreflexivity violation.
3903
3904 2018-07-30  Tom Tromey  <tom@tromey.com>
3905
3906         * cli/cli-decode.c (lookup_cmd): Remove lint code.
3907         * value.c (unpack_long): Remove lint code.
3908         * valops.c (value_ind): Remove lint code.
3909         * valarith.c (value_x_binop, value_x_unop, value_equal)
3910         (value_pos): Remove lint code.
3911
3912 2018-07-28  Tom de Vries  <tdevries@suse.de>
3913
3914         * eval.c (evaluate_subexp_for_sizeof): Interpret size of dynamic type
3915         with undefined upper bound as <optimized out>.
3916
3917 2018-07-27  Sergio Durigan Junior  <sergiodj@redhat.com>
3918
3919         * gcore.in: Rename variable "name" to "prefix".  Expand
3920         "usage" text.
3921
3922 2018-07-14  Jon Turney  <jon.turney@dronecode.org.uk>
3923
3924         * windows-nat.c (windows_nat_target::create_inferior): Update to
3925         call close() in global namespace.
3926
3927 2018-07-26  Tom Tromey  <tom@tromey.com>
3928
3929         * dwarf-index-write.c (add_address_entry): Don't add objfile
3930         offsets.
3931         * dbxread.c (find_stab_function): Rename from
3932         find_stab_function_addr.  Return a bound_minimal_symbol.
3933         (read_dbx_symtab): Use raw_text_low, raw_text_high.
3934         Don't add objfile offsets.
3935         (end_psymtab): Use raw_text_low, raw_text_high,
3936         MSYMBOL_VALUE_RAW_ADDRESS.
3937         (read_ofile_symtab): Update.
3938         (process_one_symbol): Update.
3939         * dwarf2read.c (create_addrmap_from_index): Don't add objfile
3940         offsets.
3941         (dw2_relocate): Remove.
3942         (dw2_find_pc_sect_symtab): Bias PC by the text offset before
3943         searching addrmap.
3944         (dwarf2_gdb_index_functions, dwarf2_debug_names_functions):
3945         Update.
3946         (process_psymtab_comp_unit_reader, add_partial_symbol)
3947         (add_partial_subprogram, dwarf2_ranges_read): Update.
3948         (load_partial_dies): Update.
3949         (add_address_entry): Don't add objfile offsets.
3950         (dwarf2_build_include_psymtabs): Update.
3951         (create_addrmap_from_aranges): Don't add objfile offsets.
3952         (dw2_find_pc_sect_compunit_symtab): Update.
3953         * mdebugread.c (parse_symbol): Don't add objfile offsets.
3954         (parse_lines): Remove 'pst' parameter, replace with 'textlow'.
3955         Update.
3956         (parse_partial_symbols): Don't add objfile offsets.  Use
3957         raw_text_low, raw_text_high.  Update.
3958         (handle_psymbol_enumerators, psymtab_to_symtab_1): Update.
3959         * objfiles.c (objfile_relocate1): Don't relocate psymtabs_addrmap
3960         or call 'relocate' quick function.  Clear psymbol_map.
3961         * psympriv.h (struct partial_symbol) <address>: Add section
3962         offset.
3963         <set_unrelocated_address>: Rename from set_address.
3964         <raw_text_low, raw_text_high>: New methods.
3965         <text_low, text_high>: Add objfile parameter.
3966         (add_psymbol_to_bcache): Add 'section' parameter.  Call
3967         set_unrelocated_address.
3968         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
3969         (find_pc_psymbol): Update.
3970         (fixup_psymbol_section, relocate_psymtabs): Remove.
3971         (dump_psymtab, psym_functions): Update.
3972         (add_psymbol_to_bcache, add_psymbol_to_list): Add 'section'
3973         parameter.
3974         (maintenance_info_psymtabs, maintenance_check_psymtabs): Update.
3975         (start_psymtab_common): Update.
3976         * symfile-debug.c (debug_qf_relocate): Remove.
3977         (debug_sym_quick_functions): Update.
3978         * symfile.h (struct quick_symbol_functions) <relocate>: Remove.
3979         * xcoffread.c (scan_xcoff_symtab): Don't add objfile offsets.
3980         Update.
3981
3982 2018-07-26  Tom Tromey  <tromey@redhat.com>
3983
3984         * dbxread.c (end_psymtab): Use text_high_valid and
3985         text_low_valid.
3986         * mdebugread.c (parse_partial_symbols): Use text_low_valid.
3987         (psymtab_to_symtab_1): Use text_high_valid and text_low_valid.
3988         * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
3989         Update comment.
3990         <text_low_valid, text_high_valid>: New fields.
3991         <set_text_low, set_text_high>: Update.
3992         * xcoffread.c (scan_xcoff_symtab): Use text_low_valid.
3993
3994 2018-07-26  Tom Tromey  <tom@tromey.com>
3995
3996         * dbxread.c (read_dbx_symtab, end_psymtab, read_ofile_symtab):
3997         Update.
3998         * dwarf2read.c (dwarf2_create_include_psymtab): Don't initialize
3999         textlow and texthigh fields.
4000         (process_psymtab_comp_unit_reader, dwarf2_build_include_psymtabs):
4001         Update.
4002         * mdebugread.c (parse_lines, parse_partial_symbols)
4003         (psymtab_to_symtab_1): Update.
4004         * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
4005         Rename fields.  Update comment.  Now private.
4006         <text_low, text_high, set_text_low, set_text_high>: New methods.
4007         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
4008         (find_pc_sect_psymbol, relocate_psymtabs, dump_psymtab)
4009         (start_psymtab_common, maintenance_info_psymtabs)
4010         (maintenance_check_psymtabs): Update.
4011         * xcoffread.c (xcoff_end_psymtab): Don't initialize textlow and
4012         texthigh fields.
4013         (scan_xcoff_symtab): Update.
4014
4015 2018-07-26  Tom Tromey  <tromey@redhat.com>
4016
4017         * psympriv.h (struct partial_symbol) <unrelocated_address,
4018         address, set_address>: New methods.
4019         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymbol)
4020         (fixup_psymbol_section, relocate_psymtabs): Update.
4021         (print_partial_symbols): Add 'objfile' parameter.  Update.
4022         (dump_psymtab, add_psymbol_to_bcache, psym_fill_psymbol_map):
4023         Update.
4024
4025 2018-07-26  Tom Tromey  <tom@tromey.com>
4026
4027         * dwarf-index-write.c (write_psymbols, debug_names::insert)
4028         (debug_names::write_psymbols): Update.
4029         * psympriv.h (struct partial_symbol): Derive from
4030         general_symbol_info.
4031         <obj_section>: New method.
4032         (PSYMBOL_DOMAIN, PSYMBOL_CLASS): Remove.n
4033         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
4034         (find_pc_sect_psymbol, fixup_psymbol_section)
4035         (match_partial_symbol, lookup_partial_symbol, relocate_psymtabs)
4036         (print_partial_symbols, recursively_search_psymtabs)
4037         (compare_psymbols, psymbol_hash, psymbol_compare)
4038         (add_psymbol_to_bcache, maintenance_check_psymtabs)
4039         (psymbol_name_matches, psym_fill_psymbol_map): Update.
4040
4041 2018-07-26  Tom Tromey  <tromey@redhat.com>
4042
4043         * dbxread.c (end_psymtab): Remove dead code.
4044
4045 2018-07-26  Andrew Burgess  <andrew.burgess@embecosm.com>
4046
4047         * dwarf2-frame-tailcall.c (tailcall_frame_sniffer): Exit early if
4048         DWARF unwinders are disabled.
4049         * dwarf2-frame.c: Add dwarf2read.h include.
4050         (dwarf2_frame_sniffer): Exit early if DWARF unwinders are
4051         disabled.
4052         (dwarf2_frame_unwinders_enabled_p): Define.
4053         (show_dwarf_unwinders_enabled_p): New function.
4054         (_initialize_dwarf2_frame): Register switch to control DWARF
4055         unwinder use.
4056         * dwarf2-frame.h (dwarf2_frame_unwinders_enabled_p): Declare.
4057         * dwarf2read.c (set_dwarf_cmdlist): Remove static keyword.
4058         (show_dwarf_cmdlist): Remove static keyword.
4059         * dwarf2read.h (set_dwarf_cmdlist): Declare.
4060         (show_dwarf_cmdlist): Declare.
4061         * NEWS: Document new feature.
4062
4063 2018-07-26  Tom de Vries  <tdevries@suse.de>
4064
4065         PR breakpoints/23366
4066         * infcmd.c (info_program_command): Handle ptid == minus_one_ptid.
4067
4068 2018-07-26  Tom de Vries  <tdevries@suse.de>
4069
4070         * dwarf2read.c (read_subrange_type): Warn if DW_AT_upper_bound or
4071         DW_AT_count can't be translated to a dynamic prop.
4072
4073 2018-07-25  Tom de Vries  <tdevries@suse.de>
4074
4075         * dwarf2loc.c (dwarf2_locexpr_baton_eval): Wrap ctx.eval call in
4076         try/catch.
4077
4078 2018-07-25  Jan Vrany  <jan.vrany@fit.cvut.cz>
4079
4080         * breakpoint.c (enable_disable_bp_num_loc): Notify observers.
4081
4082 2018-07-25  Joel Brobecker  <brobecker@adacore.com>
4083
4084         * MAINTAINERS (Global Maintainers): Add Tom Tromey.
4085
4086 2018-07-24  Keith Seitz  <keiths@redhat.comt
4087
4088         PR symtab/23010
4089         * dwarf2read.c (dw2_add_symbol_to_list): New function.
4090         (fixup_go_packaging, new_symbol): Use dw2_add_symbol_to_list
4091         instead of add_symbol_to_list.
4092         (read_file_scope): Call prepare_one_comp_unit before reading
4093         any other DIEs.
4094
4095 2018-07-24  Simon Marchi  <simon.marchi@ericsson.com>
4096
4097         * common/scoped_mmap.h (class scoped_mmap): Fix indentation.
4098
4099 2018-07-24  Tom Tromey  <tom@tromey.com>
4100
4101         * utils.c (malloc, realloc, free): Don't declare.
4102         * configure, config.in: Rebuild.
4103         * configure.ac: Don't check for declarations of free, malloc, or
4104         realloc.
4105
4106 2018-07-22  Simon Marchi  <simon.marchi@polymtl.ca>
4107
4108         * aarch64-linux-nat.c
4109         (aarch64_linux_nat_target::stopped_data_address): Remove unused
4110         variable.
4111         * arm-linux-nat.c (fetch_regs): Likewise.
4112         (store_regs): Likewise.
4113         (fetch_vfp_regs): Likewise.
4114         (store_vfp_regs): Likewise.
4115         (arm_linux_nat_target::insert_hw_breakpoint): Likewise.
4116         (arm_linux_nat_target::remove_hw_breakpoint): Likewise.
4117         (arm_linux_nat_target::insert_watchpoint): Likewise.
4118         (arm_linux_nat_target::remove_watchpoint): Likewise.
4119         * mips-linux-nat.c (mips_linux_nat_target::insert_watchpoint):
4120         Likewise.
4121         * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs):
4122         Likewise.
4123         * ppc-linux-nat.c (fetch_register): Likewise.
4124         (fetch_all_gp_regs): Likewise.
4125         (fetch_ppc_registers): Likewise.
4126         (store_all_gp_regs): Likewise.
4127         (store_ppc_registers): Likewise.
4128         (hwdebug_insert_point): Likewise.
4129         (can_use_watchpoint_cond_accel): Likewise.
4130         * remote-sim.c (gdb_os_write_stdout): Likewise.
4131
4132 2018-07-22  Simon Marchi  <simon.marchi@polymtl.ca>
4133             Tom Tromey  <tom@tromey.com>
4134
4135         * warning.m4 (AM_GDB_WARNINGS): Add -Wunused-variable and special
4136         test for it.
4137         * configure: Rebuild.
4138
4139 2018-07-22  Tom Tromey  <tom@tromey.com>
4140
4141         * regformats/regdat.sh: Define xmltarget_${name} inside
4142         #ifndef IN_PROCESS_AGENT.
4143
4144 2018-07-22  Tom Tromey  <tom@tromey.com>
4145
4146         * value.c (value_fetch_lazy_bitfield): Remove unused variable.
4147
4148 2018-07-22  Tom Tromey  <tom@tromey.com>
4149
4150         * symfile.c (reread_symbols): Notify iter, not objfile.
4151
4152 2018-07-22  Tom Tromey  <tom@tromey.com>
4153
4154         * ravenscar-thread.c (ravenscar_thread_target::store_registers):
4155         Use arch_ops.
4156         (ravenscar_thread_target::prepare_to_store): Likewise.
4157
4158 2018-07-22  Tom Tromey  <tom@tromey.com>
4159
4160         * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Remove
4161         unused variable.  Call value_fetch_lazy when needed.
4162         * guile/scm-pretty-print.c (gdbscm_apply_val_pretty_printer):
4163         Remove unused variable.  Call value_fetch_lazy when needed.
4164
4165 2018-07-22  Tom Tromey  <tom@tromey.com>
4166
4167         * m32c-tdep.c (mark_dma): Return void.
4168         (make_regs): Remove unused declarations.
4169
4170 2018-07-22  Tom Tromey  <tom@tromey.com>
4171
4172         * guile/scm-cmd.c (gdbscm_dont_repeat): Call
4173         cmdscm_get_valid_command_smob_arg_unsafe for effect.
4174         * guile/scm-block.c (gdbscm_make_block_syms_iter): Call
4175         bkscm_get_valid_block_smob_arg_unsafe for effect.
4176
4177 2018-07-22  Tom Tromey  <tom@tromey.com>
4178
4179         * bfin-tdep.c (bfin_push_dummy_call): Use arg_type, not
4180         value_type.
4181
4182 2018-07-22  Tom Tromey  <tom@tromey.com>
4183
4184         * windows-nat.c (saved_context): Conditionally define.
4185         * remote.c (remote_target::remote_btrace_maybe_reopen):
4186         Conditionally declare "warned".
4187         * inflow.c (sigquit_ours): Conditionally define.
4188         (new_tty): Move "tty" declaration inside #if.
4189         * guile/guile.c (guile_datadir): Conditionally define.
4190         * charset.c (set_be_le_names): Move some declarations inside #if.
4191         * btrace.c (parse_xml_btrace): Move "errcode" declaration inside
4192         #if.
4193         (parse_xml_btrace_conf): Likewise.
4194
4195 2018-07-22  Tom Tromey  <tom@tromey.com>
4196
4197         * spu-tdep.c (spu_get_overlay_table): Remove unused variable.
4198
4199 2018-07-22  Tom Tromey  <tom@tromey.com>
4200
4201         * guile/scm-value.c (gdbscm_value_call): Remove unused variables.
4202         * guile/scm-math.c (vlscm_unop_gdbthrow, vlscm_binop_gdbthrow)
4203         (vlscm_convert_typed_value_from_scheme): Remove unused variable.
4204         * buildsym-legacy.c (get_macro_table): Remove unused variable.
4205         * stack.c (frame_apply_level_command): Remove unused variable.
4206         * tic6x-tdep.c (tic6x_push_dummy_call): Remove unused variable.
4207         * sparc64-tdep.c (adi_examine_command): Remove unused variable.
4208         * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Remove
4209         unused variable.
4210         * nios2-tdep.c (nios2_push_dummy_call): Remove unused variable.
4211         * mep-tdep.c (mep_push_dummy_call): Remove unused variable.
4212         * ada-lang.c (ada_lookup_symbol_list_worker): Remove unused
4213         variable.
4214         * amd64-tdep.c (amd64_supply_xsave): Remove unused variable.
4215         * arm-tdep.c (arm_record_data_proc_misc_ld_str): Remove unused
4216         variable.
4217         * breakpoint.c (check_no_tracepoint_commands, update_watchpoint):
4218         Remove unused variable.
4219         * cli/cli-script.c (recurse_read_control_structure): Remove unused
4220         variable.
4221         * common/tdesc.c (print_xml_feature::visit): Remove unused
4222         variable.
4223         * compile/compile-object-load.c (store_regs): Remove unused
4224         variables.
4225         * complaints.c (clear_complaints): Remove unused variable.
4226         * corelow.c (core_target_open): Remove unused variable.
4227         * fbsd-tdep.c (fbsd_core_info_proc_status): Remove unused
4228         variable.
4229         * guile/scm-frame.c (gdbscm_frame_read_var): Remove unused
4230         variable.
4231         * guile/scm-symtab.c (stscm_print_sal_smob): Remove unused
4232         variable.
4233         * guile/scm-type.c (gdbscm_field_baseclass_p): Remove unused
4234         variable.
4235         * guile/scm-utils.c (gdbscm_parse_function_args): Remove unused
4236         variable.
4237         * hppa-tdep.c (hppa_stub_frame_unwind_cache): Remove unused
4238         variable.
4239         * ia64-tdep.c (examine_prologue): Remove unused variable.
4240         * infcall.c (run_inferior_call): Remove unused variable.
4241         * inferior.c (exit_inferior): Remove unused variable.
4242         * infrun.c (infrun_thread_ptid_changed): Remove unused variable.
4243         * linespec.c (decode_line_2): Remove unused variable.
4244         * linux-nat.c (super_close): Remove.
4245         * linux-tdep.c (linux_info_proc): Remove unused variable.
4246         * mi/mi-main.c (mi_execute_command): Remove unused variable.
4247         * microblaze-linux-tdep.c (microblaze_linux_sigtramp_cache):
4248         Remove unused variable.
4249         * parse.c (find_minsym_type_and_address): Remove unused variable.
4250         * printcmd.c (info_symbol_command, printf_floating): Remove unused
4251         variable.
4252         * python/py-breakpoint.c (bppy_set_commands): Remove unused
4253         variable.
4254         * python/py-unwind.c (unwind_infopy_dealloc): Remove unused
4255         variables.
4256         * record-btrace.c (record_btrace_target::store_registers): Remove
4257         unused variable.
4258         (cmd_show_record_btrace_cpu): Remove unused variable.
4259         * riscv-tdep.c (riscv_register_reggroup_p)
4260         (riscv_push_dummy_call, riscv_return_value): Remove unused
4261         variable.
4262         * rust-exp.y (literal): Remove unused variable.
4263         * rust-lang.c (rust_evaluate_subexp) <OP_RUST_ARARAY>: Remove
4264         unused variable.
4265         <STRUCTOP_ANONYMOUS>: Likewise.
4266         * s390-linux-tdep.c (s390_linux_init_abi_31)
4267         (s390_linux_init_abi_64): Remove unused variable.
4268         * ser-ming2.c (ser_windows_read_prim, pipe_select_thread)
4269         (file_select_thread, net_windows_open, _initialize_ser_windows):
4270         Remove unused variables.
4271         * symtab.c (find_pc_sect_line): Remove unused variable.
4272         * target-memory.c (compute_garbled_blocks): Remove unused
4273         variable.
4274         (target_write_memory_blocks): Remove unused variable.
4275         * target.c (target_stack::unpush): Remove unused variables.
4276         * tracepoint.c (start_tracing, all_tracepoint_actions)
4277         (merge_uploaded_trace_state_variables)
4278         (print_one_static_tracepoint_marker): Remove unused variable.
4279         * unittests/basic_string_view/element_access/char/1.cc (test01):
4280         Remove unused variable.
4281         * windows-nat.c (windows_continue, windows_add_all_dlls)
4282         (do_initial_windows_stuff, windows_nat_target::create_inferior):
4283         Remove unused variables.
4284
4285 2018-07-21  Simon Marchi  <simon.marchi@polymtl.ca>
4286
4287         * arm-tdep.c (arm_gdbarch_init): Declare attr_arch and
4288         attr_profile in HAVE_ELF.
4289         * rs6000-tdep.c (bfd_uses_spe_extensions): Declare vector_abi in
4290         HAVE_ELF.
4291
4292 2018-07-20  Simon Marchi  <simon.marchi@polymtl.ca>
4293
4294         * frame.c (frame_register_unwind): Change parameter name.
4295         (frame_unwind_register): Likewise.
4296         (frame_unwind_register_value): Likewise.
4297         (frame_unwind_register_signed): Likewise.
4298         (frame_unwind_register_unsigned): Likewise.
4299         * frame.h (frame_register_unwind): Likewise.
4300         (frame_unwind_register): Likewise.
4301         (frame_unwind_register_value): Likewise.
4302         (frame_unwind_register_signed): Likewise.
4303         (frame_unwind_register_unsigned): Likewise.
4304         (frame_unwind_arch): Likewise.
4305
4306 2018-07-20  Maciej W. Rozycki  <macro@mips.com>
4307
4308         * MAINTAINERS: Update my e-mail address, downgrade to MIPS I-IV
4309         ISA maintenance.
4310
4311 2018-07-20  Maciej W. Rozycki  <macro@mips.com>
4312
4313         * mips-linux-nat.c (mips_linux_nat_target::read_description):
4314         Call `get_ptrace_pid' rather than extracting the ptrace PID by
4315         hand.
4316
4317 2018-07-20  Keith Seitz  <keiths@redhat.com>
4318
4319         * buildsym.h (struct buildsym_compunit) <m_objfile, m_subfiles,
4320         m_main_subfile, m_comp_dir, m_producer, m_debugformat,
4321         m_compunit_symtab, m_language>: Add "m_" prefix.
4322         Update all uses.
4323         * buildsym.c: Update all uses.
4324
4325 2018-07-20  Tom Tromey  <tom@tromey.com>
4326
4327         * buildsym-legacy.h (record_line): Don't use record_line_ftype.
4328         * buildsym.h (record_line_ftype): Remove typedef.
4329
4330 2018-07-20  Tom Tromey  <tom@tromey.com>
4331
4332         * buildsym-legacy.h (augment_type_symtab): Don't declare.
4333         (end_expandable_symtab): Likewise.
4334         (end_symtab_get_static_block): Likewise.
4335         (end_symtab_from_static_block): Likewise.
4336         * buildsym-legacy.c (augment_type_symtab): Remove.
4337         (end_expandable_symtab): Remove.
4338         (end_symtab_get_static_block): Remove.
4339         (end_symtab_from_static_block): Remove.
4340
4341 2018-07-20  Tom Tromey  <tom@tromey.com>
4342
4343         * dwarf2read.c: Include buildsym.h.
4344         (struct dwarf2_cu) <builder>: New method.
4345         (fixup_go_packaging): Update.
4346         (process_full_comp_unit, process_full_type_unit): Update.  Don't
4347         use scoped_free_pendings.
4348         (using_directives): Add "cu" parameter, remove "language".
4349         (read_import_statement, setup_type_unit_groups, )
4350         (read_func_scope, read_lexical_block_scope)
4351         (dwarf2_record_block_ranges, read_namespace): Update.
4352         (lnp_state_machine::lnp_state_machine): Add cu parameter.
4353         (lnp_state_machine::handle_end_sequence): Update.
4354         (class lnp_state_machine) <m_cu>: New member.
4355         <m_record_line_callback>: Remove.
4356         <m_currently_recording_lines>: New member.
4357         (lnp_state_machine::handle_set_file): Update.
4358         (noop_record_line): Remove.
4359         (dwarf_record_line_p): Add cu parameter.
4360         (dwarf_record_line_1, dwarf_finish_line): Likewise.
4361         (lnp_state_machine::record_line)
4362         (lnp_state_machine::lnp_state_machine)
4363         (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
4364         (dwarf_decode_lines): Update.
4365         (dwarf2_start_subfile): Add cu parameter.
4366         (dwarf2_start_symtab, new_symbol): Update.
4367         (macro_start_file, dwarf_decode_macro_bytes): Add cu parameter.
4368         Remove dwarf2_per_objfile parameter.
4369         (dwarf_decode_macros): Update.
4370
4371 2018-07-20  Tom Tromey  <tom@tromey.com>
4372
4373         * stabsread.c (define_symbol): Update.
4374         * buildsym-legacy.h (get_buildsym_compunit): Declare.
4375         * dwarf2read.c (new_symbol): Update.
4376         * cp-support.h (cp_scan_for_anonymous_namespaces): Update.
4377         * cp-namespace.c: Include buildsym.h.
4378         (cp_scan_for_anonymous_namespaces): Add "compunit" parameter.
4379         * buildsym-legacy.c (get_buildsym_compunit): New function.
4380
4381 2018-07-20  Tom Tromey  <tom@tromey.com>
4382
4383         * xcoffread.c: Include buildsym-legacy.h.
4384         * windows-nat.c: Include buildsym-legacy.h.
4385         * stabsread.c: Include buildsym-legacy.h.
4386         * mdebugread.c: Include buildsym-legacy.h.
4387         * buildsym-legacy.h: New file.
4388         * buildsym-legacy.c: New file, from buildsym.c.
4389         * go32-nat.c: Include buildsym-legacy.h.
4390         * dwarf2read.c: Include buildsym-legacy.h.
4391         * dbxread.c: Include buildsym-legacy.h.
4392         * cp-namespace.c: Include buildsym-legacy.h.
4393         * coffread.c: Include buildsym-legacy.h.
4394         * buildsym.h: Move some contents to buildsym-legacy.h.
4395         * buildsym.c: Include buildsym-legacy.h.  Move many functions to
4396         buildsym-legacy.c.
4397         * Makefile.in (HFILES_NO_SRCDIR): Add buildsym-legacy.h.
4398
4399 2018-07-20  Tom Tromey  <tom@tromey.com>
4400
4401         * buildsym.h (struct buildsym_compunit): Move from buildsym.c.
4402         * buildsym.c (struct buildsym_compunit): Move to buildsym.h.
4403         (buildsym_compunit::buildsym_compunit)
4404         (buildsym_compunit::~buildsym_compunit)
4405         (buildsym_compunit::get_macro_table): Define.
4406
4407 2018-07-20  Tom Tromey  <tom@tromey.com>
4408
4409         * buildsym.c (reset_symtab_globals): Remove.
4410         (buildsym_compunit::end_symtab_from_static_block): Update.
4411         (buildsym_compunit::augment_type_symtab): Update.
4412         (end_symtab_from_static_block): Call free_buildsym_compunit.
4413         (augment_type_symtab, end_symtab, end_expandable_symtab):
4414         Likewise.
4415
4416 2018-07-20  Tom Tromey  <tom@tromey.com>
4417
4418         * arch-utils.c: Do not include buildsym.h.
4419         * mipsread.c: Do not include buildsym.h.
4420         * machoread.c: Do not include buildsym.h.
4421         * elfread.c: Do not include buildsym.h.
4422
4423 2018-07-20  Tom Tromey  <tom@tromey.com>
4424
4425         * buildsym.c (buildsym_compunit::buildsym_compunit): Do more
4426         initialization.
4427         (buildsym_compunit): Add new constructor.
4428         (struct buildsym_compunit) <get_last_source_file, finish_block,
4429         record_block_range, start_subfile, patch_subfile_names,
4430         push_subfile, pop_subfile, record_line, get_compunit_symtab,
4431         set_last_source_start_addr, get_last_source_start_addr,
4432         get_local_using_directives, set_local_using_directives,
4433         get_global_using_directives, outermost_context_p,
4434         get_current_context_stack, get_context_stack_depth,
4435         get_current_subfile, get_local_symbols, get_file_symbols,
4436         get_global_symbols, record_debugformat, record_producer,
4437         push_context, pop_context, end_symtab_get_static_block,
4438         end_symtab_from_static_block, end_symtab, end_expandable_symtab>:
4439         New public methods.
4440         <record_pending_block, finish_block_internal, make_blockvector,
4441         watch_main_source_file_lossage, end_symtab_with_blockvector>: New
4442         private methods.
4443         Update all users.
4444
4445 2018-05-22  Tom Tromey  <tom@tromey.com>
4446
4447         * buildsym.c (record_pending_block): Move earlier.  Remove objfile
4448         parameter.
4449         (finish_block_internal): Update.
4450
4451 2018-07-20  Tom Tromey  <tom@tromey.com>
4452
4453         * buildsym.c (record_pending_block): Move earlier.  Remove objfile
4454         parameter.
4455         (finish_block_internal): Update.
4456
4457 2018-07-20  Tom Tromey  <tom@tromey.com>
4458
4459         * buildsym.h (EXTERN): Don't define or undef.
4460         * buildsym.c (EXTERN): Don't define.
4461
4462 2018-07-20  Tom Tromey  <tom@tromey.com>
4463
4464         * buildsym.c: Remove TODO comment.
4465
4466 2018-07-20  Tom Tromey  <tom@tromey.com>
4467
4468         * coffread.c (coff_symtab_read): Update.
4469         * xcoffread.c (xcoff_psymtab_to_symtab_1): Update.
4470         (xcoff_new_init): Update.
4471         * mipsread.c (mipscoff_new_init): Update.
4472         * mdebugread.c (mdebug_build_psymtabs): Update.
4473         * elfread.c (elf_new_init): Update.
4474         * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
4475         Update.
4476         * dbxread.c (dbx_new_init, dbx_psymtab_to_symtab_1)
4477         (coffstab_build_psymtabs, elfstab_build_psymtabs)
4478         (stabsect_build_psymtabs): Update.
4479         * buildsym.h (buildsym_init): Don't declare.
4480         * buildsym.c: Update comment.
4481         (prepare_for_building): Remove.
4482         (start_symtab, restart_symtab): Update.
4483         (reset_symtab_globals): Update comment.
4484         (buildsym_init): Remove.
4485
4486 2018-07-20  Tom Tromey  <tom@tromey.com>
4487
4488         * xcoffread.c (read_xcoff_symtab, process_xcoff_symbol): Update.
4489         * stabsread.c (patch_block_stabs, define_symbol, read_type)
4490         (read_enum_type, common_block_start, common_block_end)
4491         (cleanup_undefined_types_1, finish_global_stabs): Update.
4492         * mdebugread.c (psymtab_to_symtab_1): Update.
4493         * dwarf2read.c (fixup_go_packaging, read_func_scope)
4494         (read_lexical_block_scope, new_symbol): Update.
4495         * dbxread.c (process_one_symbol): Update.
4496         * coffread.c (coff_symtab_read, process_coff_symbol)
4497         (coff_read_enum_type): Update.
4498         * buildsym.h (file_symbols, global_symbols, local_symbols): Don't
4499         declare.
4500         (get_local_symbols, get_file_symbols, get_global_symbols): New
4501         functions.
4502         * buildsym.c (~buildsym_compunit): Clean up m_file_symbols and
4503         m_global_symbols.
4504         <m_file_symbols, m_local_symbols, m_global_symbols>: New members.
4505         (~scoped_free_pendings): Update.
4506         (finish_block, prepare_for_building, reset_symtab_globals)
4507         (end_symtab_get_static_block, end_symtab_with_blockvector)
4508         (augment_type_symtab, push_context): Update.
4509         (get_local_symbols, get_file_symbols, get_global_symbols): New
4510         functions.
4511         (buildsym_init): Update.
4512
4513 2018-07-20  Tom Tromey  <tom@tromey.com>
4514
4515         * dwarf2read.c (process_full_comp_unit): Do not set list_in_scope.
4516         (process_full_type_unit): Likewise.
4517         (dwarf2_start_symtab): Set list_in_scope.
4518
4519 2018-07-20  Tom Tromey  <tom@tromey.com>
4520
4521         * dwarf2read.c (process_psymtab_comp_unit_reader)
4522         (build_type_psymtabs_reader): Do not set list_in_scope.
4523
4524 2018-07-20  Tom Tromey  <tom@tromey.com>
4525
4526         * buildsym.c (free_pendings): Remove.
4527         (add_symbol_to_list, scoped_free_pendings)
4528         (finish_block_internal, buildsym_init): Update.
4529
4530 2018-07-20  Tom Tromey  <tom@tromey.com>
4531
4532         * xcoffread.c (read_xcoff_symtab): Update.
4533         * dwarf2read.c (read_func_scope, read_lexical_block_scope):
4534         Update.
4535         * dbxread.c (process_one_symbol): Update.
4536         * coffread.c (coff_symtab_read): Update.
4537         * buildsym.h (finish_block): Update.
4538         * buildsym.c (finish_block): Remove "listhead" argument.
4539         (end_symtab_get_static_block): Update.
4540
4541 2018-07-20  Tom Tromey  <tom@tromey.com>
4542
4543         * buildsym.h (class scoped_free_pendings): Remove constructor.
4544         * buildsym.c (struct buildsym_compunit) <free_pending_blocks>: New
4545         method.
4546         <m_pending_block_obstack, m_pending_blocks>: New members.
4547         (pending_block_obstack, pending_blocks): Remove.
4548         (scoped_free_pendings::scoped_free_pendings): Default.
4549         (~scoped_free_pendings): Update.
4550         (free_pending_blocks): Remove.
4551         (finish_block_internal, record_pending_block, make_blockvector)
4552         (end_symtab_get_static_block, augment_type_symtab, push_context)
4553         (buildsym_init): Update.
4554
4555 2018-07-20  Tom Tromey  <tom@tromey.com>
4556
4557         * buildsym.c (struct buildsym_compunit) <m_pending_addrmap,
4558         m_pending_addrmap_obstack, m_pending_addrmap_interesting>: New
4559         members.
4560         (pending_addrmap, pending_addrmap_obstack)
4561         (pending_addrmap_interesting): Remove.
4562         (scoped_free_pendings, record_block_range, make_blockvector)
4563         (prepare_for_building, reset_symtab_globals, buildsym_init):
4564         Update.
4565
4566 2018-07-20  Tom Tromey  <tom@tromey.com>
4567
4568         * xcoffread.c (process_linenos): Update.
4569         * stabsread.c (define_symbol, read_type, read_enum_type): Update.
4570         * mdebugread.c (psymtab_to_symtab_1): Update.
4571         * dwarf2read.c (setup_type_unit_groups)
4572         (lnp_state_machine::handle_set_file, dwarf_record_line_p)
4573         (lnp_state_machine::record_line, dwarf_decode_lines): Update.
4574         * dbxread.c (process_one_symbol): Update.
4575         * coffread.c (coff_symtab_read, enter_linenos)
4576         (process_coff_symbol): Update.
4577         * buildsym.h (current_subfile): Don't declare.
4578         (get_current_subfile): Declare.
4579         * buildsym.c (struct buildsym_compunit) <m_current_subfile>: New
4580         member.
4581         (start_subfile, free_buildsym_compunit, push_subfile)
4582         (prepare_for_building, start_symtab): Update.
4583         (get_current_subfile): New function.
4584
4585 2018-07-20  Tom Tromey  <tom@tromey.com>
4586
4587         * coffread.c (coff_symtab_read): Update.
4588         * xcoffread.c (read_xcoff_symtab): Update.
4589         * dwarf2read.c (new_symbol): Update.
4590         (read_func_scope, read_lexical_block_scope): Update.
4591         * dbxread.c (process_one_symbol): Update.
4592         * buildsym.h (context_stack, context_stack_depth): Don't declare.
4593         (outermost_context_p): Remove macro.
4594         (outermost_context_p, get_current_context_stack)
4595         (get_context_stack_depth): Declare.
4596         (pop_context): Return struct context_stack.
4597         * buildsym.c (struct buildsym_compunit) <m_context_stack: New
4598         member.
4599         (context_stack_size): Remove.
4600         (INITIAL_CONTEXT_STACK_SIZE): Remove.
4601         (prepare_for_building, end_symtab_get_static_block)
4602         (augment_type_symtab, push_context): Update.
4603         (pop_context): Return struct context_stack.
4604         (outermost_context_p, get_current_context_stack)
4605         (get_context_stack_depth): New functions.
4606         (buildsym_init): Update.
4607
4608 2018-07-20  Tom Tromey  <tom@tromey.com>
4609
4610         * rust-exp.y: Now a pure parser.  Update all rules.
4611         (%union): Move earlier.
4612         (current_parser, work_obstack): Remove globals.
4613         (rust_parser, ~rust_parser): Update.
4614         (class rust_parser) <copy_name, concat3, crate_name, super_name,
4615         lex_character, lex_number, lex_string, lex_identifier,
4616         rust_lookup_type, convert_params_to_types, convert_ast_to_type,
4617         convert_name, convert_params_to_expression,
4618         convert_ast_to_expression, ast_basic_type, ast_operation,
4619         ast_compound_assignment, rust_op, ast_literal, ast_dliteral,
4620         ast_structop, ast_structop_anonymous, ast_unary, ast_cast,
4621         ast_call_ish, ast_path, ast_string, ast_struct, ast_range,
4622         ast_array_type, ast_slice_type, ast_reference_type,
4623         ast_pointer_type, ast_function_type, ast_tuple_type>: New methods.
4624         (rust_parse): Update.
4625         (rustyyerror, rustyylex): Add parser parameter.
4626         (rust_lex_test_one, rust_lex_int_test, rust_lex_exception_test)
4627         (rust_lex_stringish_test, rust_lex_test_sequence)
4628         (rust_lex_test_trailing_dot, rust_lex_test_completion)
4629         (rust_lex_test_push_back, rust_lex_tests): Update.
4630
4631 2018-07-19  Pedro Alves  <palves@redhat.com>
4632
4633         * guile/guile-internal.h (gdbscm_scm_to_c_string): Now returns a
4634         gdb::unique_xmalloc_ptr.
4635         * guile/scm-breakpoint.c (gdbscm_set_breakpoint_condition_x):
4636         Adjust to use dbscm_wrap and gdb::unique_xmalloc_ptr.
4637         * guile/scm-exception.c (gdbscm_exception_message_to_string): Use
4638         copy-initialization.
4639         * guile/scm-pretty-print.c (ppscm_print_children): Use
4640         gdb::unique_xmalloc_ptr instead of cleanups.
4641         (gdbscm_apply_val_pretty_printer): Remove cleanups.
4642         * guile/scm-string.c (gdbscm_scm_to_c_string): Now returns a
4643         gdb::unique_xmalloc_ptr.
4644         * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
4645         Adjust to use gdb::unique_xmalloc_ptr.
4646         * guile/scm-utils.c (extract_arg): Adjust.
4647         * guile/scm-value.c (gdbscm_value_field): Adjust to use
4648         gdb::unique_xmalloc_ptr instead of a cleanup.
4649
4650 2018-07-19  Tom Tromey  <tom@tromey.com>
4651
4652         * utils.c (do_value_free_to_mark)
4653         (make_cleanup_value_free_to_mark): Remove.
4654         * utils.h (make_cleanup_value_free_to_mark): Remove.
4655
4656 2018-07-19  Pedro Alves  <palves@redhat.com>
4657
4658         * guile/guile-internal.h (gdbscm_wrap): Really make 'args' a
4659         forwarding reference.
4660
4661 2018-07-18  Pedro Alves  <palves@redhat.com>
4662
4663         * guile/guile.c (gdbscm_execute_gdb_command): Adjust to use
4664         gdbscm_wrap.  Use gdb::unique_xmalloc_ptr<char> instead of a
4665         cleanup.
4666
4667 2018-07-18  Pedro Alves  <palves@redhat.com>
4668
4669         * guile/guile-internal.h: Add comment about mixing GDB and Scheme
4670         exceptions.
4671         (GDBSCM_HANDLE_GDB_EXCEPTION_WITH_CLEANUPS): Delete.
4672         (gdbscm_wrap): New.
4673         * guile/scm-frame.c (gdbscm_frame_read_register): Use xfree
4674         directly instead of a cleanup.
4675         * guile/scm-math.c (vlscm_unop_gdbthrow): New, factored out from ...
4676         (vlscm_unop): ... this.  Reimplement using gdbscm_wrap.
4677         (vlscm_binop_gdbthrow): New, factored out from ...
4678         (vlscm_binop): ... this.  Reimplement using gdbscm_wrap.
4679         (vlscm_rich_compare): Use gdbscm_wrap.
4680         * guile/scm-symbol.c (gdbscm_lookup_symbol): Use xfree directly
4681         instead of a cleanup.
4682         (gdbscm_lookup_global_symbol): Use xfree directly instead of a
4683         cleanup.
4684         * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
4685         Use xfree directly instead of a cleanup.
4686         * guile/scm-value.c (gdbscm_make_value, gdbscm_make_lazy_value):
4687         Adjust to use gdbscm_wrap and scoped_value_mark.
4688         (gdbscm_value_optimized_out_p): Adjust to use gdbscm_wrap.
4689         (gdbscm_value_address, gdbscm_value_dereference)
4690         (gdbscm_value_referenced_value): Adjust to use gdbscm_wrap and
4691         scoped_value_mark.
4692         (gdbscm_value_dynamic_type): Use scoped_value_mark.
4693         (vlscm_do_cast, gdbscm_value_field): Adjust to use gdbscm_wrap and
4694         scoped_value_mark.
4695         (gdbscm_value_subscript, gdbscm_value_call): Adjust to use
4696         gdbscm_wrap and scoped_value_mark.
4697         (gdbscm_value_to_string): Use xfree directly instead of a
4698         cleanup.  Move 'buffer' unique_ptr to TRY scope.
4699         (gdbscm_value_to_lazy_string): Use xfree directly instead of a
4700         cleanup.  Move 'buffer' unique_ptr to TRY scope.  Use
4701         scoped_value_mark.
4702         (gdbscm_value_fetch_lazy_x): Use gdbscm_wrap.
4703         (gdbscm_parse_and_eval): Adjust to use gdbscm_wrap and
4704         scoped_value_mark.
4705         (gdbscm_history_ref, gdbscm_history_append_x): Adjust to use
4706         gdbscm_wrap.
4707
4708 2018-07-18  Tom de Vries  <tdevries@suse.de>
4709
4710         * findvar.c (default_read_var_value): Also resolve dynamic type for
4711         LOC_OPTIMIZED_OUT vars.
4712
4713 2018-07-18  Maciej W. Rozycki  <macro@mips.com>
4714
4715         * mips-tdep.c (micromips_next_pc): Add SYSCALL instruction
4716         decoding.
4717
4718 2018-07-17  Tom Tromey  <tom@tromey.com>
4719
4720         * guile/scm-param.c (pascm_set_func, pascm_show_func)
4721         (compute_enum_list, pascm_set_param_value_x)
4722         (gdbscm_parameter_value): Update.
4723         * guile/guile-internal.h (gdbscm_scm_to_string): Update.
4724         (gdbscm_scm_to_host_string): Update.
4725         * guile/scm-math.c (vlscm_convert_typed_value_from_scheme):
4726         Update.
4727         * guile/scm-cmd.c (cmdscm_add_completion): Update.
4728         * guile/scm-pretty-print.c (ppscm_print_string_repr): Update.
4729         * guile/scm-string.c (gdbscm_scm_to_string): Return
4730         unique_xmalloc_ptr.
4731         (gdbscm_scm_to_host_string): Likewise.
4732
4733 2018-07-17  Tom Tromey  <tom@tromey.com>
4734
4735         * guile/guile.c (gdbscm_eval_from_control_command): Update.
4736         * guile/guile-internal.h (gdbscm_safe_eval_string): Update.
4737         * guile/scm-objfile.c (gdbscm_execute_objfile_script): Update.
4738         * guile/scm-safe-call.c (gdbscm_safe_eval_string): Return
4739         unique_xmalloc_ptr.
4740
4741 2018-07-17  Tom Tromey  <tom@tromey.com>
4742
4743         * guile/scm-param.c (pascm_signal_setshow_error): Update.
4744         * guile/guile-internal.h (gdbscm_exception_message_to_string):
4745         Update.
4746         * guile/scm-cmd.c (cmdscm_function): Update.
4747         * guile/scm-pretty-print.c
4748         (ppscm_print_exception_unless_memory_error): Update.
4749         * guile/scm-exception.c (gdbscm_exception_message_to_string):
4750         Return unique_xmalloc_ptr.
4751
4752 2018-07-17  Tom Tromey  <tom@tromey.com>
4753
4754         * guile/scm-pretty-print.c (ppscm_make_pp_type_error_exception):
4755         Use string_printf.
4756
4757 2018-07-17  Jim Wilson  <jimw@sifive.com>
4758
4759         * riscv-tdep.c (riscv_has_feature): Delete comment that refers to
4760         set_gdbarch_decr_pc_after_break.  Call riscv_read_misa_reg always.
4761         (riscv_gdbarch_init): Delete local has_compressed_isa.  Delete now
4762         unecessary braces after EF_RISCV_RVC test.  Delete call to
4763         set_gdbarch_decr_pc_after_break.
4764
4765         * riscv-tdep.h (DECLARE_CSR): Use RISCV_FIRST_CSR_REGNUM instead of
4766         RISCV_LAST_FP_REGNUM + 1.
4767         (RSICV_CSR_LEGACY_MISA_REGNUM): Add RISCV_FIRST_CSR_REGNUM.
4768
4769 2018-07-17  Tom Tromey  <tom@tromey.com>
4770
4771         * configure.ac: Remove --disable-gdbcli.
4772         * configure: Rebuild.
4773         * Makefile.in (SUBDIR_CLI_DEPS, SUBDIR_CLI_LDFLAGS)
4774         (SUBDIR_CLI_CFLAGS): Remove.
4775         (SFILES): Use SUBDIR_CLI_SRCS.
4776         (COMMON_OBS): Use SUBDIR_CLI_OBS.
4777
4778 2018-07-17  Tom Tromey  <tom@tromey.com>
4779
4780         PR gdb/18624:
4781         * coffread.c (coff_symtab_read): Use scoped_free_pendings.
4782
4783 2018-07-16  Jim Wilson  <jimw@sifive.com>
4784
4785         * riscv-tdep.c (riscv_gdbarch_init): Call gdbarch_init_osabi.
4786
4787 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
4788
4789         * ia64-libunwind-tdep.c (libunwind_frame_cache): Remove unused
4790         variable.
4791         (libunwind_frame_sniffer): Likewise.
4792         (libunwind_frame_prev_register): Likewise.
4793         (libunwind_sigtramp_frame_sniffer): Likewise.
4794         * ia64-tdep.c (ia64_access_reg): Likewise.
4795         (ia64_access_rse_reg): Likewise.
4796         (ia64_libunwind_sigtramp_frame_this_id): Likewise.
4797         * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Likewise.
4798
4799 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
4800
4801         * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Add cast.
4802
4803 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
4804
4805         * remote-sim.c (gdbsim_target::close,
4806         gdbsim_target::mourn_inferior): Remove unused variables.
4807
4808 2018-07-16  Simon Marchi  <simon.marchi@polymtl.ca>
4809
4810         * ia64-tdep.c (ktab_buf): New global.
4811         (getunwind_table): Return a gdb::optional<gdb::byte_vector>.
4812         (get_kernel_table): Adjust.
4813
4814 2018-07-16  Tom Tromey  <tom@tromey.com>
4815
4816         * xcoffread.c (read_xcoff_symtab): Use outermost_context_p.
4817         * dwarf2read.c (using_directives, new_symbol): Use
4818         outermost_context_p.
4819         * dbxread.c (process_one_symbol): Use outermost_context_p.
4820         * coffread.c (coff_symtab_read): Use outermost_context_p.
4821
4822 2018-07-16  Tom Tromey  <tom@tromey.com>
4823
4824         * dwarf2read.c (using_directives, read_func_scope)
4825         (read_lexical_block_scope): Update.
4826         * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
4827         * buildsym.h (local_using_directives, global_using_directives):
4828         Don't declare.
4829         (get_local_using_directives, set_local_using_directives)
4830         (get_global_using_directives): Declare.
4831         * buildsym.c (struct buildsym_compunit) <m_local_using_directives,
4832         m_global_using_directives>: New members.
4833         (finish_block_internal, prepare_for_building)
4834         (reset_symtab_globals, end_symtab_get_static_block)
4835         (push_context): Update.
4836         (get_local_using_directives, set_local_using_directives)
4837         (get_global_using_directives): New functions.
4838         (buildsym_init): Update.
4839
4840 2018-07-16  Tom Tromey  <tom@tromey.com>
4841
4842         * xcoffread.c (xcoff_initial_scan): Don't call
4843         free_pending_blocks.
4844         * dbxread.c (dbx_symfile_read): Don't call free_pending_blocks.
4845         * buildsym.h (class scoped_free_pendings): Add constructor.
4846         (free_pending_blocks): Don't declare.
4847         * buildsym.c (scoped_free_pendings::scoped_free_pendings): New.
4848         (free_pending_blocks): Now static.
4849
4850 2018-07-16  Tom Tromey  <tom@tromey.com>
4851
4852         * buildsym.h (push_subfile, pop_subfile): Update declarations.
4853         * buildsym.c (struct buildsym_compunit) <m_subfile_stack>: New
4854         member.
4855         (struct subfile_stack): Remove.
4856         (subfile_stack): Remove.
4857         (push_subfile, pop_subfile, buildsym_init): Update.
4858
4859 2018-07-16  Tom Tromey  <tom@tromey.com>
4860
4861         * buildsym.c (push_subfile): Use gdb_assert.
4862         (pop_subfile): Use gdb_assert.
4863
4864 2018-07-16  Tom Tromey  <tom@tromey.com>
4865
4866         * buildsym.h (merge_symbol_lists): Remove.
4867         * buildsym.c (merge_symbol_lists): Remove.
4868
4869 2018-07-16  Tom Tromey  <tom@tromey.com>
4870
4871         * stabsread.c (scan_file_globals): Update comment.
4872         * stabsread.h (scan_file_globals): Move from buildsym.h.
4873         * buildsym.h (scan_file_globals): Move to stabsread.h.
4874
4875 2018-07-16  Tom Tromey  <tom@tromey.com>
4876
4877         * xcoffread.c (xcoff_new_init): Update.
4878         * mipsread.c (mipscoff_new_init): Update.
4879         * mdebugread.c (mdebug_build_psymtabs): Update.
4880         * elfread.c (elf_new_init): Update.
4881         * dbxread.c (dbx_new_init, coffstab_build_psymtabs)
4882         (elfstab_build_psymtabs, stabsect_build_psymtabs): Update.
4883         * buildsym.h (buildsym_new_init): Don't declare.
4884         * buildsym.c (buildsym_new_init): Remove.
4885
4886 2018-07-16  Tom Tromey  <tom@tromey.com>
4887
4888         * stabsread.h (within_function): Move from buildsym.h.
4889         * stabsread.c (start_stabs): Clear within_function.
4890         * coffread.c (coff_start_symtab): Clear within_function.
4891         * buildsym.h (within_function): Move to stabsread.h.
4892         * buildsym.c (prepare_for_building): Update.
4893
4894 2018-07-16  Tom Tromey  <tom@tromey.com>
4895
4896         * stabsread.h (processing_gcc_compilation): Move from buildsym.h.
4897         * dwarf2read.c (dwarf2_start_symtab): Don't set
4898         processing_gcc_compilation.
4899         * buildsym.h (processing_gcc_compilation): Move to stabsread.h.
4900
4901 2018-07-16  Tom Tromey  <tom@tromey.com>
4902
4903         * stabsread.h (HASHSIZE, hashname, symnum, next_symbol_text)
4904         (next_symbol_text_func): Move from buildsym.h.
4905         * stabsread.c (hashname): Move from buildsym.c.
4906         * buildsym.h (HASHSIZE, symnum, next_symbol_text)
4907         (next_symbol_text_func, hashname): Move to stabsread.h.
4908         * buildsym.c: Don't include bcache.h
4909         (hashname): Move to stasbread.c.
4910
4911 2018-07-16  Tom Tromey  <tom@tromey.com>
4912
4913         * buildsym.h (context_stack_size): Don't declare.
4914         * buildsym.c (context_stack_size): New global.
4915
4916 2018-07-16  Tom Tromey  <tom@tromey.com>
4917
4918         * dbxread.c (processing_acc_compilation): New global.
4919         * buildsym.h (processing_acc_compilation): Don't declare.
4920
4921 2018-07-16  Tom Tromey  <tom@tromey.com>
4922
4923         * xcoffread.c (aix_process_linenos, complete_symtab): Update.
4924         * dbxread.c (read_ofile_symtab): Update.
4925         * coffread.c (coff_start_symtab, coff_end_symtab): Update.
4926         * buildsym.h (last_source_start_addr): Remove.
4927         (set_last_source_start_addr, get_last_source_start_addr):
4928         Declare.
4929         * buildsym.c (buildsym_compunit::buildsym_compunit): Add last_addr
4930         parameter.
4931         (struct buildsym_compunit) <m_last_source_start_addr>: New
4932         member.
4933         (prepare_for_building): Remove start_addr parameter.
4934         (start_symtab, restart_symtab, end_symtab_get_static_block)
4935         (end_symtab_with_blockvector): Update.
4936         (set_last_source_start_addr, get_last_source_start_addr): New
4937         functions.
4938
4939 2018-07-16  Tom Tromey  <tom@tromey.com>
4940
4941         * buildsym.c (struct buildsym_compunit) <m_have_line_numbers>: New
4942         member.
4943         (have_line_numbers): Remove.
4944         (record_line, prepare_for_building, end_symtab_get_static_block)
4945         (augment_type_symtab): Update.
4946
4947 2018-07-16  Tom Tromey  <tom@tromey.com>
4948
4949         * buildsym.c (~buildsym_compunit): Free the macro table.
4950         (struct buildsym_compunit) <get_macro_table, release_macros>: New
4951         methods.
4952         <m_pending_macros>: New member.
4953         (pending_macros): Remove.
4954         (~scoped_free_pendings, get_macro_table, prepare_for_building)
4955         (reset_symtab_globals, end_symtab_get_static_block)
4956         (end_symtab_with_blockvector, augment_type_symtab)
4957         (buildsym_init): Update.
4958
4959 2018-07-16  Tom Tromey  <tom@tromey.com>
4960
4961         * buildsym.c (buildsym_compunit::buildsym_compunit): Add name
4962         parameter.
4963         (buildsym_compunit::set_last_source_file): New method.
4964         <m_last_source_file>: New member.
4965         (prepare_for_building): Remove "name" parameter.
4966         (start_symtab, restart_symtab, reset_symtab_globals): Update.
4967         (last_source_file): Remove.
4968         (set_last_source_file, get_last_source_file): Update.
4969
4970 2018-07-16  Tom Tromey  <tom@tromey.com>
4971
4972         * buildsym.c (prepare_for_building): Add assert.
4973
4974 2018-07-16  Tom Tromey  <tom@tromey.com>
4975
4976         * buildsym.c (~buildsym_compunit): Update.
4977         (struct buildsym_compunit) <comp_unit>: Now a unique_xmalloc_ptr.
4978         (start_subfile, patch_subfile_names)
4979         (end_symtab_with_blockvector): Update.
4980
4981 2018-07-16  Tom Tromey  <tom@tromey.com>
4982
4983         * buildsym.c (struct buildsym_compunit): Add constructor,
4984         destructor, initializers.
4985         (start_buildsym_compunit): Remove.
4986         (free_buildsym_compunit): Use "delete".
4987         (start_symtab, restart_symtab): Use "new".
4988
4989 2018-07-13  Simon Marchi  <simon.marchi@polymtl.ca>
4990
4991         * symfile.c (set_objfile_default_section_offset): Remove struct
4992         keyword.
4993
4994 2018-07-14  Stafford Horne  <shorne@gmail.com>
4995
4996         * (Responsible Maintainers): Add myself as or1k maintainer.
4997
4998 2018-07-13  Tom Tromey  <tom@tromey.com>
4999
5000         * symfile.c (set_objfile_default_section_offset): Use extra braces
5001         around initializer.
5002
5003 2018-07-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
5004
5005         * s390-tdep.c (s390_displaced_step_fixup): Adjust PC for a
5006         non-branching basr.
5007
5008 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
5009
5010         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5011         unittests/cli-utils-selftests.c
5012         * unittests/cli-utils-selftests.c: New file.
5013
5014 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
5015
5016         * NEWS: Mention new commands. Mention change to 'thread apply'.
5017
5018 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
5019
5020         * thread.c (thr_try_catch_cmd): New function.
5021         (thread_apply_all_command): Handle qcs flags.
5022         (thread_apply_command): Handle qcs flags.
5023         (taas_command): New function.
5024         (tfaas_command): New function.
5025         (_initialize_thread): Update to setup the new commands 'taas
5026         and 'tfaas'. Change doc string for 'thread apply'.
5027
5028 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
5029
5030         * stack.c: (trailing_outermost_frame): New function, mostly
5031         extracted from backtrace_command_1.
5032         (leading_innermost_frame): New function.
5033         (backtrace_command_1): Update to call trailing_outermost_frame.
5034         (frame_apply_command_count): New function.
5035         (frame_apply_level_command): New function.
5036         (frame_apply_all_command): New function.
5037         (frame_apply_command): New function.
5038         (faas_command): New function.
5039         (frame_cmd_list): New variable.
5040         (_initialize_stack): Update to setup the new commands 'frame apply'
5041         and 'faas'.
5042
5043 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
5044
5045         * cli-utils.c (number_or_range_parser::get_number): Only handle
5046         numbers or convenience var as numbers.
5047         (parse_flags): New function.
5048         (parse_flags_qcs): New function.
5049         (number_or_range_parser::finished): Ensure parsing end is detected
5050         before end of string.
5051         * cli-utils.h (parse_flags): New function.
5052         (parse_flags_qcs): New function.
5053         (number_or_range_parser): Remove m_finished bool.
5054         (number_or_range_parser::skip_range): Set m_in_range to false.
5055
5056 2018-07-12  Sergio Durigan Junior  <sergiodj@redhat.com>
5057
5058         * ser-tcp.c (try_connect): Declare 'ioarg' as 'u_long' if building
5059         on Windows.
5060
5061 2018-07-11  Sergio Durigan Junior  <sergiodj@redhat.com>
5062             Jan Kratochvil  <jan.kratochvil@redhat.com>
5063             Paul Fertser  <fercerpav@gmail.com>
5064             Tsutomu Seki  <sekiriki@gmail.com>
5065             Pedro Alves  <palves@redhat.com>
5066
5067         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5068         'unittests/parse-connection-spec-selftests.c'.
5069         (COMMON_SFILES): Add 'common/netstuff.c'.
5070         (HFILES_NO_SRCDIR): Add 'common/netstuff.h'.
5071         * NEWS (Changes since GDB 8.2): Mention IPv6 support.
5072         * common/netstuff.c: New file.
5073         * common/netstuff.h: New file.
5074         * ser-tcp.c: Include 'netstuff.h' and 'wspiapi.h'.
5075         (wait_for_connect): Update comment.  New parameter
5076         'gdb::optional<int> sock' instead of 'struct serial *scb'.
5077         Use 'sock' directly instead of 'scb->fd'.
5078         (try_connect): New function, with code from 'net_open'.
5079         (net_open): Rewrite main loop to deal with multiple
5080         sockets/addresses.  Handle IPv6-style hostnames; implement
5081         support for IPv6 connections.
5082         * unittests/parse-connection-spec-selftests.c: New file.
5083
5084 2018-07-11  Pedro Alves  <palves@redhat.com>
5085
5086         PR gdb/23377
5087         * remote.c (remote_target::remote_detach_pid): Call
5088         set_current_process.
5089
5090 2018-07-11  Pedro Alves  <palves@redhat.com>
5091
5092         * h8300-tdep.c (h8300_gdbarch_init): Remove
5093         set_gdbarch_ecoff_reg_to_regnum calls.
5094
5095 2018-07-11  Sergio Durigan Junior  <sergiodj@redhat.com>
5096
5097         PR c++/23373
5098         * c-typeprint.c (c_type_print_base_struct_union): Don't print
5099         offsets/sizes for static members of a class/struct.
5100
5101 2018-07-11  Alan Hayward  <alan.hayward@arm.com>
5102
5103         * target-descriptions.c (tdesc_register_bitsize): Rename.
5104         * target-descriptions.h (tdesc_register_bitsize): Likewise.
5105         * rs6000-tdep.c (rs6000_gdbarch_init): Use new name.
5106         * aarch64-tdep.c (aarch64_get_tdesc_vq): Convert size.
5107
5108 2018-07-10  Tom Tromey  <tom@tromey.com>
5109
5110         * breakpoint.c (moribund_locations): Now static and a
5111         std::vector.
5112         (breakpoint_init_inferior, moribund_breakpoint_here_p)
5113         (build_bpstat_chain, update_global_location_list)
5114         (breakpoint_retire_moribund): Update.
5115         * breakpoint.h (bp_location_p): Remove typedef.  Don't declare
5116         VEC.
5117
5118 2018-07-10  Andrew Burgess  <andrew.burgess@embecosm.com>
5119
5120         * riscv-tdep.c (riscv_is_fp_regno_p): New function.
5121         (riscv_register_reggroup_p): Use new function, remove unneeded
5122         parenthesis.
5123         (riscv_push_dummy_call): Extend assert to compare against xlen or
5124         flen based on register type.
5125
5126 2018-07-10  Andrew Burgess  <andrew.burgess@embecosm.com>
5127
5128         * riscv-tdep.c (riscv_print_arg_location): Use TYPE_SAFE_NAME.
5129
5130 2018-07-09  Andrew Burgess  <andrew.burgess@embecosm.com>
5131
5132         * remote.c (show_hardware_watchpoint_limit): New function.
5133         (show_hardware_watchpoint_length_limit): New function.
5134         (show_hardware_breakpoint_limit): New function.
5135         (_initialize_remote): Use add_setshow_zuinteger_unlimited_cmd
5136         where appropriate, update help text.
5137
5138 2018-07-09  Tom Tromey  <tom@tromey.com>
5139
5140         * Makefile.in (CDEPS): Don't mention XM_CDEPS.
5141         (CLIBS): Don't mention NAT_CLIBS.
5142
5143 2018-07-09  Tom Tromey  <tom@tromey.com>
5144
5145         * Makefile.in (ADD_FILES, ADD_DEPS): Remove.
5146         (LIBGDB_OBS, clean mostlyclean): Update.
5147         (gdb$(EXEEXT), insight$(EXEEXT)): Update.
5148
5149 2018-07-09  Tom Tromey  <tom@tromey.com>
5150
5151         * Makefile.in (%.c: %.y): Use ECHO_YACC.
5152         (%.c: %.l): Use ECHO_LEX.  Just fail if flex not available.
5153         * silent-rules.mk (ECHO_YACC, ECHO_LEX): New variables.
5154
5155 2018-07-09  Tom Tromey  <tom@tromey.com>
5156
5157         * Makefile.in (ALLDEPFILES): Remove exec.c.
5158         (COMMON_OBS): Remove exec.o.
5159         (COMMON_SFILES): Add exec.c.
5160
5161 2018-07-09  Tom Tromey  <tom@tromey.com>
5162
5163         * Makefile.in (LINT, LINTFLAGS, LINTFILES, lint): Remove.
5164
5165 2018-07-09  Tom Tromey  <tom@tromey.com>
5166
5167         * Makefile.in (clean mostlyclean): Remove stamp-version.
5168         (version.c): Depend on stamp-version.
5169         (stamp-version): New rule, from version.c rule.
5170
5171 2018-07-09  Tom Tromey  <tom@tromey.com>
5172
5173         * Makefile.in (init.c): Depend on stamp-init.
5174         (stamp-init): New rule, from init.c rule.
5175         (clean mostlyclean): Remove stamp-init.
5176
5177 2018-07-09  Tom Tromey  <tom@tromey.com>
5178
5179         * Makefile.in (INIT_FILES): Remove CONFIG_SRCS,
5180         SUBDIR_GCC_COMPILE_SRCS.
5181
5182 2018-07-09  Tom Tromey  <tom@tromey.com>
5183
5184         * Makefile.in (init.c): Remove some unused sed rules.
5185
5186 2018-07-09  Tom Tromey  <tom@tromey.com>
5187
5188         * Makefile.in (TSOBS): Remove.
5189         (INIT_FILES): Update.
5190         (LIBGDB_OBS): Update.
5191         (COMMON_SFILES): Add inflow.c.
5192         (SFILES): Remove inflow.c.
5193
5194 2018-07-07  Jan Kratochvil  <jan.kratochvil@redhat.com>
5195
5196         * contrib/gdb-add-index.sh ($dwarf5): New, use it.
5197
5198 2018-07-07  Simon Marchi  <simon.marchi@polymtl.ca>
5199
5200         * ia64-libunwind-tdep.c (get_reg_name, get_fpreg_name,
5201         get_saveloc_name, is_signal_frame_name, step_name,
5202         init_remote_name, create_addr_space_name,
5203         destroy_addr_space_name, search_unwind_table_name,
5204         find_dyn_list_name): Constify.
5205
5206 2018-07-05  Simon Marchi  <simon.marchi@polymtl.ca>
5207
5208         * darwin-nat.c (darwin_pthread_kill): New function.
5209         (darwin_resume_thread): Use darwin_pthread_kill.
5210
5211 2018-07-05  Tom de Vries  <tdevries@suse.de>
5212
5213         * macroexp.c (macro_buffer) <operator=>: New member function.
5214
5215 2018-07-04  Tom Tromey  <tom@tromey.com>
5216
5217         * darwin-nat.c (darwin_attach_pid): Use exit_inferior.
5218
5219 2018-07-04  Simon Marchi  <simon.marchi@polymtl.ca>
5220
5221         * common/common-defs.h (HAVE_USEFUL_SBRK): Define.
5222         * main.c: Use HAVE_USEFUL_SBRK instead of HAVE_SBRK.
5223         * maint.c: Likewise.
5224         * top.c: Likewise.
5225
5226 2018-07-04  Joel Brobecker  <brobecker@adacore.com>
5227
5228         * NEWS: Create a new section for the next release branch.
5229         Rename the section of the current branch, now that it has
5230         been cut.
5231
5232 2018-07-04  Joel Brobecker  <brobecker@adacore.com>
5233
5234         GDB 8.2 branch created (1b919490e8ba30bf1d6941df0ed112b0e557017e):
5235         * version.in: Bump version to 8.2.50.DATE-git.
5236
5237 2018-07-04  Vyacheslav Barinov  <v.barinov@samsung.com>
5238             Pedro Alves  <palves@redhat.com>
5239
5240         * linux-nat.c (linux_init_ptrace): Rename to ...
5241         (linux_init_ptrace_procfs): ... this.  Call
5242         linux_proc_init_warnings.
5243         (linux_nat_target::post_attach)
5244         (linux_nat_target::post_startup_inferior): Adjust.
5245         * nat/linux-procfs.c (linux_proc_init_warnings): Define function.
5246         * nat/linux-procfs.h (linux_proc_init_warnings): Declare function.
5247
5248 2018-07-04  Tom de Vries  <tdevries@suse.de>
5249
5250         * dwarf2read.c (error_check_comp_unit_head): Move dwarf version
5251         check ...
5252         (read_comp_unit_head): ... here.
5253
5254 2018-07-03  Tom Tromey  <tom@tromey.com>
5255
5256         * tracepoint.c (process_tracepoint_on_disconnect, start_tracing)
5257         (stop_tracing, tstatus_command)
5258         (find_matching_tracepoint_location, merge_uploaded_tracepoints)
5259         (print_one_static_tracepoint_marker): Update.
5260         * breakpoint.c (static_tracepoints_here, all_tracepoints): Return
5261         std::vector.
5262         * breakpoint.h (breakpoint_p): Remove typedef.  Don't declare
5263         VEC.
5264         (all_tracepoints, static_tracepoints_here): Return std::vector.
5265
5266 2018-07-03  Tom Tromey  <tom@tromey.com>
5267
5268         * common/ptid.c (ptid_equal): Remove.
5269         * common/ptid.h (ptid_equal): Don't declare.
5270         * ada-tasks.c: Update.
5271         * breakpoint.c: Update.
5272         * common/agent.c: Update.
5273         * corelow.c: Update.
5274         * darwin-nat-info.c: Update.
5275         * darwin-nat.c: Update.
5276         * dcache.c: Update.
5277         * dtrace-probe.c: Update.
5278         * dummy-frame.c: Update.
5279         * fbsd-nat.c: Update.
5280         * frame.c: Update.
5281         * gdbthread.h: Update.
5282         * gnu-nat.c: Update.
5283         * go32-nat.c: Update.
5284         * inf-loop.c: Update.
5285         * inf-ptrace.c: Update.
5286         * infcall.c: Update.
5287         * infcmd.c: Update.
5288         * inflow.c: Update.
5289         * infrun.c: Update.
5290         * linux-fork.c: Update.
5291         * linux-nat.c: Update.
5292         * linux-thread-db.c: Update.
5293         * mi/mi-cmd-var.c: Update.
5294         * mi/mi-interp.c: Update.
5295         * mi/mi-main.c: Update.
5296         * nto-procfs.c: Update.
5297         * ppc-linux-tdep.c: Update.
5298         * procfs.c: Update.
5299         * python/py-inferior.c: Update.
5300         * python/py-record-btrace.c: Update.
5301         * python/py-record.c: Update.
5302         * ravenscar-thread.c: Update.
5303         * regcache.c: Update.
5304         * remote-sim.c: Update.
5305         * remote.c: Update.
5306         * sol-thread.c: Update.
5307         * solib.c: Update.
5308         * target.c: Update.
5309         * tui/tui-stack.c: Update.
5310         * varobj.c: Update.
5311         * windows-nat.c: Update.
5312         * windows-tdep.c: Update.
5313
5314 2018-07-03  Tom Tromey  <tom@tromey.com>
5315
5316         * common/ptid.c (ptid_match): Remove.
5317         * common/ptid.h (ptid_match): Don't declare.
5318         * fbsd-nat.c: Update.
5319         * infcmd.c: Update.
5320         * infrun.c: Update.
5321         * linux-nat.c: Update.
5322         * record-btrace.c: Update.
5323         * regcache.c: Update.
5324         * remote.c: Update.
5325
5326 2018-07-03  Tom Tromey  <tom@tromey.com>
5327
5328         * common/ptid.c (ptid_tid_p): Remove.
5329         * common/ptid.h (ptid_tid_p): Don't declare.
5330         * sol-thread.c: Update.
5331
5332 2018-07-03  Tom Tromey  <tom@tromey.com>
5333
5334         * common/ptid.c (ptid_lwp_p): Remove.
5335         * common/ptid.h (ptid_lwp_p): Don't declare.
5336         * fbsd-nat.c: Update.
5337         * linux-nat.c: Update.
5338         * nat/linux-procfs.c: Update.
5339         * nat/x86-linux-dregs.c: Update.
5340         * sol-thread.c: Update.
5341
5342 2018-07-03  Tom Tromey  <tom@tromey.com>
5343
5344         * common/ptid.c (ptid_is_pid): Remove.
5345         * common/ptid.h (ptid_is_pid): Don't declare.
5346         * infrun.c: Update.
5347         * linux-nat.c: Update.
5348         * mi/mi-interp.c: Update.
5349         * remote.c: Update.
5350         * thread.c: Update.
5351
5352 2018-07-03  Tom Tromey  <tom@tromey.com>
5353
5354         * common/ptid.c (ptid_get_tid): Remove.
5355         * common/ptid.h (ptid_get_tid): Don't declare.
5356         * ada-tasks.c: Update.
5357         * aix-thread.c: Update.
5358         * bsd-uthread.c: Update.
5359         * darwin-nat.c: Update.
5360         * fbsd-nat.c: Update.
5361         * i386-darwin-nat.c: Update.
5362         * infrun.c: Update.
5363         * linux-tdep.c: Update.
5364         * nto-procfs.c: Update.
5365         * ppc-ravenscar-thread.c: Update.
5366         * python/py-infthread.c: Update.
5367         * ravenscar-thread.c: Update.
5368         * sol-thread.c: Update.
5369         * sparc-ravenscar-thread.c: Update.
5370         * windows-nat.c: Update.
5371
5372 2018-07-03  Tom Tromey  <tom@tromey.com>
5373
5374         * common/ptid.c (ptid_get_lwp): Remove.
5375         * common/ptid.h (ptid_get_lwp): Don't declare.
5376         * aarch64-linux-nat.c: Update.
5377         * ada-tasks.c: Update.
5378         * aix-thread.c: Update.
5379         * amd64-linux-nat.c: Update.
5380         * arm-linux-nat.c: Update.
5381         * corelow.c: Update.
5382         * fbsd-nat.c: Update.
5383         * fbsd-tdep.c: Update.
5384         * gnu-nat.c: Update.
5385         * i386-cygwin-tdep.c: Update.
5386         * i386-gnu-nat.c: Update.
5387         * i386-linux-nat.c: Update.
5388         * ia64-linux-nat.c: Update.
5389         * inf-ptrace.c: Update.
5390         * infrun.c: Update.
5391         * linux-fork.c: Update.
5392         * linux-nat.c: Update.
5393         * linux-tdep.c: Update.
5394         * linux-thread-db.c: Update.
5395         * mips-linux-nat.c: Update.
5396         * nat/aarch64-linux-hw-point.c: Update.
5397         * nat/aarch64-linux.c: Update.
5398         * nat/linux-btrace.c: Update.
5399         * nat/linux-osdata.c: Update.
5400         * nat/linux-procfs.c: Update.
5401         * nat/x86-linux-dregs.c: Update.
5402         * obsd-nat.c: Update.
5403         * ppc-fbsd-nat.c: Update.
5404         * ppc-linux-nat.c: Update.
5405         * procfs.c: Update.
5406         * python/py-infthread.c: Update.
5407         * ravenscar-thread.c: Update.
5408         * remote.c: Update.
5409         * s390-linux-nat.c: Update.
5410         * sol-thread.c: Update.
5411         * sol2-tdep.c: Update.
5412         * spu-linux-nat.c: Update.
5413         * x86-linux-nat.c: Update.
5414         * xtensa-linux-nat.c: Update.
5415
5416 2018-07-03  Tom Tromey  <tom@tromey.com>
5417
5418         * common/ptid.c (ptid_get_pid): Remove.
5419         * common/ptid.h (ptid_get_pid): Don't declare.
5420         * aarch64-linux-nat.c: Update.
5421         * ada-lang.c: Update.
5422         * aix-thread.c: Update.
5423         * alpha-bsd-nat.c: Update.
5424         * amd64-fbsd-nat.c: Update.
5425         * amd64-linux-nat.c: Update.
5426         * arm-linux-nat.c: Update.
5427         * arm-nbsd-nat.c: Update.
5428         * auxv.c: Update.
5429         * break-catch-syscall.c: Update.
5430         * breakpoint.c: Update.
5431         * bsd-uthread.c: Update.
5432         * corelow.c: Update.
5433         * ctf.c: Update.
5434         * darwin-nat.c: Update.
5435         * fbsd-nat.c: Update.
5436         * fbsd-tdep.c: Update.
5437         * gcore.c: Update.
5438         * gnu-nat.c: Update.
5439         * hppa-nbsd-nat.c: Update.
5440         * hppa-obsd-nat.c: Update.
5441         * i386-fbsd-nat.c: Update.
5442         * ia64-linux-nat.c: Update.
5443         * inf-ptrace.c: Update.
5444         * infcmd.c: Update.
5445         * inferior.c: Update.
5446         * inferior.h: Update.
5447         * inflow.c: Update.
5448         * infrun.c: Update.
5449         * linux-fork.c: Update.
5450         * linux-nat.c: Update.
5451         * linux-tdep.c: Update.
5452         * linux-thread-db.c: Update.
5453         * m68k-bsd-nat.c: Update.
5454         * mi/mi-interp.c: Update.
5455         * mi/mi-main.c: Update.
5456         * mips-linux-nat.c: Update.
5457         * mips-nbsd-nat.c: Update.
5458         * mips64-obsd-nat.c: Update.
5459         * nat/aarch64-linux-hw-point.c: Update.
5460         * nat/aarch64-linux.c: Update.
5461         * nat/linux-btrace.c: Update.
5462         * nat/linux-osdata.c: Update.
5463         * nat/linux-procfs.c: Update.
5464         * nat/x86-linux-dregs.c: Update.
5465         * nto-procfs.c: Update.
5466         * obsd-nat.c: Update.
5467         * ppc-linux-nat.c: Update.
5468         * ppc-nbsd-nat.c: Update.
5469         * ppc-obsd-nat.c: Update.
5470         * proc-service.c: Update.
5471         * procfs.c: Update.
5472         * python/py-inferior.c: Update.
5473         * python/py-infthread.c: Update.
5474         * ravenscar-thread.c: Update.
5475         * record.c: Update.
5476         * remote-sim.c: Update.
5477         * remote.c: Update.
5478         * rs6000-nat.c: Update.
5479         * s390-linux-nat.c: Update.
5480         * sh-nbsd-nat.c: Update.
5481         * sol-thread.c: Update.
5482         * sparc-nat.c: Update.
5483         * sparc64-tdep.c: Update.
5484         * spu-linux-nat.c: Update.
5485         * spu-tdep.c: Update.
5486         * target-debug.h: Update.
5487         * target.c: Update.
5488         * thread.c: Update.
5489         * tid-parse.c: Update.
5490         * tracefile-tfile.c: Update.
5491         * vax-bsd-nat.c: Update.
5492         * windows-nat.c: Update.
5493         * x86-linux-nat.c: Update.
5494         * x86-nat.c: Update.
5495
5496 2018-07-03  Tom Tromey  <tom@tromey.com>
5497
5498         * common/ptid.c (pid_to_ptid): Remove.
5499         * common/ptid.h (pid_to_ptid): Don't declare.
5500         * aix-thread.c: Update.
5501         * arm-linux-nat.c: Update.
5502         * common/ptid.c: Update.
5503         * common/ptid.h: Update.
5504         * corelow.c: Update.
5505         * ctf.c: Update.
5506         * darwin-nat.c: Update.
5507         * fbsd-nat.c: Update.
5508         * fork-child.c: Update.
5509         * gnu-nat.c: Update.
5510         * go32-nat.c: Update.
5511         * inf-ptrace.c: Update.
5512         * infcmd.c: Update.
5513         * inferior.c: Update.
5514         * infrun.c: Update.
5515         * linux-fork.c: Update.
5516         * linux-nat.c: Update.
5517         * nat/aarch64-linux-hw-point.c: Update.
5518         * nat/fork-inferior.c: Update.
5519         * nat/x86-linux-dregs.c: Update.
5520         * nto-procfs.c: Update.
5521         * obsd-nat.c: Update.
5522         * procfs.c: Update.
5523         * progspace.c: Update.
5524         * remote.c: Update.
5525         * rs6000-nat.c: Update.
5526         * s390-linux-nat.c: Update.
5527         * sol-thread.c: Update.
5528         * spu-linux-nat.c: Update.
5529         * target.c: Update.
5530         * top.c: Update.
5531         * tracefile-tfile.c: Update.
5532         * windows-nat.c: Update.
5533
5534 2018-07-03  Tom Tromey  <tom@tromey.com>
5535
5536         * common/ptid.h (ptid_build): Don't declare.
5537         * common/ptid.c (ptid_build): Remove.
5538         * aix-thread.c: Update.
5539         * bsd-kvm.c: Update.
5540         * bsd-uthread.c: Update.
5541         * common/agent.c: Update.
5542         * common/ptid.c: Update.
5543         * common/ptid.h: Update.
5544         * corelow.c: Update.
5545         * darwin-nat.c: Update.
5546         * fbsd-nat.c: Update.
5547         * gnu-nat.c: Update.
5548         * linux-fork.c: Update.
5549         * linux-nat.c: Update.
5550         * linux-thread-db.c: Update.
5551         * nat/linux-osdata.c: Update.
5552         * nat/linux-procfs.c: Update.
5553         * nto-procfs.c: Update.
5554         * obsd-nat.c: Update.
5555         * proc-service.c: Update.
5556         * procfs.c: Update.
5557         * ravenscar-thread.c: Update.
5558         * remote-sim.c: Update.
5559         * remote.c: Update.
5560         * sol-thread.c: Update.
5561         * target.c: Update.
5562         * windows-nat.c: Update.
5563
5564 2018-07-03  Tom Tromey  <tom@tromey.com>
5565
5566         * infrun.c (follow_exec): Use exit_inferior_silent.
5567         * inferior.c (exit_inferior_num_silent): Remove.
5568         * inferior.h (exit_inferior_num_silent): Don't declare.
5569
5570 2018-07-03  Tom Tromey  <tom@tromey.com>
5571
5572         PR cli/23340:
5573         * darwin-nat.c (darwin_attach_pid): Reset inferior and
5574         inferior_ptid on error.
5575
5576 2018-07-02  Maciej W. Rozycki  <macro@mips.com>
5577             Simon Marchi  <simon.marchi@polymtl.ca>
5578
5579         PR tdep/8282
5580         * disasm.h (gdb_disassembler): Add
5581         `m_disassembler_options_holder'. member
5582         * disasm.c (get_all_disassembler_options): New function.
5583         (gdb_disassembler::gdb_disassembler): Use it.
5584         (gdb_buffered_insn_length_init_dis): Likewise.
5585         (gdb_buffered_insn_length): Adjust accordingly.
5586         (set_disassembler_options): Handle options with arguments.
5587         (show_disassembler_options_sfunc): Likewise.  Add a leading new
5588         line if showing options with descriptions.
5589         (disassembler_options_completer): Adapt to using the
5590         `disasm_options_and_args_t' structure.
5591         * mips-tdep.c (mips_disassembler_options): New variable.
5592         (mips_disassembler_options_o32): Likewise.
5593         (mips_disassembler_options_n32): Likewise.
5594         (mips_disassembler_options_n64): Likewise.
5595         (gdb_print_insn_mips): Don't set `disassembler_options'.
5596         (gdb_print_insn_mips_n32, gdb_print_insn_mips_n64): Remove
5597         functions.
5598         (mips_gdbarch_init): Always set `gdbarch_print_insn' to
5599         `gdb_print_insn_mips'.  Set `gdbarch_disassembler_options',
5600         `gdbarch_disassembler_options_implicit' and
5601         `gdbarch_valid_disassembler_options'.
5602         * arm-tdep.c (_initialize_arm_tdep): Adapt to using the
5603         `disasm_options_and_args_t' structure.
5604         * gdbarch.sh (disassembler_options_implicit): New `gdbarch'
5605         method.
5606         (valid_disassembler_options): Switch from `disasm_options_t' to
5607         the `disasm_options_and_args_t' structure.
5608         * NEWS: Document `set disassembler-options' support for the MIPS
5609         target.
5610         * gdbarch.h: Regenerate.
5611         * gdbarch.c: Regenerate.
5612
5613 2018-07-02  Sebastian Huber  <sebastian.huber@embedded-brains.de>
5614
5615         * riscv-tdep.c (riscv_register_aliases): Swap "fp" and "s0" entries.
5616
5617 2018-06-29  Joel Brobecker  <brobecker@adacore.com>
5618
5619         * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Add missing
5620         parameter in call to amd64_target_description.
5621         * amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise.
5622         * amd64-fbsd-tdep.c (amd64fbsd_core_read_description)
5623         (amd64fbsd_init_abi): Likewise.
5624         * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
5625         * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
5626         * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
5627         * amd64-fbsd-nat.c (amd64_fbsd_nat_target): Likewise.
5628
5629 2018-06-29  Pedro Alves  <palves@redhat.com>
5630
5631         * gdb/amd64-tdep.h (amd64_create_target_description): Add
5632         "segments" parameter.
5633         * gdb/amd64-tdep.c (amd64_none_init_abi, amd64_x32_none_init_abi)
5634         (_initialize_amd64_tdep): Update call to
5635         amd64_create_target_description.
5636         (amd64_target_description): Add "segments" parameter.  Adjust
5637         the implementation to use it.
5638         * gdb/amd64-linux-tdep.c (amd64_linux_read_description): Update
5639         call to amd64_create_target_description.
5640         * gdb/amd64-windows-tdep.c (amd64_windows_init_abi): Likewise.
5641         * gdb/arch/amd64.h (amd64_create_target_description): Add
5642         "segments" register.
5643         * gdb/arch/amd64.c (amd64_create_target_description): Add
5644         "segments" parameter.  Call create_feature_i386_64bit_segments
5645         only if SEGMENTS is true.
5646         * gdb/gdbserver/win32-i386-low.c (i386_arch_setup): Update
5647         call to amd64_create_target_description.
5648
5649 2018-06-29  Pedro Alves  <palves@redhat.com>
5650
5651         * thread.c (thread_target_id_str): New, factored out from ...
5652         (print_thread_info_1): ... here.  Use it to compute the max
5653         "Target Id" column width.
5654
5655 2018-06-29  Pedro Alves  <palves@redhat.com>
5656
5657         * remote.c (remote_target::extra_thread_info): Delete
5658         'display_buf' and 'n' locals.  from the cache, regardless of
5659         packet mechanims is in use.  Use cache for qThreadExtra and qP
5660         methods too.
5661
5662 2018-06-29  Pedro Alves  <palves@redhat.com>
5663
5664         * blockframe.c (find_pc_sect_containing_function): New function.
5665         * breakpoint.c (print_breakpoint_location): Don't call
5666         find_pc_sect_function.
5667         * linespec.c (create_sals_line_offset): Record the location's
5668         symbol in the sal.
5669         * linespec.c (convert_address_location_to_sals): Fill in sal's
5670         symbol with find_pc_sect_containing_function.
5671         * symtab.c (find_function_start_sal): Rename to ...
5672         (find_function_start_sal_1): ... this.
5673         (find_function_start_sal): Reimplement as wrapper around
5674         find_function_start_sal_1, and use
5675         find_pc_sect_containing_function to fill in the sal's symbol.
5676         (find_function_start_sal(symbol*, bool)): Adjust.
5677         * symtab.h (find_pc_function, find_pc_sect_function): Adjust
5678         comments.
5679         (find_pc_sect_containing_function): Declare.
5680
5681 2018-06-29  Pedro Alves  <palves@redhat.com>
5682
5683         * inline-frame.c (stopped_by_user_bp_inline_frame): Return
5684         true if the the location has no symbol.
5685
5686 2018-06-28  Tom Tromey  <tom@tromey.com>
5687
5688         * NEWS: Mention --enable-codesign.
5689         * silent-rules.mk (ECHO_SIGN): New variable.
5690         * configure.ac: Add --enable-codesign.
5691         * configure: Rebuild.
5692         * Makefile.in (CODESIGN, CODESIGN_CERT): New variables.
5693         (gdb$(EXEEXT)): Optionally invoke codesign.
5694
5695 2018-06-28  Pedro Alves  <palves@redhat.com>
5696
5697         * gdbthread.h (struct thread_suspend_state) <stop_pc>: Extend
5698         comments.
5699         (switch_to_thread_no_regs): Adjust comment.
5700         * infcmd.c (stop_pc): Delete.
5701         (post_create_inferior, info_program_command): Replace references
5702         to stop_pc with references to thread_info->suspend.stop_pc.
5703         * inferior.h (stop_pc): Delete declaration.
5704         * infrun.c (proceed, handle_syscall_event, fill_in_stop_func)
5705         (handle_inferior_event_1, handle_signal_stop)
5706         (process_event_stop_test, keep_going_stepped_thread)
5707         (handle_step_into_function, handle_step_into_function_backward)
5708         (print_stop_location): Replace references to stop_pc with
5709         references to thread_info->suspend.stop_pc.
5710         (struct infcall_suspend_state) <stop_pc>: Delete field.
5711         (save_infcall_suspend_state, restore_infcall_suspend_state):
5712         Remove references to inf_stat->stop_pc.
5713         * linux-fork.c (fork_load_infrun_state): Likewise.
5714         * record-btrace.c (record_btrace_set_replay): Likewise.
5715         * record-full.c (record_full_goto_entry): Likewise.
5716         * remote.c (print_one_stopped_thread): Likewise.
5717         * target.c (target_resume): Extend comment.
5718         * thread.c (set_executing_thread): New.
5719         (set_executing): Use it.
5720         (switch_to_thread_no_regs, switch_to_no_thread, switch_to_thread):
5721         Remove references to stop_pc.
5722
5723 2018-06-28  Pedro Alves  <palves@redhat.com>
5724
5725         * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>:
5726         Moving fetching stop_pc until after ecs->event_thread is refreshed.
5727
5728 2018-06-28  Tom Tromey  <tom@tromey.com>
5729
5730         * coffread.c (coff_symfile_finish): Update.
5731         * xcoffread.c (xcoff_symfile_finish): Update.
5732         * elfread.c (elf_symfile_finish): Update.
5733         * symfile.h (dwarf2_free_objfile): Don't declare.
5734         * dwarf2read.c (_initialize_dwarf2_read): Use
5735         register_objfile_data_with_cleanup.
5736         (dwarf2_free_objfile): Now static.  Change signature.
5737
5738 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
5739
5740         * symfile.c (add_symbol_file_command, _initialize_symfile): Add
5741         option "-o" to add-symbol-file-load to add an offset to each
5742         section's load address.
5743         * symfile.c (set_objfile_default_section_offset): New function.
5744
5745 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
5746
5747         * symfile.c (add_symbol_file_command): Make sure that sections
5748         with the same name are sorted in the same order.
5749
5750 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
5751
5752         * symfile.c (add_symbol_file_command, _initialize_symfile): Do not
5753         require the second argument.  If omitted, load sections at the
5754         addresses specified in the file.
5755
5756 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
5757
5758         * symfile.c (symbol_file_command, symbol_file_add_main_1)
5759         (_initialize_symfile): Add option "-o" to symbol-file to add an
5760         offset to each section of the symbol file.
5761
5762 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
5763
5764         * MAINTAINERS (Write After Approval): Add Petr Tesarik.
5765
5766 2018-06-27  Tom Tromey  <tom@tromey.com>
5767
5768         * stack.c (_initialize_stack): Update "func" help text.
5769
5770 2018-06-27  Tom Tromey  <tom@tromey.com>
5771
5772         * python/py-unwind.c (unwind_info_object) <saved_regs>: Now a
5773         std::vector.
5774         (unwind_infopy_str, pyuw_create_unwind_info)
5775         (unwind_infopy_add_saved_register, pyuw_sniffer)
5776         (unwind_infopy_dealloc, unwind_infopy_add_saved_register):
5777         Update.
5778         (struct saved_reg): Add constructor.
5779         <value>: Now a gdbpy_ref<>.
5780
5781 2018-06-27  Tom Tromey  <tom@tromey.com>
5782
5783         * machoread.c (macho_symfile_read): Define "symbol_table" earlier.
5784
5785 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
5786
5787         * gdb-gdb.py.in: Format using autopep8.
5788
5789 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
5790
5791         * gdb-gdb.py.in (CoreAddrPrettyPrinter): New class.
5792         (type_lookup_function): Recognize CORE_ADDR values.
5793
5794 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
5795
5796         * gdb-gdb.py.in (StructMainTypePrettyPrinter) <to_string>: Don't
5797         print tag_name.
5798
5799 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
5800
5801         * gdb-gdb.py.in (TypeFlag) <__cmp__>: Remove.
5802         <__lt__>: Add.
5803
5804 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
5805
5806         * gdb-gdb.py: Move to...
5807         * gdb-gdb.py.in: ... here.
5808         * configure.ac (AC_CONFIG_FILES): Add gdb-gdb.py.
5809         * Makefile.in (all): Add gdb-gdb.gdb and gdb-gdb.py as
5810         dependencies.
5811         (distclean): Remove gdb-gdb.py when cleaning.
5812         (gdb-gdb.py, gdb-gdb.gdb): New rules.
5813         * configure: Re-generate.
5814
5815 2018-06-27  Pedro Alves  <palves@redhat.com>
5816
5817         * proc-service.c (get_ps_regcache): New.
5818         (ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
5819         (ps_lsetfpregs): Use it.
5820
5821 2018-06-27  Omair Javaid  <omair.javaid@linaro.org>
5822
5823         PR gdb/21695
5824         * dwarf2read.c (lnp_state_machine::check_line_address): Update declaration.
5825         (dwarf_decode_lines_1): Adjust.
5826
5827 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
5828
5829         * fbsd-nat.h (class fbsd_nat_target) <find_memory_regions>: Add
5830         override.
5831         <info_proc>: Likewise.
5832
5833 2018-06-26  Joel Brobecker  <brobecker@adacore.com>
5834
5835         * windows-nat.c (do_windows_fetch_inferior_registers): Rename
5836         to windows_fetch_one_register, and only handle the case of
5837         fetching one register.  Move the code that reloads the context
5838         and iterates over all registers if R is negative to...
5839         (windows_nat_target::fetch_registers): ... here.
5840         (do_windows_store_inferior_registers): Rename to
5841         windows_store_one_register, and only handle the case of storing
5842         one register.  Move the code that handles the case where r is
5843         negative to...
5844         (windows_nat_target::store_registers) ... here.
5845
5846 2018-06-26  Tom Tromey  <tom@tromey.com>
5847
5848         PR rust/22574:
5849         * typeprint.c (whatis_exp): Allow ptype/o for Rust.
5850         * rust-lang.c (rust_print_struct_def): Add podata parameter.
5851         Update.
5852         (rust_internal_print_type): Add podata parameter.
5853         (rust_print_type): Update.
5854
5855 2018-06-26  Tom Tromey  <tom@tromey.com>
5856
5857         * typeprint.h (struct print_offset_data) <update, finish,
5858         maybe_print_hole>: New methods.
5859         <indentation>: New constant.
5860         * typeprint.c (print_offset_data::indentation): Define.
5861         (print_offset_data::maybe_print_hole, print_offset_data::update)
5862         (print_offset_data::finish): Move from c-typeprint.c and rename.
5863         * c-typeprint.c (OFFSET_SPC_LEN): Remove.
5864         (print_spaces_filtered_with_print_options): Update.
5865         (c_print_type_union_field_offset, maybe_print_hole)
5866         (c_print_type_struct_field_offset): Move to typeprint.c and
5867         rename.
5868         (c_type_print_base_struct_union): Update.
5869
5870 2018-06-25  Pedro Alves  <palves@redhat.com>
5871
5872         * gdbthread.h (thread_info_ref, delete_thread)
5873         (delete_thread_silent, first_thread_of_inferior)
5874         (any_thread_of_inferior, switch_to_thread)
5875         (enable_thread_stack_temporaries)
5876         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
5877         (get_last_thread_stack_temporary)
5878         (value_in_thread_stack_temporaries, can_access_registers_thread):
5879         Spell out "struct thread_info" instead of just "thread_info".
5880         * inferior.h (notice_new_inferior): Likewise.
5881
5882 2018-06-25  Pedro Alves  <palves@redhat.com>
5883
5884         * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
5885         pass thread_info pointer to delete_thread.
5886         (windows_nat_target::detach): Pass inferior pointer to
5887         detach_inferior.
5888         * aix-thread.c (sync_threadlists): Pass thread_info pointer to
5889         delete_thread.
5890         * bsd-kvm.c (bsd_kvm_target::close): Use discard_all_inferiors.
5891         * darwin-nat.c (darwin_check_new_threads): Use find_thread_ptid
5892         and pass a thread_info pointer to delete_thread.
5893         * fbsd-nat.c (fbsd_nat_target::wait): Use find_thread_ptid and
5894         pass thread_info pointer to delete_thread.
5895         * go32-nat.c (go32_nat_target::mourn_inferior): Remove
5896         delete_thread_silent call.
5897         * procfs.c (procfs_target::detach): Pass inferior pointer to
5898         detach_inferior.
5899         (procfs_target::wait): Pass thread_info pointer to delete_thread.
5900         * remote-sim.c (gdbsim_target::mourn_inferior): Remove
5901         delete_thread_silent call.
5902         * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
5903         pass thread_info pointer to delete_thread.
5904         (windows_nat_target::detach): Pass inferior pointer to
5905         delete_inferior.
5906
5907 2018-06-22  Alan Hayward  <alan.hayward@arm.com>
5908
5909         * regcache.c (readable_regcache::read_part): Fix asserts.
5910         (reg_buffer::raw_collect_part): New function.
5911         (regcache::write_part): Fix asserts.
5912         (reg_buffer::raw_supply_part): New function.
5913         (regcache::transfer_regset_register): New helper function.
5914         (regcache::transfer_regset): Call new functions.
5915         (regcache_supply_regset): Use gdb_byte*.
5916         (regcache::supply_regset): Likewise.
5917         (regcache_collect_regset): Likewise.
5918         (regcache::collect_regset): Likewise.
5919         * regcache.h (reg_buffer::raw_collect_part): New declaration.
5920         (reg_buffer::raw_supply_part): Likewise.
5921         (regcache::transfer_regset_register): Likewise.
5922         (regcache::transfer_regset): Use gdb_byte*.
5923
5924 2018-06-22  Alan Hayward  <alan.hayward@arm.com>
5925
5926         * nat/aarch64-sve-linux-ptrace.h (HAS_SVE_STATE): Use &.
5927
5928 2018-06-21  Pedro Alves  <palves@redhat.com>
5929
5930         * ada-lang.h (ada_get_task_number): Take a thread_info pointer
5931         instead of a ptid_t.  All callers adjusted.
5932         * ada-tasks.c (ada_get_task_number): Likewise.  All callers
5933         adjusted.
5934         (print_ada_task_info, display_current_task_id, task_command_1):
5935         Adjust.
5936         * breakpoint.c (watchpoint_in_thread_scope): Adjust to use
5937         inferior_thread.
5938         (breakpoint_kind): Adjust.
5939         (remove_breakpoints_pid): Rename to ...
5940         (remove_breakpoints_inf): ... this.  Adjust to take an inferior
5941         pointer.  All callers adjusted.
5942         (bpstat_clear_actions): Use inferior_thread.
5943         (get_bpstat_thread): New.
5944         (bpstat_do_actions): Use it.
5945         (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust
5946         to take a thread_info pointer.  All callers adjusted.
5947         (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint)
5948         (breakpoint_re_set_thread): Use inferior_thread.
5949         * breakpoint.h (struct inferior): Forward declare.
5950         (bpstat_stop_status): Update.
5951         (remove_breakpoints_pid): Delete.
5952         (remove_breakpoints_inf): New.
5953         * bsd-uthread.c (bsd_uthread_target::wait)
5954         (bsd_uthread_target::update_thread_list): Use find_thread_ptid.
5955         * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch)
5956         (maint_btrace_packet_history_cmd)
5957         (maint_btrace_clear_packet_history_cmd): Adjust.
5958         (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use
5959         inferior_thread.
5960         * cli/cli-interp.c: Include "inferior.h".
5961         * common/refcounted-object.h (struct
5962         refcounted_object_ref_policy): New.
5963         * compile/compile-object-load.c: Include gdbthread.h.
5964         (store_regs): Use inferior_thread.
5965         * corelow.c (core_target::close): Use current_inferior.
5966         (core_target_open): Adjust to use first_thread_of_inferior and use
5967         the current inferior.
5968         * ctf.c (ctf_target::close): Adjust to use current_inferior.
5969         * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ...
5970         <thread>: ... this new field.  All references adjusted.
5971         (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor):
5972         Take a thread_info pointer instead of a ptid_t.
5973         * dummy-frame.h (dummy_frame_push, dummy_frame_pop)
5974         (dummy_frame_discard, register_dummy_frame_dtor): Take a
5975         thread_info pointer instead of a ptid_t.
5976         * elfread.c: Include "inferior.h".
5977         (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop):
5978         Use inferior_thread.
5979         * eval.c (evaluate_subexp): Likewise.
5980         * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use
5981         inferior_thread.
5982         * gdb_proc_service.h (struct thread_info): Forward declare.
5983         (struct ps_prochandle) <ptid>: Delete, replaced by ...
5984         <thread>: ... this new field.  All references adjusted.
5985         * gdbarch.h, gdbarch.c: Regenerate.
5986         * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a
5987         'thread' parameter.  All implementations and callers adjusted.
5988         * gdbthread.h (thread_info) <set_running>: New method.
5989         (delete_thread, delete_thread_silent): Take a thread_info pointer
5990         instead of a ptid.
5991         (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete.
5992         (first_thread_of_process): Delete, replaced by ...
5993         (first_thread_of_inferior): ... this new function.  All callers
5994         adjusted.
5995         (any_live_thread_of_process): Delete, replaced by ...
5996         (any_live_thread_of_inferior): ... this new function.  All callers
5997         adjusted.
5998         (switch_to_thread, switch_to_no_thread): Declare.
5999         (is_executing): Delete.
6000         (enable_thread_stack_temporaries): Update comment.
6001         <enable_thread_stack_temporaries>: Take a thread_info pointer
6002         instead of a ptid_t.  Incref the thread.
6003         <~enable_thread_stack_temporaries>: Decref the thread.
6004         <m_ptid>: Delete
6005         <m_thr>: New.
6006         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
6007         (get_last_thread_stack_temporary)
6008         (value_in_thread_stack_temporaries, can_access_registers_thread):
6009         Take a thread_info pointer instead of a ptid_t.  All callers
6010         adjusted.
6011         * infcall.c (get_call_return_value): Use inferior_thread.
6012         (run_inferior_call): Work with thread pointers instead of ptid_t.
6013         (call_function_by_hand_dummy): Work with thread pointers instead
6014         of ptid_t.  Use thread_info_ref.
6015         * infcmd.c (proceed_thread_callback): Access thread's state
6016         directly.
6017         (ensure_valid_thread, ensure_not_running): Use inferior_thread,
6018         access thread's state directly.
6019         (continue_command): Use inferior_thread.
6020         (info_program_command): Use find_thread_ptid and access thread
6021         state directly.
6022         (proceed_after_attach_callback): Use thread state directly.
6023         (notice_new_inferior): Take a thread_info pointer instead of a
6024         ptid_t.  All callers adjusted.
6025         (exit_inferior): Take an inferior pointer instead of a pid.  All
6026         callers adjusted.
6027         (exit_inferior_silent): New.
6028         (detach_inferior): Delete.
6029         (valid_gdb_inferior_id, pid_to_gdb_inferior_id)
6030         (gdb_inferior_id_to_pid, in_inferior_list): Delete.
6031         (detach_inferior_command, kill_inferior_command): Use
6032         find_inferior_id instead of valid_gdb_inferior_id and
6033         gdb_inferior_id_to_pid.
6034         (inferior_command): Use inferior and thread pointers.
6035         * inferior.h (struct thread_info): Forward declare.
6036         (notice_new_inferior): Take a thread_info pointer instead of a
6037         ptid_t.  All callers adjusted.
6038         (detach_inferior): Delete declaration.
6039         (exit_inferior, exit_inferior_silent): Take an inferior pointer
6040         instead of a pid.  All callers adjusted.
6041         (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
6042         (valid_gdb_inferior_id): Delete.
6043         * infrun.c (follow_fork_inferior, proceed_after_vfork_done)
6044         (handle_vfork_child_exec_or_exit, follow_exec): Adjust.
6045         (struct displaced_step_inferior_state) <pid>: Delete, replaced by
6046         ...
6047         <inf>: ... this new field.
6048         <step_ptid>: Delete, replaced by ...
6049         <step_thread>: ... this new field.
6050         (get_displaced_stepping_state): Take an inferior pointer instead
6051         of a pid.  All callers adjusted.
6052         (displaced_step_in_progress_any_inferior): Adjust.
6053         (displaced_step_in_progress_thread): Take a thread pointer instead
6054         of a ptid_t.  All callers adjusted.
6055         (displaced_step_in_progress, add_displaced_stepping_state): Take
6056         an inferior pointer instead of a pid.  All callers adjusted.
6057         (get_displaced_step_closure_by_addr): Adjust.
6058         (remove_displaced_stepping_state): Take an inferior pointer
6059         instead of a pid.  All callers adjusted.
6060         (displaced_step_prepare_throw, displaced_step_prepare)
6061         (displaced_step_fixup): Take a thread pointer instead of a ptid_t.
6062         All callers adjusted.
6063         (start_step_over): Adjust.
6064         (infrun_thread_ptid_changed): Remove bit updating ptids in the
6065         displaced step queue.
6066         (do_target_resume): Adjust.
6067         (fetch_inferior_event): Use inferior_thread.
6068         (context_switch, get_inferior_stop_soon): Take an
6069         execution_control_state pointer instead of a ptid_t.  All callers
6070         adjusted.
6071         (switch_to_thread_cleanup): Delete.
6072         (stop_all_threads): Use scoped_restore_current_thread.
6073         * inline-frame.c: Include "gdbthread.h".
6074         (inline_state) <inline_state>: Take a thread pointer instead of a
6075         ptid_t.  All callers adjusted.
6076         <ptid>: Delete, replaced by ...
6077         <thread>: ... this new field.
6078         (find_inline_frame_state): Take a thread pointer instead of a
6079         ptid_t.  All callers adjusted.
6080         (skip_inline_frames, step_into_inline_frame)
6081         (inline_skipped_frames, inline_skipped_symbol): Take a thread
6082         pointer instead of a ptid_t.  All callers adjusted.
6083         * inline-frame.h (skip_inline_frames, step_into_inline_frame)
6084         (inline_skipped_frames, inline_skipped_symbol): Likewise.
6085         * linux-fork.c (delete_checkpoint_command): Adjust to use thread
6086         pointers directly.
6087         * linux-nat.c (get_detach_signal): Likewise.
6088         * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter.
6089         (thread_db_notice_clone): Adjust.
6090         (thread_db_find_new_threads_silently)
6091         (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take
6092         a thread pointer instead of a ptid_t.  All callers adjusted.
6093         * mi/mi-cmd-var.c: Include "inferior.h".
6094         (mi_cmd_var_update_iter): Update to use thread pointers.
6095         * mi/mi-interp.c (mi_new_thread): Update to use the thread's
6096         inferior directly.
6097         (mi_output_running_pid, mi_inferior_count): Delete, bits factored
6098         out to ...
6099         (mi_output_running): ... this new function.
6100         (mi_on_resume_1): Adjust to use it.
6101         (mi_user_selected_context_changed): Adjust to use inferior_thread.
6102         * mi/mi-main.c (proceed_thread): Adjust to use thread pointers
6103         directly.
6104         (interrupt_thread_callback): : Adjust to use thread and inferior
6105         pointers.
6106         * proc-service.c: Include "gdbthread.h".
6107         (ps_pglobal_lookup): Adjust to use the thread's inferior directly.
6108         * progspace-and-thread.c: Include "inferior.h".
6109         * progspace.c: Include "inferior.h".
6110         * python/py-exitedevent.c (create_exited_event_object): Adjust to
6111         hold a reference to an inferior_object.
6112         * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use
6113         inferior_thread.
6114         * python/py-inferior.c (struct inferior_object): Give the type a
6115         tag name instead of a typedef.
6116         (python_on_normal_stop): No need to check if the current thread is
6117         listed.
6118         (inferior_to_inferior_object): Change return type to
6119         inferior_object.  All callers adjusted.
6120         (find_thread_object): Delete, bits factored out to ...
6121         (thread_to_thread_object): ... this new function.
6122         * python/py-infthread.c (create_thread_object): Use
6123         inferior_to_inferior_object.
6124         (thpy_is_stopped): Use thread pointer directly.
6125         (gdbpy_selected_thread): Use inferior_thread.
6126         * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete
6127         field, replaced with ...
6128         <thread>: ... this new field.  All users adjusted.
6129         (btpy_insn_or_gap_new): Drop const.
6130         (btpy_list_new): Take a thread pointer instead of a ptid_t.  All
6131         callers adjusted.
6132         * python/py-record.c: Include "gdbthread.h".
6133         (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
6134         a ptid_t.  All callers adjusted.
6135         (gdbpy_current_recording): Use inferior_thread.
6136         * python/py-record.h (recpy_record_object) <ptid>: Delete
6137         field, replaced with ...
6138         <thread>: ... this new field.  All users adjusted.
6139         (recpy_element_object) <ptid>: Delete
6140         field, replaced with ...
6141         <thread>: ... this new field.  All users adjusted.
6142         (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
6143         a ptid_t.  All callers adjusted.
6144         * python/py-threadevent.c: Include "gdbthread.h".
6145         (get_event_thread): Use thread_to_thread_object.
6146         * python/python-internal.h (struct inferior_object): Forward
6147         declare.
6148         (find_thread_object, find_inferior_object): Delete declarations.
6149         (thread_to_thread_object, inferior_to_inferior_object): New
6150         declarations.
6151         * record-btrace.c: Include "inferior.h".
6152         (require_btrace_thread): Use inferior_thread.
6153         (record_btrace_frame_sniffer)
6154         (record_btrace_tailcall_frame_sniffer): Use inferior_thread.
6155         (get_thread_current_frame): Use scoped_restore_current_thread and
6156         switch_to_thread.
6157         (get_thread_current_frame): Use thread pointer directly.
6158         (record_btrace_replay_at_breakpoint): Use thread's inferior
6159         pointer directly.
6160         * record-full.c: Include "inferior.h".
6161         * regcache.c: Include "gdbthread.h".
6162         (get_thread_arch_regcache): Use the inferior's address space
6163         directly.
6164         (get_thread_regcache, registers_changed_thread): New.
6165         * regcache.h (get_thread_regcache(thread_info *thread)): New
6166         overload.
6167         (registers_changed_thread): New.
6168         (remote_target) <remote_detach_1>: Swap order of parameters.
6169         (remote_add_thread): <remote_add_thread>: Return the new thread.
6170         (get_remote_thread_info(ptid_t)): New overload.
6171         (remote_target::remote_notice_new_inferior): Use thread pointers
6172         directly.
6173         (remote_target::process_initial_stop_replies): Use
6174         thread_info::set_running.
6175         (remote_target::remote_detach_1, remote_target::detach)
6176         (extended_remote_target::detach): Adjust.
6177         * stack.c (frame_show_address): Use inferior_thread.
6178         * target-debug.h (target_debug_print_thread_info_pp): New.
6179         * target-delegates.c: Regenerate.
6180         * target.c (default_thread_address_space): Delete.
6181         (memory_xfer_partial_1): Use current_inferior.
6182         (target_detach): Use current_inferior.
6183         (target_thread_address_space): Delete.
6184         (generic_mourn_inferior): Use current_inferior.
6185         * target.h (struct target_ops) <thread_address_space>: Delete.
6186         (target_thread_address_space): Delete.
6187         * thread.c (init_thread_list): Use ALL_THREADS_SAFE.  Use thread
6188         pointers directly.
6189         (delete_thread_1, delete_thread, delete_thread_silent): Take a
6190         thread pointer instead of a ptid_t.  Adjust all callers.
6191         (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete.
6192         (first_thread_of_process): Delete, replaced by ...
6193         (first_thread_of_inferior): ... this new function.  All callers
6194         adjusted.
6195         (any_thread_of_process): Rename to ...
6196         (any_thread_of_inferior): ... this, and take an inferior pointer.
6197         (any_live_thread_of_process): Rename to ...
6198         (any_live_thread_of_inferior): ... this, and take an inferior
6199         pointer.
6200         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
6201         (value_in_thread_stack_temporaries)
6202         (get_last_thread_stack_temporary): Take a thread pointer instead
6203         of a ptid_t.  Adjust all callers.
6204         (thread_info::set_running): New.
6205         (validate_registers_access): Use inferior_thread.
6206         (can_access_registers_ptid): Rename to ...
6207         (can_access_registers_thread): ... this, and take a thread
6208         pointer.
6209         (print_thread_info_1): Adjust to compare thread pointers instead
6210         of ptids.
6211         (switch_to_no_thread, switch_to_thread): Make extern.
6212         (scoped_restore_current_thread::~scoped_restore_current_thread):
6213         Use m_thread pointer directly.
6214         (scoped_restore_current_thread::scoped_restore_current_thread):
6215         Use inferior_thread.
6216         (thread_command): Use thread pointer directly.
6217         (thread_num_make_value_helper): Use inferior_thread.
6218         * top.c (execute_command): Use inferior_thread.
6219         * tui/tui-interp.c: Include "inferior.h".
6220         * varobj.c (varobj_create): Use inferior_thread.
6221         (value_of_root_1): Use find_thread_global_id instead of
6222         global_thread_id_to_ptid.
6223
6224 2018-06-21  Alan Hayward  <alan.hayward@arm.com>
6225
6226         * regcache.c (readable_regcache::read_part): Avoid memcpy when
6227         possible.
6228         (regcache::write_part): Likewise.
6229         (readable_regcache::cooked_read_part): Update comment.
6230         (readable_regcache::cooked_write_part): Likewise.
6231         * regcache.h: (readable_regcache::read_part): Likewise.
6232         (regcache::write_part): Likewise.
6233
6234 2018-06-21  Richard Bunt  <richard.bunt@arm.com>
6235             Dirk Schubert  <dirk.schubert@arm.com>
6236
6237         * aarch64-linux-nat.c (post_attach): New.
6238         (aarch64_linux_nat_target::post_attach): Override post_attach to
6239         record the number of hardware debug registers.
6240
6241 2018-06-20  Tom Tromey  <tom@tromey.com>
6242
6243         * python/py-param.c (add_setshow_generic): Make parameters const.
6244         (parmpy_init): Update.
6245
6246 2018-06-20  Simon Marchi  <simon.marchi@polymtl.ca>
6247
6248         * regcache.h (regcache_cooked_read_ftype): Rename to...
6249         (register_read_ftype): ...this, change type to function_view.
6250         (class reg_buffer) <save>: Remove src parameter.
6251         (readonly_detached_regcache) <readonly_detached_regcache>: Make
6252         parameter non-const in first overload.  Remove src parameter in
6253         second overload.
6254         * regcache.c (do_cooked_read): Remove.
6255         (readonly_detached_regcache::readonly_detached_regcache): Make
6256         parameter non-const, adjust call to other constructor.
6257         (reg_buffer::save): Remove src parameter.
6258         * frame.c (do_frame_register_read): Remove.
6259         (frame_save_as_regcache): Use lambda function.
6260         * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
6261         parameter to ppu2spu_data *.
6262         (ppu2spu_sniffer): Use lambda function.
6263
6264 2018-06-20  Simon Marchi  <simon.marchi@polymtl.ca>
6265
6266         * record-full.c (record_full_target::insert_breakpoint): Remove
6267         "struct" keyword, add const.
6268
6269 2018-06-19  Simon Marchi  <simon.marchi@ericsson.com>
6270
6271         * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
6272         PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
6273         * configure.ac: Remove AC_PREREQ, add missing quoting.
6274         * gnulib/configure.ac: Modernize usage of
6275         AC_INIT/AM_INIT_AUTOMAKE.  Remove AC_PREREQ.
6276         * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
6277         (AUTOMAKE_VERSION): Bump to 1.15.1.
6278         * configure: Re-generate.
6279         * config.in: Re-generate.
6280         * aclocal.m4: Re-generate.
6281         * gnulib/aclocal.m4: Re-generate.
6282         * gnulib/config.in: Re-generate.
6283         * gnulib/configure: Re-generate.
6284         * gnulib/import/Makefile.in: Re-generate.
6285
6286 2018-06-19  Pedro Alves  <palves@redhat.com>
6287
6288         * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
6289         (lookup_minimal_symbol_by_pc_section): ... here with
6290         gdb_assert_not_reached added.
6291
6292 2018-06-19  Pedro Alves  <palves@redhat.com>
6293
6294         * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
6295         parameter with a block parameter.  Compare location's block symbol
6296         with the frame's block instead of addresses.
6297         (skip_inline_frames): Pass the current block instead of the
6298         frame's address.  Break out as soon as we determine the frame
6299         should not be skipped.
6300
6301 2018-06-18  Tom Tromey  <tom@tromey.com>
6302
6303         * solib-aix.c (solib_aix_get_section_offsets): Return
6304         unique_xmalloc_ptr.
6305         (solib_aix_solib_create_inferior_hook): Update.
6306
6307 2018-06-18  Tom Tromey  <tom@tromey.com>
6308
6309         * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
6310
6311 2018-06-18  Tom Tromey  <tom@tromey.com>
6312
6313         * solib-frv.c (frv_relocate_main_executable): Use
6314         unique_xmalloc_ptr.
6315         * solib-dsbt.c (dsbt_relocate_main_executable): Use
6316         unique_xmalloc_ptr.
6317
6318 2018-06-18  Tom Tromey  <tom@tromey.com>
6319
6320         * objfiles.h (inhibit_section_map_updates): Update.
6321         (resume_section_map_updates, resume_section_map_updates_cleanup):
6322         Remove.
6323         * solib-svr4.c (svr4_handle_solib_event): Update.
6324         * objfiles.c (inhibit_section_map_updates): Return
6325         scoped_restore_tmpl<int>.
6326         (resume_section_map_updates, resume_section_map_updates_cleanup):
6327         Remove.
6328
6329 2018-06-18  Tom Tromey  <tom@tromey.com>
6330
6331         * valprint.h (read_string): Update.
6332         * valprint.c (read_string): Change type of "buffer".
6333         (val_print_string): Update.
6334         * python/py-value.c (valpy_string): Update.
6335         * language.h (struct language_defn) <la_get_string>: Change
6336         type of "buffer".
6337         (default_get_string, c_get_string): Update.
6338         * language.c (default_get_string): Change type of "buffer".
6339         * guile/scm-value.c (gdbscm_value_to_string): Update.
6340         * c-lang.c (c_get_string): Change type of "buffer".
6341
6342 2018-06-18  Tom Tromey  <tom@tromey.com>
6343
6344         * ser-mingw.c (struct pipe_state_destroyer): New.
6345         (pipe_state_up): New typedef.
6346         (cleanup_pipe_state): Remove.
6347         (pipe_windows_open): Use pipe_state_up.  Don't release argv.
6348
6349 2018-06-18  Tom Tromey  <tom@tromey.com>
6350
6351         * rust-lang.h (rust_yyerror): Don't declare.
6352         * rust-lang.c (rust_language_defn): Update.
6353         * rust-exp.y (yyerror): Now static.
6354         * parse.c (parse_exp_in_context_1): Update.
6355         * p-lang.h (p_yyerror): Don't declare.
6356         * p-lang.c (p_language_defn): Update.
6357         * p-exp.y (yyerror): Now static.
6358         * opencl-lang.c (opencl_language_defn): Update.
6359         * objc-lang.c (objc_language_defn): Update.
6360         * m2-lang.h (m2_yyerror): Don't declare.
6361         * m2-lang.c (m2_language_defn): Update.
6362         * m2-exp.y (yyerror): Now static.
6363         * language.h (struct language_defn) <la_error>: Remove.
6364         * language.c (unk_lang_error): Remove.
6365         (unknown_language_defn, auto_language_defn): Remove.
6366         * go-lang.h (go_yyerror): Don't declare.
6367         * go-lang.c (go_language_defn): Update.
6368         * go-exp.y (yyerror): Now static.
6369         * f-lang.h (f_yyerror): Don't declare.
6370         * f-lang.c (f_language_defn): Update.
6371         * f-exp.y (yyerror): Now static.
6372         * d-lang.h (d_yyerror): Don't declare.
6373         * d-lang.c (d_language_defn): Update.
6374         * d-exp.y (yyerror): Now static.
6375         * c-lang.h (c_yyerror): Don't declare.
6376         * c-lang.c (c_language_defn, cplus_language_defn)
6377         (asm_language_defn, minimal_language_defn): Update.
6378         * c-exp.y (yyerror): Now static.
6379         * ada-lang.h (ada_yyerror): Don't declare.
6380         * ada-lang.c (ada_language_defn): Update.
6381         * ada-exp.y (yyerror): Now static.
6382
6383 2018-06-18  Alan Hayward  <alan.hayward@arm.com>
6384
6385         * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
6386         (store_sveregs_to_thread): Likewise.
6387         (aarch64_linux_fetch_inferior_registers): Check for SVE.
6388         (aarch64_linux_store_inferior_registers): Likewise.
6389         * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
6390         function.
6391         (aarch64_sve_regs_copy_to_regcache): Likewise.
6392         (aarch64_sve_regs_copy_from_regcache): Likewise.
6393         * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
6394         declaration.
6395         (aarch64_sve_regs_copy_to_regcache): Likewise.
6396         (aarch64_sve_regs_copy_from_regcache): Likewise.
6397         (sve_context): Structure from Linux headers.
6398         (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
6399         (SVE_SIG_ZREG_SIZE): Likewise.
6400         (SVE_SIG_PREG_SIZE): Likewise.
6401         (SVE_SIG_FFR_SIZE): Likewise.
6402         (SVE_SIG_REGS_OFFSET): Likewise.
6403         (SVE_SIG_ZREGS_OFFSET): Likewise.
6404         (SVE_SIG_ZREG_OFFSET): Likewise.
6405         (SVE_SIG_ZREGS_SIZE): Likewise.
6406         (SVE_SIG_PREGS_OFFSET): Likewise.
6407         (SVE_SIG_PREG_OFFSET): Likewise.
6408         (SVE_SIG_PREGS_SIZE): Likewise.
6409         (SVE_SIG_FFR_OFFSET): Likewise.
6410         (SVE_SIG_REGS_SIZE): Likewise.
6411         (SVE_SIG_CONTEXT_SIZE): Likewise.
6412         (SVE_PT_REGS_MASK): Likewise.
6413         (SVE_PT_REGS_FPSIMD): Likewise.
6414         (SVE_PT_REGS_SVE): Likewise.
6415         (SVE_PT_VL_INHERIT): Likewise.
6416         (SVE_PT_VL_ONEXEC): Likewise.
6417         (SVE_PT_REGS_OFFSET): Likewise.
6418         (SVE_PT_FPSIMD_OFFSET): Likewise.
6419         (SVE_PT_FPSIMD_SIZE): Likewise.
6420         (SVE_PT_SVE_ZREG_SIZE): Likewise.
6421         (SVE_PT_SVE_PREG_SIZE): Likewise.
6422         (SVE_PT_SVE_FFR_SIZE): Likewise.
6423         (SVE_PT_SVE_FPSR_SIZE): Likewise.
6424         (SVE_PT_SVE_FPCR_SIZE): Likewise.
6425         (__SVE_SIG_TO_PT): Likewise.
6426         (SVE_PT_SVE_OFFSET): Likewise.
6427         (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
6428         (SVE_PT_SVE_ZREG_OFFSET): Likewise.
6429         (SVE_PT_SVE_ZREGS_SIZE): Likewise.
6430         (SVE_PT_SVE_PREGS_OFFSET): Likewise.
6431         (SVE_PT_SVE_PREG_OFFSET): Likewise.
6432         (SVE_PT_SVE_PREGS_SIZE): Likewise.
6433         (SVE_PT_SVE_FFR_OFFSET): Likewise.
6434         (SVE_PT_SVE_FPSR_OFFSET): Likewise.
6435         (SVE_PT_SVE_FPCR_OFFSET): Likewise.
6436         (SVE_PT_SVE_SIZE): Likewise.
6437         (SVE_PT_SIZE): Likewise.
6438         (HAS_SVE_STATE): New define.
6439
6440 2018-06-18  Alan Hayward  <alan.hayward@arm.com>
6441
6442         * nat/aarch64-sve-linux-sigcontext.h: New file.
6443         * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
6444         new files.
6445         (SVE_VQ_MIN): Likewise.
6446         (SVE_VQ_MAX): Likewise.
6447         (SVE_VL_MIN): Likewise.
6448         (SVE_VL_MAX): Likewise.
6449         (SVE_NUM_ZREGS): Likewise.
6450         (SVE_NUM_PREGS): Likewise.
6451         (sve_vl_valid): Likewise.
6452         (struct user_sve_header): Likewise.
6453
6454 2018-06-16  Andrew Burgess  <andrew.burgess@embecosm.com>
6455             Richard Bunt <Richard.Bunt@arm.com>
6456
6457         * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
6458         was requested by GDB.
6459
6460 2018-06-15  Tom de Vries  <tdevries@suse.de>
6461
6462         * MAINTAINERS (Write After Approval): Add Tom de Vries.
6463
6464 2018-06-14  Simon Marchi  <simon.marchi@polymtl.ca>
6465
6466         * gnulib/update-gnulib.sh: Print expected versions of
6467         autoconf/aclocal.
6468
6469 2018-06-14  Simon Marchi  <simon.marchi@ericsson.com>
6470
6471         * arch-utils.c (default_type_align): Use type_length_units.
6472         * gdbtypes.c (type_align): Use type_length_units.
6473
6474 2018-06-14  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
6475
6476         * cli/cli-script.c (_initialize_cli_script): Fix online documentation
6477         of 'define' command.
6478
6479 2018-06-14  Tom de Vries  <tdevries@suse.de>
6480
6481         PR cli/22573
6482         * infcmd.c (print_return_value_1): Use get_user_print_options instead of
6483         get_no_prettyformat_print_options.
6484
6485 2018-06-13  Simon Marchi  <simon.marchi@ericsson.com>
6486
6487         * sparc-nat.h: Include target.h.
6488         * sparc64-linux-nat.c (class sparc64_linux_nat_target)
6489         <fetch_registers>: Remove this argument in function call.
6490         <store_registers>: Remove this argument in function call, remove
6491         extra semicolon.
6492         <low_forget_process>: Call sparc64_forget_process instead of
6493         sparc_forget_process.
6494
6495 2018-06-13  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
6496
6497         * procfs.c (_initialize_procfs): Use add_inf_child_target.
6498         (procfs_target::make_corefile_notes): Adjust to new
6499         target_read_alloc return type.
6500
6501 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
6502             Stephen Roberts  <stephen.roberts@arm.com>
6503
6504         PR gdb/22882
6505         * infrun.c (fetch_inferior_event): If GDB is not proceeding then
6506         run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
6507         Move should_notify_stop local into more inner scope.
6508
6509 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
6510             Stephen Roberts  <stephen.roberts@arm.com>
6511
6512         PR gdb/22882
6513         * infrun.c (resume_1): Add call to mark_async_event_handler.
6514
6515 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
6516
6517         * infrun.c (do_target_wait): Change old version of $pc printed.
6518
6519 2018-06-11  Simon Marchi  <simon.marchi@ericsson.com>
6520
6521         * dwarf2read.c (read_index_from_section): Rename to...
6522         (read_gdb_index_from_section): ... this, update all callers.
6523         (dwarf2_read_index): Rename to...
6524         (dwarf2_read_gdb_index): ... this, update all callers.
6525
6526 2018-06-11  John David Anglin  <danglin@gcc.gnu.org>
6527
6528         * gdb/hppa-linux-nat.c
6529         (hppa_linux_nat_target::fetch_inferior_registers): Rename to
6530         hppa_linux_nat_target::fetch_registers.
6531
6532 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
6533
6534         * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
6535         * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
6536         (AARCH64_DWARF_SVE_FFR): Likewise.
6537         (AARCH64_DWARF_SVE_P0): Likewise.
6538         (AARCH64_DWARF_SVE_Z0): Likewise.
6539
6540 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
6541
6542         * common/common-regcache.h (raw_compare): New function.
6543         * regcache.c (regcache::raw_compare): Likewise.
6544         * regcache.h (regcache::raw_compare): New declaration.
6545
6546 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
6547
6548         * common/common-regcache.h (reg_buffer_common): New structure.
6549         * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
6550         (reg_buffer::raw_supply): Likewise.
6551         (reg_buffer::raw_supply_integer): Likewise.
6552         (reg_buffer::raw_supply_zeroed): Likewise.
6553         (reg_buffer::raw_collect): Likewise.
6554         (reg_buffer::raw_collect_integer): Likewise.
6555         * regcache.h (reg_buffer::invalidate): Move from detached_regcache.
6556         (reg_buffer::raw_supply): Likewise.
6557         (reg_buffer::raw_supply_integer): Likewise.
6558         (reg_buffer::raw_supply_zeroed): Likewise.
6559         (reg_buffer::raw_collect): Likewise.
6560         (reg_buffer::raw_collect_integer): Likewise.
6561
6562 2018-06-10  Tom Tromey  <tom@tromey.com>
6563
6564         * remote.c (stop_reply_p): Remove typedef.  Don't declare queue.
6565         (class remote_state) <stop_reply_queue>: Now std::vector.
6566         (remote_state::~remote_state)
6567         (remote_target::stop_reply_queue_length): Update.
6568         (struct queue_iter_param, remove_child_of_pending_fork)
6569         (struct check_pending_event_prevents_wildcard_vcont_callback_data)
6570         (check_pending_event_prevents_wildcard_vcont_callback)
6571         (remove_stop_reply_for_inferior)
6572         (remove_stop_reply_of_remote_state)
6573         (remote_notif_remove_once_on_match)
6574         (stop_reply_match_ptid_and_ws)
6575         (remote_kill_child_of_pending_fork): Remove.
6576         (remote_target::remove_new_fork_children)
6577         (remote_target::check_pending_events_prevent_wildcard_vcont)
6578         (remote_target::discard_pending_stop_replies)
6579         (remote_target::discard_pending_stop_replies_in_queue)
6580         (remote_target::remote_notif_remove_queued_reply)
6581         (remote_target::queued_stop_reply)
6582         (remote_target::push_stop_reply, remote_target::peek_stop_reply)
6583         (remote_target::wait, remote_target::kill_new_fork_children)
6584         (remote_target::async): Update.
6585
6586 2018-06-10  Tom Tromey  <tom@tromey.com>
6587
6588         * record-full.c (record_full_arch_list_cleanups): Remove.
6589         (record_full_message): Use try/catch.
6590         (record_full_wait_cleanups): Remove.
6591         (record_full_wait_1): Use try/catch.
6592         (record_full_restore): Likewise.
6593
6594 2018-06-10  Tom Tromey  <tom@tromey.com>
6595
6596         * record-full.c (record_full_breakpoint_p): Remove typedef.  Don't
6597         declare VEC.  Add constructor.
6598         <in_target_beneath>: Now bool.
6599         (record_full_breakpoints): Now a std::vector, static.
6600         (record_full_sync_record_breakpoints)
6601         (record_full_init_record_breakpoints)
6602         (record_full_target::insert_breakpoint)
6603         (record_full_target::remove_breakpoint): Update.  Don't use XNEW.
6604
6605 2018-06-10  Simon Marchi  <simon.marchi@polymtl.ca>
6606
6607         * dwarf2read.c (process_cu_includes): Remove struct keyword.
6608         * serial.c (serial_interface_lookup): Remove struct keyword.
6609
6610 2018-06-10  Tom Tromey  <tom@tromey.com>
6611
6612         * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
6613         method.
6614         * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
6615         a method.
6616         * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
6617         method.
6618         * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
6619         "beneath" as a method.
6620         * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
6621         Use "beneath" as a method.
6622
6623 2018-06-10  Tom Tromey  <tom@tromey.com>
6624
6625         * tracefile.c (struct trace_file_writer_deleter): New.
6626         <operator()>: Rename from trace_file_writer_xfree.
6627         (trace_file_writer_up): New typedef.
6628         (tsave_command, trace_save_tfile, trace_save_ctf): Update.
6629
6630 2018-06-09  Simon Marchi  <simon.marchi@ericsson.com>
6631
6632         * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
6633         <m_registers, m_register_status>: Change type to
6634         std::unique_ptr.
6635         * regcache.c (reg_buffer::reg_buffer): Use new instead of
6636         XCNEWVEC.
6637
6638 2018-06-09  Simon Marchi  <simon.marchi@ericsson.com>
6639
6640         * common/common-regcache.h (enum register_status): Add
6641         underlying type "signed char".
6642         * regcache.h (reg_buffer) <m_register_status>: Change type to
6643         register_status *.
6644         * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
6645         register_status instead of signed char.
6646         (reg_buffer::save): Use REG_UNKNOWN instead of 0.
6647         (reg_buffer::get_register_status): Remove cast.
6648         (readable_regcache::raw_read): Remove cast.
6649         (readable_regcache::cooked_read): Remove cast.
6650
6651 2018-06-09  Tom Tromey  <tom@tromey.com>
6652
6653         * source.c (reverse_search_command, forward_search_command): Use
6654         scoped_fd.
6655
6656 2018-06-09  Tom Tromey  <tom@tromey.com>
6657
6658         * serial.c (serial_ops_p): Remove typedef.  Don't declare VEC.
6659         (serial_ops_list): Now static, std::vector.
6660         (serial_interface_lookup, serial_add_interface): Update.
6661
6662 2018-06-09  Tom Tromey  <tom@tromey.com>
6663
6664         * dwarf2read.c (process_cu_includes): Update.
6665         (process_full_comp_unit): Update.
6666         * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
6667         std::vector.
6668
6669 2018-06-08  Paul Koning  <paul_koning@dell.com>
6670
6671         PR gdb/23252
6672
6673         * python/python.c (do_start_initialization):
6674         Avoid call to internal Python API.
6675         (init__gdb_module): New function.
6676
6677 2018-06-08  Gary Benson <gbenson@redhat.com>
6678
6679         * linux-thread-db.c (valprint.h): New include.
6680         (struct check_thread_db_info): New structure.
6681         (check_thread_db_on_load, tdb_testinfo): New static globals.
6682         (check_thread_db, check_thread_db_callback): New functions.
6683         (try_thread_db_load_1): Run integrity checks if requested.
6684         (maintenance_check_libthread_db): New function.
6685         (_initialize_thread_db): Register "maint check libthread-db"
6686         and "maint set/show check-libthread-db".
6687         * NEWS: Mention the above new commands.
6688
6689 2018-06-08  Tom Tromey  <tom@tromey.com>
6690
6691         * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
6692         now a method.
6693
6694 2018-06-08  Tom Tromey  <tom@tromey.com>
6695
6696         * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
6697
6698 2018-06-08  Tom Tromey  <tom@tromey.com>
6699
6700         * common/btrace-common.h (struct btrace_data): Add constructor,
6701         destructor, move assignment operator.
6702         <empty, clear, fini>: New methods.
6703         <format>: Initialize.
6704         (btrace_data_init, btrace_data_fini, btrace_data_clear)
6705         (btrace_data_empty): Don't declare.
6706         * common/btrace-common.c (btrace_data_init): Remove.
6707         (btrace_data::fini): Rename from btrace_data_fini.
6708         (btrace_data::empty): Rename from btrace_data_empty.
6709         (btrace_data::clear): Rename from btrace_data_clear.  Return
6710         bool.
6711         * btrace.h (make_cleanup_btrace_data): Don't declare.
6712         * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
6713         (parse_xml_btrace): Update.
6714         (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
6715         (maint_btrace_clear_packet_history_cmd): Update.
6716
6717 2018-06-07  Pedro Alves  <palves@redhat.com>
6718
6719         * target.h (target_ops) <beneath>: Now a method.  All references
6720         updated.
6721         (class target_stack): New.
6722         * target.c (g_target_stack): New.
6723         (g_current_top_target): Delete.
6724         (current_top_target): Get the top target out of g_target_stack.
6725         (target_stack::push, target_stack::unpush): New.
6726         (push_target, unpush_target): Reimplement.
6727         (target_is_pushed): Reimplement in terms of g_target_stack.
6728         (target_ops::beneath, target_stack::find_beneath): New.
6729
6730 2018-06-07  Pedro Alves  <palves@redhat.com>
6731
6732         * target.h (find_target_beneath): Delete declaration.
6733         * target.c (find_target_beneath): Delete definition.
6734         * aix-thread.c: All callers of find_target_beneath adjusted to
6735         call target_ops::beneath instead.
6736         * bsd-uthread.c: Likewise.
6737         * linux-thread-db.c: Likewise.
6738         * ravenscar-thread.c: Likewise.
6739         * sol-thread.c: Likewise.
6740         * spu-multiarch.c: Likewise.
6741
6742 2018-06-07  Pedro Alves  <palves@redhat.com>
6743
6744         * target.h (target_ops) <beneath>: Now a method.  All references
6745         updated.
6746         (target_ops) <m_beneath>: New.
6747         * target.c (target_ops::beneath): New.
6748         * corelow.c: Adjust all references to target_ops::beneath.
6749         * linux-thread-db.c: Likewise.
6750         * make-target-delegates: Likewise.
6751         * record-btrace.c: Likewise.
6752         * record-full.c: Likewise.
6753         * remote.c: Likewise.
6754         * target.c: Likewise.
6755         * target-delegates.c: Regenerate.
6756
6757 2018-06-07  Pedro Alves  <palves@redhat.com>
6758
6759         * target.h (target_stack): Delete.
6760         (current_top_target): Declare function.
6761         * target.c (target_stack): Delete.
6762         (g_current_top_target): New.
6763         (current_top_target): New function.
6764         * auxv.c: Use current_top_target instead of target_stack
6765         throughout.
6766         * avr-tdep.c: Likewise.
6767         * breakpoint.c: Likewise.
6768         * corefile.c: Likewise.
6769         * elfread.c: Likewise.
6770         * eval.c: Likewise.
6771         * exceptions.c: Likewise.
6772         * frame.c: Likewise.
6773         * gdbarch-selftests.c: Likewise.
6774         * gnu-v3-abi.c: Likewise.
6775         * ia64-tdep.c: Likewise.
6776         * ia64-vms-tdep.c: Likewise.
6777         * infcall.c: Likewise.
6778         * infcmd.c: Likewise.
6779         * infrun.c: Likewise.
6780         * linespec.c: Likewise.
6781         * linux-tdep.c: Likewise.
6782         * minsyms.c: Likewise.
6783         * ppc-linux-nat.c: Likewise.
6784         * ppc-linux-tdep.c: Likewise.
6785         * procfs.c: Likewise.
6786         * regcache.c: Likewise.
6787         * remote.c: Likewise.
6788         * rs6000-tdep.c: Likewise.
6789         * s390-linux-nat.c: Likewise.
6790         * s390-tdep.c: Likewise.
6791         * solib-aix.c: Likewise.
6792         * solib-darwin.c: Likewise.
6793         * solib-dsbt.c: Likewise.
6794         * solib-spu.c: Likewise.
6795         * solib-svr4.c: Likewise.
6796         * solib-target.c: Likewise.
6797         * sparc-tdep.c: Likewise.
6798         * sparc64-tdep.c: Likewise.
6799         * spu-tdep.c: Likewise.
6800         * symfile.c: Likewise.
6801         * symtab.c: Likewise.
6802         * target-descriptions.c: Likewise.
6803         * target-memory.c: Likewise.
6804         * target.c: Likewise.
6805         * target.h: Likewise.
6806         * tracefile-tfile.c: Likewise.
6807         * tracepoint.c: Likewise.
6808         * valops.c: Likewise.
6809         * valprint.c: Likewise.
6810         * value.c: Likewise.
6811         * windows-tdep.c: Likewise.
6812         * mi/mi-main.c: Likewise.
6813
6814 2018-06-07  Tom Tromey  <tom@tromey.com>
6815
6816         * valprint.h (build_address_symbolic): Declare.
6817         * printcmd.c (print_address_symbolic): Update.
6818         (build_address_symbolic): Change "name" and "filename" to
6819         std::string.
6820         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
6821         Update.
6822         * defs.h (build_address_symbolic): Remove declaration.
6823
6824 2018-06-07  Alan Hayward  <alan.hayward@arm.com>
6825
6826         * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
6827         (aarch64_vnv_type): Add function.
6828         (aarch64_pseudo_register_name): Add V regs for SVE.
6829         (aarch64_pseudo_register_type): Likewise.
6830         (aarch64_pseudo_register_reggroup_p): Likewise.
6831         (aarch64_pseudo_read_value_2): Use V0 offset for SVE
6832         (aarch64_pseudo_read_value): Add V regs for SVE.
6833         (aarch64_pseudo_write_2): Use V0 offset for SVE
6834         (aarch64_pseudo_write): Add V regs for SVE.
6835         * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
6836
6837 2018-06-06  Sergio Durigan Junior  <sergiodj@redhat.com>
6838
6839         * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
6840         (sve_vl_from_vq): Likewise.
6841
6842 2018-06-05  Tom Tromey  <tom@tromey.com>
6843
6844         * cli/cli-cmds.c (show_version): Update.
6845         * top.c (print_gdb_version): Add "interactive" parameter.
6846         Update.
6847         * main.c (captured_main_1): Update.
6848         * top.h (print_gdb_version): Add "interactive" parameter and a
6849         comment.
6850
6851 2018-06-05  David Malcolm  <dmalcolm@redhat.com>
6852
6853         * common/enum-flags.h: Add trailing semicolon to example in
6854         comment.
6855
6856 2018-06-05  Tom Tromey  <tom@tromey.com>
6857
6858         PR cli/12326:
6859         * NEWS: Add entry about pager.
6860         * utils.c (pagination_disabled_for_command): New global.
6861         (prompt_for_continue): Allow "c" response to prompt.
6862         (reinitialize_more_filter): Clear
6863         pagination_disabled_for_command.
6864         (fputs_maybe_filtered): Check pagination_disabled_for_command.
6865
6866 2018-06-04  Tom Tromey  <tom@tromey.com>
6867
6868         * ada-lang.h (ada_lookup_symbol_list): Update.
6869         * ada-lang.c (resolve_subexp): Update.
6870         (symbols_are_identical_enums): Change type of syms.  Remove nsyms
6871         parameter.
6872         (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
6873         (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
6874         results parameter to std::vector.
6875         (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
6876         Update.
6877         * ada-exp.y (block_lookup): Update.
6878         (select_possible_type_sym): Change type of syms.  Remove nsyms
6879         parameter.
6880         (write_var_or_type, write_name_assoc): Update.
6881
6882 2018-06-04  Joel Brobecker  <brobecker@adacore.com>
6883
6884         * windows-nat.c (windows_nat_target::xfer_partial): Return
6885         TARGET_XFER_E_IO if we need to delegate to the target beneath
6886         but BENEATH is NULL.
6887
6888 2018-06-04  Simon Marchi  <simon.marchi@ericsson.com>
6889
6890         * Makefile.in (config.status): Add configure.nat as a
6891         dependency.
6892
6893 2018-06-04  Tom Tromey  <tom@tromey.com>
6894
6895         * cp-name-parser.y (cpname_state): Add method declarations.
6896         (HANDLE_QUAL): Update.
6897         (cpname_state::d_grab, cpname_state::fill_comp)
6898         (cpname_state::make_operator, cpname_state::make_dtor)
6899         (cpname_state::make_builtin_type, cpname_state::make_name)
6900         (cpname_state::d_qualify, cpname_state::d_int_type)
6901         (cpname_state::d_unary, cpname_state::d_binary): Now methods.
6902         (%union): Move earlier.
6903
6904 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
6905
6906         * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
6907
6908 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
6909
6910         * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
6911         (aarch64_pseudo_write_1): Likewise.
6912         (aarch64_pseudo_read_value): Use helper.
6913         (aarch64_pseudo_write): Likewise.
6914
6915 2018-06-04  Pedro Alves  <palves@redhat.com>
6916
6917         * darwin-nat.c (darwin_ops): Delete.
6918         (darwin_attach_pid): Use get_native_target.
6919
6920 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
6921
6922         * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
6923         * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
6924
6925 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
6926
6927         * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
6928         * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
6929         (aarch64_gdbarch_init): Check for SVE.
6930         * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
6931
6932 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
6933
6934         * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
6935         * aarch64-tdep.h (aarch64_read_description): Likewise.
6936         * arch/aarch64.c (aarch64_create_target_description): Likewise.
6937         * arch/aarch64.h (aarch64_create_target_description): Likewise.
6938         * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
6939         * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
6940         * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
6941
6942 2018-06-02  Simon Marchi  <simon.marchi@ericsson.com>
6943
6944         * value.c (value_fetch_lazy_bitfield): New.
6945         (value_fetch_lazy_memory): New.
6946         (value_fetch_lazy_register): New.
6947         (value_fetch_lazy): Factor out to smaller functions.
6948
6949 2018-06-01  Tom Tromey  <tom@tromey.com>
6950
6951         * cp-name-parser.y (backslashable, represented): Now const.
6952
6953 2018-06-01  Tom Tromey  <tom@tromey.com>
6954
6955         * cp-name-parser.y: Include parser-defs.h.
6956         (parser_fprintf): Remove declaration.
6957
6958 2018-06-01  Tom Tromey  <tom@tromey.com>
6959
6960         * cp-name-parser.y: Use %pure-parser, %lex-param, and
6961         %parse-param.
6962         (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
6963         (global_result): Remove globals.
6964         (struct cpname_state): New.
6965         (yyparse): Don't declare.
6966         (yylex, yyerror): Move declarations after %union.
6967         (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
6968         (make_name): Add state parameter.
6969         Update all callers.
6970         (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
6971         parameter.
6972         (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
6973         Update.
6974         (yylex): Add lvalp, state parameters.
6975         (yyerror): Add state parameter.
6976         (cp_demangled_name_to_comp): Update.
6977
6978 2018-06-01  Tom Tromey  <tom@tromey.com>
6979
6980         * cp-name-parser.y (parser_fprintf): Declare.
6981         (GDB_YY_REMAP_PREFIX): Define.
6982         Include yy-remap.h.  Don't redefine yy* identifiers.
6983
6984 2018-06-01  Tom Tromey  <tom@tromey.com>
6985
6986         * python/py-type.c (typy_legacy_template_argument): Update.
6987         * cp-support.h (cp_demangled_name_to_comp): Update.
6988         * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
6989         parameter to be a "std::string *".
6990         (main): Update.
6991
6992 2018-06-01  H.J. Lu  <hongjiu.lu@intel.com>
6993
6994         * ada-lex.l: Include "diagnostics.h" instead of
6995         "common/diagnostics.h".
6996         * unittests/environ-selftests.c: Likewise.
6997         * common/diagnostics.h: Moved to ../include.
6998
6999 2018-06-01  Joel Brobecker  <brobecker@adacore.com>
7000
7001         * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
7002         to language_mode_manual while calling breakpoint_re_set_one.
7003
7004 2018-06-01  Tom Tromey  <tom@tromey.com>
7005
7006         * valops.c (value_cast_structs, destructor_name_p): Update.
7007         * symtab.c (gdb_mangle_name): Update.
7008         * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
7009         Update.
7010         * p-valprint.c (pascal_object_is_vtbl_ptr_type)
7011         (pascal_object_print_value_fields, pascal_object_print_value):
7012         Update.
7013         * p-typeprint.c (pascal_type_print_derivation_info): Update.
7014         * linespec.c (find_methods): Update.
7015         * gdbtypes.h (type_name_no_tag): Remove.
7016         (type_name_or_error): Rename from type_name_no_tag_or_error.
7017         * gdbtypes.c (type_name_no_tag): Remove.
7018         (type_name_or_error): Rename from type_name_no_tag_or_error.
7019         (lookup_struct_elt_type, check_typedef): Update.
7020         * expprint.c (print_subexp_standard): Update.
7021         * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
7022         * d-namespace.c (d_lookup_nested_symbol): Update.
7023         * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
7024         (cp_print_class_member): Update.
7025         * cp-namespace.c (cp_lookup_nested_symbol): Update.
7026         * completer.c (add_struct_fields): Update.
7027         * c-typeprint.c (cp_type_print_derivation_info)
7028         (c_type_print_varspec_prefix, c_type_print_base_struct_union):
7029         Update.
7030         * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
7031         (ada_prefer_type, ada_is_exception_sym): Update.
7032
7033 2018-06-01  Tom Tromey  <tom@tromey.com>
7034
7035         * valops.c (enum_constant_from_type, value_namespace_elt)
7036         (value_maybe_namespace_elt): Update.
7037         * valarith.c (find_size_for_pointer_math): Update.
7038         * target-descriptions.c (make_gdb_type): Update.
7039         * symmisc.c (print_symbol): Update.
7040         * stabsread.c (define_symbol, read_type)
7041         (complain_about_struct_wipeout, add_undefined_type)
7042         (cleanup_undefined_types_1): Update.
7043         * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
7044         (rust_range_type_p, val_print_struct, rust_print_struct_def)
7045         (rust_internal_print_type, rust_composite_type)
7046         (rust_evaluate_funcall, rust_evaluate_subexp)
7047         (rust_inclusive_range_type_p): Update.
7048         * python/py-type.c (typy_get_tag): Update.
7049         * p-typeprint.c (pascal_type_print_base): Update.
7050         * mdebugread.c (parse_symbol, parse_type): Update.
7051         * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
7052         Update.
7053         * guile/scm-type.c (gdbscm_type_tag): Update.
7054         * go-lang.c (sixg_string_p): Update.
7055         * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
7056         Update.
7057         * gdbtypes.h (struct main_type) <tag_name>: Remove.
7058         (TYPE_TAG_NAME): Remove.
7059         * gdbtypes.c (type_name_no_tag): Simplify.
7060         (check_typedef, check_types_equal, recursive_dump_type)
7061         (copy_type_recursive, arch_composite_type): Update.
7062         * f-typeprint.c (f_type_print_base): Update.  Print "Type" prefix
7063         in summary mode when needed.
7064         * eval.c (evaluate_funcall): Update.
7065         * dwarf2read.c (fixup_go_packaging, read_structure_type)
7066         (process_structure_scope, read_enumeration_type)
7067         (read_namespace_type, read_module_type, determine_prefix): Update.
7068         * cp-support.c (inspect_type): Update.
7069         * coffread.c (process_coff_symbol, decode_base_type): Update.
7070         * c-varobj.c (c_is_path_expr_parent): Update.
7071         * c-typeprint.c (c_type_print_base_struct_union): Update.
7072         (c_type_print_base_1): Update.  Print struct/class/union/enum in
7073         summary when using C language.
7074         * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
7075         (gen_maybe_namespace_elt): Update.
7076         * ada-lang.c (ada_type_name): Simplify.
7077         (empty_record, ada_template_to_fixed_record_type_1)
7078         (template_to_static_fixed_type)
7079         (to_record_with_fixed_variant_part, ada_check_typedef): Update.
7080
7081 2018-06-01  Tom Tromey  <tom@tromey.com>
7082
7083         * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
7084         c_print_type.
7085         * c-typeprint.c (c_print_type_1): Add "language" parameter.
7086         (c_print_type): Update.
7087         (c_print_type): New overload.
7088         (c_type_print_varspec_prefix, c_type_print_args)
7089         (c_type_print_varspec_suffix, c_print_type_no_offsets)
7090         (c_type_print_base_struct_union, c_type_print_base_1)
7091         (cp_type_print_method_args): Add "language" parameter.
7092         (c_type_print_base): Update.
7093         * c-lang.h (c_print_type): Add new overload.
7094
7095 2018-06-01  Tom Tromey  <tom@tromey.com>
7096
7097         * typeprint.h (c_type_print_varspec_suffix): Don't declare.
7098         * c-typeprint.c (c_type_print_varspec_suffix): Now static.
7099
7100 2018-06-01  Alan Hayward  <alan.hayward@arm.com>
7101
7102         * aarch64-tdep.c (aarch64_sve_register_names): New const
7103         var.
7104         * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
7105         (AARCH64_SVE_Z_REGS_NUM): New define.
7106         (AARCH64_SVE_P_REGS_NUM): Likewise.
7107         (AARCH64_SVE_NUM_REGS): Likewise.
7108
7109 2018-05-31  Uros Bizjak  <ubizjak@gmail.com>
7110
7111         * nat/linux-ptrace.h [__alpha__]
7112         (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
7113         definitions.
7114
7115 2018-05-31  Maciej W. Rozycki  <macro@mips.com>
7116
7117         * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
7118         the endianness selected.
7119         * NEWS: Document `set endian auto' mode operation update.
7120
7121 2018-05-31  Alan Hayward  <alan.hayward@arm.com>
7122
7123         * Makefile.in: Add new header.
7124         * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
7125         (sve_vl_from_vg): Likewise.
7126         (sve_vq_from_vl): Likewise.
7127         (sve_vl_from_vq): Likewise.
7128         (sve_vq_from_vg): Likewise.
7129         (sve_vg_from_vq): Likewise.
7130         * configure.nat: Add new c file.
7131         * nat/aarch64-sve-linux-ptrace.c: New file.
7132         * nat/aarch64-sve-linux-ptrace.h: New file.
7133
7134 2018-05-31  Alan Hayward  <alan.hayward@arm.com>
7135
7136         * aarch64-linux-nat.c (aarch64_linux_read_description):
7137         Add parmeter zero.
7138         * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
7139         Likewise.
7140         * aarch64-tdep.c (tdesc_aarch64_list): Add.
7141         (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
7142         (aarch64_gdbarch_init): Add parmeter zero.
7143         * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
7144         * arch/aarch64.c (aarch64_create_target_description): Check VQ.
7145         * arch/aarch64.h (aarch64_create_target_description): Add VQ.
7146         parmeter.
7147         * doc/gdb.texinfo: Describe SVE feature
7148         * features/aarch64-sve.c: New file.
7149
7150 2018-05-31  Omair Javaid  <omair.javaid@linaro.org>
7151
7152         PR gdb/23210
7153         * gdbarch.sh (significant_addr_bit): Default to zero when
7154         not set by target architecture.
7155         * gdbarch.c: Re-generated.
7156         * utils.c (address_significant): Update.
7157
7158 2018-05-30  Joel Brobecker  <brobecker@adacore.com>
7159
7160         * stack.c (func_command): Remove trailing newline in call to error.
7161
7162 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7163
7164         * regcache.h (regcache_raw_collect): Remove, update callers to
7165         use regcache::raw_collect.
7166         * regcache.c (regcache_raw_collect): Remove.
7167
7168 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7169
7170         * regcache.h (regcache_raw_supply): Remove, update callers to
7171         use detached_regcache::raw_supply.
7172         * regcache.c (regcache_raw_supply): Remove.
7173
7174 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7175
7176         * regcache.h (regcache_cooked_write_part): Remove, update
7177         callers to use regcache::cooked_write_part.
7178         * regcache.c (regcache_cooked_write_part): Remove.
7179
7180 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7181
7182         * regcache.h (regcache_cooked_read_part): Remove, update callers
7183         to use readable_regcache::cooked_read_part.
7184         * regcache.c (regcache_cooked_read_part): Remove.
7185
7186 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7187
7188         * regcache.h (regcache_cooked_read_value): Remove, update
7189         callers to use readable_regcache::cooked_read_value.
7190         * regcache.c (regcache_cooked_read_value): Remove.
7191
7192 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7193
7194         * regcache.h (regcache_cooked_write): Remove, update callers to
7195         use regcache::cooked_write.
7196         * regcache.c (regcache_cooked_write): Remove.
7197
7198 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7199
7200         * regcache.h (regcache_invalidate): Remove, update callers to
7201         use detached_regcache::invalidate instead.
7202         * regcache.c (regcache_invalidate): Remove.
7203
7204 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7205
7206         * regcache.h (regcache_raw_write_part): Remove, update callers
7207         to use regcache::raw_write_part instead.
7208         * regcache.c (regcache_raw_write_part): Remove.
7209
7210 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7211
7212         * regcache.h (regcache_raw_read_part): Remove, update callers to
7213         use readable_regcache::raw_read_part instead.
7214         * regcache.c (regcache_raw_read_part): Remove.
7215
7216 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7217
7218         * regcache.h (regcache_cooked_read): Remove, update callers to
7219         use readable_regcache::cooked_read instead.
7220         * regcache.c (regcache_cooked_read): Remove.
7221
7222 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7223
7224         * regcache.h (regcache_raw_write): Remove, update callers to use
7225         regcache::raw_write instead.
7226         * regcache.c (regcache_raw_write): Remove.
7227
7228 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7229
7230         * regcache.h (regcache_raw_read): Remove, update callers to use
7231         readable_regcache::raw_read instead.
7232         * regcache.c (regcache_raw_read): Remove.
7233
7234 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7235
7236         * regcache.h (regcache_raw_update): Remove, update callers to
7237         use readable_regcache::raw_update instead.
7238         * regcache.c (regcache_raw_update): Remove.
7239
7240 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7241
7242         * regcache.h (regcache_register_status): Remove, update callers
7243         to use reg_buffer::get_register_status directly instead.
7244         * regcache.c (regcache_register_status): Remove.
7245
7246 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7247
7248         * regcache.h (regcache_get_ptid): Remove, update all callers to
7249         call regcache::ptid instead.
7250         * regcache.c (regcache_get_ptid): Remove.
7251
7252 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7253
7254         * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
7255
7256 2018-05-30  Pedro Alves  <palves@redhat.com>
7257
7258         * common/common-exceptions.h (exception_rethrow): Use
7259         ATTRIBUTE_NORETURN.
7260
7261 2018-05-29  Simon Marchi  <simon.marchi@polymtl.ca>
7262
7263         * breakpoint.c (print_solib_event, check_status_catch_solib):
7264         Remove struct keyword in range-based for loops.
7265         * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
7266         * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
7267         Likewise.
7268         * linespec.c (find_superclass_methods, search_minsyms_for_name):
7269         Likewise.
7270         * symfile.c (addr_info_make_relative): Likewise.
7271         * thread.c (value_in_thread_stack_temporaries): Likewise.
7272
7273 2018-06-12  Weimin Pan  <weimin.pan@oracle.com>
7274
7275         PR gdb/16841
7276         * valops.c (value_struct_elt_for_reference): Call check_typedef on
7277         aggregate type to get its real type before accessing it.
7278
7279 2018-05-29  Weimin Pan  <weimin.pan@oracle.com>
7280
7281         * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
7282         * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
7283         * coff-pe-read.c (add_pe_forwarded_sym): Replace
7284         lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
7285         * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
7286         * jit.c (jit_breakpoint_re_set_internal): Likewise.
7287         * printcmd.c (info_address_command): Likewise.
7288
7289 2018-05-29  Tom Tromey  <tom@tromey.com>
7290
7291         * windows-nat.c (handle_exception): Update fall-through comment.
7292
7293 2018-05-29  Tom Tromey  <tom@tromey.com>
7294
7295         * progspace.h (so_list_ptr): Remove typedef.  Don't declare VEC.
7296         (struct program_space) <added_solibs>: Now a std::vector.
7297         * breakpoint.c (print_solib_event): Update.
7298         (check_status_catch_solib): Update.
7299         * progspace.c (clear_program_space_solib_cache): Update.
7300         * solib.c (update_solib_list): Update.
7301
7302 2018-05-29  Tom Tromey  <tom@tromey.com>
7303
7304         * python/py-type.c (typy_richcompare): Update.
7305         * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
7306         * gdbtypes.h (types_deeply_equal): Return bool.
7307         (types_equal): Likewise.
7308         * gdbtypes.c (type_equality_entry_d): Remove typedef.  Don't
7309         declare VEC.
7310         (check_types_equal): Change worklist to std::vector.  Return
7311         bool.
7312         (struct type_equality_entry): Add constructor.
7313         (compare_maybe_null_strings): Return bool.
7314         (check_types_worklist): Return bool.  Change worklist to
7315         std::vector.
7316         (types_deeply_equal): Use std::vector.
7317         (types_equal): Return bool.
7318         (compare_maybe_null_strings): Simplify.
7319
7320 2018-05-29  Tom Tromey  <tom@tromey.com>
7321
7322         * record-btrace.c (tp_t): Remove typedef.  Don't declare VEC.
7323
7324 2018-05-29  Tom Tromey  <tom@tromey.com>
7325
7326         * objc-lang.h: Don't include cp-support.h.
7327         * common/gdb_vecs.h (const_char_ptr): Remove typedef.  Don't
7328         declare VEC.
7329
7330 2018-05-27  Tom Tromey  <tom@tromey.com>
7331
7332         * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
7333
7334 2018-05-25  Tom Tromey  <tom@tromey.com>
7335
7336         * value.c (value::location): Initialize.
7337
7338 2018-05-25  Tom Tromey  <tom@tromey.com>
7339
7340         * dbxread.c (init_bincl_list): Remove.
7341         (bincl_list): Now a std::vector.
7342         (bincls_allocated, next_bincl): Remove.
7343         (free_bincl_list, do_free_bincl_list_cleanup)
7344         (make_cleanup_free_bincl_list): Remove.
7345         (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
7346         unique_xmalloc_ptr.
7347         (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
7348         (struct header_file_location): Add constructor.
7349         (add_bincl_to_list): Remove.
7350
7351 2018-05-25  Tom Tromey  <tom@tromey.com>
7352
7353         * tui/tui.c (tui_enable): Update.
7354         * mi/mi-interp.c (mi_interp::init): Update.
7355         * interps.h (class interp) <name>: New method.
7356         <m_name>: Rename from name.
7357         (~scoped_restore_interp): Update.
7358         * interps.c (interp::interp): Update.
7359         (interp_add, interp_set, interp_lookup_existing)
7360         (current_interp_named_p): Update.
7361
7362 2018-05-25  Tom Tromey  <tom@tromey.com>
7363
7364         * interps.c (interp_name): Remove.
7365         * mi/mi-interp.c (mi_interp::init): Update.
7366         * interps.h (interp_name): Remove.
7367         (~scoped_restore_interp): Update.
7368         * tui/tui.c (tui_enable): Update.
7369
7370 2018-05-25  Tom Tromey  <tom@tromey.com>
7371
7372         * utils.c (fputs_maybe_filtered): Update.
7373         * linespec.c (decode_line_full): Update.
7374         * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
7375         (mi_print_breakpoint_for_event, mi_solib_loaded)
7376         (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
7377         (mi_user_selected_context_changed): Update.
7378         * mi/mi-main.c (mi_execute_command): Update.
7379         * cli/cli-script.c (execute_control_command): Update.
7380         * python/python.c (execute_gdb_command): Update.
7381         * solib.c (info_sharedlibrary_command): Update.
7382         * interps.c (interp_ui_out): Remove.
7383         * interps.h (interp_ui_out): Remove.
7384
7385 2018-05-25  Tom Tromey  <tom@tromey.com>
7386
7387         * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
7388         * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
7389         * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
7390
7391 2018-05-25  Tom Tromey  <tom@tromey.com>
7392
7393         * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
7394         * interps.c (interp_exec): Use scoped_restore.
7395
7396 2018-05-25  Tom Tromey  <tom@tromey.com>
7397
7398         * remote.c (remote_target::remote_file_get): Use
7399         gdb::byte_vector.
7400         (remote_target::remote_file_put): Likewise.
7401
7402 2018-05-25  Tom Tromey  <tom@tromey.com>
7403
7404         * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
7405         a std::string.
7406         (get_pe_section_index, add_pe_exported_sym): Update.
7407         (read_pe_exported_syms): Use gdb::def_vector.
7408
7409 2018-05-25  Tom Tromey  <tom@tromey.com>
7410
7411         * frame.c (remove_prev_frame): Remove.
7412         (get_prev_frame_if_no_cycle): Use TRY/CATCH.
7413
7414 2018-05-25  Maciej W. Rozycki  <macro@mips.com>
7415
7416         * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
7417         Remove prototypes.
7418         * mips-linux-nat.c (supply_fpregset): Always call
7419         `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
7420         (fill_fpregset): Always call `mips64_fill_fpregset' rather than
7421         `mips_fill_fpregset'.
7422         * mips-linux-tdep.c (mips_supply_fpregset)
7423         (mips_supply_fpregset_wrapper, mips_fill_fpregset)
7424         (mips_fill_fpregset_wrapper): Remove functions.
7425         (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
7426         (mips_linux_fpregset): Remove variable.
7427         (mips_linux_iterate_over_regset_sections): Use
7428         `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
7429         (mips_linux_o32_sigframe_init): Remove comment.
7430
7431 2018-05-25  Pedro Alves  <palves@redhat.com>
7432
7433         * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
7434         (struct readahead_cache, struct packet_reg, struct
7435         remote_arch_state, class remote_state): Move higher up in the
7436         file.
7437         (remote_target::m_remote_state): Now an object instead of a pointer.
7438         (remote_target::get_remote_state): Adjust.
7439
7440 2018-05-24  Andrew Burgess  <andrew.burgess@embecosm.com>
7441
7442         * stack.c (select_and_print_frame): Delete.
7443         (struct function_bounds): Move struct within function.
7444         (func_command): Most content moved into new function
7445         find_frame_for_function, use new function, print result, add
7446         function comment.
7447         (find_frame_for_function): New function, now returns a result.
7448
7449 2018-05-24  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
7450
7451         * stack.c (iterate_over_block_arg_vars): Fix comment.
7452         (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
7453
7454 2018-05-24  Andrew Burgess  <andrew.burgess@embecosm.com>
7455
7456         PR gdb/23203
7457         * frame.c
7458         (scoped_restore_selected_frame::scoped_restore_selected_frame):
7459         Define.
7460         (scoped_restore_selected_frame::~scoped_restore_selected_frame):
7461         Define.
7462         * frame.h (class scoped_restore_selected_frame): New class.
7463         * stack.c (print_frame_local_vars): Remove catching and rethrowing
7464         of any exception, use scoped_restore_selected_frame to restore the
7465         frame instead.
7466
7467 2018-05-24  Pedro Alves  <palves@redhat.com>
7468
7469         * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
7470         override.
7471
7472 2018-05-23  Tom Tromey  <tom@tromey.com>
7473
7474         * complaints.c (struct complaints): Remove.
7475         (symfile_complaint_book): Remove.
7476         (series): New global.
7477         (complaint_internal): Update.
7478         (clear_complaints): Update.
7479
7480 2018-05-23  Tom Tromey  <tom@tromey.com>
7481
7482         * complaints.c (counters): New global.
7483         (struct complain): Remove.
7484         (struct complaints) <root>: Remove.
7485         (complaint_sentinel): Remove.
7486         (symfile_complaint_book): Update.
7487         (find_complaint) Remove.
7488         (complaint_internal, clear_complaints): Update.
7489
7490 2018-05-23  Tom Tromey  <tom@tromey.com>
7491
7492         * complaints.c (struct complain) <file, line>: Remove.
7493         (find_complaint): Remove file, line parameters.
7494         (complaint_internal): Update.
7495
7496 2018-05-23  Tom Tromey  <tom@tromey.com>
7497
7498         * complaints.c (vcomplaint): Remove.
7499         (complaint_internal) Merge in contents of vcomplaint.
7500
7501 2018-05-23  Tom Tromey  <tom@tromey.com>
7502
7503         * complaints.c (struct complaints) <explanation>: Remove.
7504         (symfile_explanations): Remove.
7505         (symfile_complaint_book): Update.
7506         (vcomplaint): Update.
7507         (struct explanation): Remove.
7508
7509 2018-05-23  Tom Tromey  <tom@tromey.com>
7510
7511         * complaints.c (symfile_complaints): Remove.
7512         (complaint_internal): Remove "complaints" parameter.
7513         (clear_complaints, vcomplaint): Remove "c" parameter.
7514         (get_complaints): Remove.
7515         * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
7516         (dwarf2_debug_line_missing_file_complaint)
7517         (dwarf2_debug_line_missing_end_sequence_complaint)
7518         (dwarf2_complex_location_expr_complaint)
7519         (dwarf2_const_value_length_mismatch_complaint)
7520         (dwarf2_section_buffer_overflow_complaint)
7521         (dwarf2_macro_malformed_definition_complaint)
7522         (dwarf2_invalid_attrib_class_complaint)
7523         (create_addrmap_from_index, dw2_symtab_iter_next)
7524         (dw2_expand_marked_cus)
7525         (dw2_debug_names_iterator::find_vec_in_debug_names)
7526         (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
7527         (create_debug_type_hash_table, init_cutu_and_read_dies)
7528         (partial_die_parent_scope, add_partial_enumeration)
7529         (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
7530         (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
7531         (read_import_statement, read_file_scope, create_dwo_cu_reader)
7532         (create_cus_hash_table, create_dwp_hash_table)
7533         (inherit_abstract_dies, read_func_scope, read_call_site_scope)
7534         (dwarf2_rnglists_process, dwarf2_ranges_process)
7535         (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
7536         (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
7537         (handle_struct_member_die, process_structure_scope)
7538         (read_array_type, read_common_block, read_module_type)
7539         (read_tag_pointer_type, read_typedef, read_base_type)
7540         (read_subrange_type, load_partial_dies, partial_die_info::read)
7541         (partial_die_info::read, partial_die_info::read)
7542         (partial_die_info::read, read_checked_initial_length_and_offset)
7543         (dwarf2_string_attr, read_formatted_entries)
7544         (dwarf_decode_line_header)
7545         (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
7546         (new_symbol, dwarf2_const_value_attr, lookup_die_type)
7547         (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
7548         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
7549         (get_signatured_type, get_DW_AT_signature_type)
7550         (decode_locdesc, file_file_name, consume_improper_spaces)
7551         (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
7552         (dwarf_decode_macro_bytes, dwarf_decode_macros)
7553         (dwarf2_symbol_mark_computed, set_die_type)
7554         (read_attribute_value): Update.
7555         * stap-probe.c (handle_stap_probe, get_stap_base_address):
7556         Update.
7557         * dbxread.c (unknown_symtype_complaint)
7558         (lbrac_mismatch_complaint, repeated_header_complaint)
7559         (set_namestring, function_outside_compilation_unit_complaint)
7560         (read_dbx_symtab, process_one_symbol): Update.
7561         * gdbtypes.c (stub_noname_complaint): Update.
7562         * windows-nat.c (handle_unload_dll): Update.
7563         * coffread.c (coff_symtab_read, enter_linenos, decode_type)
7564         (decode_base_type): Update.
7565         * xcoffread.c (bf_notfound_complaint, ef_complaint)
7566         (eb_complaint, record_include_begin, record_include_end)
7567         (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
7568         (process_xcoff_symbol, read_symbol)
7569         (function_outside_compilation_unit_complaint)
7570         (scan_xcoff_symtab): Update.
7571         * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
7572         * buildsym.c (finish_block_internal, make_blockvector)
7573         (end_symtab_get_static_block, augment_type_symtab): Update.
7574         * dtrace-probe.c (dtrace_process_dof)
7575         (dtrace_static_probe_ops::get_probes): Update.
7576         * complaints.h (struct complaint): Don't declare.
7577         (symfile_complaints): Remove.
7578         (complaint_internal): Remove "complaints" parameter.
7579         (complaint): Likewise.
7580         (clear_complaints): Likewise.
7581         * symfile.c (syms_from_objfile_1, finish_new_objfile)
7582         (reread_symbols): Update.
7583         * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
7584         (dwarf2_frame_cache, decode_frame_entry): Update.
7585         * dwarf2loc.c (dwarf_reg_to_regnum): Update.
7586         * objc-lang.c (lookup_objc_class, lookup_child_selector)
7587         (info_selectors_command): Update.
7588         * macrotab.c (macro_include, check_for_redefinition)
7589         (macro_undef): Update.
7590         * objfiles.c (filter_overlapping_sections): Update.
7591         * stabsread.c (invalid_cpp_abbrev_complaint)
7592         (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
7593         (define_symbol, error_type, read_type, rs6000_builtin_type)
7594         (stabs_method_name_from_physname, read_member_functions)
7595         (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
7596         (attach_fields_to_type, complain_about_struct_wipeout)
7597         (read_range_type, read_args, common_block_start)
7598         (common_block_end, cleanup_undefined_types_1, scan_file_globals):
7599         Update.
7600         * mdebugread.c (index_complaint, unknown_ext_complaint)
7601         (basic_type_complaint, bad_tag_guess_complaint)
7602         (bad_rfd_entry_complaint, unexpected_type_code_complaint)
7603         (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
7604         (parse_procedure, parse_lines)
7605         (function_outside_compilation_unit_complaint)
7606         (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
7607         (bad_tag_guess_complaint, reg_value_complaint): Update.
7608         * cp-support.c (demangled_name_complaint): Update.
7609         * macroscope.c (sal_macro_scope): Update.
7610         * dwarf-index-write.c (class debug_names): Update.
7611
7612 2018-05-23  Tom Tromey  <tom@tromey.com>
7613
7614         * complaints.c (clear_complaints): Remove "noisy" parameter.
7615         * complaints.h (clear_complaints): Update.
7616         * symfile.c (syms_from_objfile_1, finish_new_objfile)
7617         (reread_symbols): Update.
7618
7619 2018-05-23  Tom Tromey  <tom@tromey.com>
7620
7621         * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
7622         SUBSEQUENT_MESSAGE.
7623         (vcomplaint, clear_complaints): Update.
7624         (symfile_explanations): Remove some messages.
7625
7626 2018-05-23  Tom Tromey  <tom@tromey.com>
7627
7628         * complaints.c (internal_complaint): Remove.
7629         * complaints.h (internal_complaint): Remove.
7630
7631 2018-05-22  Maciej W. Rozycki  <macro@mips.com>
7632
7633         * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
7634
7635 2018-05-22  Pedro Alves  <palves@redhat.com>
7636
7637         * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
7638         (remote_fileio_badfd, remote_fileio_return_errno)
7639         (remote_fileio_return_success, remote_fileio_func_open)
7640         (remote_fileio_func_open, remote_fileio_func_close)
7641         (remote_fileio_func_read, remote_fileio_func_write)
7642         (remote_fileio_func_lseek, remote_fileio_func_rename)
7643         (remote_fileio_func_unlink, remote_fileio_func_stat)
7644         (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
7645         (remote_fileio_func_isatty, remote_fileio_func_system): Add
7646         remote_target parameter.
7647         (remote_fio_func_map) <func>: Add remote_target parameter.
7648         (do_remote_fileio_request, remote_fileio_request):
7649         * remote-fileio.h (remote_fileio_request):
7650         * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
7651         remote_target parameter.
7652         (remote_notif_process, handle_notification): Adjust to pass down
7653         the remote.
7654         (remote_notif_state_allocate): Add remote_target parameter.  Save
7655         it.
7656         * remote-notif.h (struct remote_target): Forward declare.
7657         (struct notif_client) <parse, ack, can_get_pending_events>: Add
7658         remote_target parameter.
7659         (struct remote_notif_state) <remote>: New field.
7660         (remote_notif_ack, remote_notif_parse): Add remote_target
7661         parameter.
7662         (remote_notif_state_allocate, remote_notif_state_allocate): Add
7663         remote_target parameter.
7664         * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
7665         (threads_listing_context, rmt_thread_action, protocol_feature)
7666         (packet_reg, stop_reply, stop_reply_p, enum packet_support)
7667         (packet_result, struct threads_listing_context, remote_state):
7668         Move definitions and declarations higher up.
7669         (remote_target) <~remote_target>: Declare.
7670         (remote_download_command_source, remote_file_put, remote_file_get)
7671         (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
7672         (remote_hostio_pread_vFile, remote_hostio_send_command)
7673         (remote_hostio_set_filesystem, remote_hostio_open)
7674         (remote_hostio_close, remote_hostio_unlink, remote_state)
7675         (get_remote_state, get_remote_packet_size, get_memory_packet_size)
7676         (get_memory_write_packet_size, get_memory_read_packet_size)
7677         (append_pending_thread_resumptions, remote_detach_1)
7678         (append_resumption, remote_resume_with_vcont)
7679         (add_current_inferior_and_thread, wait_ns, wait_as)
7680         (process_stop_reply, remote_notice_new_inferior)
7681         (process_initial_stop_replies, remote_add_thread)
7682         (btrace_sync_conf, remote_btrace_maybe_reopen)
7683         (remove_new_fork_children, kill_new_fork_children)
7684         (discard_pending_stop_replies, stop_reply_queue_length)
7685         (check_pending_events_prevent_wildcard_vcont)
7686         (discard_pending_stop_replies_in_queue, stop_reply)
7687         (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
7688         (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
7689         (remote_interrupt_as, remote_interrupt_ns)
7690         (remote_get_noisy_reply, remote_query_attached)
7691         (remote_add_inferior, remote_current_thread, get_current_thread)
7692         (set_thread, set_general_thread, set_continue_thread)
7693         (set_general_process, write_ptid)
7694         (remote_unpack_thread_info_response, remote_get_threadinfo)
7695         (parse_threadlist_response, remote_get_threadlist)
7696         (remote_threadlist_iterator, remote_get_threads_with_ql)
7697         (remote_get_threads_with_qxfer)
7698         (remote_get_threads_with_qthreadinfo, extended_remote_restart)
7699         (get_offsets, remote_check_symbols, remote_supported_packet)
7700         (remote_query_supported, remote_packet_size)
7701         (remote_serial_quit_handler, remote_detach_pid)
7702         (remote_vcont_probe, remote_resume_with_hc)
7703         (send_interrupt_sequence, interrupt_query)
7704         (remote_notif_get_pending_events, fetch_register_using_p)
7705         (send_g_packet, process_g_packet, fetch_registers_using_g)
7706         (store_register_using_P, store_registers_using_G)
7707         (set_remote_traceframe, check_binary_download)
7708         (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
7709         (remote_xfer_live_readonly_partial, remote_read_bytes)
7710         (remote_send_printf, remote_flash_write, readchar)
7711         (remote_serial_write, putpkt, putpkt_binary, skip_frame)
7712         (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
7713         (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
7714         (extended_remote_disable_randomization, extended_remote_run)
7715         (send_environment_packet, extended_remote_environment_support)
7716         (extended_remote_set_inferior_cwd, remote_write_qxfer)
7717         (remote_read_qxfer, push_stop_reply, vcont_r_supported)
7718         (packet_command): Now methods of ...
7719         (remote_target): ... this class.
7720         (m_remote_state) <remote_target>: New field.
7721         (struct remote_state) <stop_reply_queue,
7722         remote_async_inferior_event_token, wait_forever_enabled_p>: New
7723         fields.
7724         (remote_state::remote_state): Allocate stop_reply_queue.
7725         (remote_state): Delete global.
7726         (get_remote_state_raw): Delete.
7727         (remote_target::get_remote_state): Allocate m_remote_state on
7728         demand.
7729         (get_current_remote_target): New.
7730         (remote_ops, extended_remote_ops): Delete.
7731         (wait_forever_enabled_p, remote_async_inferior_event_token):
7732         Delete, moved to struct remote_state.
7733         (remote_target::close): Delete self.  Destruction bits split to
7734         ...
7735         (remote_target::~remote_target): ... this.
7736         (show_memory_packet_size): Adjust to use
7737         get_current_remote_target.
7738         (struct protocol_feature) <func>: Add remote_target parameter.
7739         All callers adjusted.
7740         (curr_quit_handler_target): New.
7741         (remote_serial_quit_handler): Reimplement.
7742         (remote_target::open_1): Adjust to use get_current_remote_target.
7743         Heap-allocate remote_target/extended_remote_target instances.
7744         (vcont_builder::vcont_builder): Add remote_target parameter, and
7745         save it in m_remote.  All callers adjusted.
7746         (vcont_builder::m_remote): New field.
7747         (vcont_builder::restart, vcont_builder::flush)
7748         (vcont_builder::push_action): Use it.
7749         (remote_target::commit_resume): Use it.
7750         (struct queue_iter_param) <remote>: New field.
7751         (remote_target::remove_new_fork_children): Fill in 'remote' field.
7752         (check_pending_event_prevents_wildcard_vcont_callback_data): New.
7753         (check_pending_event_prevents_wildcard_vcont_callback)
7754         (remote_target::check_pending_events_prevent_wildcard_vcont)
7755         (remote_target::discard_pending_stop_replies)
7756         (remote_target::discard_pending_stop_replies_in_queue)
7757         (remote_target::remote_notif_remove_queued_reply): Fill in
7758         'remote' field.
7759         (remote_notif_get_pending_events): New.
7760         (remote_target::readchar, remote_target::remote_serial_write):
7761         Save/restore curr_quit_handler_target.
7762         (putpkt): New.
7763         (kill_new_fork_children): Fill in 'remote' field.
7764         (packet_command): Use get_current_remote_target, defer to
7765         remote_target method of same name.
7766         (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
7767         parameter, and save it in m_remote.  All callers adjusted.
7768         (scoped_remote_fd::release): Use m_remote.
7769         (scoped_remote_fd::m_remote): New field.
7770         (remote_file_put, remote_file_get, remote_file_delete): Use
7771         get_current_remote_target, defer to remote_target method of same
7772         name.
7773         (remote_btrace_reset): Add remote_state paremeter.  Update all
7774         callers.
7775         (remote_async_inferior_event_handler). Pass down 'data'.
7776         (remote_new_objfile): Use get_current_remote_target.
7777         (remote_target::vcont_r_supported): New.
7778         (set_range_stepping): Use get_current_remote_target and
7779         remote_target::vcont_r_supported.
7780         (_initialize_remote): Don't allocate 'remote_state' and
7781         'stop_reply_queue' globals.
7782         * remote.h (struct remote_target): Forward declare.
7783         (getpkt, putpkt, remote_notif_get_pending_events): Add
7784         'remote_target' parameter.
7785
7786 2018-05-22  Pedro Alves  <palves@redhat.com>
7787
7788         * remote.c (vcont_builder): Now a class.  Make all data members
7789         private.
7790         (vcont_builder) <vcont_builder, restart, flush, push_action>:
7791         Declare methods.
7792         (vcont_builder_restart): Rename to ...
7793         (vcont_builder::restart): ... this.
7794         (vcont_builder_flush): Rename to ...
7795         (vcont_builder::flush): ... this.
7796         (vcont_builder_push_action): Rename to ...
7797         (vcont_builder::push_action): ... this.
7798         (remote_target::commit_resume): Adjust.
7799
7800 2018-05-22  Pedro Alves  <palves@redhat.com>
7801
7802         * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
7803         (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
7804         (get_fixed_memory_packet_size): New.
7805         (get_memory_packet_size): Use it.
7806         (set_memory_packet_size): Don't override the config size with
7807         DEFAULT_MAX_MEMORY_PACKET_SIZE.
7808         (show_memory_packet_size): Use get_fixed_memory_packet_size.
7809         Don't refer to get_memory_packet_size if not connected to a remote
7810         target.  Show "(default)" if configured size is 0.
7811
7812 2018-05-22  Pedro Alves  <palves@redhat.com>
7813
7814         * remote.c (remote_target::mourn_inferior): Move
7815         discard_pending_stop_replies call here from ...
7816         (_initialize_remote): ... here.
7817
7818 2018-05-22  Pedro Alves  <palves@redhat.com>
7819
7820         * remote.c (compare_section_command): Remove set_general_process
7821         call.
7822
7823 2018-05-22  Pedro Alves  <palves@redhat.com>
7824
7825         * remote.c (struct packet_reg, struct remote_arch_state):
7826         Move higher up in the file.
7827         (remote_state) <m_arch_states>: Store remote_arch_state values
7828         instead of remote_arch_state pointers.
7829         (remote_state::get_remote_arch_state): Adjust.
7830
7831 2018-05-22  Pedro Alves  <palves@redhat.com>
7832
7833         * remote.c: Include <unordered_map>.
7834         (remote_state): Now a class.
7835         (remote_state) <get_remote_arch_state>: Declare method.
7836         <get_remote_arch_state>: New field.
7837         (remote_arch_state) <remote_arch_state>: Declare ctor.
7838         <regs>: Now a unique_ptr.
7839         (remote_gdbarch_data_handle): Delete.
7840         (get_remote_arch_state): Delete.
7841         (remote_state::get_remote_arch_state): New.
7842         (get_remote_state): Adjust to call remote_state's
7843         get_remote_arch_state method.
7844         (init_remote_state): Delete, bits factored out to ...
7845         (remote_arch_state::remote_arch_state): ... this new method.
7846         (get_remote_packet_size, get_memory_packet_size)
7847         (process_g_packet, remote_target::fetch_registers)
7848         (remote_target::prepare_to_store, store_registers_using_G)
7849         (remote_target::store_registers, remote_target::get_trace_status):
7850         Adjust to call remote_state's method.
7851         (_initialize_remote): Remove reference to
7852         remote_gdbarch_data_handle.
7853
7854 2018-05-22  Pedro Alves  <palves@redhat.com>
7855
7856         * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
7857         pread>: New method declarations.
7858         (remote_target::open_1): Adjust.
7859         (readahead_cache_invalidate): Rename to ...
7860         (readahead_cache::invalidate): ... this, and adjust to be a class
7861         method.
7862         (readahead_cache_invalidate_fd): Rename to ...
7863         (readahead_cache::invalidate_fd): ... this, and adjust to be a
7864         class method.
7865         (remote_hostio_pwrite): Adjust.
7866         (remote_hostio_pread_from_cache): Rename to ...
7867         (readahead_cache::pread): ... this, and adjust to be a class
7868         method.
7869         (remote_hostio_close): Adjust.
7870
7871 2018-05-22  Pedro Alves  <palves@redhat.com>
7872
7873         * remote.c (remote_hostio_close_cleanup): Delete.
7874         (class scoped_remote_fd): New.
7875         (remote_file_put, remote_file_get): Use it.
7876
7877 2018-05-22  Pedro Alves  <palves@redhat.com>
7878
7879         (struct vCont_action_support): Use bool and initialize all fields.
7880         (struct readahead_cache): Initialize all fields.
7881         (remote_state): Use bool and initialize all fields.
7882         (remote_state::remote_state, remote_state::~remote_state): New.
7883         (new_remote_state): Delete.
7884         (_initialize_remote): Use new to allocate remote_state.
7885
7886 2018-05-22  Pedro Alves  <palves@redhat.com>
7887             張俊芝  <zjz@zjz.name>
7888
7889         PR gdb/22973
7890         * c-exp.y: Include "c-support.h".
7891         (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
7892         of tolower.  Use c_ident_is_alpha to scan names.
7893         * c-lang.c: Include "c-support.h".
7894         (convert_ucn, convert_octal, convert_hex, convert_escape): Use
7895         ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
7896         * c-support.h: New file, with bits factored out from ...
7897         * cp-name-parser.y: ... this file.
7898         Include "c-support.h".
7899         (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
7900         c-support.h and renamed.
7901         (symbol_end, yylex): Adjust.
7902
7903 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
7904
7905         * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
7906         parameter type to CORE_ADDR.
7907         * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
7908         parameter type in declaration to CORE_ADDR.
7909         * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
7910         target_auxv_search to get AT_HWCAP and use the result to get the
7911         target description.
7912         * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
7913         to CORE_ADDR. Remove the cast of the return value to unsigned
7914         long. Fix error predicate of target_auxv_search.
7915         (ppc_linux_nat_target::read_description): Change the type of the
7916         hwcap variable to CORE_ADDR.
7917
7918 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
7919
7920         * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
7921         if the size of fpscr is larger than 32 bits.
7922
7923 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
7924
7925         * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
7926         (ppc32_linux_vsxregmap): New global.
7927         (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
7928         regcache_supply_regset, and regcache_collect_regset.
7929         * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
7930         * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
7931         (fetch_vsx_register, store_vsx_register): Remove.
7932         (fetch_vsx_registers): Add regno parameter. Get regset using
7933         ppc_linux_vsxregset. Use regset to supply registers.
7934         (store_vsx_registers): Add regno parameter. Get regset using
7935         ppc_linux_vsxregset. Use regset to collect registers.
7936         (fetch_register): Call fetch_vsx_registers instead of
7937         fetch_vsx_register.
7938         (store_register): Call store_vsx_registers instead of
7939         store_vsx_register.
7940         (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
7941         new regno parameter.
7942         (store_ppc_registers): Call store_vsx_registers with -1 for the
7943         new regno parameter.
7944         * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
7945         (ppc_collect_vsxregset): Remove.
7946
7947 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
7948
7949         * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
7950         offset fields.
7951         * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
7952         for vector register offset fields.
7953         (ppc64_fbsd_reg_offsets): Likewise.
7954         * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
7955         to vector register offset fields.
7956         * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
7957         to vector register offset fields.
7958         * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
7959         vector register offset fields.
7960         * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
7961         initializers for vector register offset fields.
7962         (rs6000_aix64_reg_offsets): Likewise.
7963         * rs6000-tdep.c (ppc_vrreg_offset): Remove.
7964         (ppc_supply_vrregset): Remove.
7965         (ppc_collect_vrregset): Remove.
7966         * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
7967         (ppc_linux_vrregset) : New function.
7968         (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
7969         (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
7970         (ppc32_linux_vrregset): Remove.
7971         (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
7972         and use result instead of ppc32_linux_vrregset.
7973         (ppc32_linux_reg_offsets): Remove initializers for vector register
7974         offset fields.
7975         (ppc64_linux_reg_offsets): Likewise.
7976         * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
7977         * ppc-linux-nat.c: Include regset.h.
7978         (gdb_vrregset_t): Adjust comment to account for little-endian
7979         mode.
7980         (supply_vrregset, fill_vrregset): Remove.
7981         (fetch_altivec_register, store_altivec_register): Remove.
7982         (fetch_altivec_registers): Add regno parameter. Get regset using
7983         ppc_linux_vrregset. Use regset to supply registers.
7984         (store_altivec_registers): Add regno parameter. Get regset using
7985         ppc_linux_vrregset. Use regset to collect registers.
7986         (fetch_register): Call fetch_altivec_registers instead of
7987         fetch_altivec_register.
7988         (store_register): Call store_altivec_registers instead of
7989         store_altivec_register.
7990         (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
7991         the new regno parameter.
7992         (store_ppc_registers): Call store_altivec_registers with -1 for
7993         the new regno parameter.
7994
7995 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
7996
7997         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
7998         (PPC_LINUX_SIZEOF_VSXREGSET): Define.
7999         * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
8000         (gdb_vrregset_t): Change array type size to
8001         PPC_LINUX_SIZEOF_VRREGSET.
8002         (gdb_vsxregset_t): Change array type size to
8003         PPC_LINUX_SIZEOF_VSXREGSET.
8004         * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
8005         Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
8006         PPC_LINUX_SIZEOF_VSXREGSET.
8007
8008 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
8009
8010         * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
8011         * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
8012         nat/ppc-linux.c.
8013         (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
8014         ppc_linux_target_wordsize with tid.
8015         (ppc_linux_nat_target::read_description): Call ppc_linux_target
8016         wordsize with tid.
8017         * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
8018         (ppc64_64bit_inferior_p): Add static and inline specifiers.
8019         (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
8020         tid parameter. Remove static specifier.
8021         * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
8022         (ppc_linux_target_wordsize): New declaration.
8023
8024 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
8025
8026         * arch/ppc-linux-common.c: New file.
8027         * arch/ppc-linux-common.h: New file.
8028         * arch/ppc-linux-tdesc.h: New file.
8029         * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
8030         * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
8031         (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
8032         arch/ppc-linux-tdesc.h.
8033         * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
8034         arch/ppc-linux-tdesc.h.
8035         (ppc_linux_nat_target::read_description): Remove target
8036         description matching code. Fill a ppc_linux_features struct and
8037         call ppc_linux_match_description with it. Move comment about ISA
8038         2.05 to ppc-linux-common.c.
8039         * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
8040         arch/ppc-linux-tdesc.h.
8041         (ppc_linux_core_read_description): Remove target description
8042         matching code. Fill a ppc_linux_features struct and call
8043         ppc_linux_match_description with it.
8044         * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
8045         (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
8046         (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
8047         (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
8048         (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
8049         (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
8050         (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
8051         (tdesc_powerpc_e500l): Remove.
8052
8053 2018-05-22  Joel Brobecker  <brobecker@adacore.com>
8054
8055         * ada-lang.c (catch_assert_command): Pass empty string instead
8056         of NULL for excep_string argument.
8057
8058 2018-05-22  Maciej W. Rozycki  <macro@mips.com>
8059
8060         * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
8061         the width of the requested register exceeds the width of the
8062         `ptrace' data type.
8063
8064 2018-05-21  Tom Tromey  <tom@tromey.com>
8065
8066         * printcmd.c (output_command): Remove.
8067         (output_command_const): Rename to output_command.
8068         * valprint.h (output_command): Rename from output_command_const.
8069         * tracepoint.c (trace_dump_actions): Call output_command.
8070
8071 2018-05-21  Tom Tromey  <tom@tromey.com>
8072
8073         * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
8074         (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
8075         * ada-lang.h (create_ada_exception_catchpoint): Update.
8076         * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
8077         std::string.
8078         (create_excep_cond_exprs, ~ada_catchpoint)
8079         (should_stop_exception, print_one_exception)
8080         (print_mention_exception, print_recreate_exception): Update.
8081         (ada_get_next_arg): Remove.
8082         (catch_ada_exception_command_split): Use std::string.  Change type
8083         of "excep_string", "cond_string".
8084         (catch_ada_exception_command): Update.
8085         (create_ada_exception_catchpoint): Change type of excep_string.
8086         (ada_exception_sal): Remove excep_string parameter.
8087         (~ada_catchpoint): Remove.
8088
8089 2018-05-21  Tom Tromey  <tom@tromey.com>
8090
8091         * ada-lang.c (ada_collect_symbol_completion_matches): Remove
8092         cleanup.
8093
8094 2018-05-21  Tom Tromey  <tom@tromey.com>
8095
8096         * ada-lang.c (ada_exception_message_1, ada_exception_message):
8097         Return unique_xmalloc_ptr.
8098         (print_it_exception): Update.
8099
8100 2018-05-21  Tom Tromey  <tom@tromey.com>
8101
8102         * tracepoint.c (trace_dump_actions): Use std::string.
8103
8104 2018-05-21  Tom Tromey  <tom@tromey.com>
8105
8106         * symfile.c (reread_symbols): Use std::string for original_name.
8107
8108 2018-05-21  Tom Tromey  <tom@tromey.com>
8109
8110         * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
8111         (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN.  Default
8112         constructor.
8113
8114 2018-05-20  Simon Marchi  <simon.marchi@polymtl.ca>
8115
8116         * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
8117         instance to...
8118         (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
8119         * objfiles.c (get_objfile_bfd_data): Allocate
8120         objfile_per_bfd_storage with obstack_new when allocating on
8121         obstack.
8122
8123 2018-05-20  Simon Marchi  <simon.marchi@ericsson.com>
8124
8125         * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
8126         OBSTACK_ZALLOC.
8127         * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
8128         * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
8129         * mdebugread.c (mdebug_build_psymtabs): Likewise.
8130         (add_pending): Likewise.
8131         (parse_symbol): Likewise.
8132         (parse_partial_symbols): Likewise.
8133         (psymtab_to_symtab_1): Likewise.
8134         (new_psymtab): Likewise.
8135         (elfmdebug_build_psymtabs): Likewise.
8136         * minsyms.c (terminate_minimal_symbol_table): Likewise.
8137         * objfiles.c (get_objfile_bfd_data): Likewise.
8138         (objfile_register_static_link): Likewise.
8139         * psymtab.c (allocate_psymtab): Likewise.
8140         * stabsread.c (read_member_functions): Likewise.
8141         * xcoffread.c (xcoff_end_psymtab): Likewise.
8142
8143 2018-05-20  Simon Marchi  <simon.marchi@ericsson.com>
8144
8145         * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
8146         compiler supports std::is_trivially_constructible.
8147         * common/poison.h: Include obstack.h.
8148         (IsMallocable): Define to is_trivially_constructible if the
8149         compiler supports it, define to true_type otherwise.
8150         (xobnew): New.
8151         (XOBNEW): Redefine.
8152         (xobnewvec): New.
8153         (XOBNEWVEC): Redefine.
8154         * gdb_obstack.h (obstack_zalloc): New.
8155         (OBSTACK_ZALLOC): Redefine.
8156         (obstack_calloc): New.
8157         (OBSTACK_CALLOC): Redefine.
8158         (obstack_new): New.
8159         * gdbarch.sh: Include gdb_obstack in gdbarch.h.
8160         (gdbarch_obstack): New declaration in gdbarch.h, definition in
8161         gdbarch.c.
8162         (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
8163         obstack_calloc/obstack_zalloc.
8164         (gdbarch_obstack_zalloc): Remove.
8165         * target-descriptions.c (tdesc_data_init): Use obstack_new.
8166
8167 2018-05-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
8168
8169         * stack.c (backtrace_command_1): Remove useless variable int i.
8170
8171 2018-05-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
8172
8173         * stack.c (print_frame_info): Fix comment.
8174
8175 2018-05-18  Tom Tromey  <tom@tromey.com>
8176
8177         * dwarf2read.c (struct dwz_file): Add constructor, initializers.
8178         <dwz_bfd>: Now a gdb_bfd_ref_ptr.
8179         (~dwarf2_per_objfile): Update
8180         (dwarf2_get_dwz_file): Use new.
8181         * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
8182         unique_ptr.
8183
8184 2018-05-18  Tom Tromey  <tom@tromey.com>
8185
8186         * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
8187         unique_ptr.
8188         * dwarf2read.c (struct dwp_file): Add constructor and
8189         initializers.
8190         (open_and_init_dwp_file): Return a unique_ptr.
8191         (dwarf2_per_objfile, create_dwp_hash_table)
8192         (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
8193         (lookup_dwo_unit_in_dwp): Update.
8194         (open_and_init_dwp_file, get_dwp_file): Update.
8195
8196 2018-05-18  Tom Tromey  <tom@tromey.com>
8197
8198         * dwarf2read.c (dwarf2_per_objfile): Update.
8199         (struct mapped_index): Add initializers.
8200         (dwarf2_read_index): Use new.
8201         (dw2_symtab_iter_init): Update.
8202         * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
8203         unique_ptr.
8204
8205 2018-05-18  Simon Marchi  <simon.marchi@ericsson.com>
8206
8207         * dwarf2read.c (mapped_index) <total_size>: Remove.
8208
8209 2018-05-18  Simon Marchi  <simon.marchi@ericsson.com>
8210
8211         * unittests/format_pieces-selftests.c (test_format_specifier):
8212         Add ARI comments.
8213
8214 2018-05-18  Tom Tromey  <tom@tromey.com>
8215
8216         * c-typeprint.c (maybe_print_hole): New function.
8217         (c_print_type_struct_field_offset): Update.
8218         (c_type_print_base_struct_union): Call maybe_print_hole.
8219
8220 2018-05-17  Keith Seitz  <keiths@redhat.com>
8221
8222         * breakpoint.c (build_bpstat_chain): New function, moved from
8223         bpstat_stop_status.
8224         (bpstat_stop_status): Add optional parameter, `stop_chain'.
8225         If no stop chain is passed, call build_bpstat_chain to build it.
8226         * breakpoint.h (build_bpstat_chain): Declare.
8227         (bpstat_stop_status): Move documentation here from breakpoint.c.
8228         * infrun.c (handle_signal_stop): Before eliding inlined frames,
8229         build the stop chain and pass it to skip_inline_frames.
8230         Pass this stop chain to bpstat_stop_status.
8231         * inline-frame.c: Include breakpoint.h.
8232         (stopped_by_user_bp_inline_frame): New function.
8233         (skip_inline_frames): Add parameter `stop_chain'.
8234         Move documention to inline-frame.h.
8235         If non-NULL, use stopped_by_user_bp_inline_frame to determine
8236         whether the frame should be elided.
8237         * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
8238         Add moved documentation and update for new parameter.
8239
8240 2018-05-17  Simon Marchi  <simon.marchi@ericsson.com>
8241
8242         PR cli/14975
8243         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8244         unittests/format_pieces-selftests.c.
8245         * common/format.h (format_piece) <operator==>: New.
8246         (format_pieces) <operator[]>: Remove.
8247         * common/format.c (format_pieces::format_pieces): Handle \e.
8248         * unittests/format_pieces-selftests.c: New.
8249
8250 2018-05-17  Tom Tromey  <tom@tromey.com>
8251
8252         PR symtab/23010:
8253         * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
8254         (dw2_instantiate_symtab): Add skip_partial parameter.
8255         (dw2_find_last_source_symtab, dw2_map_expand_apply)
8256         (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
8257         (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
8258         (dw2_expand_symtabs_matching_one)
8259         (dw2_find_pc_sect_compunit_symtab)
8260         (dw2_debug_names_lookup_symbol)
8261         (dw2_debug_names_expand_symtabs_for_function): Update.
8262         (init_cutu_and_read_dies): Add skip_partial parameter.
8263         (process_psymtab_comp_unit, build_type_psymtabs_1)
8264         (process_skeletonless_type_unit, load_partial_comp_unit)
8265         (psymtab_to_symtab_1): Update.
8266         (load_full_comp_unit): Add skip_partial parameter.
8267         (process_imported_unit_die, dwarf2_read_addr_index)
8268         (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
8269         (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
8270         (read_signatured_type): Update.
8271
8272 2018-05-17  Simon Marchi  <simon.marchi@ericsson.com>
8273
8274         * value.c (release_value): Remove unused variable.
8275         (record_latest_value): Likewise.
8276         (access_value_history): Likewise.
8277         (preserve_values): Likewise.
8278
8279 2018-05-17  Tom Tromey  <tom@tromey.com>
8280
8281         * extension.h (struct ext_lang_type_printers) <py_type_printers>:
8282         Initialize.
8283
8284 2018-05-16  Maciej W. Rozycki  <macro@mips.com>
8285
8286         PR gdb/22286
8287         * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
8288         Also handle registers whose width is not a multiple of
8289         PTRACE_TYPE_RET.
8290         (linux_nat_trad_target::store_register): Likewise.
8291
8292 2018-05-16  Tom Tromey  <tom@tromey.com>
8293
8294         * gdbcore.h (core_bfd): Redefine.
8295         * corelow.c (core_target::close): Update.
8296         (core_target_open): Update.
8297         * progspace.h (struct program_space) <cbfd>: Now a
8298         gdb_bfd_ref_ptr.
8299
8300 2018-05-16  Tom Tromey  <tom@tromey.com>
8301
8302         PR cli/19551:
8303         * symfile-add-flags.h (enum symfile_add_flags)
8304         <SYMFILE_NOT_FILENAME>: New constant.
8305         * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME.  Get
8306         objfile name from BFD.
8307         (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
8308         * minidebug.c (find_separate_debug_file_in_section): Put
8309         ".gnu_debugdata" into BFD's file name.
8310
8311 2018-05-16  Simon Marchi  <simon.marchi@ericsson.com>
8312
8313         * regcache.c (regcache_read_ftype, regcache_write_ftype):
8314         Remove.
8315
8316 2018-05-15  Tamar Christina  <tamar.christina@arm.com>
8317
8318         PR binutils/21446
8319         * aarch64-tdep.c (aarch64_analyze_prologue,
8320         aarch64_software_single_step, aarch64_displaced_step_copy_insn):
8321         Indicate not interested in errors.
8322
8323 2018-05-15  Maciej W. Rozycki  <macro@mips.com>
8324
8325         * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
8326         Supply the MIPS_ZERO_REGNUM register.
8327
8328 2018-05-15  Maciej W. Rozycki  <macro@mips.com>
8329
8330         * mips-tdep.c (mask_address_var): Make variable static.
8331
8332 2018-05-14  Tom Tromey  <tom@tromey.com>
8333
8334         * dwarf2read.c (rust_union_quirks): Clear rust_unions.
8335
8336 2018-05-11  Andrew Burgess  <andrew.burgess@embecosm.com>
8337
8338         * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
8339         FXSAVE_ADDR for the mxcsr register.
8340
8341 2018-05-11  Max Filippov  <jcmvbkbc@gmail.com>
8342
8343         * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
8344
8345 2018-05-11  Pedro Alves  <palves@redhat.com>
8346
8347         * corelow.c (core_target) <core_target>: No longer inline.
8348         Initialize m_core_gdbarch, m_core_vec and build the section table
8349         here.
8350         <~core_target>: New.
8351         <core_gdbarch, get_core_register_section>: New methods.
8352         <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
8353         factored out from ...
8354         <core_data, core_vec, core_gdbarch>: ... these deleted globals.
8355         (core_ops): Delete.
8356         (sniff_core_bfd): Add gdbarch parameter.
8357         (core_close): Delete, merged into ...
8358         (core_target::close): ... here.  Delete self.
8359         (core_close_cleanup): Delete.
8360         (core_target_open): Allocate a core_target on the heap.  Use a
8361         unique_ptr instead of a cleanup.  Bits moved into the core_target
8362         ctor.  Adjust to use core_target methods instead of globals.
8363         (get_core_register_section): Rename to ...
8364         (core_target::get_core_register_section): ... this and adjust.
8365         (struct get_core_registers_cb_data): New.
8366         (get_core_registers_cb): Use it.  Use bool.
8367         (core_target::fetch_registers, core_target::files_info)
8368         (core_target::xfer_partial, core_target::read_description)
8369         (core_target::pid_to, core_target::thread_name): Adjust to
8370         reference class fields instead of globals.
8371         * target.h (struct target_ops_deleter, target_ops_up): New.
8372
8373 2018-05-11  Pedro Alves  <palves@redhat.com>
8374
8375         * corefile.c (core_file_command): Move to corelow.c.
8376         * corelow.c (the_core_target): Delete.
8377         (core_file_command): Moved from corefile.c.  Check exec_bfd
8378         instead of the_core_target.  Use target_detach instead of calling
8379         into the_core_target directly.
8380         (maybe_say_no_core_file_now): New.
8381         (core_target::detach): Use it.
8382         (_initialize_corelow): Remove references to the_core_target.
8383         * gdbcore.h (the_core_target): Delete.
8384
8385 2018-05-11  Tom Tromey  <tromey@redhat.com>
8386             Pedro Alves  <palves@redhat.com>
8387
8388         * corefile.c (core_bfd): Remove.
8389         * gdbcore.h (core_bfd): Now a macro.
8390         * progspace.h (struct program_space) <cbfd>: New field.
8391
8392 2018-05-11  Tom Tromey  <tom@tromey.com>
8393
8394         * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
8395         gdb::def_vector.
8396
8397 2018-05-10  Tom Tromey  <tom@tromey.com>
8398
8399         * configure: Rebuild.
8400         * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
8401
8402 2018-05-10  Joel Brobecker  <brobecker@adacore.com>
8403
8404         PR server/23158:
8405         * regformats/regdat.sh: Adjust script, following the addition
8406         of the new expedite_regs parameter to init_target_desc.
8407
8408 2018-05-10  Omair Javaid  <omair.javaid@linaro.org>
8409     
8410         PR gdb/23127
8411         * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
8412         set_gdbarch_significant_addr_bit.
8413         * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
8414         set_gdbarch_significant_addr_bit.
8415         * utils.c (address_significant): Update to sign extend addr.
8416
8417 2018-05-09  Max Filippov  <jcmvbkbc@gmail.com>
8418
8419         * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
8420         (xtensa_linux_init_abi): Limit tdep->num_regs by
8421         tdep->num_nopriv_regs.
8422         * xtensa-tdep.c (xtensa_derive_tdep): Calculate
8423         tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
8424         not initialized.
8425
8426 2018-05-08  Simon Marchi  <simon.marchi@ericsson.com>
8427
8428         * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
8429
8430 2018-05-08  Andrew Burgess  <andrew.burgess@embecosm.com>
8431
8432         * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
8433         (I387_MXCSR_INIT_VAL): New constant.
8434         * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
8435         buffer if it was supplied by the inferior.
8436         * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
8437         (i387_xsave_get_clear_bv): New function.
8438         (i387_supply_xsave): Only read x87 control registers from the
8439         xsave buffer if the feature is enabled, and the state will have
8440         been written, otherwise, provide a suitable default.
8441         (i387_collect_xsave): Pre-clear all registers in xsave buffer,
8442         including x87 control registers.  Update control registers if they
8443         have changed from the default value, and mark features as enabled
8444         as required.
8445         * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
8446
8447 2018-05-08  Ulrich Weigand  <uweigand@de.ibm.com>
8448
8449         * spu-tdep.c (info_spu_event_command): Fix output formatting.
8450
8451 2018-05-07  Tom Tromey  <tom@tromey.com>
8452
8453         * configure: Rebuild.
8454         * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
8455
8456 2018-05-07  Tom Tromey  <tom@tromey.com>
8457
8458         PR tdep/20362:
8459         * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
8460         bit.  Use correct value for VDIV.
8461
8462 2018-05-04  Tom Tromey  <tom@tromey.com>
8463
8464         * configure: Rebuild.
8465         * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
8466
8467 2018-05-04  Tom Tromey  <tom@tromey.com>
8468
8469         * linux-record.c (record_linux_system_call) <case
8470         RECORD_SYS_RECVFROM>: Add "break".
8471
8472 2018-05-04  Tom Tromey  <tom@tromey.com>
8473
8474         * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
8475         Add missing "break".
8476         * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
8477         Add missing "break".
8478
8479 2018-05-04  Tom Tromey  <tom@tromey.com>
8480
8481         * rs6000-tdep.c (ppc_process_record_op4)
8482         (ppc_process_record_op63): Add fall-through comment.
8483
8484 2018-05-04  Tom Tromey  <tom@tromey.com>
8485
8486         * i386-tdep.c (i386_process_record): Add fall-through comment.
8487
8488 2018-05-04  Tom Tromey  <tom@tromey.com>
8489
8490         * stabsread.c (define_symbol) <case 'p'>: Add fall-through
8491         comment.
8492
8493 2018-05-04  Tom Tromey  <tom@tromey.com>
8494
8495         * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
8496         * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
8497         * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
8498         comment.
8499         * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
8500         comment.
8501         * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
8502         comment.
8503
8504 2018-05-04  Tom Tromey  <tom@tromey.com>
8505
8506         * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
8507
8508 2018-05-04  Tom Tromey  <tom@tromey.com>
8509
8510         * s390-tdep.c (s390_process_record): Fix fall-through comments.
8511         * xcoffread.c (scan_xcoff_symtab): Move comment later.
8512         * symfile.c (section_is_mapped): Fix fall-through comment.
8513         * stabsread.c (define_symbol, read_member_functions): Fix
8514         fall-through comment.
8515         * s390-linux-tdep.c (s390_process_record): Fix fall-through
8516         comment.
8517         * remote.c (remote_wait_as): Fix fall-through comment.
8518         * p-exp.y (yylex): Fix fall-through comment.
8519         * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
8520         comment.
8521         * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
8522         * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
8523         * jv-exp.y (yylex): Fix fall-through comment.
8524         * go-exp.y (lex_one_token): Fix fall-through comment.
8525         * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
8526         fall-through comment.
8527         * f-exp.y (yylex): Fix fall-through comment.
8528         * dwarf2read.c (process_die): Fix fall-through comments.
8529         * dbxread.c (process_one_symbol): Fix fall-through comment.
8530         * d-exp.y (lex_one_token): Fix fall-through comment.
8531         * cp-name-parser.y (yylex): Fix fall-through comment.
8532         * coffread.c (coff_symtab_read): Fix fall-through comment.
8533         * c-exp.y (lex_one_token): Fix fall-through comment.
8534         * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
8535         comment.
8536         * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
8537         comment.
8538
8539 2018-05-04  Tom Tromey  <tom@tromey.com>
8540
8541         PR python/22730:
8542         * NEWS: Mention gdb.execute change.
8543         * gdbcmd.h (execute_control_command): Don't declare.
8544         * python/python.c (execute_gdb_command): Use read_command_lines_1,
8545         execute_control_commands, execute_control_commands_to_string.
8546         * cli/cli-script.h (execute_control_commands)
8547         (execute_control_commands_to_string): Declare.
8548         (execute_control_command): Add from_tty parameter.
8549         * cli/cli-script.c (execute_control_commands)
8550         (execute_control_commands_to_string): New functions.
8551         (execute_user_command): Use execute_control_commands.
8552         (execute_control_command_1): Add "from_tty" parameter.  Update.
8553         (execute_control_command): Likewise.
8554
8555 2018-05-04  Tom Tromey  <tom@tromey.com>
8556
8557         PR python/22731:
8558         * NEWS: Mention that breakpoint commands are writable.
8559         * python/py-breakpoint.c (bppy_set_commands): New function.
8560         (breakpoint_object_getset) <"commands">: Use it.
8561
8562 2018-05-04  Tom Tromey  <tom@tromey.com>
8563
8564         * tracepoint.c (actions_command): Update.
8565         * mi/mi-cmd-break.c (mi_command_line_array)
8566         (mi_command_line_array_cnt, mi_command_line_array_ptr)
8567         (mi_read_next_line): Remove.
8568         (mi_cmd_break_commands): Update.
8569         * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
8570         function_view.
8571         * cli/cli-script.c (get_command_line): Update.
8572         (process_next_line): Use function_view.  Constify.
8573         (recurse_read_control_structure, read_command_lines)
8574         (read_command_lines_1): Change argument types to function_view.
8575         (do_define_command, document_command): Update.
8576         * breakpoint.h (check_tracepoint_command): Don't declare.
8577         * breakpoint.c (check_tracepoint_command): Remove.
8578         (commands_command_1, create_tracepoint_from_upload): Update.
8579
8580 2018-05-04  Tom Tromey  <tom@tromey.com>
8581
8582         PR gdb/11750:
8583         * cli/cli-script.h (enum command_control_type) <define_control>:
8584         New constant.
8585         * cli/cli-script.c (multi_line_command_p): Handle define_control.
8586         (build_command_line, execute_control_command_1)
8587         (process_next_line): Likewise.
8588         (do_define_command): New function, extracted from define_command.
8589         (define_command): Use it.
8590
8591 2018-05-04  Tom Tromey  <tom@tromey.com>
8592
8593         * tracepoint.c (actions_command): Update.
8594         * cli/cli-script.h (read_command_lines): Update.
8595         * cli/cli-script.c (read_command_lines): Constify prompt_arg.
8596         (MAX_TMPBUF): Remove define.
8597         (define_command): Use string_printf.
8598         (document_command): Likewise.
8599         * breakpoint.c (commands_command_1): Update.
8600
8601 2018-05-04  Tom Tromey  <tom@tromey.com>
8602
8603         * top.c (execute_command): Update.
8604         * cli/cli-script.h (print_command_lines): Now varargs.
8605         * cli/cli-script.c (print_command_lines): Now varargs.
8606         (execute_control_command_1) <case while_control, case if_control>:
8607         Update.
8608
8609 2018-05-04  Tom Tromey  <tom@tromey.com>
8610
8611         * tracepoint.c (all_tracepoint_actions): Rename from
8612         all_tracepoint_actions_and_cleanup.  Change return type.
8613         (actions_command, encode_actions_1, encode_actions)
8614         (trace_dump_actions, tdump_command): Update.
8615         * remote.c (remote_download_command_source): Update.
8616         * python/python.c (gdbpy_eval_from_control_command)
8617         (python_command, python_interactive_command): Update.
8618         * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
8619         * guile/guile.c (guile_command)
8620         (gdbscm_eval_from_control_command, guile_command): Update.
8621         * compile/compile.c (compile_code_command)
8622         (compile_print_command, compile_to_object): Update.
8623         * cli/cli-script.h (struct command_lines_deleter): New.
8624         (counted_command_line): New typedef.
8625         (struct command_line): Add constructor, destructor.
8626         <body_list>: Remove.
8627         <body_list_0, body_list_1>: New members.
8628         (command_line_up): Remove typedef.
8629         (read_command_lines, read_command_lines_1, get_command_line):
8630         Update.
8631         (copy_command_lines): Don't declare.
8632         * cli/cli-script.c (build_command_line): Use "new".
8633         (get_command_line): Return counted_command_line.
8634         (print_command_lines, execute_user_command)
8635         (execute_control_command_1, while_command, if_command): Update.
8636         (realloc_body_list): Remove.
8637         (process_next_line, recurse_read_control_structure): Update.
8638         (read_command_lines, read_command_lines_1): Return counted_command_line.
8639         (free_command_lines): Use "delete".
8640         (copy_command_lines): Remove.
8641         (define_command, document_command, show_user_1): Update.
8642         * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
8643         a counted_command_line.
8644         * breakpoint.h (counted_command_line): Remove typedef.
8645         (breakpoint_set_commands): Update.
8646         * breakpoint.c (check_no_tracepoint_commands)
8647         (validate_commands_for_breakpoint): Update.
8648         (breakpoint_set_commands): Change commands to be a
8649         counted_command_line.
8650         (commands_command_1, update_dprintf_command_list)
8651         (create_tracepoint_from_upload): Update.
8652
8653 2018-05-04  Tom Tromey  <tom@tromey.com>
8654
8655         * cli/cli-decode.h (cmd_list_element): New constructor.
8656         (~cmd_list_element): New destructor.
8657         (struct cmd_list_element): Add initializers.
8658         * cli/cli-decode.c (do_add_cmd): Use "new".
8659         (delete_cmd): Use "delete".
8660
8661 2018-05-04  Jan Kratochvil  <jan.kratochvil@redhat.com>
8662             Pedro Alves <palves@redhat.com>
8663
8664         PR breakpoints/19806 and support for PR external/20207.
8665         * NEWS: Mention Aarch64 watchpoint improvements.
8666         * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
8667         watchpoints and PR external/20207 watchpoints.
8668         * nat/aarch64-linux-hw-point.c
8669         (kernel_supports_any_contiguous_range): New.
8670         (aarch64_watchpoint_offset): New.
8671         (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
8672         (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
8673         (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
8674         (aarch64_align_watchpoint): New parameters aligned_offset_p and
8675         next_addr_orig_p.  Support PR external/20207 watchpoints.
8676         (aarch64_downgrade_regs): New.
8677         (aarch64_dr_state_insert_one_point): New parameters offset and
8678         addr_orig.
8679         (aarch64_dr_state_remove_one_point): Likewise.
8680         (aarch64_handle_breakpoint): Update caller.
8681         (aarch64_handle_aligned_watchpoint): Likewise.
8682         (aarch64_handle_unaligned_watchpoint): Support addr_orig and
8683         aligned_offset.
8684         (aarch64_linux_set_debug_regs): Remove const from state.  Call
8685         aarch64_downgrade_regs.
8686         (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
8687         * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
8688         (DR_CONTROL_MASK): ... this.
8689         (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
8690         (unsigned int aarch64_watchpoint_offset): New prototype.
8691         (aarch64_linux_set_debug_regs): Remove const from state.
8692         * utils.c (align_up, align_down): Move to ...
8693         * common/common-utils.c (align_up, align_down): ... here.
8694         * utils.h (align_up, align_down): Move to ...
8695         * common/common-utils.h (align_up, align_down): ... here.
8696
8697 2018-05-04  Joel Brobecker  <brobecker@adacore.com>
8698
8699         * sparc-tdep.c (sparc_structure_return_p): Re-implement to
8700         match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
8701         (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
8702         Re-implement to match the ABI as summarized in GCC's
8703         gcc/config/sparc/sparc.c.  All callers updated.
8704         (sparc32_store_arguments): Remove assertion.
8705
8706 2018-05-04  Tom Tromey  <tom@tromey.com>
8707
8708         * printcmd.c: Don't include tui.h.
8709         (decode_format): Use skip_spaces.
8710
8711 2018-05-04  Tom Tromey  <tom@tromey.com>
8712
8713         PR gdb/22619:
8714         * printcmd.c (last_count): New global.
8715         (x_command): Use saved count when repeating.
8716
8717 2018-05-04  Tom Tromey  <tom@tromey.com>
8718
8719         * nto-procfs.c (do_closedir_cleanup): Remove.
8720         (procfs_pidlist): Use gdb_dir_up.
8721         * procfs.c (do_closedir_cleanup): Remove.
8722         (proc_update_threads): Use gdb_dir_up.
8723         * common/filestuff.h (struct gdb_dir_deleter): New.
8724         (gdb_dir_up): New typedef.
8725
8726 2018-05-04  Tom Tromey  <tom@tromey.com>
8727
8728         * ada-lang.c (print_mention_exception): Use std::string.
8729
8730 2018-05-04  Tom Tromey  <tom@tromey.com>
8731
8732         * ada-lang.c (create_excep_cond_exprs): Update.
8733         (ada_exception_catchpoint_cond_string): Use std::string.
8734
8735 2018-05-04  Tom Tromey  <tom@tromey.com>
8736
8737         * ada-lang.c (xget_renaming_scope): Return std::string.
8738         (old_renaming_is_invisible): Update.
8739
8740 2018-05-04  Tom Tromey  <tom@tromey.com>
8741
8742         * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
8743         (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
8744
8745 2018-05-04  Ulrich Weigand  <uweigand@de.ibm.com>
8746
8747         * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
8748
8749 2018-05-04  Tom Tromey  <tom@tromey.com>
8750
8751         * remote.c (remote_query_supported_append): Change type.
8752         (remote_check_symbols): Update.
8753
8754 2018-05-04  Paul Pluzhnikov  <ppluzhnikov@google.com>
8755
8756         PR gdb/11420
8757         * configure.ac: Prepend libpython.
8758         * python/python-config.py: Likewise.
8759         * configure: Regenerate.
8760
8761 2018-05-03  Simon Marchi  <simon.marchi@ericsson.com>
8762
8763         * Makefile.in (%.c: %.l): Use -t instead of --stdout.
8764
8765 2018-05-03  Pedro Alves  <palves@redhat.com>
8766
8767         * s390-linux-nat.c
8768         (s390_linux_nat_target::have_continuable_watchpoint): Mark with
8769         override.  Write 'true' instead of '1'.
8770         (s390_linux_nat_target::watchpoint_addr_within_range): Remove
8771         declaration.
8772
8773 2018-05-02  Pedro Alves  <palves@redhat.com>
8774
8775         * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
8776         add_inf_child_target.
8777         * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
8778         add_inf_child_target.
8779         * aix-thread.c (aix_thread_target_info): New.
8780         (aix_thread_target) <shortname, longname, doc>: Delete.
8781         <info>: New.
8782         * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
8783         add_inf_child_target.
8784         * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
8785         add_inf_child_target.
8786         * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
8787         add_inf_child_target.
8788         * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
8789         add_inf_child_target.
8790         * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
8791         add_inf_child_target.
8792         * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
8793         add_inf_child_target.
8794         * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
8795         add_inf_child_target.
8796         * arm-linux-nat.c (_initialize_arm_linux_nat): Use
8797         add_inf_child_target.
8798         * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
8799         add_inf_child_target.
8800         * bfd-target.c (target_bfd_target_info): New.
8801         (target_bfd) <shortname, longname, doc>: Delete.
8802         <info>: New.
8803         * bsd-kvm.c (bsd_kvm_target_info): New.
8804         (bsd_kvm_target) <shortname, longname, doc>: Delete.
8805         <info>: New.
8806         (bsd_kvm_target::open): Rename to ...
8807         (bsd_kvm_target_open): ... this.  Adjust.
8808         * bsd-uthread.c (bsd_uthread_target_info): New.
8809         (bsd_uthread_target) <shortname, longname, doc>: Delete.
8810         <info>: New.
8811         * corefile.c (core_file_command): Adjust.
8812         * corelow.c (core_target_info): New.
8813         (core_target) <shortname, longname, doc>: Delete.
8814         <info>: New.
8815         (core_target::open): Rename to ...
8816         (core_target_open): ... this.  Adjust.
8817         * ctf.c (ctf_target_info): New.
8818         (ctf_target) <shortname, longname, doc>: Delete.
8819         <info>: New.
8820         (ctf_target::open): Rename to ...
8821         (ctf_target_open): ... this.
8822         (_initialize_ctf): Adjust.
8823         * exec.c (exec_target_info): New.
8824         (exec_target) <shortname, longname, doc>: Delete.
8825         <info>: New.
8826         (exec_target::open): Rename to ...
8827         (exec_target_open): ... this.
8828         * gdbcore.h (core_target_open): Declare.
8829         * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
8830         * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
8831         add_inf_child_target.
8832         * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
8833         add_inf_child_target.
8834         * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
8835         add_inf_child_target.
8836         * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
8837         add_inf_child_target.
8838         * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
8839         add_inf_child_target.
8840         * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
8841         add_inf_child_target.
8842         * i386-linux-nat.c (_initialize_i386_linux_nat): Use
8843         add_inf_child_target.
8844         * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
8845         add_inf_child_target.
8846         * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
8847         add_inf_child_target.
8848         * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
8849         add_inf_child_target.
8850         * inf-child.c (inf_child_target_info): New.
8851         (inf_child_target::info): New.
8852         (inf_child_open_target): Remove 'target' parameter.  Use
8853         get_native_target instead.
8854         (inf_child_target::open): Delete.
8855         (add_inf_child_target): New.
8856         * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
8857         Delete.
8858         <info>: New.
8859         (add_inf_child_target): Declare.
8860         (inf_child_open_target): Declare.
8861         * linux-thread-db.c (thread_db_target_info): New.
8862         (thread_db_target) <shortname, longname, doc>: Delete.
8863         <info>: New.
8864         * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
8865         add_inf_child_target.
8866         * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
8867         add_inf_child_target.
8868         * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
8869         add_inf_child_target.
8870         * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
8871         add_inf_child_target.
8872         * make-target-delegates (print_class): Adjust.
8873         * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
8874         add_inf_child_target.
8875         * mips-linux-nat.c (_initialize_mips_linux_nat): Use
8876         add_inf_child_target.
8877         * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
8878         add_inf_child_target.
8879         * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
8880         add_inf_child_target.
8881         * nto-procfs.c (nto_native_target_info): New.
8882         (nto_procfs_target_native) <shortname, longname, doc>:
8883         Delete.
8884         <info>: New.
8885         (nto_procfs_target_info): New.
8886         (nto_procfs_target_procfs) <shortname, longname, doc>:
8887         Delete.
8888         <info>: New.
8889         (init_procfs_targets): Adjust.
8890         * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
8891         add_inf_child_target.
8892         * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
8893         add_inf_child_target.
8894         * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
8895         add_inf_child_target.
8896         * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
8897         add_inf_child_target.
8898         * ravenscar-thread.c (ravenscar_target_info): New.
8899         (ravenscar_thread_target) <shortname, longname, doc>:
8900         Delete.
8901         <info>: New.
8902         * record-btrace.c (record_btrace_target_info):
8903         (record_btrace_target) <shortname, longname, doc>: Delete.
8904         <info>: New.
8905         (record_btrace_target::open): Rename to ...
8906         (record_btrace_target_open): ... this.  Adjust.
8907         * record-full.c (record_longname, record_doc): New.
8908         (record_full_base_target) <shortname, longname, doc>: Delete.
8909         <info>: New.
8910         (record_full_target_info): New.
8911         (record_full_target): <shortname>: Delete.
8912         <info>: New.
8913         (record_full_core_open_1, record_full_open_1): Update comments.
8914         (record_full_base_target::open): Rename to ...
8915         (record_full_open): ... this.
8916         (cmd_record_full_restore): Update.
8917         (_initialize_record_full): Update.
8918         * remote-sim.c (remote_sim_target_info): New.
8919         (gdbsim_target) <shortname, longname, doc>: Delete.
8920         <info>: New.
8921         (gdbsim_target::open): Rename to ...
8922         (gdbsim_target_open): ... this.
8923         (_initialize_remote_sim): Adjust.
8924         * remote.c (remote_doc): New.
8925         (remote_target_info): New.
8926         (remote_target) <shortname, longname, doc>: Delete.
8927         <info>: New.
8928         (extended_remote_target_info): New.
8929         (extended_remote_target) <shortname, longname, doc>: Delete.
8930         <info>: New.
8931         (remote_target::open_1): Make static.  Adjust.
8932         * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
8933         * s390-linux-nat.c (_initialize_s390_nat): Use
8934         add_inf_child_target.
8935         * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
8936         add_inf_child_target.
8937         * sol-thread.c (thread_db_target_info): New.
8938         (sol_thread_target) <shortname, longname, doc>: Delete.
8939         <info>: New.
8940         * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
8941         add_inf_child_target.
8942         * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
8943         add_inf_child_target.
8944         * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
8945         add_inf_child_target.
8946         * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
8947         add_inf_child_target.
8948         * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
8949         add_inf_child_target.
8950         * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
8951         add_inf_child_target.
8952         * spu-linux-nat.c (_initialize_spu_nat): Use
8953         add_inf_child_target.
8954         * spu-multiarch.c (spu_multiarch_target_info): New.
8955         (spu_multiarch_target) <shortname, longname, doc>: Delete.
8956         <info>: New.
8957         * target-delegates.c: Regenerate.
8958         * target.c: Include <unordered_map>.
8959         (target_ops_p): Delete.
8960         (DEF_VEC_P(target_ops_p)): Delete.
8961         (target_factories): New.
8962         (test_target_info): New.
8963         (test_target_ops::info): New.
8964         (open_target): Adjust to use target_factories.
8965         (add_target_with_completer): Rename to ...
8966         (add_target): ... this.  Change prototype.  Register target_info
8967         and open callback in target_factories.  Register target_info in
8968         command context instead of target_ops.
8969         (add_target): Delete old implementation.
8970         (add_deprecated_target_alias): Change prototype.  Adjust.
8971         (the_native_target): New.
8972         (set_native_target, get_native_target): New.
8973         (find_default_run_target): Use the_native_target.
8974         (find_attach_target, find_run_target): Simplify.
8975         (target_ops::open): Delete.
8976         (dummy_target_info): New.
8977         (dummy_target::shortname, dummy_target::longname)
8978         (dummy_target::doc): Delete.
8979         (dummy_target::info): New.
8980         (debug_target::shortname, debug_target::longname)
8981         (debug_target::doc): Delete.
8982         (debug_target::info): New.
8983         * target.h (struct target_info): New.
8984         (target_ops::~target_ops): Add comment.
8985         (target_ops::info): New.
8986         (target_ops::shortname, target_ops::longname, target_ops::doc): No
8987         longer virtual.  Implement in terms of target_info.
8988         (set_native_target, get_native_target): Declare.
8989         (target_open_ftype): New.
8990         (add_target, add_target_with_completer)
8991         (add_deprecated_target_alias): Change prototype.
8992         (test_target) <shortname, longname, doc>: Delete.
8993         <info>: New.
8994         * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
8995         add_inf_child_target.
8996         * tracefile-tfile.c (tfile_target_info): New.
8997         (tfile_target) <shortname, longname, doc>: Delete.
8998         <info>: New.
8999         (tfile_target::open): Rename to ...
9000         (tfile_target_open): ... this.
9001         (_initialize_tracefile_tfile): Adjust.
9002         * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
9003         add_inf_child_target.
9004         * windows-nat.c (_initialize_windows_nat): Use
9005         add_inf_child_target.
9006         * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
9007         add_inf_child_target.
9008
9009 2018-05-02  Pedro Alves  <palves@redhat.com>
9010
9011         * linux-nat.h (linux_nat_target) <low_new_thread,
9012         low_delete_thread, low_new_fork, low_forget_process,
9013         low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
9014         New virtual methods.
9015         (linux_nat_set_new_thread, linux_nat_set_delete_thread)
9016         (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
9017         (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
9018         (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
9019         (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
9020         Delete.
9021         * linux-fork.c (delete_fork): Adjust to call low method.
9022         * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
9023         (linux_nat_new_fork, linux_nat_forget_process_hook)
9024         (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
9025         (linux_nat_status_is_event):
9026         (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
9027         (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
9028         to call low method.
9029         (sigtrap_is_event): Rename to ...
9030         (linux_nat_target::low_status_is_event): ... this.
9031         (linux_nat_set_status_is_event): Delete.
9032         (save_stop_reason, linux_nat_wait_1)
9033         (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
9034         low methods.
9035         (linux_nat_set_new_thread, linux_nat_set_delete_thread)
9036         (linux_nat_set_new_fork, linux_nat_set_forget_process)
9037         (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
9038         (linux_nat_set_prepare_to_resume): Delete.
9039         * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
9040         low virtual methods.
9041         * amd64-linux-nat.c: Likewise.
9042         * arm-linux-nat.c: Likewise.
9043         * i386-linux-nat.c: Likewise.
9044         * ia64-linux-nat.c: Likewise.
9045         * mips-linux-nat.c: Likewise.
9046         * ppc-linux-nat.c: Likewise.
9047         * s390-linux-nat.c: Likewise.
9048         * sparc64-linux-nat.c: Likewise.
9049         * x86-linux-nat.c: Likewise.
9050         * x86-linux-nat.h: Include "nat/x86-linux.h".
9051         (x86_linux_nat_target) <low_new_fork, low_forget_process,
9052         low_prepare_to_resume, low_new_thread, low_delete_thread>:
9053         Override methods.
9054
9055 2018-05-02  Pedro Alves  <palves@redhat.com>
9056
9057         * target.h (target_ops)
9058         <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
9059         stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
9060         stopped_by_watchpoint, have_continuable_watchpoint,
9061         stopped_data_address, watchpoint_addr_within_range,
9062         can_accel_watchpoint_condition, can_run, thread_alive,
9063         has_all_memory, has_memory, has_stack, has_registers,
9064         has_execution, can_async_p, is_async_p, supports_non_stop,
9065         always_non_stop_p, can_execute_reverse, supports_multi_process,
9066         supports_enable_disable_tracepoint,
9067         supports_disable_randomization, supports_string_tracing,
9068         supports_evaluation_of_breakpoint_conditions,
9069         can_run_breakpoint_commands, filesystem_is_local,
9070         can_download_tracepoint, get_trace_state_variable_value,
9071         set_trace_notes, get_tib_address, use_agent, can_use_agent,
9072         record_is_replaying, record_will_replay,
9073         augmented_libraries_svr4_read>: Adjust to return bool.
9074         * aarch64-linux-nat.c: All implementations adjusted.
9075         * aix-thread.c: All implementations adjusted.
9076         * arm-linux-nat.c: All implementations adjusted.
9077         * breakpoint.c: All implementations adjusted.
9078         * bsd-kvm.c: All implementations adjusted.
9079         * bsd-uthread.c: All implementations adjusted.
9080         * corelow.c: All implementations adjusted.
9081         * ctf.c: All implementations adjusted.
9082         * darwin-nat.c: All implementations adjusted.
9083         * darwin-nat.h: All implementations adjusted.
9084         * exec.c: All implementations adjusted.
9085         * fbsd-nat.c: All implementations adjusted.
9086         * fbsd-nat.h: All implementations adjusted.
9087         * gnu-nat.c: All implementations adjusted.
9088         * gnu-nat.h: All implementations adjusted.
9089         * go32-nat.c: All implementations adjusted.
9090         * ia64-linux-nat.c: All implementations adjusted.
9091         * inf-child.c: All implementations adjusted.
9092         * inf-child.h: All implementations adjusted.
9093         * inf-ptrace.c: All implementations adjusted.
9094         * inf-ptrace.h: All implementations adjusted.
9095         * linux-nat.c: All implementations adjusted.
9096         * linux-nat.h: All implementations adjusted.
9097         * mips-linux-nat.c: All implementations adjusted.
9098         * nto-procfs.c: All implementations adjusted.
9099         * ppc-linux-nat.c: All implementations adjusted.
9100         * procfs.c: All implementations adjusted.
9101         * ravenscar-thread.c: All implementations adjusted.
9102         * record-btrace.c: All implementations adjusted.
9103         * record-full.c: All implementations adjusted.
9104         * remote-sim.c: All implementations adjusted.
9105         * remote.c: All implementations adjusted.
9106         * s390-linux-nat.c: All implementations adjusted.
9107         * sol-thread.c: All implementations adjusted.
9108         * spu-multiarch.c: All implementations adjusted.
9109         * target-delegates.c: All implementations adjusted.
9110         * target.c: All implementations adjusted.
9111         * target.h: All implementations adjusted.
9112         * tracefile-tfile.c: All implementations adjusted.
9113         * tracefile.c: All implementations adjusted.
9114         * tracefile.h: All implementations adjusted.
9115         * windows-nat.c: All implementations adjusted.
9116         * x86-linux-nat.h: All implementations adjusted.
9117         * x86-nat.h: All implementations adjusted.
9118
9119 2018-05-02  Pedro Alves  <palves@redhat.com>
9120
9121         * make-target-delegates (scan_target_h): Don't trim lines here.
9122         Replace sequences of tabs and/or whitespace with a single
9123         whitespace.
9124         (top level, parsing methods): Trim each line before processing it
9125         here.
9126
9127 2018-05-02  Pedro Alves  <palves@redhat.com>
9128             John Baldwin  <jhb@freebsd.org>
9129
9130         * target.h (enum strata) <debug_stratum>: New.
9131         (struct target_ops) <all delegation methods>: Replace by C++
9132         virtual methods, and drop "to_" prefix.  All references updated
9133         throughout.
9134         <to_shortname, to_longname, to_doc, to_data,
9135         to_have_steppable_watchpoint, to_have_continuable_watchpoint,
9136         to_has_thread_control, to_attach_no_wait>: Delete, replaced by
9137         virtual methods.  All references updated throughout.
9138         <can_attach, supports_terminal_ours, can_create_inferior,
9139         get_thread_control_capabilities, attach_no_wait>: New
9140         virtual methods.
9141         <insert_breakpoint, remove_breakpoint>: Now
9142         TARGET_DEFAULT_NORETURN methods.
9143         <info_proc>: Now returns bool.
9144         <to_magic>: Delete.
9145         (OPS_MAGIC): Delete.
9146         (current_target): Delete.  All references replaced by references
9147         to ...
9148         (target_stack): ... this.  New.
9149         (target_shortname, target_longname): Adjust.
9150         (target_can_run): Now a function declaration.
9151         (default_child_has_all_memory, default_child_has_memory)
9152         (default_child_has_stack, default_child_has_registers)
9153         (default_child_has_execution): Remove target_ops parameter.
9154         (complete_target_initialization): Delete.
9155         (memory_breakpoint_target): New template class.
9156         (test_target_ops): Refactor as a C++ class with virtual methods.
9157         * make-target-delegates (NAME_PART): Tighten.
9158         (POINTER_PART, CP_SYMBOL): New.
9159         (SIMPLE_RETURN_PART): Reimplement.
9160         (VEC_RETURN_PART): Expect less.
9161         (RETURN_PART, VIRTUAL_PART): New.
9162         (METHOD): Adjust to C++ virtual methods.
9163         (scan_target_h): Remove reference to C99.
9164         (dname): Output "target_ops::" prefix.
9165         (write_function_header): Adjust to output a C++ class method.
9166         (write_declaration): New.
9167         (write_delegator): Adjust to output a C++ class method.
9168         (tdname): Output "dummy_target::" prefix.
9169         (write_tdefault, write_debugmethod): Adjust to output a C++ class
9170         method.
9171         (tdefault_names, debug_names): Delete.
9172         (return_types, tdefaults, styles, argtypes_array): New.
9173         (top level): All methods are delegators.
9174         (print_class): New.
9175         (top level): Print dummy_target and debug_target classes.
9176         * target-delegates.c: Regenerate.
9177         * target-debug.h (target_debug_print_enum_info_proc_what)
9178         (target_debug_print_thread_control_capabilities)
9179         (target_debug_print_thread_info_p): New.
9180         * target.c (dummy_target): Delete.
9181         (the_dummy_target, the_debug_target): New.
9182         (target_stack): Now extern.
9183         (set_targetdebug): Push/unpush debug target.
9184         (default_child_has_all_memory, default_child_has_memory)
9185         (default_child_has_stack, default_child_has_registers)
9186         (default_child_has_execution): Remove target_ops parameter.
9187         (complete_target_initialization): Delete.
9188         (add_target_with_completer): No longer call
9189         complete_target_initialization.
9190         (target_supports_terminal_ours): Use regular delegation.
9191         (update_current_target): Delete.
9192         (push_target): No longer check magic number.  Don't call
9193         update_current_target.
9194         (unpush_target): Don't call update_current_target.
9195         (target_is_pushed): No longer check magic number.
9196         (target_require_runnable): Skip for all stratums over
9197         process_stratum.
9198         (target_ops::info_proc): New.
9199         (target_info_proc): Use find_target_at and
9200         find_default_run_target.
9201         (target_supports_disable_randomization): Use regular delegation.
9202         (target_get_osdata): Use find_target_at.
9203         (target_ops::open, target_ops::close, target_ops::can_attach)
9204         (target_ops::attach, target_ops::can_create_inferior)
9205         (target_ops::create_inferior, target_ops::can_run)
9206         (target_can_run): New.
9207         (default_fileio_target): Use regular delegation.
9208         (target_ops::fileio_open, target_ops::fileio_pwrite)
9209         (target_ops::fileio_pread, target_ops::fileio_fstat)
9210         (target_ops::fileio_close, target_ops::fileio_unlink)
9211         (target_ops::fileio_readlink): New.
9212         (target_fileio_open_1, target_fileio_unlink)
9213         (target_fileio_readlink): Always call the target method.  Handle
9214         FILEIO_ENOSYS.
9215         (return_zero, return_zero_has_execution): Delete.
9216         (init_dummy_target): Delete.
9217         (dummy_target::dummy_target, dummy_target::shortname)
9218         (dummy_target::longname, dummy_target::doc)
9219         (debug_target::debug_target, debug_target::shortname)
9220         (debug_target::longname, debug_target::doc): New.
9221         (target_supports_delete_record): Use regular delegation.
9222         (setup_target_debug): Delete.
9223         (maintenance_print_target_stack): Skip debug_stratum.
9224         (initialize_targets): Instantiate the_dummy_target and
9225         the_debug_target.
9226         * auxv.c (target_auxv_parse): Remove 'ops' parameter.  Adjust to
9227         use target_stack.
9228         (target_auxv_search, fprint_target_auxv): Adjust.
9229         (info_auxv_command): Adjust to use target_stack.
9230         * auxv.h (target_auxv_parse): Remove 'ops' parameter.
9231         * exceptions.c (print_flush): Handle a NULL target_stack.
9232         * regcache.c (target_ops_no_register): Refactor as class with
9233         virtual methods.
9234
9235         * exec.c (exec_target): New class.
9236         (exec_ops): Now an exec_target.
9237         (exec_open, exec_close_1, exec_get_section_table)
9238         (exec_xfer_partial, exec_files_info, exec_has_memory)
9239         (exec_make_note_section): Refactor as exec_target methods.
9240         (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
9241         Delete.
9242         (exec_target::find_memory_regions): New.
9243         (_initialize_exec): Don't call init_exec_ops.
9244         * gdbcore.h (exec_file_clear): Delete.
9245
9246         * corefile.c (core_target): Delete.
9247         (core_file_command): Adjust.
9248         * corelow.c (core_target): New class.
9249         (the_core_target): New.
9250         (core_close): Remove target_ops parameter.
9251         (core_close_cleanup): Adjust.
9252         (core_target::close): New.
9253         (core_open, core_detach, get_core_registers, core_files_info)
9254         (core_xfer_partial, core_thread_alive, core_read_description)
9255         (core_pid_to_str, core_thread_name, core_has_memory)
9256         (core_has_stack, core_has_registers, core_info_proc): Rework as
9257         core_target methods.
9258         (ignore, core_remove_breakpoint, init_core_ops): Delete.
9259         (_initialize_corelow): Initialize the_core_target.
9260         * gdbcore.h (core_target): Delete.
9261         (the_core_target): New.
9262
9263         * ctf.c: (ctf_target): New class.
9264         (ctf_ops): Now a ctf_target.
9265         (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
9266         (ctf_xfer_partial, ctf_get_trace_state_variable_value)
9267         (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
9268         methods.
9269         (init_ctf_ops): Delete.
9270         (_initialize_ctf): Don't call it.
9271         * tracefile-tfile.c (tfile_target): New class.
9272         (tfile_ops): Now a tfile_target.
9273         (tfile_open, tfile_close, tfile_files_info)
9274         (tfile_get_tracepoint_status, tfile_trace_find)
9275         (tfile_fetch_registers, tfile_xfer_partial)
9276         (tfile_get_trace_state_variable_value, tfile_traceframe_info):
9277         Refactor as tfile_target methods.
9278         (tfile_xfer_partial_features): Remove target_ops parameter.
9279         (init_tfile_ops): Delete.
9280         (_initialize_tracefile_tfile): Don't call it.
9281         * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
9282         (tracefile_has_stack, tracefile_has_registers)
9283         (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
9284         tracefile_target methods.
9285         (init_tracefile_ops): Delete.
9286         (tracefile_target::tracefile_target): New.
9287         * tracefile.h: Include "target.h".
9288         (tracefile_target): New class.
9289         (init_tracefile_ops): Delete.
9290
9291         * spu-multiarch.c (spu_multiarch_target): New class.
9292         (spu_ops): Now a spu_multiarch_target.
9293         (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
9294         (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
9295         (spu_search_memory, spu_mourn_inferior): Refactor as
9296         spu_multiarch_target methods.
9297         (init_spu_ops): Delete.
9298         (_initialize_spu_multiarch): Remove references to init_spu_ops,
9299         complete_target_initialization.
9300
9301         * ravenscar-thread.c (ravenscar_thread_target): New class.
9302         (ravenscar_ops): Now a ravenscar_thread_target.
9303         (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
9304         (ravenscar_thread_alive, ravenscar_pid_to_str)
9305         (ravenscar_fetch_registers, ravenscar_store_registers)
9306         (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
9307         (ravenscar_stopped_by_hw_breakpoint)
9308         (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
9309         (ravenscar_mourn_inferior, ravenscar_core_of_thread)
9310         (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
9311         methods.
9312         (init_ravenscar_thread_ops): Delete.
9313         (_initialize_ravenscar): Remove references to
9314         init_ravenscar_thread_ops and complete_target_initialization.
9315
9316         * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
9317         (bsd_uthread_target): New class.
9318         (bsd_uthread_ops): Now a bsd_uthread_target.
9319         (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
9320         (bsd_uthread_close, bsd_uthread_mourn_inferior)
9321         (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
9322         (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
9323         (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
9324         (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
9325         (bsd_uthread_target): Delete function.
9326         (_initialize_bsd_uthread): Remove reference to
9327         complete_target_initialization.
9328
9329         * bfd-target.c (target_bfd_data): Delete.  Fields folded into ...
9330         (target_bfd): ... this new class.
9331         (target_bfd_xfer_partial, target_bfd_get_section_table)
9332         (target_bfd_close): Refactor as target_bfd methods.
9333         (target_bfd::~target_bfd): New.
9334         (target_bfd_reopen): Adjust.
9335         (target_bfd::close): New.
9336
9337         * record-btrace.c (record_btrace_target): New class.
9338         (record_btrace_ops): Now a record_btrace_target.
9339         (record_btrace_open, record_btrace_stop_recording)
9340         (record_btrace_disconnect, record_btrace_close)
9341         (record_btrace_async, record_btrace_info)
9342         (record_btrace_insn_history, record_btrace_insn_history_range)
9343         (record_btrace_insn_history_from, record_btrace_call_history)
9344         (record_btrace_call_history_range)
9345         (record_btrace_call_history_from, record_btrace_record_method)
9346         (record_btrace_is_replaying, record_btrace_will_replay)
9347         (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
9348         (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
9349         (record_btrace_store_registers, record_btrace_prepare_to_store)
9350         (record_btrace_to_get_unwinder)
9351         (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
9352         (record_btrace_commit_resume, record_btrace_wait)
9353         (record_btrace_stop, record_btrace_can_execute_reverse)
9354         (record_btrace_stopped_by_sw_breakpoint)
9355         (record_btrace_supports_stopped_by_sw_breakpoint)
9356         (record_btrace_stopped_by_hw_breakpoint)
9357         (record_btrace_supports_stopped_by_hw_breakpoint)
9358         (record_btrace_update_thread_list, record_btrace_thread_alive)
9359         (record_btrace_goto_begin, record_btrace_goto_end)
9360         (record_btrace_goto, record_btrace_stop_replaying_all)
9361         (record_btrace_execution_direction)
9362         (record_btrace_prepare_to_generate_core)
9363         (record_btrace_done_generating_core): Refactor as
9364         record_btrace_target methods.
9365         (init_record_btrace_ops): Delete.
9366         (_initialize_record_btrace): Remove reference to
9367         init_record_btrace_ops.
9368         * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
9369         the execution_direction global.
9370         (record_full_base_target, record_full_target)
9371         (record_full_core_target): New classes.
9372         (record_full_ops): Now a record_full_target.
9373         (record_full_core_ops): Now a record_full_core_target.
9374         (record_full_target::detach, record_full_target::disconnect)
9375         (record_full_core_target::disconnect)
9376         (record_full_target::mourn_inferior, record_full_target::kill):
9377         New.
9378         (record_full_open, record_full_close, record_full_async): Refactor
9379         as methods of the record_full_base_target class.
9380         (record_full_resume, record_full_commit_resume): Refactor
9381         as methods of the record_full_target class.
9382         (record_full_wait, record_full_stopped_by_watchpoint)
9383         (record_full_stopped_data_address)
9384         (record_full_stopped_by_sw_breakpoint)
9385         (record_full_supports_stopped_by_sw_breakpoint)
9386         (record_full_stopped_by_hw_breakpoint)
9387         (record_full_supports_stopped_by_hw_breakpoint): Refactor as
9388         methods of the record_full_base_target class.
9389         (record_full_store_registers, record_full_xfer_partial)
9390         (record_full_insert_breakpoint, record_full_remove_breakpoint):
9391         Refactor as methods of the record_full_target class.
9392         (record_full_can_execute_reverse, record_full_get_bookmark)
9393         (record_full_goto_bookmark, record_full_execution_direction)
9394         (record_full_record_method, record_full_info, record_full_delete)
9395         (record_full_is_replaying, record_full_will_replay)
9396         (record_full_goto_begin, record_full_goto_end, record_full_goto)
9397         (record_full_stop_replaying): Refactor as methods of the
9398         record_full_base_target class.
9399         (record_full_core_resume, record_full_core_kill)
9400         (record_full_core_fetch_registers)
9401         (record_full_core_prepare_to_store)
9402         (record_full_core_store_registers, record_full_core_xfer_partial)
9403         (record_full_core_insert_breakpoint)
9404         (record_full_core_remove_breakpoint)
9405         (record_full_core_has_execution): Refactor
9406         as methods of the record_full_core_target class.
9407         (record_full_base_target::supports_delete_record): New.
9408         (init_record_full_ops): Delete.
9409         (init_record_full_core_ops): Delete.
9410         (record_full_save): Refactor as method of the
9411         record_full_base_target class.
9412         (_initialize_record_full): Remove references to
9413         init_record_full_ops and init_record_full_core_ops.
9414
9415         * remote.c (remote_target, extended_remote_target): New classes.
9416         (remote_ops): Now a remote_target.
9417         (extended_remote_ops): Now an extended_remote_target.
9418         (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
9419         (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
9420         (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
9421         (remote_pass_signals, remote_set_syscall_catchpoint)
9422         (remote_program_signals, )
9423         (remote_thread_always_alive): Remove target_ops parameter.
9424         (remote_thread_alive, remote_thread_name)
9425         (remote_update_thread_list, remote_threads_extra_info)
9426         (remote_static_tracepoint_marker_at)
9427         (remote_static_tracepoint_markers_by_strid)
9428         (remote_get_ada_task_ptid, remote_close, remote_start_remote)
9429         (remote_open): Refactor as methods of remote_target.
9430         (extended_remote_open, extended_remote_detach)
9431         (extended_remote_attach, extended_remote_post_attach):
9432         (extended_remote_supports_disable_randomization)
9433         (extended_remote_create_inferior): : Refactor as method of
9434         extended_remote_target.
9435         (remote_set_permissions, remote_open_1, remote_detach)
9436         (remote_follow_fork, remote_follow_exec, remote_disconnect)
9437         (remote_resume, remote_commit_resume, remote_stop)
9438         (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
9439         (remote_terminal_ours, remote_wait, remote_fetch_registers)
9440         (remote_prepare_to_store, remote_store_registers)
9441         (remote_flash_erase, remote_flash_done, remote_files_info)
9442         (remote_kill, remote_mourn, remote_insert_breakpoint)
9443         (remote_remove_breakpoint, remote_insert_watchpoint)
9444         (remote_watchpoint_addr_within_range)
9445         (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
9446         (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
9447         (remote_supports_stopped_by_sw_breakpoint)
9448         (remote_stopped_by_hw_breakpoint)
9449         (remote_supports_stopped_by_hw_breakpoint)
9450         (remote_stopped_by_watchpoint, remote_stopped_data_address)
9451         (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
9452         (remote_verify_memory): Refactor as methods of remote_target.
9453         (remote_write_qxfer, remote_read_qxfer): Remove target_ops
9454         parameter.
9455         (remote_xfer_partial, remote_get_memory_xfer_limit)
9456         (remote_search_memory, remote_rcmd, remote_memory_map)
9457         (remote_pid_to_str, remote_get_thread_local_address)
9458         (remote_get_tib_address, remote_read_description): Refactor as
9459         methods of remote_target.
9460         (remote_target::fileio_open, remote_target::fileio_pwrite)
9461         (remote_target::fileio_pread, remote_target::fileio_close): New.
9462         (remote_hostio_readlink, remote_hostio_fstat)
9463         (remote_filesystem_is_local, remote_can_execute_reverse)
9464         (remote_supports_non_stop, remote_supports_disable_randomization)
9465         (remote_supports_multi_process, remote_supports_cond_breakpoints)
9466         (remote_supports_enable_disable_tracepoint)
9467         (remote_supports_string_tracing)
9468         (remote_can_run_breakpoint_commands, remote_trace_init)
9469         (remote_download_tracepoint, remote_can_download_tracepoint)
9470         (remote_download_trace_state_variable, remote_enable_tracepoint)
9471         (remote_disable_tracepoint, remote_trace_set_readonly_regions)
9472         (remote_trace_start, remote_get_trace_status)
9473         (remote_get_tracepoint_status, remote_trace_stop)
9474         (remote_trace_find, remote_get_trace_state_variable_value)
9475         (remote_save_trace_data, remote_get_raw_trace_data)
9476         (remote_set_disconnected_tracing, remote_core_of_thread)
9477         (remote_set_circular_trace_buffer, remote_traceframe_info)
9478         (remote_get_min_fast_tracepoint_insn_len)
9479         (remote_set_trace_buffer_size, remote_set_trace_notes)
9480         (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
9481         (remote_disable_btrace, remote_teardown_btrace)
9482         (remote_read_btrace, remote_btrace_conf)
9483         (remote_augmented_libraries_svr4_read, remote_load)
9484         (remote_pid_to_exec_file, remote_can_do_single_step)
9485         (remote_execution_direction, remote_thread_handle_to_thread_info):
9486         Refactor as methods of remote_target.
9487         (init_remote_ops, init_extended_remote_ops): Delete.
9488         (remote_can_async_p, remote_is_async_p, remote_async)
9489         (remote_thread_events, remote_upload_tracepoints)
9490         (remote_upload_trace_state_variables): Refactor as methods of
9491         remote_target.
9492         (_initialize_remote): Remove references to init_remote_ops and
9493         init_extended_remote_ops.
9494
9495         * remote-sim.c (gdbsim_target): New class.
9496         (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
9497         (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
9498         (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
9499         (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
9500         (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
9501         (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
9502         Refactor as methods of gdbsim_target.
9503         (gdbsim_ops): Now a gdbsim_target.
9504         (init_gdbsim_ops): Delete.
9505         (gdbsim_cntrl_c): Adjust.
9506         (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
9507
9508         * amd64-linux-nat.c (amd64_linux_nat_target): New class.
9509         (the_amd64_linux_nat_target): New.
9510         (amd64_linux_fetch_inferior_registers)
9511         (amd64_linux_store_inferior_registers): Refactor as methods of
9512         amd64_linux_nat_target.
9513         (_initialize_amd64_linux_nat): Adjust.  Set linux_target.
9514         * i386-linux-nat.c: Don't include "linux-nat.h".
9515         (i386_linux_nat_target): New class.
9516         (the_i386_linux_nat_target): New.
9517         (i386_linux_fetch_inferior_registers)
9518         (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
9519         as methods of i386_linux_nat_target.
9520         (_initialize_i386_linux_nat): Adjust.  Set linux_target.
9521         * inf-child.c (inf_child_ops): Delete.
9522         (inf_child_fetch_inferior_registers)
9523         (inf_child_store_inferior_registers): Delete.
9524         (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
9525         methods of inf_child_target.
9526         (inf_child_target::supports_terminal_ours)
9527         (inf_child_target::terminal_init)
9528         (inf_child_target::terminal_inferior)
9529         (inf_child_target::terminal_ours_for_output)
9530         (inf_child_target::terminal_ours, inf_child_target::interrupt)
9531         (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
9532         New.
9533         (inf_child_open, inf_child_disconnect, inf_child_close)
9534         (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
9535         (inf_child_post_startup_inferior, inf_child_can_run)
9536         (inf_child_pid_to_exec_file): Refactor as methods of
9537         inf_child_target.
9538         (inf_child_follow_fork): Delete.
9539         (inf_child_target::can_create_inferior)
9540         (inf_child_target::can_attach): New.
9541         (inf_child_target::has_all_memory, inf_child_target::has_memory)
9542         (inf_child_target::has_stack, inf_child_target::has_registers)
9543         (inf_child_target::has_execution): New.
9544         (inf_child_fileio_open, inf_child_fileio_pwrite)
9545         (inf_child_fileio_pread, inf_child_fileio_fstat)
9546         (inf_child_fileio_close, inf_child_fileio_unlink)
9547         (inf_child_fileio_readlink, inf_child_use_agent)
9548         (inf_child_can_use_agent): Refactor as methods of
9549         inf_child_target.
9550         (return_zero, inf_child_target): Delete.
9551         (inf_child_target::inf_child_target): New.
9552         * inf-child.h: Include "target.h".
9553         (inf_child_target): Delete function prototype.
9554         (inf_child_target): New class.
9555         (inf_child_open_target, inf_child_mourn_inferior)
9556         (inf_child_maybe_unpush_target): Delete.
9557         * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
9558         (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
9559         (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
9560         (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
9561         (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
9562         (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
9563         (inf_ptrace_wait, inf_ptrace_xfer_partial)
9564         (inf_ptrace_thread_alive, inf_ptrace_files_info)
9565         (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
9566         methods of inf_ptrace_target.
9567         (inf_ptrace_target): Delete function.
9568         * inf-ptrace.h: Include "inf-child.h".
9569         (inf_ptrace_target): Delete function declaration.
9570         (inf_ptrace_target): New class.
9571         (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
9572         * linux-nat.c (linux_target): New.
9573         (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
9574         (linux_nat_target::~linux_nat_target): New.
9575         (linux_child_post_attach, linux_child_post_startup_inferior)
9576         (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
9577         (linux_child_remove_fork_catchpoint)
9578         (linux_child_insert_vfork_catchpoint)
9579         (linux_child_remove_vfork_catchpoint)
9580         (linux_child_insert_exec_catchpoint)
9581         (linux_child_remove_exec_catchpoint)
9582         (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
9583         (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
9584         (linux_nat_resume, linux_nat_stopped_by_watchpoint)
9585         (linux_nat_stopped_data_address)
9586         (linux_nat_stopped_by_sw_breakpoint)
9587         (linux_nat_supports_stopped_by_sw_breakpoint)
9588         (linux_nat_stopped_by_hw_breakpoint)
9589         (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
9590         (linux_nat_kill, linux_nat_mourn_inferior)
9591         (linux_nat_xfer_partial, linux_nat_thread_alive)
9592         (linux_nat_update_thread_list, linux_nat_pid_to_str)
9593         (linux_nat_thread_name, linux_child_pid_to_exec_file)
9594         (linux_child_static_tracepoint_markers_by_strid)
9595         (linux_nat_is_async_p, linux_nat_can_async_p)
9596         (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
9597         (linux_nat_supports_multi_process)
9598         (linux_nat_supports_disable_randomization, linux_nat_async)
9599         (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
9600         (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
9601         (linux_nat_fileio_open, linux_nat_fileio_readlink)
9602         (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
9603         methods of linux_nat_target.
9604         (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
9605         (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
9606         parameter.
9607         (check_stopped_by_watchpoint): Adjust.
9608         (linux_xfer_partial): Delete.
9609         (linux_target_install_ops, linux_target, linux_nat_add_target):
9610         Delete.
9611         (linux_nat_target::linux_nat_target): New.
9612         * linux-nat.h: Include "inf-ptrace.h".
9613         (linux_nat_target): New.
9614         (linux_target, linux_target_install_ops, linux_nat_add_target):
9615         Delete function declarations.
9616         (linux_target): Declare global.
9617         * linux-thread-db.c (thread_db_target): New.
9618         (thread_db_target::thread_db_target): New.
9619         (thread_db_ops): Delete.
9620         (the_thread_db_target): New.
9621         (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
9622         (thread_db_update_thread_list, thread_db_pid_to_str)
9623         (thread_db_extra_thread_info)
9624         (thread_db_thread_handle_to_thread_info)
9625         (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
9626         (thread_db_resume): Refactor as methods of thread_db_target.
9627         (init_thread_db_ops): Delete.
9628         (_initialize_thread_db): Remove reference to init_thread_db_ops.
9629         * x86-linux-nat.c: Don't include "linux-nat.h".
9630         (super_post_startup_inferior): Delete.
9631         (x86_linux_nat_target::~x86_linux_nat_target): New.
9632         (x86_linux_child_post_startup_inferior)
9633         (x86_linux_read_description, x86_linux_enable_btrace)
9634         (x86_linux_disable_btrace, x86_linux_teardown_btrace)
9635         (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
9636         methods of x86_linux_nat_target.
9637         (x86_linux_create_target): Delete.  Bits folded ...
9638         (x86_linux_add_target): ... here.  Now takes a linux_nat_target
9639         pointer.
9640         * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
9641         (x86_linux_nat_target): New class.
9642         (x86_linux_create_target): Delete.
9643         (x86_linux_add_target): Now takes a linux_nat_target pointer.
9644         * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
9645         (x86_region_ok_for_watchpoint, x86_stopped_data_address)
9646         (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
9647         (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
9648         (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
9649         make extern.
9650         (x86_use_watchpoints): Delete.
9651         * x86-nat.h: Include "breakpoint.h" and "target.h".
9652         (x86_use_watchpoints): Delete.
9653         (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
9654         (x86_stopped_by_watchpoint, x86_stopped_data_address)
9655         (x86_insert_watchpoint, x86_remove_watchpoint)
9656         (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
9657         (x86_stopped_by_hw_breakpoint): New declarations.
9658         (x86_nat_target): New template class.
9659
9660         * ppc-linux-nat.c (ppc_linux_nat_target): New class.
9661         (the_ppc_linux_nat_target): New.
9662         (ppc_linux_fetch_inferior_registers)
9663         (ppc_linux_can_use_hw_breakpoint)
9664         (ppc_linux_region_ok_for_hw_watchpoint)
9665         (ppc_linux_ranged_break_num_registers)
9666         (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
9667         (ppc_linux_insert_mask_watchpoint)
9668         (ppc_linux_remove_mask_watchpoint)
9669         (ppc_linux_can_accel_watchpoint_condition)
9670         (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
9671         (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
9672         (ppc_linux_watchpoint_addr_within_range)
9673         (ppc_linux_masked_watch_num_registers)
9674         (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
9675         (ppc_linux_read_description): Refactor as methods of
9676         ppc_linux_nat_target.
9677         (_initialize_ppc_linux_nat): Adjust.  Set linux_target.
9678
9679         * procfs.c (procfs_xfer_partial): Delete forward declaration.
9680         (procfs_target): New class.
9681         (the_procfs_target): New.
9682         (procfs_target): Delete function.
9683         (procfs_auxv_parse, procfs_attach, procfs_detach)
9684         (procfs_fetch_registers, procfs_store_registers, procfs_wait)
9685         (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
9686         (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
9687         (procfs_create_inferior, procfs_update_thread_list)
9688         (procfs_thread_alive, procfs_pid_to_str)
9689         (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
9690         (procfs_stopped_data_address, procfs_insert_watchpoint)
9691         (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
9692         (proc_find_memory_regions, procfs_info_proc)
9693         (procfs_make_note_section): Refactor as methods of procfs_target.
9694         (_initialize_procfs): Adjust.
9695         * sol-thread.c (sol_thread_target): New class.
9696         (sol_thread_ops): Now a sol_thread_target.
9697         (sol_thread_detach, sol_thread_resume, sol_thread_wait)
9698         (sol_thread_fetch_registers, sol_thread_store_registers)
9699         (sol_thread_xfer_partial, sol_thread_mourn_inferior)
9700         (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
9701         (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
9702         (init_sol_thread_ops): Delete.
9703         (_initialize_sol_thread): Adjust.  Remove references to
9704         init_sol_thread_ops and complete_target_initialization.
9705
9706         * windows-nat.c (windows_nat_target): New class.
9707         (windows_fetch_inferior_registers)
9708         (windows_store_inferior_registers, windows_resume, windows_wait)
9709         (windows_attach, windows_detach, windows_pid_to_exec_file)
9710         (windows_files_info, windows_create_inferior)
9711         (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
9712         (windows_close, windows_pid_to_str, windows_xfer_partial)
9713         (windows_get_tib_address, windows_get_ada_task_ptid)
9714         (windows_thread_name, windows_thread_alive): Refactor as
9715         windows_nat_target methods.
9716         (do_initial_windows_stuff): Adjust.
9717         (windows_target): Delete function.
9718         (_initialize_windows_nat): Adjust.
9719
9720         * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
9721         (darwin_mourn_inferior, darwin_kill_inferior)
9722         (darwin_create_inferior, darwin_attach, darwin_detach)
9723         (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
9724         (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
9725         (darwin_supports_multi_process): Refactor as darwin_nat_target
9726         methods.
9727         (darwin_resume_to, darwin_files_info): Delete.
9728         (_initialize_darwin_inferior): Rename to ...
9729         (_initialize_darwin_nat): ... this.  Adjust to C++ification.
9730         * darwin-nat.h: Include "inf-child.h".
9731         (darwin_nat_target): New class.
9732         (darwin_complete_target): Delete.
9733         * i386-darwin-nat.c (i386_darwin_nat_target): New class.
9734         (darwin_target): New.
9735         (i386_darwin_fetch_inferior_registers)
9736         (i386_darwin_store_inferior_registers): Refactor as methods of
9737         darwin_nat_target.
9738         (darwin_complete_target): Delete, with ...
9739         (_initialize_i386_darwin_nat): ... bits factored out here.
9740
9741         * alpha-linux-nat.c (alpha_linux_nat_target): New class.
9742         (the_alpha_linux_nat_target): New.
9743         (alpha_linux_register_u_offset): Refactor as
9744         alpha_linux_nat_target method.
9745         (_initialize_alpha_linux_nat): Adjust.
9746         * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
9747         (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
9748         (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
9749         methods of linux_nat_trad_target.
9750         (linux_trad_target): Delete.
9751         * linux-nat-trad.h (linux_trad_target): Delete function.
9752         (linux_nat_trad_target): New class.
9753         * mips-linux-nat.c (mips_linux_nat_target): New class.
9754         (super_fetch_registers, super_store_registers, super_close):
9755         Delete.
9756         (the_mips_linux_nat_target): New.
9757         (mips64_linux_regsets_fetch_registers)
9758         (mips64_linux_regsets_store_registers)
9759         (mips64_linux_fetch_registers, mips64_linux_store_registers)
9760         (mips_linux_register_u_offset, mips_linux_read_description)
9761         (mips_linux_can_use_hw_breakpoint)
9762         (mips_linux_stopped_by_watchpoint)
9763         (mips_linux_stopped_data_address)
9764         (mips_linux_region_ok_for_hw_watchpoint)
9765         (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
9766         (mips_linux_close): Refactor as methods of mips_linux_nat.
9767         (_initialize_mips_linux_nat): Adjust to C++ification.
9768
9769         * aix-thread.c (aix_thread_target): New class.
9770         (aix_thread_ops): Now an aix_thread_target.
9771         (aix_thread_detach, aix_thread_resume, aix_thread_wait)
9772         (aix_thread_fetch_registers, aix_thread_store_registers)
9773         (aix_thread_xfer_partial, aix_thread_mourn_inferior)
9774         (aix_thread_thread_alive, aix_thread_pid_to_str)
9775         (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
9776         Refactor as methods of aix_thread_target.
9777         (init_aix_thread_ops): Delete.
9778         (_initialize_aix_thread): Remove references to init_aix_thread_ops
9779         and complete_target_initialization.
9780         * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
9781         (rs6000_nat_target): New class.
9782         (the_rs6000_nat_target): New.
9783         (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
9784         (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
9785         (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
9786         (super_create_inferior): Delete.
9787         (_initialize_rs6000_nat): Adjust to C++ification.
9788
9789         * arm-linux-nat.c (arm_linux_nat_target): New class.
9790         (the_arm_linux_nat_target): New.
9791         (arm_linux_fetch_inferior_registers)
9792         (arm_linux_store_inferior_registers, arm_linux_read_description)
9793         (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
9794         (arm_linux_remove_hw_breakpoint)
9795         (arm_linux_region_ok_for_hw_watchpoint)
9796         (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
9797         (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
9798         (arm_linux_watchpoint_addr_within_range): Refactor as methods of
9799         arm_linux_nat_target.
9800         (_initialize_arm_linux_nat): Adjust to C++ification.
9801
9802         * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
9803         (the_aarch64_linux_nat_target): New.
9804         (aarch64_linux_fetch_inferior_registers)
9805         (aarch64_linux_store_inferior_registers)
9806         (aarch64_linux_child_post_startup_inferior)
9807         (aarch64_linux_read_description)
9808         (aarch64_linux_can_use_hw_breakpoint)
9809         (aarch64_linux_insert_hw_breakpoint)
9810         (aarch64_linux_remove_hw_breakpoint)
9811         (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
9812         (aarch64_linux_region_ok_for_hw_watchpoint)
9813         (aarch64_linux_stopped_data_address)
9814         (aarch64_linux_stopped_by_watchpoint)
9815         (aarch64_linux_watchpoint_addr_within_range)
9816         (aarch64_linux_can_do_single_step): Refactor as methods of
9817         aarch64_linux_nat_target.
9818         (super_post_startup_inferior): Delete.
9819         (_initialize_aarch64_linux_nat): Adjust to C++ification.
9820
9821         * hppa-linux-nat.c (hppa_linux_nat_target): New class.
9822         (the_hppa_linux_nat_target): New.
9823         (hppa_linux_fetch_inferior_registers)
9824         (hppa_linux_store_inferior_registers): Refactor as methods of
9825         hppa_linux_nat_target.
9826         (_initialize_hppa_linux_nat): Adjust to C++ification.
9827
9828         * ia64-linux-nat.c (ia64_linux_nat_target): New class.
9829         (the_ia64_linux_nat_target): New.
9830         (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
9831         (ia64_linux_stopped_data_address)
9832         (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
9833         (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
9834         ia64_linux_nat_target methods.
9835         (super_xfer_partial): Delete.
9836         (_initialize_ia64_linux_nat): Adjust to C++ification.
9837
9838         * m32r-linux-nat.c (m32r_linux_nat_target): New class.
9839         (the_m32r_linux_nat_target): New.
9840         (m32r_linux_fetch_inferior_registers)
9841         (m32r_linux_store_inferior_registers): Refactor as
9842         m32r_linux_nat_target methods.
9843         (_initialize_m32r_linux_nat): Adjust to C++ification.
9844
9845         * m68k-linux-nat.c (m68k_linux_nat_target): New class.
9846         (the_m68k_linux_nat_target): New.
9847         (m68k_linux_fetch_inferior_registers)
9848         (m68k_linux_store_inferior_registers): Refactor as
9849         m68k_linux_nat_target methods.
9850         (_initialize_m68k_linux_nat): Adjust to C++ification.
9851
9852         * s390-linux-nat.c (s390_linux_nat_target): New class.
9853         (the_s390_linux_nat_target): New.
9854         (s390_linux_fetch_inferior_registers)
9855         (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
9856         (s390_insert_watchpoint, s390_remove_watchpoint)
9857         (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
9858         (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
9859         (s390_auxv_parse, s390_read_description): Refactor as methods of
9860         s390_linux_nat_target.
9861         (_initialize_s390_nat): Adjust to C++ification.
9862
9863         * sparc-linux-nat.c (sparc_linux_nat_target): New class.
9864         (the_sparc_linux_nat_target): New.
9865         (_initialize_sparc_linux_nat): Adjust to C++ification.
9866         * sparc-nat.c (sparc_fetch_inferior_registers)
9867         (sparc_store_inferior_registers): Remove target_ops parameter.
9868         * sparc-nat.h (sparc_fetch_inferior_registers)
9869         (sparc_store_inferior_registers): Remove target_ops parameter.
9870         * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
9871         (the_sparc64_linux_nat_target): New.
9872         (_initialize_sparc64_linux_nat): Adjust to C++ification.
9873
9874         * spu-linux-nat.c (spu_linux_nat_target): New class.
9875         (the_spu_linux_nat_target): New.
9876         (spu_child_post_startup_inferior, spu_child_post_attach)
9877         (spu_child_wait, spu_fetch_inferior_registers)
9878         (spu_store_inferior_registers, spu_xfer_partial)
9879         (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
9880         methods.
9881         (_initialize_spu_nat): Adjust to C++ification.
9882
9883         * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
9884         (the_tilegx_linux_nat_target): New.
9885         (fetch_inferior_registers, store_inferior_registers):
9886         Refactor as methods.
9887         (_initialize_tile_linux_nat): Adjust to C++ification.
9888
9889         * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
9890         (the_xtensa_linux_nat_target): New.
9891         (xtensa_linux_fetch_inferior_registers)
9892         (xtensa_linux_store_inferior_registers): Refactor as
9893         xtensa_linux_nat_target methods.
9894         (_initialize_xtensa_linux_nat): Adjust to C++ification.
9895
9896         * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
9897         (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
9898         (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
9899         (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
9900         (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
9901         (fbsd_stopped_by_sw_breakpoint)
9902         (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
9903         (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
9904         (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
9905         (fbsd_post_startup_inferior, fbsd_post_attach)
9906         (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
9907         (fbsd_set_syscall_catchpoint)
9908         (super_xfer_partial, super_resume, super_wait)
9909         (fbsd_supports_stopped_by_hw_breakpoint): Delete.
9910         (fbsd_handle_debug_trap): Remove target_ops parameter.
9911         (fbsd_nat_add_target): Delete.
9912         * fbsd-nat.h: Include "inf-ptrace.h".
9913         (fbsd_nat_add_target): Delete.
9914         (USE_SIGTRAP_SIGINFO): Define.
9915         (fbsd_nat_target): New class.
9916
9917         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
9918         (amd64bsd_store_inferior_registers): Remove target_ops parameter.
9919         (amd64bsd_target): Delete.
9920         * amd64-bsd-nat.h: New file.
9921         * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
9922         "x86-bsd-nat.h".
9923         (amd64_fbsd_nat_target): New class.
9924         (the_amd64_fbsd_nat_target): New.
9925         (amd64fbsd_read_description): Refactor as method of
9926         amd64_fbsd_nat_target.
9927         (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
9928         (_initialize_amd64fbsd_nat): Adjust to C++ification.
9929         * amd64-nat.h (amd64bsd_target): Delete function declaration.
9930         * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
9931         (i386bsd_store_inferior_registers): Remove target_ops parameter.
9932         (i386bsd_target): Delete.
9933         * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
9934         (i386bsd_fetch_inferior_registers)
9935         (i386bsd_store_inferior_registers): Declare.
9936         (i386_bsd_nat_target): New class.
9937         * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
9938         (the_i386_fbsd_nat_target): New.
9939         (i386fbsd_resume, i386fbsd_read_description): Refactor as
9940         i386_fbsd_nat_target methods.
9941         (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
9942         (_initialize_i386fbsd_nat): Adjust to C++ification.
9943         * x86-bsd-nat.c (super_mourn_inferior): Delete.
9944         (x86bsd_mourn_inferior, x86bsd_target): Delete.
9945         (_initialize_x86_bsd_nat): Adjust to C++ification.
9946         * x86-bsd-nat.h: Include "x86-nat.h".
9947         (x86bsd_target): Delete declaration.
9948         (x86bsd_nat_target): New class.
9949
9950         * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
9951         (the_aarch64_fbsd_nat_target): New.
9952         (aarch64_fbsd_fetch_inferior_registers)
9953         (aarch64_fbsd_store_inferior_registers): Refactor as methods of
9954         aarch64_fbsd_nat_target.
9955         (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
9956         * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
9957         (the_alpha_bsd_nat_target): New.
9958         (alphabsd_fetch_inferior_registers)
9959         (alphabsd_store_inferior_registers): Refactor as
9960         alpha_bsd_nat_target methods.
9961         (_initialize_alphabsd_nat): Refactor as methods of
9962         alpha_bsd_nat_target.
9963         * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
9964         (the_amd64_nbsd_nat_target): New.
9965         (_initialize_amd64nbsd_nat): Adjust to C++ification.
9966         * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
9967         (the_amd64_obsd_nat_target): New.
9968         (_initialize_amd64obsd_nat): Adjust to C++ification.
9969         * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
9970         (the_arm_fbsd_nat_target): New.
9971         (arm_fbsd_fetch_inferior_registers)
9972         (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
9973         (_initialize_arm_fbsd_nat): Refactor as methods of
9974         arm_fbsd_nat_target.
9975         (_initialize_arm_fbsd_nat): Adjust to C++ification.
9976         * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
9977         (the_arm_netbsd_nat_target): New.
9978         (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
9979         arm_netbsd_nat_target.
9980         (_initialize_arm_netbsd_nat): Adjust to C++ification.
9981         * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
9982         (the_hppa_nbsd_nat_target): New.
9983         (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
9984         hppa_nbsd_nat_target methods.
9985         (_initialize_hppanbsd_nat): Adjust to C++ification.
9986         * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
9987         (the_hppa_obsd_nat_target): New.
9988         (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
9989         methods of hppa_obsd_nat_target.
9990         (_initialize_hppaobsd_nat): Adjust to C++ification.  Use
9991         add_target.
9992         * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
9993         (_initialize_i386nbsd_nat): Adjust to C++ification.  Use
9994         add_target.
9995         * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
9996         (_initialize_i386obsd_nat): Use add_target.
9997         * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
9998         (the_m68k_bsd_nat_target): New.
9999         (m68kbsd_fetch_inferior_registers)
10000         (m68kbsd_store_inferior_registers): Refactor as methods of
10001         m68k_bsd_nat_target.
10002         (_initialize_m68kbsd_nat): Adjust to C++ification.
10003         * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
10004         (the_mips_fbsd_nat_target): New.
10005         (mips_fbsd_fetch_inferior_registers)
10006         (mips_fbsd_store_inferior_registers): Refactor as methods of
10007         mips_fbsd_nat_target.
10008         (_initialize_mips_fbsd_nat): Adjust to C++ification.  Use
10009         add_target.
10010         * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
10011         (the_mips_nbsd_nat_target): New.
10012         (mipsnbsd_fetch_inferior_registers)
10013         (mipsnbsd_store_inferior_registers): Refactor as methods of
10014         mips_nbsd_nat_target.
10015         (_initialize_mipsnbsd_nat): Adjust to C++ification.
10016         * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
10017         (the_mips64_obsd_nat_target): New.
10018         (mips64obsd_fetch_inferior_registers)
10019         (mips64obsd_store_inferior_registers): Refactor as methods of
10020         mips64_obsd_nat_target.
10021         (_initialize_mips64obsd_nat): Adjust to C++ification.  Use
10022         add_target.
10023         * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
10024         nbsd_nat_target.
10025         * nbsd-nat.h: Include "inf-ptrace.h".
10026         (nbsd_nat_target): New class.
10027         * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
10028         (obsd_wait): Refactor as methods of obsd_nat_target.
10029         (obsd_add_target): Delete.
10030         * obsd-nat.h: Include "inf-ptrace.h".
10031         (obsd_nat_target): New class.
10032         * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
10033         (the_ppc_fbsd_nat_target): New.
10034         (ppcfbsd_fetch_inferior_registers)
10035         (ppcfbsd_store_inferior_registers): Refactor as methods of
10036         ppc_fbsd_nat_target.
10037         (_initialize_ppcfbsd_nat): Adjust to C++ification.  Use
10038         add_target.
10039         * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
10040         (the_ppc_nbsd_nat_target): New.
10041         (ppcnbsd_fetch_inferior_registers)
10042         (ppcnbsd_store_inferior_registers): Refactor as methods of
10043         ppc_nbsd_nat_target.
10044         (_initialize_ppcnbsd_nat): Adjust to C++ification.
10045         * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
10046         (the_ppc_obsd_nat_target): New.
10047         (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
10048         methods of ppc_obsd_nat_target.
10049         (_initialize_ppcobsd_nat): Adjust to C++ification.  Use
10050         add_target.
10051         * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
10052         (the_sh_nbsd_nat_target): New.
10053         (shnbsd_fetch_inferior_registers)
10054         (shnbsd_store_inferior_registers): Refactor as methods of
10055         sh_nbsd_nat_target.
10056         (_initialize_shnbsd_nat): Adjust to C++ification.
10057         * sparc-nat.c (sparc_xfer_wcookie): Make extern.
10058         (inf_ptrace_xfer_partial): Delete.
10059         (sparc_xfer_partial, sparc_target): Delete.
10060         * sparc-nat.h (sparc_fetch_inferior_registers)
10061         (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
10062         (sparc_target): Delete function declaration.
10063         (sparc_target): New template class.
10064         * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
10065         (_initialize_sparcnbsd_nat): Adjust to C++ification.
10066         * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
10067         (_initialize_sparc64fbsd_nat): Adjust to C++ification.  Use
10068         add_target.
10069         * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
10070         (_initialize_sparc64nbsd_nat): Adjust to C++ification.
10071         * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
10072         (_initialize_sparc64obsd_nat): Adjust to C++ification.  Use
10073         add_target.
10074         * vax-bsd-nat.c (vax_bsd_nat_target): New class.
10075         (the_vax_bsd_nat_target): New.
10076         (vaxbsd_fetch_inferior_registers)
10077         (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
10078         methods.
10079         (_initialize_vaxbsd_nat): Adjust to C++ification.
10080
10081         * bsd-kvm.c (bsd_kvm_target): New class.
10082         (bsd_kvm_ops): Now a bsd_kvm_target.
10083         (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
10084         (bsd_kvm_files_info, bsd_kvm_fetch_registers)
10085         (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
10086         bsd_kvm_target.
10087         (bsd_kvm_return_one): Delete.
10088         (bsd_kvm_add_target): Adjust to C++ification.
10089
10090         * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
10091         (nto_procfs_target_procfs): New classes.
10092         (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
10093         (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
10094         (procfs_post_attach, procfs_wait, procfs_fetch_registers)
10095         (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
10096         (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
10097         (procfs_remove_hw_breakpoint, procfs_resume)
10098         (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
10099         (procfs_kill_inferior, procfs_store_registers)
10100         (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
10101         as methods of nto_procfs_target.
10102         (nto_procfs_ops): Now an nto_procfs_target_procfs.
10103         (nto_native_ops): Delete.
10104         (procfs_open, procfs_native_open): Delete.
10105         (nto_native_ops): Now an nto_procfs_target_native.
10106         (init_procfs_targets): Adjust to C++ification.
10107         (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
10108         (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
10109         Refactor as methods of nto_procfs_target.
10110
10111         * go32-nat.c (go32_nat_target): New class.
10112         (the_go32_nat_target): New.
10113         (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
10114         (go32_store_registers, go32_xfer_partial, go32_files_info)
10115         (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
10116         (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
10117         (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
10118         (go32_pid_to_str): Refactor as methods of go32_nat_target.
10119         (go32_target): Delete.
10120         (_initialize_go32_nat): Adjust to C++ification.
10121
10122         * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
10123         (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
10124         (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
10125         (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
10126         gnu_nat_target.
10127         (gnu_target): Delete.
10128         * gnu-nat.h (gnu_target): Delete.
10129         (gnu_nat_target): New class.
10130         * i386-gnu-nat.c (gnu_base_target): New.
10131         (i386_gnu_nat_target): New class.
10132         (the_i386_gnu_nat_target): New.
10133         (_initialize_i386gnu_nat): Adjust to C++ification.
10134
10135 2018-05-02  Pedro Alves  <palves@redhat.com>
10136
10137         * bfd-target.c (target_bfd_xclose): Rename to ...
10138         (target_bfd_close): ... this.
10139         (target_bfd_reopen): Adjust.
10140         * target.c (target_close): Remove references to to_xclose.
10141         * target.h (target_ops::to_xclose): Delete.
10142         (target_ops::to_close): Update comments.
10143
10144 2018-05-02  Pedro Alves  <palves@redhat.com>
10145
10146         * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
10147         "linux-nat.h".
10148         * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
10149         * inf-ptrace.c (inf_ptrace_register_u_offset)
10150         (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
10151         (inf_ptrace_store_register, inf_ptrace_store_registers)
10152         (inf_ptrace_trad_target): Move to ...
10153         * linux-nat-trad.c: ... this new file.
10154         * linux-nat-trad.h: New file.
10155         * linux-nat.c (linux_target_install_ops): Make extern.
10156         (linux_trad_target): Delete.
10157         * linux-nat.h (linux_trad_target): Delete declaration.
10158         (linux_target_install_ops): Declare.
10159         * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
10160         "linux-nat.h".
10161
10162 2018-05-02  Pedro Alves  <palves@redhat.com>
10163
10164         * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
10165         procfs_target/add_target here.
10166         * procfs.c (procfs_target): Make static.
10167         (_initialize_procfs): Call add_target here.
10168         * procfs.h (struct target_ops): Remove forward declaration.
10169         (procfs_target): Remove declaration.
10170         * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
10171
10172 2018-05-02  Pedro Alves  <palves@redhat.com>
10173
10174         * procfs.c (procfs_stopped_by_watchpoint)
10175         (procfs_insert_watchpoint, procfs_remove_watchpoint)
10176         (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
10177         Forward declare.
10178         (procfs_use_watchpoints): Delete, move contents...
10179         (procfs_target): ... here.
10180         * procfs.h (procfs_use_watchpoints): Delete declaration.
10181         * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
10182         procfs_use_watchpoints.
10183         * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
10184         procfs_use_watchpoints.
10185
10186 2018-05-02  Tom Tromey  <tom@tromey.com>
10187
10188         PR python/20084:
10189         * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
10190         and var_zuinteger_unlimited.
10191         * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
10192         and PARAM_ZUINTEGER_UNLIMITED.
10193         (set_parameter_value): Handle var_zuinteger and
10194         var_zuinteger_unlimited.
10195         (add_setshow_generic): Likewise.
10196         (parmpy_init): Likewise.
10197
10198 2018-04-28  Dan Robertson  <danlrobertson89@gmail.com>
10199
10200         PR rust/23124
10201         * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
10202         pointer is not null before dereferencing it.
10203
10204 2018-04-30  Tom Tromey  <tom@tromey.com>
10205
10206         * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
10207         is_mi_like_p.
10208
10209 2018-04-30  Tom Tromey  <tom@tromey.com>
10210
10211         * breakpoint.c (mention): Remove use of is_mi_like_p.
10212         (print_mention_ranged_breakpoint): Likewise.
10213         * break-catch-throw.c (print_it_exception_catchpoint): Remove use
10214         of is_mi_like_p.
10215
10216 2018-04-30  Tom Tromey  <tom@tromey.com>
10217
10218         * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
10219
10220 2018-04-30  Tom Tromey  <tom@tromey.com>
10221
10222         * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
10223         (info_spu_event_command): Remove some uses of is_mi_like_p.
10224
10225 2018-04-30  Tom Tromey  <tom@tromey.com>
10226
10227         * python/py-framefilter.c (py_print_single_arg)
10228         (enumerate_locals, py_print_args, py_print_frame): Remove some
10229         uses of is_mi_like_p.
10230
10231 2018-04-30  Tom Tromey  <tom@tromey.com>
10232
10233         * ui-out.c: Update.
10234         * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
10235         * ui-out.h (ui_out::is_mi_like_p): Now const.
10236         (ui_out::do_is_mi_like_p): Now const.
10237         * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
10238
10239 2018-04-30  Tom Tromey  <tom@tromey.com>
10240
10241         * varobj.c (varobj_set_visualizer): Use new_reference.
10242         * python/python.c (gdbpy_decode_line): Use new_reference.
10243         * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
10244         new_reference.
10245
10246 2018-04-30  Tom Tromey  <tom@tromey.com>
10247
10248         * varobj.c (install_new_value): Use new_reference.
10249         * value.h (value_incref): Return void.  Swap intro comment with
10250         value_decref.
10251         * value.c (set_value_parent): Use new_reference.
10252         (value_incref): Return void.  Update intro comment.
10253         (release_value): Use new_reference.
10254         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
10255
10256 2018-04-30  Tom Tromey  <tom@tromey.com>
10257
10258         * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
10259         * gdb_bfd.h (new_bfd_ref): Remove.
10260         (gdb_bfd_open): Update comment.
10261         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
10262         (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
10263         (gdb_bfd_fdopenr): Use new_reference.
10264         * exec.c (exec_file_attach): Use new_reference.
10265
10266 2018-04-30  Tom Tromey  <tom@tromey.com>
10267
10268         * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
10269         method.
10270
10271 2018-04-30  Tom Tromey  <tom@tromey.com>
10272
10273         * jit.c (jit_read_code_entry): Use type_align.
10274         * i386-tdep.c (i386_gdbarch_init): Don't call
10275         set_gdbarch_long_long_align_bit.
10276         * gdbarch.sh: Remove long_long_align_bit.
10277         * gdbarch.c, gdbarch.h: Rebuild.
10278         * arc-tdep.c (arc_type_align): New function.
10279         (arc_gdbarch_init): Use arc_type_align.  Don't call
10280         set_gdbarch_long_long_align_bit.
10281
10282 2018-04-30  Tom Tromey  <tom@tromey.com>
10283
10284         * rust-lang.c (rust_type_alignment): Remove.
10285         (rust_composite_type): Use type_align.
10286
10287 2018-04-30  Tom Tromey  <tom@tromey.com>
10288
10289         * NEWS: Mention Type.align.
10290         * python/py-type.c (typy_get_alignof): New function.
10291         (type_object_getset): Add "alignof".
10292
10293 2018-04-30  Tom Tromey  <tom@tromey.com>
10294
10295         PR exp/17095:
10296         * NEWS: Update.
10297         * std-operator.def (UNOP_ALIGNOF): New operator.
10298         * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
10299         New.
10300         * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
10301         * c-lang.c (c_op_print_tab): Add alignof.
10302         * c-exp.y (ALIGNOF): New token.
10303         (exp): Add "ALIGNOF" production.
10304         (ident_tokens): Add _Alignof and alignof.
10305
10306 2018-04-30  Tom Tromey  <tom@tromey.com>
10307
10308         * i386-tdep.c (i386_type_align): New function.
10309         (i386_gdbarch_init): Update.
10310         * gdbarch.sh (type_align): New method.
10311         * gdbarch.c, gdbarch.h: Rebuild.
10312         * arch-utils.h (default_type_align): Declare.
10313         * arch-utils.c (default_type_align): New function.
10314         * gdbtypes.h (TYPE_ALIGN_BITS): New define.
10315         (struct type) <align_log2>: New field.
10316         <instance_flags>: Now a bitfield.
10317         (TYPE_RAW_ALIGN): New macro.
10318         (type_align, type_raw_align, set_type_align): Declare.
10319         * gdbtypes.c (type_align, type_raw_align, set_type_align): New
10320         functions.
10321         * dwarf2read.c (quirk_rust_enum): Set type alignment.
10322         (get_alignment, maybe_set_alignment): New functions.
10323         (read_structure_type, read_enumeration_type, read_array_type)
10324         (read_set_type, read_tag_pointer_type, read_tag_reference_type)
10325         (read_subrange_type, read_base_type): Set type alignment.
10326
10327 2018-04-30  Simon Marchi  <simon.marchi@ericsson.com>
10328
10329         * dwarf2read.c (read_index_from_section): Use bool.
10330
10331 2018-04-29  Fabian Groffen  <grobian@gentoo.org>
10332
10333         PR gdb/22950
10334         * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
10335         with #ifdef.
10336
10337 2018-04-29  John Reiser  <jreiser@BitWagon.com>
10338
10339         PR build/22873
10340         * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
10341         last step, and do it atomically.
10342
10343 2018-04-27  Alexandre Oliva  <aoliva@redhat.com>
10344
10345         * compile/compile-c-types.c (convert_int, convert_float):
10346         Update for C FE v1.
10347
10348 2018-04-27  Tom Tromey  <tom@tromey.com>
10349
10350         PR rust/22545:
10351         * rust-lang.c (rust_inclusive_range_type_p): New function.
10352         (rust_range): Handle inclusive ranges.
10353         (rust_compute_range): Likewise.
10354         * rust-exp.y (struct rust_op) <inclusive>: New field.
10355         (DOTDOTEQ): New constant.
10356         (range_expr): Add "..=" productions.
10357         (operator_tokens): Add "..=" token.
10358         (ast_range): Add "inclusive" parameter.
10359         (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
10360         ranges.
10361         * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
10362         bounds values.
10363         * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
10364         LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
10365         Update comments.
10366         * expprint.c (print_subexp_standard): Handle new bounds values.
10367         (dump_subexp_body_standard): Likewise.
10368
10369 2018-04-27  Tom Tromey  <tom@tromey.com>
10370
10371         * configure: Rebuild.
10372         * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
10373         * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
10374         "OVERRIDE".
10375         (class symbol_needs_eval_context): Likewise.
10376         * dwarf2read.c (mock_mapped_index::symbol_name_count)
10377         (mock_mapped_index::symbol_name_at): Use "override".  Remove
10378         "virtual".
10379         * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
10380         "override".
10381         (class dwarf_expr_executor): Use "override", not "OVERRIDE".
10382         * aarch64-tdep.c (instruction_reader::read): Use "override".
10383         (instruction_reader_test::read): Likewise.
10384         * arm-tdep.c (instruction_reader::read): Use "override".
10385         (instruction_reader_thumb::read): Likewise.
10386
10387 2018-04-26  Andrzej Kaczmarek  <andrzej.kaczmarek@codecoup.pl>
10388
10389         PR remote/9665
10390         * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
10391         instead of remote_send.
10392         (remote_send): Remove.
10393
10394 2018-04-26  Pedro Alves  <palves@redhat.com>
10395
10396         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
10397         find_function_start_sal instead of find_pc_line.
10398
10399 2018-04-26  Pedro Alves  <palves@redhat.com>
10400
10401         * breakpoint.c (set_breakpoint_location_function): Handle
10402         mst_data_gnu_ifunc.
10403         * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
10404         * elfread.c (elf_symtab_read): Give data symbols with
10405         BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
10406         (elf_rel_plt_read): Update comment.
10407         * linespec.c (convert_linespec_to_sals): Handle
10408         mst_data_gnu_ifunc.
10409         (minsym_found): Handle mst_data_gnu_ifunc.
10410         * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
10411         (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
10412         * parse.c (find_minsym_type_and_address): Handle
10413         mst_data_gnu_ifunc.
10414         * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
10415         * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
10416         * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
10417         comment.
10418         <mst_data_gnu_ifunc>: New enumerator.
10419
10420 2018-04-26  Pedro Alves  <palves@redhat.com>
10421
10422         * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
10423         (lookup_minimal_symbol_by_pc_section): ... this.  Replace
10424         'want_trampoline' parameter by a lookup_msym_prefer parameter.
10425         Handle it.
10426         (lookup_minimal_symbol_by_pc_section): Delete old implementation.
10427         (lookup_minimal_symbol_by_pc): Adjust.
10428         (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
10429         (lookup_solib_trampoline_symbol_by_pc): Adjust.
10430         * minsyms.h (lookup_msym_prefer): New enum.
10431         (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
10432         parameter by a lookup_msym_prefer parameter.
10433
10434 2018-04-26  Pedro Alves  <palves@redhat.com>
10435
10436         * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
10437         ends in "@plt" instead of looking at the symbol's section.
10438
10439 2018-04-26  Pedro Alves  <palves@redhat.com>
10440
10441         * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete.  Remove
10442         all references.
10443         (find_pc_partial_function_gnu_ifunc): Rename to ...
10444         (find_pc_partial_function): ... this, and remove references to
10445         'is_gnu_ifunc_p'.
10446         (find_pc_partial_function): Delete old implementation.
10447         * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
10448
10449 2018-04-26  Pedro Alves  <palves@redhat.com>
10450
10451         * linespec.c (struct bound_minimal_symbol_search_key): New.
10452         (convert_linespec_to_sals): Sort minimal symbols earlier.  Don't
10453         skip first line if we found a GNU ifunc minimal symbol by name.
10454         (compare_msymbols): Change parameters to work with a destructured
10455         lhs minsym.
10456         (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
10457         functions.
10458
10459 2018-04-26  Pedro Alves  <palves@redhat.com>
10460
10461         * breakpoint.c (set_breakpoint_location_function): Don't resolve
10462         ifunc targets here.  Instead, if we have an ifunc minsym, use its
10463         address/name.
10464         (add_location_to_breakpoint): Store the minsym and the objfile in
10465         the breakpoint location.
10466         * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
10467         * linespec.c (minsym_found): Resolve GNU ifunc targets here.
10468         Record the minsym in the sal.
10469         * symtab.h (symtab_and_line) <msymbol>: New field.
10470
10471 2018-04-26  Pedro Alves  <palves@redhat.com>
10472
10473         * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
10474         unless we actually resolved the ifunc.
10475
10476 2018-04-26  Pedro Alves  <palves@redhat.com>
10477
10478         * c-exp.y (variable production): Prefer ifunc minsyms over
10479         regular function symbols.
10480         * symtab.c (find_gnu_ifunc): New function.
10481         * minsyms.h (lookup_msym_prefer): New enum.
10482         (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
10483         parameter by a lookup_msym_prefer parameter.
10484         * symtab.h (find_gnu_ifunc): New declaration.
10485
10486 2018-04-26  Pedro Alves  <palves@redhat.com>
10487
10488         * blockframe.c (find_gnu_ifunc_target_type): New function.
10489         (find_function_type): New.
10490         * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
10491         return a value with a memory address.
10492         (eval_call): For calls to GNU ifunc functions, try to find the
10493         type of the target function from the type that the resolver
10494         returns.
10495         * gdbtypes.c (objfile_type): Don't install a return type for ifunc
10496         symbols.
10497         * infcall.c (find_function_return_type): Delete.
10498         (find_function_addr): Add 'function_type' parameter.  For calls to
10499         GNU ifunc functions, try to find the type of the target function
10500         from the type that the resolver returns, and return it via
10501         FUNCTION_TYPE.
10502         (call_function_by_hand_dummy): Adjust to use the function type
10503         returned by find_function_addr.
10504         (find_function_addr): Add 'function_type' parameter and move
10505         description here.
10506         * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
10507         declarations.
10508
10509 2018-04-26  Pedro Alves  <palves@redhat.com>
10510
10511         * c-exp.y (variable production): Skip finding an alias for ifunc
10512         symbols.
10513
10514 2018-04-26  Pedro Alves  <palves@redhat.com>
10515
10516         * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
10517
10518 2018-04-25  Pedro Alves  <palves@redhat.com>
10519
10520         * infcmd.c (kill_command): Print the pid as string, not the whole
10521         thread's ptid.  Add comment.  s/has been killed/killed/ in output
10522         message.
10523         * remote.c (remote_detach_1): Print the pid as string, not the
10524         whole thread's ptid.
10525
10526 2018-04-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
10527             Sergio Durigan Junior  <sergiodj@redhat.com>
10528             Pedro Alves  <palves@redhat.com>
10529
10530         * infcmd.c (kill_command): Print message when inferior has
10531         been killed.
10532         * inferior.c (print_inferior_events): Remove 'static'.  Set as
10533         '1'.
10534         (add_inferior): Improve message printed when
10535         'print_inferior_events' is on.
10536         (exit_inferior): Remove message printed when
10537         'print_inferior_events' is on.
10538         (detach_inferior): Improve message printed when
10539         'print_inferior_events' is on.
10540         (initialize_inferiors): Use 'add_inferior_silent' to set
10541         'current_inferior_'.
10542         * inferior.h (print_inferior_events): Declare here as
10543         'extern'.
10544         * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
10545         '[Detaching...]' messages when 'print_inferior_events' is on.
10546         Use 'add_thread_silent' instead of 'add_thread'.  Add '[' and ']'
10547         as prefix/suffix for messages.  Remove periods.  Fix erroneous
10548         'Detaching after fork from child...', replace it by '... from
10549         parent...'.
10550         (handle_vfork_child_exec_or_exit): Add '[' and ']' as
10551         prefix/suffix when printing 'Detaching...' messages.  Print
10552         them when 'print_inferior_events' is on.
10553         * remote.c (remote_detach_1): Print message when detaching
10554         from inferior and '!is_fork_parent'.
10555
10556 2018-04-24  Tom Tromey  <tom@tromey.com>
10557
10558         * cli-out.h: Reindent.
10559
10560 2018-04-24  Tom Tromey  <tom@tromey.com>
10561
10562         * cli-out.c (cli_ui_out::out_field_fmt): Remove.
10563         (cli_ui_out::do_field_string): Use fputs_filtered.
10564         * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
10565
10566 2018-04-23  Tom Tromey  <tom@tromey.com>
10567
10568         * guile/scm-frame.c (gdbscm_frame_read_var): Use
10569         gdb::unique_xmalloc_ptr.
10570
10571 2018-04-23  Tom Tromey  <tom@tromey.com>
10572
10573         * configure: Rebuild.
10574
10575 2018-04-22  Rajendra SY  <rajendra.sy@gmail.com>
10576
10577         PR gdb/23095
10578         * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
10579         prepare_for_testing.  Set normal_bp to r_debug_state if target
10580         is bsd.
10581
10582 2018-04-21  Pedro Alves  <palves@redhat.com>
10583             Rajendra SY  <rajendra.sy@gmail.com>
10584
10585         * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
10586         * remote.c (extended_remote_attach): In all-stop mode, mark the
10587         thread as executing.
10588
10589 2018-04-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
10590
10591         * thread.c (thread_apply_all_command): Fix comment.
10592         (thread_command): Fix comment.
10593
10594 2018-04-10  Alan Hayward  <alan.hayward@arm.com>
10595
10596         * common/tdesc.h (tdesc_create_feature): Remove xml filename
10597         parameter.
10598         * features/aarch64-core.c (create_feature_aarch64_core):
10599         Regenerate.
10600         * features/aarch64-fpu.c (create_feature_aarch64_fpu):
10601         Likewise.
10602         * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
10603         Likewise.
10604         * features/i386/32bit-avx512.c
10605         (create_feature_i386_32bit_avx512): Likewise.
10606         * features/i386/32bit-core.c (create_feature_i386_32bit_core):
10607         Likewise.
10608         * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
10609         Likewise.
10610         * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
10611         Likewise.
10612         * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
10613         Likewise.
10614         * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
10615         Likewise.
10616         * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
10617         Likewise.
10618         * features/i386/64bit-avx512.c
10619         (create_feature_i386_64bit_avx512): Likewise.
10620         * features/i386/64bit-core.c (create_feature_i386_64bit_core):
10621         Likewise.
10622         * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
10623         Likewise.
10624         * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
10625         Likewise.
10626         * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
10627         Likewise.
10628         * features/i386/64bit-segments.c
10629         (create_feature_i386_64bit_segments): Likewise.
10630         * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
10631         Likewise.
10632         * features/i386/x32-core.c
10633         (create_feature_i386_x32_core): Likewise.
10634         * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
10635         * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
10636         * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
10637         * target-descriptions.c: In generated code, don't pass xml
10638         filename.
10639
10640 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
10641
10642         * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
10643         (print_xml_feature::visit_post): Likewise.
10644         (print_xml_feature::visit): Likewise.
10645         * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
10646         (print_xml_feature): Add new class.
10647         * regformats/regdat.sh: Null xmltarget on feature targets.
10648         * target-descriptions.c (struct target_desc): Add xmltarget.
10649         (maintenance_check_tdesc_xml_convert): Add unittest function.
10650         (tdesc_get_features_xml): Add function to get xml.
10651         (maintenance_check_xml_descriptions): Test xml generation.
10652         * xml-tdesc.c (string_read_description_xml): Add function.
10653         * xml-tdesc.h (string_read_description_xml): Add declaration.
10654
10655 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
10656
10657         * features/Makefile: Add feature marker to targets with new style
10658         target descriptions.
10659         * regformats/aarch64.dat: Regenerate.
10660         * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
10661         * regformats/i386/amd64-avx-linux.dat: Likewise.
10662         * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
10663         * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
10664         * regformats/i386/amd64-linux.dat: Likewise.
10665         * regformats/i386/amd64-mpx-linux.dat: Likewise.
10666         * regformats/i386/amd64.dat: Likewise.
10667         * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
10668         * regformats/i386/i386-avx-linux.dat: Likewise.
10669         * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
10670         * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
10671         * regformats/i386/i386-linux.dat: Likewise.
10672         * regformats/i386/i386-mmx-linux.dat: Likewise.
10673         * regformats/i386/i386-mpx-linux.dat: Likewise.
10674         * regformats/i386/i386.dat: Likewise.
10675         * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
10676         * regformats/i386/x32-avx-linux.dat: Likewise.
10677         * regformats/i386/x32-linux.dat: Likewise.
10678         * regformats/tic6x-c62x-linux.dat: Likewise.
10679         * regformats/tic6x-c64x-linux.dat: Likewise.
10680         * regformats/tic6x-c64xp-linux.dat: Likewise.
10681         * regformats/regdat.sh: Parse feature marker.
10682
10683 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
10684
10685         * common/tdesc.h (tdesc_architecture_name): Add new declaration.
10686         (tdesc_osabi_name): Likewise.
10687         * target-descriptions.c (tdesc_architecture_name): Add new
10688         function.
10689         (tdesc_osabi_name): Likewise.
10690
10691 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
10692
10693         * common/tdesc.c (tdesc_predefined_type): Move to here.
10694         (tdesc_named_type): Likewise.
10695         (tdesc_create_vector): Likewise.
10696         (tdesc_create_struct): Likewise.
10697         (tdesc_set_struct_size): Likewise.
10698         (tdesc_create_union): Likewise.
10699         (tdesc_create_flags): Likewise.
10700         (tdesc_create_enum): Likewise.
10701         (tdesc_add_field): Likewise.
10702         (tdesc_add_typed_bitfield): Likewise.
10703         (tdesc_add_bitfield): Likewise.
10704         (tdesc_add_flag): Likewise.
10705         (tdesc_add_enum_value): Likewise.
10706         * common/tdesc.h (struct tdesc_type_builtin): Likewise.
10707         (struct tdesc_type_vector): Likewise.
10708         (struct tdesc_type_field): Likewise.
10709         (struct tdesc_type_with_fields): Likewise.
10710         (tdesc_create_enum): Add declaration.
10711         (tdesc_add_typed_bitfield): Likewise.
10712         (tdesc_add_enum_value): Likewise.
10713         * target-descriptions.c (tdesc_type_field): Move from here.
10714         (tdesc_type_builtin): Likewise.
10715         (tdesc_type_vector): Likewise.
10716         (tdesc_type_with_fields): Likewise.
10717         (tdesc_predefined_types): Likewise.
10718         (tdesc_named_type): Likewise.
10719         (tdesc_create_vector): Likewise.
10720         (tdesc_create_struct): Likewise.
10721         (tdesc_set_struct_size): Likewise.
10722         (tdesc_create_union): Likewise.
10723         (tdesc_create_flags): Likewise.
10724         (tdesc_create_enum): Likewise.
10725         (tdesc_add_field): Likewise.
10726         (tdesc_add_typed_bitfield): Likewise.
10727         (tdesc_add_bitfield): Likewise.
10728         (tdesc_add_flag): Likewise.
10729         (tdesc_add_enum_value): Likewise.
10730         * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
10731         (tdesc_add_typed_bitfield): Likewise.
10732         (tdesc_add_enum_value): Likewise.
10733
10734 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
10735
10736         * common/tdesc.c (tdesc_feature::accept): Move to here.
10737         (tdesc_feature::operator==): Likewise.
10738         (tdesc_create_reg): Likewise.
10739         * common/tdesc.h (tdesc_type_kind): Likewise.
10740         (struct tdesc_type): Likewise.
10741         (struct tdesc_feature): Likewise.
10742         * regformats/regdat.sh: Create a feature.
10743         * target-descriptions.c (tdesc_type_kind): Move from here.
10744         (tdesc_type): Likewise.
10745         (tdesc_type_up): Likewise.
10746         (tdesc_feature): Likewise.
10747         (tdesc_create_reg): Likewise.
10748
10749 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
10750
10751         * Makefile.in: Add arch/tdesc.c
10752         * common/tdesc.c: New file.
10753         * common/tdesc.h (tdesc_element_visitor): Move to here.
10754         (tdesc_element): Likewise.
10755         (tdesc_reg): Likewise.
10756         (tdesc_reg_up): Likewise.
10757         * regformats/regdef.h (reg): Add offset to constructors.
10758         * target-descriptions.c (tdesc_element_visitor): Move from here.
10759         (tdesc_element): Likewise.
10760         (tdesc_reg): Likewise.
10761         (tdesc_reg_up): Likewise.
10762
10763 2018-04-17  Tom Tromey  <tom@tromey.com>
10764
10765         * dwarf2read.c (quirk_rust_enum): Conditionally drop the
10766         discriminant field.
10767
10768 2018-04-17  Tom Tromey  <tom@tromey.com>
10769
10770         * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
10771
10772 2018-04-17  Andreas Arnez  <arnez@linux.vnet.ibm.com>
10773
10774         * symtab.c (print_symbol_info): Skip printing filename and line
10775         number when `last' is NULL.
10776         (symtab_symbol_info): Use empty string instead of NULL for first
10777         invocation of print_symbol_info.
10778         (rbreak_command): Pass NULL to `last' parameter of
10779         print_symbol_info.
10780
10781 2018-04-16  Simon Marchi  <simon.marchi@ericsson.com>
10782
10783         * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
10784         instead of nullptr.
10785
10786 2018-04-16  Pedro Alves  <palves@redhat.com>
10787
10788         * MAINTAINERS (sh): Remove.
10789         * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
10790         (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
10791         (ALLDEPFILES): Remove sh64-tdep.c.
10792         * NEWS: Mentions that support for SH-5/SH64 is removed.
10793         * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
10794         (sh*-*-openbsd*): Ditto.
10795         (sh64-*-elf*): Remove.
10796         (sh*): Remove.
10797         * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
10798         * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
10799         * sh-tdep.c: No longer include "sh64-tdep.h".
10800         (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
10801         * sh64-tdep.c, sh64-tdep.h: Remove files.
10802
10803 2018-04-16  Pedro Alves  <palves@redhat.com>
10804
10805         * MAINTAINERS: Remove m88k.
10806         * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
10807         (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
10808         (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
10809         * NEWS: Mention that support for m88k was removed.
10810         * configure.host (m88*-*-*): Remove support.
10811         * configure.nat (m88k-*-*): Remove support.
10812         * configure.tgt (m88*-*-openbsd*): Remove.
10813         * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
10814
10815 2018-04-15  Simon Marchi  <simon.marchi@polymtl.ca>
10816
10817         * configure.tgt (x86_tobjs): New variable.
10818         (amd64_tobjs, i386_tobjs): Use it.
10819
10820 2018-04-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
10821
10822         * symtab.c (print_symbol_info): Precede the symbol definition by
10823         the line number when available.
10824         * NEWS: Advertise this enhancement.
10825
10826 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
10827
10828         * NEWS (New options): announce set/show record btrace cpu.
10829         * btrace.c: Include record-btrace.h.
10830         (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
10831         the vendor is unknown.
10832         (btrace_compute_ftrace_1): Add cpu parameter.  Update callers.
10833         Maybe overwrite the btrace configuration's cpu.
10834         (btrace_compute_ftrace): Add cpu parameter.  Update callers.
10835         (btrace_fetch): Add cpu parameter.  Update callers.
10836         (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
10837         Maybe overwrite the btrace configuration's cpu.  Skip enabling
10838         errata workarounds if the vendor is unknown.
10839         * python/py-record-btrace.c: Include record-btrace.h.
10840         (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
10841         (recpy_bt_function_call_history): Call record_btrace_get_cpu.
10842         * record-btrace.c (record_btrace_cpu_state_kind): New.
10843         (record_btrace_cpu): New.
10844         (set_record_btrace_cpu_cmdlist): New.
10845         (record_btrace_get_cpu): New.
10846         (require_btrace_thread, record_btrace_info)
10847         (record_btrace_resume_thread): Call record_btrace_get_cpu.
10848         (cmd_set_record_btrace_cpu_none): New.
10849         (cmd_set_record_btrace_cpu_auto): New.
10850         (cmd_set_record_btrace_cpu): New.
10851         (cmd_show_record_btrace_cpu): New.
10852         (_initialize_record_btrace): Initialize set/show record btrace cpu
10853         commands.
10854         * record-btrace.h (record_btrace_get_cpu): New.
10855
10856 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
10857
10858         * record.c (set_record_command): Fix typo in message.
10859
10860 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
10861
10862         * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
10863
10864 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
10865
10866         * infrun.c (process_event_stop_test): Call
10867         gdbarch_in_indirect_branch_thunk.
10868         * gdbarch.sh (in_indirect_branch_thunk): New.
10869         * gdbarch.c: Regenerated.
10870         * gdbarch.h: Regenerated.
10871         * x86-tdep.h: New.
10872         * x86-tdep.c: New.
10873         * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
10874         (HFILES_NO_SRCDIR): Add x86-tdep.h.
10875         (ALLDEPFILES): Add x86-tdep.c.
10876         * arch-utils.h (default_in_indirect_branch_thunk): New.
10877         * arch-utils.c (default_in_indirect_branch_thunk): New.
10878         * i386-tdep: Include x86-tdep.h.
10879         (i386_in_indirect_branch_thunk): New.
10880         (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
10881         function.
10882         * amd64-tdep: Include x86-tdep.h.
10883         (amd64_in_indirect_branch_thunk): New.
10884         (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
10885
10886 2018-04-12  Jan Kratochvil  <jan.kratochvil@redhat.com>
10887
10888         PR gdb/23053
10889         * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
10890         (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
10891         (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
10892         regression.
10893
10894 2018-04-12  Tom Tromey  <tom@tromey.com>
10895
10896         * rust-lang.c (rust_print_struct_def): Remove univariant code.
10897         (rust_evaluate_subexp): Likewise.
10898
10899 2018-04-12  Pedro Alves  <palves@redhat.com>
10900
10901         * procfs.c (procfs_detach): Make forward declaration's prototype
10902         match definition's protototype.
10903         (proc_get_LDT_entry): Remove stale do_cleanups call.
10904
10905 2018-04-12  Pedro Alves  <palves@redhat.com>
10906
10907         * target.h (target_ops::to_has_exited): Delete.
10908         (target_has_exited): Delete.
10909         * target-delegates.c: Regenerate.
10910
10911 2018-04-11  Pedro Alves  <palves@redhat.com>
10912
10913         * target.c (fileio_fh_t::t): Add comment.
10914         (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
10915         (target_fileio_close): Handle a NULL target.
10916         (invalidate_fileio_fh): New.
10917         (target_close): Call it.
10918         * remote.c (remote_hostio_send_command): No longer check whether
10919         remote_desc is open.
10920
10921 2018-04-11  Pedro Alves  <palves@redhat.com>
10922
10923         * target.c (fileio_fh_t): Make it a named struct instead of a
10924         typedef.
10925         (fileio_fh_t::is_closed): New method.
10926         (DEF_VEC_O (fileio_fh_t)): Remove.
10927         (fileio_fhandles): Now a std::vector.
10928         (is_closed_fileio_fh): Delete.
10929         (acquire_fileio_fd): Adjust.  Rename parameters.
10930         (release_fileio_fd): Adjust.
10931         (fileio_fd_to_fh): Reimplement as a function instead of a macro.
10932         (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
10933         (target_fileio_close): Adjust.
10934
10935 2018-04-10  Simon Marchi  <simon.marchi@ericsson.com>
10936
10937         * auto-load.c (auto_load_safe_path_vec_update): Iterate by
10938         index.
10939
10940 2018-04-10  Pedro Alves  <palves@redhat.com>
10941
10942         * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
10943         (scoped_finish_thread_state): New class.
10944         * infcmd.c (run_command_1): Use it instead of finish_thread_state
10945         cleanup.
10946         * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
10947         (fetch_inferior_event, normal_stop): Likewise.
10948         * thread.c (finish_thread_state_cleanup): Delete.
10949
10950 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
10951             Pedro Alves  <palves@redhat.com>
10952
10953         * value.c: Include "selftest.h" and "common/array-view.h".
10954         (struct range) <operator ==>: New.
10955         (test_ranges_contain): New.
10956         (check_ranges_vector): New.
10957         (test_insert_into_bit_range_vector): New.
10958         (_initialize_values): Register selftests.
10959         * common/array-view.h (operator==, operator!=): New.
10960
10961 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
10962
10963         * common/gdb_vecs.h (unordered_remove): Add overload that takes
10964         an iterator.
10965         * inline-frame.c: Include <algorithm>.
10966         (struct inline_state): Add constructor.
10967         (inline_state_s): Remove.
10968         (DEF_VEC_O(inline_state_s)): Remove.
10969         (inline_states): Change type to std::vector.
10970         (find_inline_frame_state): Adjust to std::vector.
10971         (allocate_inline_frame_state): Remove.
10972         (clear_inline_frame_state): Adjust to std::vector.
10973         (skip_inline_frames): Adjust to std::vector.
10974
10975 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
10976
10977         * tracepoint.h (struct trace_state_variable): Add constructor.
10978         <name>: Change type to std::string.
10979         * tracepoint.c (tsv_s): Remove.
10980         (DEF_VEC_O(tsv_s)): Remove.
10981         (tvariables): Change to std::vector.
10982         (create_trace_state_variable): Adjust to std::vector.
10983         (find_trace_state_variable): Likewise.
10984         (find_trace_state_variable_by_number): Likewise.
10985         (delete_trace_state_variable): Likewise.
10986         (trace_variable_command): Adjust to std::string.
10987         (delete_trace_variable_command): Likewise.
10988         (tvariables_info_1): Adjust to std::vector.
10989         (save_trace_state_variables): Likewise.
10990         (start_tracing): Likewise.
10991         (merge_uploaded_trace_state_variables): Adjust to std::vector
10992         and std::string.
10993         * target.h (struct target_ops)
10994         <to_download_trace_state_variable>: Pass reference to
10995         trace_state_variable.
10996         * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
10997         * target-delegates.c: Re-generate.
10998         * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
10999         (mi_tsv_deleted): Likewise.
11000         * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
11001         * remote.c (remote_download_trace_state_variable): Change
11002         pointer to reference and adjust.
11003         * make-target-delegates (parse_argtypes): Handle references.
11004         (write_function_header): Likewise.
11005         (munge_type): Likewise.
11006
11007 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
11008
11009         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11010         string_view-selftests.c.
11011         * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
11012         testsuite.
11013         * unittests/basic_string_view/cons/char/1.cc: Likewise.
11014         * unittests/basic_string_view/cons/char/2.cc: Likewise.
11015         * unittests/basic_string_view/cons/char/3.cc: Likewise.
11016         * unittests/basic_string_view/element_access/char/1.cc:
11017         Likewise.
11018         * unittests/basic_string_view/element_access/char/empty.cc:
11019         Likewise.
11020         * unittests/basic_string_view/element_access/char/front_back.cc:
11021         Likewise.
11022         * unittests/basic_string_view/inserters/char/2.cc: Likewise.
11023         * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
11024         Likewise.
11025         * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
11026         Likewise.
11027         * unittests/basic_string_view/modifiers/swap/char/1.cc:
11028         Likewise.
11029         * unittests/basic_string_view/operations/compare/char/1.cc:
11030         Likewise.
11031         * unittests/basic_string_view/operations/compare/char/13650.cc:
11032         Likewise.
11033         * unittests/basic_string_view/operations/copy/char/1.cc:
11034         Likewise.
11035         * unittests/basic_string_view/operations/data/char/1.cc:
11036         Likewise.
11037         * unittests/basic_string_view/operations/find/char/1.cc:
11038         Likewise.
11039         * unittests/basic_string_view/operations/find/char/2.cc:
11040         Likewise.
11041         * unittests/basic_string_view/operations/find/char/3.cc:
11042         Likewise.
11043         * unittests/basic_string_view/operations/find/char/4.cc:
11044         Likewise.
11045         * unittests/basic_string_view/operations/rfind/char/1.cc:
11046         Likewise.
11047         * unittests/basic_string_view/operations/rfind/char/2.cc:
11048         Likewise.
11049         * unittests/basic_string_view/operations/rfind/char/3.cc:
11050         Likewise.
11051         * unittests/basic_string_view/operations/substr/char/1.cc:
11052         Likewise.
11053         * unittests/basic_string_view/operators/char/2.cc: Likewise.
11054         * unittests/string_view-selftests.c: New file.
11055
11056 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
11057
11058         * unittests/basic_string_view/capacity/1.cc: New file.
11059         * unittests/basic_string_view/capacity/empty_neg.cc: New file.
11060         * unittests/basic_string_view/cons/char/1.cc: New file.
11061         * unittests/basic_string_view/cons/char/2.cc: New file.
11062         * unittests/basic_string_view/cons/char/3.cc: New file.
11063         * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
11064         * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
11065         * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
11066         * unittests/basic_string_view/element_access/char/1.cc: New file.
11067         * unittests/basic_string_view/element_access/char/2.cc: New file.
11068         * unittests/basic_string_view/element_access/char/empty.cc: New file.
11069         * unittests/basic_string_view/element_access/char/front_back.cc: New file.
11070         * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
11071         * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
11072         * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
11073         * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
11074         * unittests/basic_string_view/include.cc: New file.
11075         * unittests/basic_string_view/inserters/char/1.cc: New file.
11076         * unittests/basic_string_view/inserters/char/2.cc: New file.
11077         * unittests/basic_string_view/inserters/char/3.cc: New file.
11078         * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
11079         * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
11080         * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
11081         * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
11082         * unittests/basic_string_view/literals/types.cc: New file.
11083         * unittests/basic_string_view/literals/values.cc: New file.
11084         * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
11085         * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
11086         * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
11087         * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
11088         * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
11089         * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
11090         * unittests/basic_string_view/operations/compare/char/1.cc: New file.
11091         * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
11092         * unittests/basic_string_view/operations/compare/char/2.cc: New file.
11093         * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
11094         * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
11095         * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
11096         * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
11097         * unittests/basic_string_view/operations/copy/char/1.cc: New file.
11098         * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
11099         * unittests/basic_string_view/operations/data/char/1.cc: New file.
11100         * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
11101         * unittests/basic_string_view/operations/find/char/1.cc: New file.
11102         * unittests/basic_string_view/operations/find/char/2.cc: New file.
11103         * unittests/basic_string_view/operations/find/char/3.cc: New file.
11104         * unittests/basic_string_view/operations/find/char/4.cc: New file.
11105         * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
11106         * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
11107         * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
11108         * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
11109         * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
11110         * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
11111         * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
11112         * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
11113         * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
11114         * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
11115         * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
11116         * unittests/basic_string_view/operations/substr/char/1.cc: New file.
11117         * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
11118         * unittests/basic_string_view/operators/char/2.cc: New file.
11119         * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
11120         * unittests/basic_string_view/range_access/char/1.cc: New file.
11121         * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
11122         * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
11123         * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
11124         * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
11125         * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
11126         * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
11127         * unittests/basic_string_view/requirements/typedefs.cc: New file.
11128         * unittests/basic_string_view/typedefs.cc: New file.
11129         * unittests/basic_string_view/types/1.cc: New file.
11130
11131 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
11132
11133         * common/gdb_string_view.h: Remove libstdc++ implementation
11134         details, adjust to gdb reality.
11135         * common/gdb_string_view.tcc: Likewise.
11136         * cli/cli-script.c (struct string_view): Remove.
11137         (user_args) <m_args>: Change element type to gdb::string_view.
11138         (user_args::insert_args): Adjust.
11139
11140 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
11141
11142         * common/gdb_string_view.h: New file.
11143         * common/gdb_string_view.tcc: New file.
11144
11145 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
11146
11147         * ax_cxx_compile_stdcxx.m4: Sync with upstream.
11148         * configure: Re-generate.
11149
11150 2018-04-09  Pedro Alves  <palves@redhat.com>
11151
11152         * gdbarch.sh: Include "observable.h" instead of "observer.h".
11153         (set_target_gdbarch): Call
11154         gdb::observers::architecture_changed.notify instead of
11155         observer_notify_architecture_changed.
11156
11157 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
11158
11159         * tracepoint.c (struct current_traceframe_cleanup): Remove.
11160         (do_restore_current_traceframe_cleanup): Remove.
11161         (restore_current_traceframe_cleanup_dtor): Remove.
11162         (make_cleanup_restore_current_traceframe): Remove.
11163         (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
11164         New.
11165         * tracepoint.h (struct scoped_restore_current_traceframe): New.
11166         * infrun.c (fetch_inferior_event): Use
11167         scoped_restore_current_traceframe.
11168
11169 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
11170
11171         * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
11172         Remove.
11173         <n_allocated_type_units>: Remove.
11174         <all_type_units>: Change to std::vector.
11175         * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
11176         to std::vector change.
11177         (dwarf2_per_objfile::get_cutu): Likewise.
11178         (dwarf2_per_objfile::get_tu): Likewise.
11179         (create_signatured_type_table_from_index): Likewise.
11180         (create_signatured_type_table_from_debug_names): Likewise.
11181         (dw2_symtab_iter_next): Likewise.
11182         (dw2_print_stats): Likewise.
11183         (dw2_expand_all_symtabs): Likewise.
11184         (dw2_expand_marked_cus): Likewise.
11185         (dw2_debug_names_iterator::next): Likewise.
11186         (dwarf2_initialize_objfile): Likewise.
11187         (add_signatured_type_cu_to_table): Likewise.
11188         (create_all_type_units): Likewise.
11189         (add_type_unit): Likewise.
11190         (struct tu_abbrev_offset): Add constructor.
11191         (build_type_psymtabs_1): Adjust to std::vector change.
11192         (print_tu_stats): Likewise.
11193         * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
11194         (write_debug_names): Likewise.
11195
11196 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
11197
11198         * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
11199         Make an std::vector.
11200         <n_comp_units>: Remove.
11201         * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
11202         to std::vector change.
11203         (dwarf2_per_objfile::get_cutu): Likewise.
11204         (dwarf2_per_objfile::get_cu): Likewise.
11205         (create_cus_from_index): Likewise.
11206         (create_addrmap_from_index): Likewise.
11207         (create_addrmap_from_aranges): Likewise.
11208         (dwarf2_read_index): Likewise.
11209         (dw2_find_last_source_symtab): Likewise.
11210         (dw2_map_symtabs_matching_filename): Likewise.
11211         (dw2_symtab_iter_next): Likewise.
11212         (dw2_print_stats): Likewise.
11213         (dw2_expand_all_symtabs): Likewise.
11214         (dw2_expand_symtabs_with_fullname): Likewise.
11215         (dw2_expand_marked_cus): Likewise.
11216         (dw2_map_symbol_filenames): Likewise.
11217         (create_cus_from_debug_names): Likewise.
11218         (dwarf2_read_debug_names): Likewise.
11219         (dw2_debug_names_iterator::next): Likewise.
11220         (dwarf2_initialize_objfile): Likewise.
11221         (set_partial_user): Likewise.
11222         (dwarf2_build_psymtabs_hard): Likewise.
11223         (read_comp_units_from_section): Remove arguments, adjust to
11224         std::vector change.
11225         (create_all_comp_units): Adjust to std::vector and
11226         read_comp_units_from_section changes.
11227         (dwarf2_find_containing_comp_unit): Adjust to std::vector
11228         change.
11229         * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
11230         (psyms_seen_size): Likewise.
11231         (write_gdbindex): Likewise.
11232         (write_debug_names): Likewise.
11233
11234 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
11235
11236         * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
11237         with dwarf2_per_objfile.
11238         (create_cus_from_index): Likewise.
11239         (create_signatured_type_table_from_index): Likewise.
11240         (dwarf2_read_index): Likewise.
11241         (dwarf2_initialize_objfile): Likewise.
11242         (dwarf2_fetch_die_loc_sect_off):  Get dwarf2_per_objfile from
11243         per_cu rather than get_dwarf2_per_objfile.
11244
11245 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
11246
11247         * dwarf2read.h (struct signatured_type): Forward declare.
11248         (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
11249         New methods.
11250         * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
11251         (dw2_get_cutu): ...this.
11252         (dwarf2_per_objfile::get_cu): Rename from...
11253         (dw2_get_cu): ...this.
11254         (dwarf2_per_objfile::get_tu): New.
11255         (create_addrmap_from_index): Adjust.
11256         (create_addrmap_from_aranges): Adjust.
11257         (dw2_find_last_source_symtab): Adjust.
11258         (dw2_map_symtabs_matching_filename): Adjust.
11259         (dw2_symtab_iter_next): Adjust.
11260         (dw2_print_stats): Adjust.
11261         (dw2_expand_all_symtabs): Adjust.
11262         (dw2_expand_symtabs_with_fullname): Adjust.
11263         (dw2_expand_marked_cus): Adjust.
11264         (dw_expand_symtabs_matching_file_matcher): Adjust.
11265         (dw2_map_symbol_filenames): Adjust.
11266         (dw2_debug_names_iterator::next): Adjust.
11267         (dwarf2_initialize_objfile): Adjust.
11268         (set_partial_user): Adjust.
11269         (dwarf2_build_psymtabs_hard): Adjust.
11270
11271 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
11272
11273         * dwarf2read.c (create_signatured_type_table_from_debug_names):
11274         Remove unused variables.
11275         (dw2_map_symtabs_matching_filename): Likewise.
11276         (dwarf2_record_block_ranges): Likewise.
11277         (dwarf2_read_addr_index): Likewise.
11278         (follow_die_offset): Likewise.
11279
11280 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
11281
11282         * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
11283         to symbol_file_add_main.
11284
11285 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
11286
11287         PR mi/22299
11288         * mi/mi-console.c (do_fputc_async_safe): New.
11289         (mi_console_file::write_async_safe): New.
11290         (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
11291         * mi/mi-console.h (class mi_console_file) <write_async_safe>:
11292         New.
11293         * ui-file.c (ui_file::putstrn): Adjust call to
11294         fputstrn_unfiltered.
11295         * utils.c (printchar): Replace do_fputs and do_fprintf
11296         parameters by do_fputc.
11297         (fputstr_filtered): Adjust call to printchar.
11298         (fputstr_unfiltered): Likewise.
11299         (fputstrn_filtered): Likewise.
11300         (fputstrn_unfiltered): Add do_fputc parameter, pass to
11301         printchar.
11302         * utils.h (do_fputc_ftype): New typedef.
11303         (fputstrn_unfiltered): Add do_fputc parameter.
11304
11305 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
11306
11307         * regformats/i386/i386-avx.dat: Remove.
11308
11309 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
11310
11311         PR gdb/22979
11312         * amd64-tdep.c (amd64_none_init_abi): New function.
11313         (amd64_x32_none_init_abi): New function.
11314         (_initialize_amd64_tdep): Register handlers for x86-64 and
11315         x64_32 with GDB_OSABI_NONE.
11316         * osabi.c (gdbarch_init_osabi): Allow running handlers for the
11317         GDB_OSABI_NONE osabi.
11318
11319 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
11320
11321         PR gdb/22980
11322         * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
11323         GDB_OSABI_NONE.
11324         * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
11325         * osabi.c (gdb_osabi_names): Add "unknown" entry.
11326
11327 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
11328
11329         * common/byte-vector.h (char_vector): New type.
11330         * target.h (target_read_alloc): Return
11331         gdb::optional<byte_vector>.
11332         (target_read_stralloc): Return gdb::optional<char_vector>.
11333         (target_get_osdata): Return gdb::optional<char_vector>.
11334         * target.c (target_read_alloc_1): Templatize.  Replacement
11335         manual memory management with vector.
11336         (target_read_alloc): Change return type, adjust.
11337         (target_read_stralloc): Change return type, adjust.
11338         (target_get_osdata): Change return type, adjust.
11339         * auxv.c (struct auxv_info) <length>: Remove.
11340         <data>: Change type to gdb::optional<byte_vector>.
11341         (auxv_inferior_data_cleanup): Free auxv_info with delete.
11342         (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
11343         (target_auxv_search): Adjust.
11344         (fprint_target_auxv): Adjust.
11345         * avr-tdep.c (avr_io_reg_read_command): Adjust.
11346         * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
11347         (linux_make_corefile_notes): Adjust.
11348         * osdata.c (get_osdata): Adjust.
11349         * remote.c (remote_get_threads_with_qxfer): Adjust.
11350         (remote_memory_map): Adjust.
11351         (remote_traceframe_info): Adjust.
11352         (btrace_read_config): Adjust.
11353         (remote_read_btrace): Adjust.
11354         (remote_pid_to_exec_file): Adjust.
11355         * solib-aix.c (solib_aix_get_library_list): Adjust.
11356         * solib-dsbt.c (decode_loadmap): Don't free buf.
11357         (dsbt_get_initial_loadmaps): Adjust.
11358         * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
11359         * solib-target.c (solib_target_current_sos): Adjust.
11360         * tracepoint.c (sdata_make_value): Adjust.
11361         * xml-support.c (xinclude_start_include): Adjust.
11362         (xml_fetch_content_from_file): Adjust.
11363         * xml-support.h (xml_fetch_another): Change return type.
11364         (xml_fetch_content_from_file): Change return type.
11365         * xml-syscall.c (xml_init_syscalls_info): Adjust.
11366         * xml-tdesc.c (file_read_description_xml): Adjust.
11367         (fetch_available_features_from_target): Change return type.
11368         (target_fetch_description_xml): Adjust.
11369         (target_read_description_xml): Adjust.
11370
11371 2018-04-06  Tom Tromey  <tom@tromey.com>
11372
11373         * value.c (~value): Update.
11374         (struct value) <contents>: Now unique_xmalloc_ptr.
11375         (value_contents_bits_eq, allocate_value_contents)
11376         (value_contents_raw, value_contents_all_raw)
11377         (value_contents_for_printing, value_contents_for_printing_const)
11378         (set_value_enclosing_type): Update.
11379
11380 2018-04-06  Tom Tromey  <tom@tromey.com>
11381
11382         * value.c (range_s): Remove typedef, VEC.
11383         (struct range): Add operator<.
11384         (range_lessthan): Remove.
11385         (ranges_contain): Change type.
11386         (~value): Update.
11387         (struct value) <unavailable, optimized_out>: Now std::vector.
11388         (value_entirely_available)
11389         (value_entirely_covered_by_range_vector)
11390         (value_entirely_unavailable, value_entirely_optimized_out):
11391         Update.
11392         (insert_into_bit_range_vector): Change argument type.
11393         (find_first_range_overlap): Likewise.
11394         (struct ranges_and_idx, value_contents_bits_eq)
11395         (require_not_optimized_out, require_available): Update.
11396         (ranges_copy_adjusted): Change argument types.
11397         (value_optimized_out, value_copy, value_fetch_lazy): Update.
11398
11399 2018-04-06  Tom Tromey  <tom@tromey.com>
11400
11401         * value.c (~value): Update.
11402         (struct value) <parent>: Now a value_ref_ptr.
11403         (value_parent, set_value_parent, value_address, value_copy):
11404         Update.
11405
11406 2018-04-06  Tom Tromey  <tom@tromey.com>
11407
11408         * value.c (struct value): Add constructor, destructor, and member
11409         initializers.
11410         (allocate_value_lazy, value_decref): Update.
11411
11412 2018-04-06  Tom Tromey  <tom@tromey.com>
11413
11414         * value.c (struct value) <released, next>: Remove.
11415         (all_values): Now a std::vector.
11416         (allocate_value_lazy): Update.
11417         (value_next): Remove.
11418         (value_mark, value_free_to_mark, release_value)
11419         (value_release_to_mark): Update.
11420
11421 2018-04-06  Tom Tromey  <tom@tromey.com>
11422
11423         * value.h (fetch_subexp_value, value_release_to_mark): Update.
11424         (free_value_chain): Remove.
11425         * value.c (free_value_chain): Remove.
11426         (value_release_to_mark): Return a std::vector.
11427         * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
11428         std::vector.
11429         (check_condition): Update.
11430         * eval.c (fetch_subexp_value): Change "val_chain" to a
11431         std::vector.
11432         * breakpoint.c (update_watchpoint): Update.
11433         (can_use_hardware_watchpoint): Change "vals" to a std::vector.
11434
11435 2018-04-06  Tom Tromey  <tom@tromey.com>
11436
11437         * value.h (free_all_values): Remove.
11438         * value.c (free_all_values): Remove.
11439
11440 2018-04-06  Tom Tromey  <tom@tromey.com>
11441
11442         * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
11443         (value_history_chain, value_history_count): Remove.
11444         (value_history): New global.
11445         (record_latest_value, access_value_history, show_values)
11446         (preserve_values): Update.
11447
11448 2018-04-06  Tom Tromey  <tom@tromey.com>
11449
11450         * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
11451         * varobj.c (varobj_set_display_format, varobj_set_value)
11452         (install_default_visualizer, construct_visualizer)
11453         (install_new_value, ~varobj, varobj_get_value_type)
11454         (my_value_of_variable, varobj_editable_p): Update.
11455         * c-varobj.c (c_describe_child, c_value_of_variable)
11456         (cplus_number_of_children, cplus_describe_child): Update.
11457         * ada-varobj.c (ada_number_of_children, ada_name_of_child)
11458         (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
11459         (ada_value_of_variable, ada_value_is_changeable_p): Update.
11460
11461 2018-04-06  Tom Tromey  <tom@tromey.com>
11462
11463         * printcmd.c (last_examine_address): Change type to
11464         value_ref_ptr.
11465         (do_examine, x_command): Update.
11466
11467 2018-04-06  Tom Tromey  <tom@tromey.com>
11468
11469         * value.c (release_value): Update.
11470         * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
11471         (struct bpstats) <val>: Now a value_ref_ptr.
11472         * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
11473         (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
11474         (~watchpoint, print_it_watchpoint, watch_command_1)
11475         (invalidate_bp_value_on_memory_change): Update.
11476
11477 2018-04-06  Tom Tromey  <tom@tromey.com>
11478
11479         * varobj.c (varobj_clear_saved_item)
11480         (update_dynamic_varobj_children, install_new_value, ~varobj):
11481         Update.
11482         * value.h (value_incref): Move declaration earlier.
11483         (value_decref): Rename from value_free.
11484         (struct value_ref_policy): New.
11485         (value_ref_ptr): New typedef.
11486         (struct value_deleter): Remove.
11487         (gdb_value_up): Remove typedef.
11488         (release_value): Change return type.
11489         (release_value_or_incref): Remove.
11490         * value.c (set_value_parent): Update.
11491         (value_incref): Change return type.
11492         (value_decref): Rename from value_free.
11493         (value_free_to_mark, free_all_values, free_value_chain): Update.
11494         (release_value): Return value_ref_ptr.
11495         (release_value_or_incref): Remove.
11496         (record_latest_value, set_internalvar, clear_internalvar):
11497         Update.
11498         * stack.c (info_frame_command): Don't call value_free.
11499         * python/py-value.c (valpy_dealloc, valpy_new)
11500         (value_to_value_object): Update.
11501         * printcmd.c (do_examine): Update.
11502         * opencl-lang.c (lval_func_free_closure): Update.
11503         * mi/mi-main.c (register_changed_p): Don't call value_free.
11504         * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
11505         * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
11506         * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
11507         value_free.
11508         * guile/scm-value.c (vlscm_free_value_smob)
11509         (vlscm_scm_from_value): Update.
11510         * frame.c (frame_register_unwind, frame_unwind_register_signed)
11511         (frame_unwind_register_unsigned, get_frame_register_bytes)
11512         (put_frame_register_bytes): Don't call value_free.
11513         * findvar.c (address_from_register): Don't call value_free.
11514         * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
11515         * dwarf2loc.c (entry_data_value_free_closure)
11516         (value_of_dwarf_reg_entry, free_pieced_value_closure)
11517         (dwarf2_evaluate_loc_desc_full): Update.
11518         * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
11519         (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
11520         (~watchpoint, watch_command_1)
11521         (invalidate_bp_value_on_memory_change): Update.
11522         * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
11523
11524 2018-04-06  Simon Marchi  <simon.marchi@polymtl.ca>
11525
11526         PR gdb/23022
11527         * warning.m4: Add -Wno-error=deprecated-register.
11528         * configure: Re-generate.
11529
11530 2018-04-05  Tom Tromey  <tom@tromey.com>
11531
11532         * linespec.h: Remove include of "vec.h".
11533
11534 2018-04-05  Tom Tromey  <tom@tromey.com>
11535
11536         * linespec.c (typep): Remove typedef.
11537         (find_methods, find_superclass_methods): Take a std::vector.
11538         (find_method): Use std::vector.
11539
11540 2018-04-05  Tom Tromey  <tom@tromey.com>
11541
11542         * utils.c (compare_strings): Remove.
11543         * utils.h (compare_strings): Remove.
11544         * objc-lang.h (find_imps): Update.
11545         * objc-lang.c (find_methods): Take a std::vector.
11546         (uniquify_strings, find_imps): Likewise.
11547         * linespec.c (find_methods): Take a std::vector.
11548         (decode_objc): Use std::vector.
11549         (add_all_symbol_names_from_pspace, find_superclass_methods): Take
11550         a std::vector.
11551         (find_method, find_function_symbols): Use std::vector.
11552
11553 2018-04-05  Tom Tromey  <tom@tromey.com>
11554
11555         * completer.c (completion_tracker::completion_tracker): Remove
11556         cast.
11557         (completion_tracker::discard_completions): Likewise.
11558         * breakpoint.c (ambiguous_names_p): Remove cast.
11559         * ada-lang.c (_initialize_ada_language): Remove cast.
11560         * utils.h (streq): Update.
11561         (streq_hash): Add new declaration.
11562         * utils.c (streq): Return bool.
11563         (streq_hash): New function.
11564
11565 2018-04-05  Tom Tromey  <tom@tromey.com>
11566
11567         * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
11568         Remove a string copy.
11569
11570 2018-04-05  Tom Tromey  <tom@tromey.com>
11571
11572         * linespec.c (filter_results): Use std::vector.
11573         (decode_line_2, decode_line_full): Update.
11574
11575 2018-04-05  Tom Tromey  <tom@tromey.com>
11576
11577         * linespec.c (canonical_to_fullform): Return std::string.
11578         (filter_results): Update.
11579         (struct decode_line_2_item): Add constructor.
11580         <fullform, displayform>: Now std::string.
11581         (decode_line_2_compare_items): Now a std::sort comparator.
11582         (decode_line_2): Update.
11583
11584 2018-04-05  Tom Tromey  <tom@tromey.com>
11585
11586         * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
11587         (unexpected_linespec_error): Update.
11588         (linespec_parse_basic, parse_linespec): Update.
11589
11590 2018-04-05  Tom Tromey  <tom@tromey.com>
11591
11592         * linespec.c (linespec_parse_basic): Reindent.
11593
11594 2018-04-05  Tom Tromey  <tom@tromey.com>
11595
11596         * minsyms.h (iterate_over_minimal_symbols): Update.
11597         * minsyms.c (iterate_over_minimal_symbols): Take a
11598         gdb::function_view.
11599         * linespec.c (struct collect_minsyms): Remove.
11600         (compare_msyms): Now a std::sort comparator.
11601         (add_minsym): Add parameters.
11602         (search_minsyms_for_name): Update.  Use std::vector.
11603
11604 2018-04-03  Tom Tromey  <tom@tromey.com>
11605
11606         * mipsread.c (read_alphacoff_dynamic_symtab): Use
11607         gdb::byte_vector.
11608
11609 2018-04-02  Weimin Pan  <weimin.pan@oracle.com>
11610
11611         * MAINTAINERS (Write After Approval): Add Weimin Pan.
11612
11613 2018-04-02  Weimin Pan  <weimin.pan@oracle.com>
11614
11615         PR gdb/16959
11616         * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when 
11617         printing static type.
11618
11619 2018-04-01  Tom Tromey  <tom@tromey.com>
11620
11621         * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
11622         (rs6000_xfer_shared_libraries): Update.
11623
11624 2018-04-01  Simon Marchi  <simon.marchi@polymtl.ca>
11625
11626         * common/gdb_vecs.h (char_ptr): Remove.
11627         * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
11628
11629 2018-03-30  Simon Marchi  <simon.marchi@polymtl.ca>
11630
11631         * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
11632         with std::vector.
11633         * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
11634
11635 2018-03-30  Simon Marchi  <simon.marchi@polymtl.ca>
11636
11637         * tracepoint.h (struct uploaded_tp): Initialize fields.
11638         <actions, step_actions, cmd_strings>: Change type to
11639         std::vector<char *>.
11640         * tracepoint.c (get_uploaded_tp): Allocate with new.
11641         (free_uploaded_tps): Free with delete.
11642         (parse_tracepoint_definition): Adjust to std::vector change.
11643         * breakpoint.c (read_uploaded_action): Likewise.
11644         (create_tracepoint_from_upload): Likewise.
11645         * ctf.c (ctf_write_uploaded_tp): Likewise.
11646         (SET_ARRAY_FIELD): Likewise.
11647         * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
11648
11649 2018-03-30  Tom Tromey  <tom@tromey.com>
11650
11651         * solib-svr4.c (lm_info_read): Use gdb::byte_vector.  Return
11652         std::unique_ptr.
11653         (svr4_keep_data_in_core): Update.
11654         (svr4_read_so_list): Update.
11655
11656 2018-03-30  Tom Tromey  <tom@tromey.com>
11657
11658         * windows-nat.c (handle_output_debug_string, handle_exception):
11659         Update.
11660         * target.h (target_read_string): Update.
11661         * target.c (target_read_string): Change "string" to
11662         unique_xmalloc_ptr.
11663         * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
11664         Update.
11665         * solib-frv.c (frv_current_sos): Update.
11666         * solib-dsbt.c (dsbt_current_sos): Update.
11667         * solib-darwin.c (darwin_current_sos): Update.
11668         * linux-thread-db.c (inferior_has_bug): Update.
11669         * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
11670         Update.  Remove alloca.
11671         * ada-lang.c (ada_main_name): Update.
11672
11673 2018-03-30  Tom Tromey  <tom@tromey.com>
11674
11675         * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
11676         (struct dwo_file_deleter): New.
11677         (dwo_file_up): New typedef.
11678         (open_and_init_dwo_file): Use dwo_file_up.
11679         (free_dwo_file_cleanup): Remove.
11680
11681 2018-03-30  Tom Tromey  <tom@tromey.com>
11682
11683         * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
11684         (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
11685
11686 2018-03-30  Tom Tromey  <tom@tromey.com>
11687
11688         * dwarf2read.c (class free_cached_comp_units): New class.
11689         (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
11690         (free_cached_comp_units): Remove function.
11691
11692 2018-03-30  Tom Tromey  <tom@tromey.com>
11693
11694         * utils.h (make_cleanup_unpush_target): Remove.
11695         * inf-ptrace.c (struct target_unpusher): New.
11696         (target_unpush_up) New typedef.
11697         (inf_ptrace_create_inferior, inf_ptrace_attach): Use
11698         target_unpush_up.
11699         * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
11700
11701 2018-03-27  Tom Tromey  <tom@tromey.com>
11702
11703         * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
11704
11705 2018-03-27  Pedro Alves  <palves@redhat.com>
11706             Tom Tromey  <tom@tromey.com>
11707
11708         * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
11709         destructor.  Now a class.
11710         (gdb_readline_wrapper_cleanup): Remove function.
11711         (gdb_readline_wrapper): Remove cleanups.
11712
11713 2018-03-27  Tom Tromey  <tom@tromey.com>
11714
11715         * typeprint.h (struct type_print_options) <local_typedefs,
11716         global_typedefs>: Remove "struct" keyword.
11717         (class typedef_hash_table): New class.
11718         (recursively_update_typedef_hash, add_template_parameters)
11719         (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
11720         (find_typedef_in_hash): Don't declare.
11721         * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
11722         (typedef_hash_table::recursively_update): Rename from
11723         recursively_update_typedef_hash.  Now a member.
11724         (typedef_hash_table::add_template_parameters): Rename from
11725         add_template_parameters.  Now a member.
11726         (typedef_hash_table::typedef_hash_table): Now a constructor;
11727         rename from create_typedef_hash.
11728         (typedef_hash_table::~typedef_hash_table): Now a destructor;
11729         rename from free_typedef_hash.
11730         (do_free_typedef_hash, make_cleanup_free_typedef_hash)
11731         (do_free_global_table): Remove.
11732         (typedef_hash_table::typedef_hash_table): New constructor; renamed
11733         from copy_type_recursive.
11734         (create_global_typedef_table): Remove.
11735         (typedef_hash_table::find_global_typedef): Now a member of
11736         typedef_hash_table.
11737         (typedef_hash_table::find_typedef): Rename from
11738         find_typedef_in_hash; now a member.
11739         (whatis_exp): Update.
11740         * extension.h (struct ext_lang_type_printers): Add constructor and
11741         destructor.
11742         (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
11743         declare.
11744         * extension.c (ext_lang_type_printers::ext_lang_type_printers):
11745         Now a constructor; rename from start_ext_lang_type_printers.
11746         (ext_lang_type_printers): Now a destructor; rename from
11747         free_ext_lang_type_printers.
11748         * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
11749         Update.
11750         (c_type_print_base_struct_union): Update.  Remove cleanups.
11751
11752 2018-03-27  Tom Tromey  <tom@tromey.com>
11753
11754         * dwarf-index-write.c: Include <cmath>.
11755
11756 2018-03-27  Joel Brobecker  <brobecker@adacore.com>
11757
11758         * NEWS: Add entry describing new "set|show varsize-limit" command.
11759         * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
11760         command.
11761         * printcmd.c (_initialize_printcmd): Add "set var" alias of
11762         "set variable".
11763
11764 2018-03-27  Simon Marchi  <simon.marchi@ericsson.com>
11765
11766         * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
11767         dwarf-index-write.c
11768         (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
11769         * dwarf-index-common.c: New file.
11770         * dwarf-index-common.h: New file.
11771         * dwarf-index-write.c: New file.
11772         * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
11773         (struct dwarf2_section_info): Move from here.
11774         (dwarf2_section_info_def): Likewise.
11775         (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
11776         (offset_type): Likewise.
11777         (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
11778         (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
11779         (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
11780         (byte_swap): Likewise.
11781         (MAYBE_SWAP): Likewise.
11782         (dwarf2_per_cu_ptr): Likewise.
11783         (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
11784         (struct tu_stats): Likewise.
11785         (struct dwarf2_per_objfile): Likewise.
11786         (struct dwarf2_per_cu_data): Likewise.
11787         (struct signatured_type): Likewise.
11788         (sig_type_ptr): Likewise.
11789         (DEF_VEC_P (sig_type_ptr)): Likewise.
11790         (INDEX4_SUFFIX): Likewise.
11791         (INDEX5_SUFFIX): Likewise.
11792         (DEBUG_STR_SUFFIX): Likewise.
11793         (dwarf2_read_section): Make non-static.
11794         (mapped_index_string_hash): Move from here.
11795         (dwarf5_djb_hash): Likewise.
11796         (file_write): Likewise.
11797         (class data_buf): Likewise.
11798         (struct symtab_index_entry): Likewise.
11799         (struct mapped_symtab): Likewise.
11800         (find_slot): Likewise.
11801         (hash_expand): Likewise.
11802         (add_index_entry): Likewise.
11803         (uniquify_cu_indices): Likewise.
11804         (class c_str_view): Likewise.
11805         (class c_str_view_hasher): Likewise.
11806         (class vector_hasher): Likewise.
11807         (write_hash_table): Likewise.
11808         (psym_index_map): Likewise.
11809         (struct addrmap_index_data): Likewise.
11810         (add_address_entry): Likewise.
11811         (add_address_entry_worker): Likewise.
11812         (write_address_map): Likewise.
11813         (symbol_kind): Likewise.
11814         (write_psymbols): Likewise.
11815         (struct signatured_type_index_data): Likewise.
11816         (write_one_signatured_type): Likewise.
11817         (recursively_count_psymbols): Likewise.
11818         (recursively_write_psymbols): Likewise.
11819         (class debug_names): Likewise.
11820         (check_dwarf64_offsets): Likewise.
11821         (psyms_seen_size): Likewise.
11822         (write_gdbindex): Likewise.
11823         (write_debug_names): Likewise.
11824         (assert_file_size): Likewise.
11825         (write_psymtabs_to_index): Likewise.
11826         (save_gdb_index_command): Likewise.
11827         (_initialize_dwarf2_read): Don't register the "save gdb-index"
11828         command.
11829         * dwarf2read.h: New file.
11830
11831 2018-03-27  Joel Brobecker  <brobecker@adacore.com>
11832
11833         PR gdb/22670
11834         * dwarf2read.c (dwarf2_physname): Do not return the demangled
11835         symbol name if the CU's language stores symbol names in linkage
11836         format.
11837         * language.h (struct language_defn)
11838         <la_store_sym_names_in_linkage_form_p>: New field.  Adjust
11839         all instances of this struct.
11840
11841 2018-03-26  Tom Tromey  <tom@tromey.com>
11842
11843         * stack.c (backtrace_command_1): Remove verbose code.
11844
11845 2018-03-26  Tom Tromey  <tom@tromey.com>
11846
11847         * python/py-framefilter.c (py_print_type): Don't catch
11848         exceptions.  Return void.
11849         (py_print_value): Likewise.
11850         (py_print_single_arg): Likewise.
11851         (enumerate_args): Don't catch exceptions.
11852         (py_print_args): Likewise.
11853         (py_print_frame): Likewise.
11854         (gdbpy_apply_frame_filter): Catch exceptions here.
11855
11856 2018-03-26  Tom Tromey  <tom@tromey.com>
11857
11858         * stack.c (_initialize_stack): Remove trailing newlines from help
11859         text.  Add "Usage" line to "backtrace" help.
11860
11861 2018-03-26  Tom Tromey  <tom@tromey.com>
11862
11863         PR python/16486:
11864         * python/py-framefilter.c (py_print_args): Call wrap_hint.
11865
11866 2018-03-26  Tom Tromey  <tom@tromey.com>
11867
11868         * python/py-framefilter.c (py_print_single_arg): Return
11869         EXT_LANG_BT_ERROR from catch.
11870
11871 2018-03-26  Tom Tromey  <tom@tromey.com>
11872
11873         PR backtrace/15584:
11874         * stack.c (backtrace_command_1): Move some code into no-filters
11875         "if".
11876
11877 2018-03-26  Tom Tromey  <tom@tromey.com>
11878
11879         * python/py-framefilter.c (throw_quit_or_print_exception): New
11880         function.
11881         (gdbpy_apply_frame_filter): Use it.
11882
11883 2018-03-26  Tom Tromey  <tom@tromey.com>
11884
11885         PR cli/17716:
11886         * python/py-framefilter.c (py_print_type, py_print_value)
11887         (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
11888         RETURN_MASK_ERROR.
11889
11890 2018-03-26  Tom Tromey  <tom@tromey.com>
11891
11892         * python/py-framefilter.c (enumerate_args): Use
11893         gdb::unique_xmalloc_ptr.
11894
11895 2018-03-26  Tom Tromey  <tom@tromey.com>
11896
11897         * python/py-framefilter.c (py_print_frame): Return
11898         EXT_LANG_BT_OK.
11899         (gdbpy_apply_frame_filter): Update comment.
11900         * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
11901         Remove.
11902         <EXT_LANG_BT_NO_FILTERS>: Change value.
11903
11904 2018-03-26  Tom Tromey  <tom@tromey.com>
11905
11906         PR backtrace/15582:
11907         * stack.c (backtrace_command): Parse "hide" argument.
11908         * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
11909         * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
11910         constant.
11911
11912 2018-03-26  Tom Tromey  <tom@tromey.com>
11913
11914         * stack.c (backtrace_command_1): Remove "show_locals" parameter,
11915         add "flags".
11916         (backtrace_command): Remove "fulltrace", add "flags".
11917
11918 2018-03-26  Tom Tromey  <tom@tromey.com>
11919
11920         * stack.c (backtrace_command): Rewrite command line parsing.
11921
11922 2018-03-26  Simon Marchi  <simon.marchi@ericsson.com>
11923
11924         * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
11925
11926 2018-03-26  Simon Marchi  <simon.marchi@ericsson.com>
11927
11928         * filename-seen-cache.h: Add include guard.
11929
11930 2018-03-26  Keith Seitz  <keiths@redhat.com>
11931
11932         * symfile.c (place_section): Remove "struct" from section_addr_info
11933         in comment.
11934         * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
11935         "struct" keyword from section_addr_info.
11936
11937 2018-03-26  Alan Hayward  <alan.hayward@arm.com>
11938
11939         * regformats/regdef.h (reg): Add constructors.
11940
11941 2018-03-25  Pedro Alves  <palves@redhat.com>
11942
11943         * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
11944         if then/else bodies in var_func_name extraction.
11945
11946 2018-03-23  Weimin Pan  <weimin.pan@oracle.com>
11947
11948         * minsyms.c (lookup_minimal_symbol_and_objfile): Use
11949         lookup_minimal_symbol() to find symbol entry.
11950         * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
11951
11952 2018-03-23  Keith Seitz  <keiths@redhat.com>
11953
11954         PR c++/22968
11955         * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
11956         nested type definitions for C++, too.
11957
11958 2018-03-23  Tom Tromey  <tom@tromey.com>
11959
11960         * machoread.c (struct oso_el): Add a constructor.  Don't define as
11961         a typedef.
11962         (macho_register_oso): Remove.
11963         (macho_symtab_read): Take a std::vector.
11964         (oso_el_compare_name): Now a std::sort comparator.
11965         (macho_symfile_read_all_oso): Take a std::vector.
11966         (macho_symfile_read): Use std::vector.  Remove cleanups.
11967
11968 2018-03-22  Tom Tromey  <tom@tromey.com>
11969
11970         * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
11971         (record_full_goto_bookmark): Use std::string.
11972
11973 2018-03-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
11974
11975         PR tdep/18295
11976         * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
11977         a single mask.
11978
11979 2018-03-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
11980
11981         * rs6000-tdep.c (store_insn_p): New function.
11982         (skip_prologue): New variable alloca_reg_offset. Set lr_reg
11983         and cr_reg to their unshifted values. Use store_insn_p to
11984         match LR saves using either R1 or fdata->alloca_reg. Use
11985         store_insn_p to match CR saves. Set alloca_reg_offset
11986         when alloca_reg and framep are set. Remove lr_reg shift
11987         when assigning to fdata->lr_register.
11988
11989 2018-03-22  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11990
11991         * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
11992         command line args instead of emitting a warning.
11993
11994 2018-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
11995
11996         * tracepoint.h (struct static_tracepoint_marker): Initialize
11997         fields, define default constructor, move constructor and move
11998         assignment, disable the rest.
11999         <str_id, extra>: Make std::string.
12000         (release_static_tracepoint_marker): Remove.
12001         (free_current_marker): Remove.
12002         * tracepoint.c (free_current_marker): Remove.
12003         (parse_static_tracepoint_marker_definition): Adjust to
12004         std::string, use new hex2str overload.
12005         (release_static_tracepoint_marker): Remove.
12006         (print_one_static_tracepoint_marker): Get marker by reference
12007         and adjust to std::string.
12008         (info_static_tracepoint_markers_command): Adjust to std::vector
12009         changes
12010         * target.h (static_tracepoint_marker_p): Remove typedef.
12011         (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
12012         (struct target_ops) <to_static_tracepoint_marker_at>: Return
12013         bool.
12014         <to_static_tracepoint_markers_by_strid>: Return std::vector.
12015         * target-debug.h
12016         (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
12017         (target_debug_print_std_vector_static_tracepoint_marker): New.
12018         (target_debug_print_struct_static_tracepoint_marker_p): Rename
12019         to...
12020         (target_debug_print_static_tracepoint_marker_p): ... this.
12021         * target-delegates.c: Re-generate.
12022         * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
12023         Make std::string.
12024         * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
12025         (decode_static_tracepoint_spec): Adjust to std::vector.
12026         (tracepoint_print_one_detail): Adjust to std::string.
12027         (strace_marker_decode_location): Adjust to std::string.
12028         (update_static_tracepoint): Adjust to std::string, remove call
12029         to release_static_tracepoint_marker.
12030         * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
12031         Adjust to std::vector.
12032         * remote.c (remote_static_tracepoint_marker_at): Return bool.
12033         (remote_static_tracepoint_markers_by_strid): Adjust to
12034         std::vector.
12035         * common/rsp-low.h (hex2str): New overload with explicit count
12036         of bytes.
12037         * common/rsp-low.c (hex2str): New overload with explicit count
12038         of bytes.
12039         * unittests/rsp-low-selftests.c (test_hex2str): New function.
12040         (_initialize_rsp_low_selftests): Add test_hex2str test.
12041         * unittests/tracepoint-selftests.c
12042         (test_parse_static_tracepoint_marker_definition): Adjust to
12043         std::string.
12044
12045 2018-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
12046
12047         * tracepoint.c (parse_static_tracepoint_marker_definition):
12048         Consider case where the definition is followed by more
12049         definitions.
12050         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12051         tracepoint-selftests.c.
12052         * unittests/tracepoint-selftests.c: New.
12053
12054 2018-03-21  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
12055
12056         * MAINTAINERS (Write After Approval): Add Pedro Franco de
12057         Carvalho.
12058
12059 2018-03-20  Stephen Roberts  <stephen.roberts@arm.com>
12060
12061         * symtab.c (find_pc_sect_line): fixed indentation.
12062
12063 2018-03-20  Stephen Roberts  <stephen.roberts@arm.com>
12064
12065         * symtab.c (find_pc_sect_line): now uses binary search.
12066
12067 2018-03-19  Tom Tromey  <tom@tromey.com>
12068
12069         * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
12070         "IDENT" production.
12071
12072 2018-03-19  Pedro Alves  <palves@redhat.com>
12073             Tom Tromey  <tom@tromey.com>
12074
12075         * unittests/observable-selftests.c: New file.
12076         * common/observable.h: New file.
12077         * observable.h: New file.
12078         * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
12079         arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
12080         breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
12081         corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
12082         extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
12083         infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
12084         linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
12085         mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
12086         ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
12087         python/py-breakpoint.c, python/py-finishbreakpoint.c,
12088         python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
12089         record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
12090         riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
12091         spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
12092         symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
12093         tui/tui-interp.c, valops.c: Update all users.
12094         * tui/tui-hooks.c (tui_bp_created_observer)
12095         (tui_bp_deleted_observer, tui_bp_modified_observer)
12096         (tui_inferior_exit_observer, tui_before_prompt_observer)
12097         (tui_normal_stop_observer, tui_register_changed_observer):
12098         Remove.
12099         (tui_observers_token): New global.
12100         (attach_or_detach, tui_attach_detach_observers): New functions.
12101         (tui_install_hooks, tui_remove_hooks): Use
12102         tui_attach_detach_observers.
12103         * record-btrace.c (record_btrace_thread_observer): Remove.
12104         (record_btrace_thread_observer_token): New global.
12105         * observer.sh: Remove.
12106         * observer.c: Rename to observable.c.
12107         * observable.c (namespace gdb_observers): Define new objects.
12108         (observer_debug): Move into gdb_observers namespace.
12109         (struct observer, struct observer_list, xalloc_observer_list_node)
12110         (xfree_observer_list_node, generic_observer_attach)
12111         (generic_observer_detach, generic_observer_notify): Remove.
12112         (_initialize_observer): Update.
12113         Don't include observer.inc.
12114         * Makefile.in (generated_files): Remove observer.h, observer.inc.
12115         (clean mostlyclean): Likewise.
12116         (observer.h, observer.inc): Remove targets.
12117         (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
12118         (COMMON_SFILES): Use observable.c, not observer.c.
12119         * .gitignore: Remove observer.h.
12120
12121 2018-03-18  Tom Tromey  <tom@tromey.com>
12122
12123         * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
12124         gdb::def_vector.
12125         (bfd_lookup_symbol_from_dyn_symtab): Likewise.
12126
12127 2018-03-17  Tom Tromey  <tom@tromey.com>
12128
12129         * auto-load.c (auto_load_objfile_script_1): Use std::string.
12130
12131 2018-03-17  Tom Tromey  <tom@tromey.com>
12132
12133         * target.c (class scoped_target_fd): New.
12134         (target_fileio_close_cleanup): Remove.
12135         (target_fileio_read_alloc_1): Use scoped_target_fd.
12136
12137 2018-03-16  Simon Marchi  <simon.marchi@polymtl.ca>
12138
12139         * silent-rules.mk: New.
12140         * Makefile.in: Include silent-rules.mk
12141         (srcdir, VPATH, top_srcdir): Move up.
12142         (COMPILE): Add ECHO_CXX.
12143         (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
12144         (init.c): Add ECHO_INIT_C.
12145         (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
12146         (version.c): Add ECHO_GEN.
12147         (printcmd.o): Add ECHO_CXX.
12148         (target-float.o): Add ECHO_CXX.
12149         (ada-exp.o): Add ECHO_CXX.
12150         (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
12151         (insight$(EXEEXT)): Add ECHO_CXXLD.
12152         * gnulib/configure.ac: Add AM_SILENT_RULES.
12153         * gnulib/aclocal.m4: Re-generate.
12154         * gnulib/configure: Re-generate.
12155         * gnulib/import/Makefile.in: Re-generate.
12156
12157 2018-03-16  Tom Tromey  <tom@tromey.com>
12158
12159         * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
12160         * utils.h (make_cleanup_free_section_addr_info): Don't declare.
12161         * utils.c (do_free_section_addr_info)
12162         (make_cleanup_free_section_addr_info): Remove.
12163         * symfile.h (struct other_sections): Add constructor.
12164         (struct section_addr_info): Remove.
12165         (section_addr_info): New typedef.
12166         (struct sym_fns) <sym_offsets>: Change type of parameter.
12167         (build_section_addr_info_from_objfile)
12168         (relative_addr_info_to_section_offsets, addr_info_make_relative)
12169         (default_symfile_offsets, symbol_file_add)
12170         (symbol_file_add_from_bfd)
12171         (build_section_addr_info_from_section_table): Update.
12172         (alloc_section_addr_info, free_section_addr_info): Don't declare.
12173         * symfile.c (alloc_section_addr_info): Remove.
12174         (build_section_addr_info_from_section_table): Change return type.
12175         Update.
12176         (build_section_addr_info_from_bfd)
12177         (build_section_addr_info_from_objfile): Likewise.
12178         (free_section_addr_info): Remove.
12179         (relative_addr_info_to_section_offsets): Change type of "addrs".
12180         (addrs_section_compar): Now a std::sort comparator.
12181         (addrs_section_sort): Change return type.
12182         (addr_info_make_relative): Change type of "addrs".  Update.
12183         (default_symfile_offsets, syms_from_objfile_1)
12184         (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
12185         (symbol_file_add_separate): Update.
12186         (symbol_file_add): Change type of "addrs".  Update.
12187         (add_symbol_file_command): Update.  Remove cleanups.
12188         * symfile-mem.c (symbol_file_add_from_memory): Update.  Remove
12189         cleanups.
12190         * symfile-debug.c (debug_sym_offsets): Change type of "info".
12191         * solib.c (solib_read_symbols): Update.
12192         * objfiles.c (objfile_relocate): Update.  Remove cleanups.
12193         * machoread.c (macho_symfile_offsets): Update.
12194         * jit.c (jit_bfd_try_read_symtab): Update.
12195
12196 2018-03-15  Simon Marchi  <simon.marchi@polymtl.ca>
12197
12198         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12199         unittests/utils-selftests.c.
12200         * unittests/utils-selftests.c: New file.
12201
12202 2018-03-14  Tom Tromey  <tom@tromey.com>
12203
12204         PR cli/14977:
12205         * printcmd.c (printf_c_string, printf_wide_c_string): Special case
12206         for NULL.
12207
12208 2018-03-14  Tom Tromey  <tom@tromey.com>
12209
12210         PR cli/19918:
12211         * printcmd.c (printf_pointer): Allow "-" in format.
12212
12213 2018-03-14  Tom Tromey  <tom@tromey.com>
12214
12215         * printcmd.c (_initialize_printcmd): Add usage to printf.
12216
12217 2018-03-14  Yao Qi  <qiyao@sourceware.org>
12218
12219         * MAINTAINERS: Update my email address.
12220
12221 2018-03-13  Tom Tromey  <tom@tromey.com>
12222
12223         * machoread.c (macho_check_dsym): Change filenamep to a
12224         std::string*.
12225         (macho_symfile_read): Update.
12226         * symfile.c (load_command): Use std::string.
12227
12228 2018-03-12  Andrew Burgess  <andrew.burgess@embecosm.com>
12229
12230         * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
12231         to error message string.
12232         (riscv_register_name): Use xsnprintf instead of sprintf.
12233         (riscv_insn::fetch_instruction): Use gdb_assert instead of
12234         internal_error.
12235         (riscv_print_arg_location): Use gdb_assert_not_reached instead of
12236         error.
12237         (riscv_push_dummy_call): Likewise.
12238
12239 2018-03-12  Tom Tromey  <tom@tromey.com>
12240
12241         * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
12242         Use gdb::byte_vector.
12243         * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
12244
12245 2018-03-12  Yao Qi  <yao.qi@linaro.org>
12246
12247         * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
12248         parameter type to readable_regcache.
12249         * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
12250         the declaration.
12251
12252 2018-03-11  Tom Tromey  <tom@tromey.com>
12253
12254         * dwarf2read.c (struct nextfield): Add initializers.
12255         (struct nextfnfield): Remove.
12256         (struct fnfieldlist): Add initializers.  Remove "length" and
12257         "head", use std::vector.
12258         (struct decl_field_list): Remove.
12259         (struct field_info): Add initializers.
12260         <fields, baseclasses>: Now std::vector.
12261         <nbaseclasses, nfnfields, typedef_field_list_count,
12262         nested_types_list_count>: Remove.
12263         (dwarf2_add_field, dwarf2_add_type_defn)
12264         (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
12265         (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
12266         (process_structure_scope): Update.
12267
12268 2018-03-11  Tom Tromey  <tom@tromey.com>
12269
12270         * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
12271         for use by std::sort.
12272         (build_type_psymtabs_1): Use std::vector.
12273
12274 2018-03-09  Eli Zaretskii  <eliz@gnu.org>
12275
12276         * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
12277         and LIBMPFR in the printed configuration.
12278
12279 2018-03-08  Tom Tromey  <tom@tromey.com>
12280
12281         * source.c (get_filename_and_charpos): Use scoped_fd.
12282         * nto-procfs.c (procfs_open_1): Use scoped_fd.
12283         (procfs_pidlist): Likewise.
12284         * procfs.c (proc_get_LDT_entry): Use scoped_fd.
12285         (iterate_over_mappings): Likewise.
12286
12287 2018-03-08  Tom Tromey  <tom@tromey.com>
12288
12289         * infcall.c (struct call_return_meta_info)
12290         <stack_temporaries_enabled>: Remove.
12291         (get_call_return_value, call_function_by_hand_dummy): Update.
12292         * thread.c (disable_thread_stack_temporaries): Remove.
12293         (enable_thread_stack_temporaries): Remove.
12294         (thread_stack_temporaries_enabled_p): Return bool.
12295         (push_thread_stack_temporary, value_in_thread_stack_temporaries)
12296         (get_last_thread_stack_temporary): Update.
12297         * eval.c (evaluate_subexp): Update.
12298         * gdbthread.h (class enable_thread_stack_temporaries): Now a
12299         class, not a function.
12300         (value_ptr, value_vec): Remove typedefs.
12301         (class thread_info) <stack_temporaries_enabled>: Now bool.
12302         <stack_temporaries>: Now a std::vector.
12303         (thread_stack_temporaries_enabled_p)
12304         (value_in_thread_stack_temporaries): Return bool.
12305
12306 2018-03-08  Simon Marchi  <simon.marchi@ericsson.com>
12307
12308         * remote.c (putpkt_binary): Fix omitted bytes reporting.
12309         (getpkt_or_notif_sane_1): Likewise.
12310
12311 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
12312
12313         * build-id.c (build_id_to_debug_bfd): Use std::string.
12314
12315 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
12316
12317         * build-id.c (find_separate_debug_file_by_buildid): Return
12318         std::string.
12319         * build-id.h (find_separate_debug_file_by_buildid): Return
12320         std::string.
12321         * coffread.c (coff_symfile_read): Adjust to std::string.
12322         * elfread.c (elf_symfile_read): Adjust to std::string.
12323         * symfile.c (separate_debug_file_exists): Change parameter to
12324         std::string.
12325         (find_separate_debug_file): Return std::string.
12326         (find_separate_debug_file_by_debuglink): Return std::string.
12327         * symfile.h (find_separate_debug_file_by_debuglink): Return
12328         std::string.
12329
12330 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
12331
12332         * common/xml-utils.c (xml_escape_text): Move code to...
12333         (xml_escape_text_append): ... this new function.
12334         * common/xml-utils.h (xml_escape_text_append): New declaration.
12335         * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
12336         New function.
12337         (_initialize_xml_utils): register test_xml_escape_text_append as
12338         a selftest.
12339
12340 2018-03-07  Alan Hayward  <alan.hayward@arm.com>
12341
12342         * defs.h: Remove MAX_REGISTER_SIZE.
12343         * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
12344         asserts.
12345         * python/py-unwind.c (pyuw_sniffer): Likewise.
12346
12347 2018-03-07  Tom Tromey  <tom@tromey.com>
12348
12349         * linux-tdep.c (linux_info_proc): Update.
12350         * target.h (struct target_ops) <to_fileio_readlink>: Return
12351         optional<string>.
12352         (target_fileio_readlink): Return optional<string>.
12353         * remote.c (remote_hostio_readlink): Return optional<string>.
12354         * inf-child.c (inf_child_fileio_readlink): Return
12355         optional<string>.
12356         * target.c (target_fileio_readlink): Return optional<string>.
12357
12358 2018-03-07  Andrew Burgess  <andrew.burgess@embecosm.com>
12359
12360         * regcache.c (cooked_read_test): Add riscv to the list of
12361         architectures that have a save_reggroup.
12362
12363 2018-03-07  Andreas Arnez  <arnez@linux.vnet.ibm.com>
12364
12365         * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
12366         value is not a dynamic class object.
12367
12368 2018-03-06  Tom Tromey  <tom@tromey.com>
12369
12370         * rust-exp.y: Formatting fixes.
12371
12372 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
12373
12374         * riscv-tdep.c (riscv_register_name): Remove target description
12375         support.
12376         (riscv_gdbarch_init): Remove target description check.
12377
12378 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
12379
12380         * riscv-tdep.c: Remove 'Contributed by ...' lines from header
12381         comment.
12382         * riscv-tdep.h: Likewise.
12383
12384 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
12385
12386         * riscv-tdep.c (riscv_pseudo_register_read): Delete.
12387         (riscv_pseudo_register_write): Delete.
12388         (riscv_gdbarch_init): Remove all use of pseudo registers.
12389
12390 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
12391
12392         * record-btrace.c (btrace_print_lines): Replace cleanup
12393         parameter with RAII equivalents.
12394         (btrace_insn_history): Replace cleanup with RAII equivalents.
12395         * ui-out.h (make_cleanup_ui_out_list_begin_end,
12396         make_cleanup_ui_out_tuple_begin_end): Remove.
12397         * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
12398         make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
12399         make_cleanup_ui_out_list_begin_end): Remove.
12400
12401 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
12402
12403         * record-btrace.c (record_btrace_maybe_mark_async_event): Change
12404         parameter types to std::vector.  Use bool.
12405         (record_btrace_wait): Replace VEC(tp_t) with
12406         std::vector<thread_info *>.
12407         * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
12408
12409 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
12410
12411         * record-btrace.c (record_btrace_disable_callback): Remove.
12412         (struct scoped_btrace_disable): New.
12413         (record_btrace_open): Use scoped_btrace_disable.
12414
12415 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
12416
12417         * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
12418         reading values from registers.
12419
12420 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
12421
12422         * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
12423         where appropriate.
12424
12425 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
12426
12427         * riscv-tdep.c (riscv_print_arg_location): Add header comment,
12428         change parameter type.  Use GDB's print functions, and use
12429         core_addr_to_string where appropriate.
12430         (riscv_push_dummy_call): Use core_addr_to_string where
12431         appropriate, update call to riscv_print_arg_location, and reindent
12432         a few lines.
12433         (riscv_return_value): Update call to riscv_print_arg_location.
12434
12435 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
12436             Tim Newsome <tim@sifive.com>
12437             Albert Ou <a0u@eecs.berkeley.edu>
12438             Darius Rad <darius@bluespec.com>
12439
12440         * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
12441         (HFILES_NO_SRCDIR): Add riscv-tdep.h.
12442         (ALLDEPFILES): Add riscv-tdep.c
12443         * configure.tgt: Add riscv support.
12444         * riscv-tdep.c: New file.
12445         * riscv-tdep.h: New file.
12446         * NEWS: Mention new target.
12447         * MAINTAINERS: Add entry for riscv.
12448
12449 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
12450
12451         * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
12452         fields within aggregates.
12453
12454 2018-03-04  Simon Marchi  <simon.marchi@polymtl.ca>
12455
12456         * record-btrace.c (btrace_print_lines): Change type of flags to
12457         gdb_disassembly_flags.
12458
12459 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
12460
12461         * fbsd-nat.c: Include "inf-ptrace.h".
12462         (USE_SIGTRAP_SIGINFO): Conditionally define.
12463         [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
12464         (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
12465         [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
12466         function.
12467         [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
12468         Likewise.
12469         [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
12470         Likewise.
12471         (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
12472         "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
12473         "supports_stopped_by_hw_breakpoint" target methods.
12474
12475 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
12476
12477         * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
12478         * fbsd-nat.c (debug_fbsd_nat): New variable.
12479         (show_fbsd_nat_debug): New function.
12480         (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
12481         (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
12482
12483 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
12484
12485         * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
12486         * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
12487         prototype.
12488         * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
12489         (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
12490         method.
12491
12492 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
12493
12494         * common/gdb_vecs.c (free_char_ptr_vec): Remove.
12495         * common/gdb_vecs.h (free_char_ptr_vec): Remove.
12496
12497 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
12498
12499         * charset.c (struct charset_vector): New.
12500         (charsets): Change type to charset_vector.
12501         (find_charset_names): Adjust.
12502         (add_one): Adjust.
12503         (_initialize_charset): Adjust.
12504
12505 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
12506
12507         * progspace.h (struct program_space) <deleted_solibs>: Change
12508         type to std::vector<std::string>.
12509         * progspace.c (clear_program_space_solib_cache): Adjust.
12510         * breakpoint.c (print_solib_event): Adjust.
12511         (check_status_catch_solib): Adjust.
12512         * solib.c (update_solib_list): Adjust.
12513         * ui-out.h (class ui_out) <field_string>: New overload.
12514         * ui-out.c (ui_out::field_string): New overload.
12515
12516 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
12517
12518         * progspace.h (struct program_space): Add constructor and
12519         destructor, initialize fields.
12520         (add_program_space): Remove.
12521         * progspace.c (add_program_space): Rename to...
12522         (program_space::program_space): ... this.
12523         (release_program_space): Rename to...
12524         (program_space::~program_space): ... this.
12525         (delete_program_space): Use delete to delete program_space.
12526         (initialize_progspace): Use new to allocate program_space.
12527         * inferior.c (add_inferior_with_spaces): Likewise.
12528         (clone_inferior_command): Likewise.
12529         * infrun.c (follow_fork_inferior): Likewise.
12530         (handle_vfork_child_exec_or_exit): Likewise.
12531
12532 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
12533
12534         * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
12535         (delim_string_to_char_ptr_vec): Return std::vector of
12536         gdb::unique_xmalloc_ptr.
12537         (dirnames_to_char_ptr_vec_append): Take std::vector of
12538         gdb::unique_xmalloc_ptr.
12539         (dirnames_to_char_ptr_vec): Return std::vector of
12540         gdb::unique_xmalloc_ptr.
12541         * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
12542         Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
12543         (delim_string_to_char_ptr_vec): Return an std::vector of
12544         gdb::unique_xmalloc_ptr, adjust the code.
12545         (dirnames_to_char_ptr_vec_append): Take an std::vector of
12546         gdb::unique_xmalloc_ptr, adjust the code.
12547         (dirnames_to_char_ptr_vec): Return an std::vector of
12548         gdb::unique_xmalloc_ptr, adjust the code.
12549         * auto-load.c (auto_load_safe_path_vec): Change type to
12550         std::vector of gdb::unique_xmalloc_ptr.
12551         (auto_load_expand_dir_vars): Return an std::vector of
12552         gdb::unique_xmalloc_ptr, adjust the code.
12553         (auto_load_safe_path_vec_update): Adjust.
12554         (filename_is_in_auto_load_safe_path_vec): Adjust.
12555         (auto_load_objfile_script_1): Adjust.
12556         * build-id.c (build_id_to_debug_bfd): Adjust.
12557         * linux-thread-db.c (thread_db_load_search): Adjust.
12558         * source.c (add_path): Adjust.
12559         (openp): Adjust.
12560         * symfile.c (find_separate_debug_file): Adjust.
12561         * utils.c (do_free_char_ptr_vec): Remove.
12562         (make_cleanup_free_char_ptr_vec): Remove.
12563
12564 2018-03-01  Sergio Durigan Junior  <sergiodj@redhat.com>
12565
12566         PR gdb/22907
12567         * common/pathstuff.c: Conditionally include "<windows.h>".
12568
12569 2018-03-01  Georg Sauthoff  <mail@georg.so>
12570
12571         PR gdb/22888
12572         * gcore.in: Quote variables and switch interpreter to bash.
12573
12574 2018-03-01  Tom Tromey  <tom@tromey.com>
12575
12576         * dwarf2read.c (alloc_discriminant_info): Fix default_index
12577         assertion.  Add assertion for discriminant_index.
12578         (quirk_rust_enum): Use correct base type name in univariant case.
12579
12580 2018-03-01  Simon Marchi  <simon.marchi@ericsson.com>
12581
12582         * record.c (get_call_history_modifiers): Return a
12583         record_print_flags.
12584         (cmd_record_call_history): Adjust.
12585         * record-btrace.c (record_btrace_call_history): Adjust.
12586         (record_btrace_call_history_range): Adjust.
12587         (record_btrace_call_history_from): Adjust.
12588         * target-debug.h (target_debug_print_record_print_flags): New.
12589         * target-delegates.c: Re-generate.
12590         * target.c (target_call_history): Change flags type.
12591         (target_call_history_from): Likewise.
12592         (target_call_history_range): Likewise.
12593         * target.h (struct target_ops) <target_call_history>: Likewise.
12594         (target_call_history_from): Likewise.
12595         (target_call_history_range): Likewise.
12596
12597 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
12598             Simon Marchi  <simon.marchi@polymtl.ca>
12599
12600         * common/common-utils.c: Include "sys/stat.h".
12601         (is_regular_file): Move here from "source.c"; change return
12602         type to "bool".
12603         * common/common-utils.h (is_regular_file): New prototype.
12604         * common/pathstuff.c (contains_dir_separator): New function.
12605         * common/pathstuff.h (contains_dir_separator): New prototype.
12606         * source.c: Don't include "sys/stat.h".
12607         (is_regular_file): Move to "common/common-utils.c".
12608
12609 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
12610
12611         * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
12612         (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
12613         * auto-load.c: Include "common/pathstuff.h".
12614         * common/common-def.h (current_directory): Move here.
12615         * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
12616         function.
12617         * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
12618         prototype.
12619         * common/pathstuff.c: New file.
12620         * common/pathstuff.h: New file.
12621         * compile/compile.c: Include "common/pathstuff.h".
12622         * defs.h (current_directory): Move to "common/common-defs.h".
12623         * dwarf2read.c: Include "common/pathstuff.h".
12624         * exec.c: Likewise.
12625         * guile/scm-safe-call.c: Likewise.
12626         * linux-thread-db.c: Likewise.
12627         * main.c: Likewise.
12628         * nto-tdep.c: Likewise.
12629         * objfiles.c: Likewise.
12630         * source.c: Likewise.
12631         * symtab.c: Likewise.
12632         * utils.c: Include "common/pathstuff.h".
12633         (gdb_realpath): Move to "common/pathstuff.c".
12634         (gdb_realpath_keepfile): Likewise.
12635         (gdb_abspath): Likewise.
12636         * utils.h (gdb_realpath): Move to "common/pathstuff.h".
12637         (gdb_realpath_keepfile): Likewise.
12638         (gdb_abspath): Likewise.
12639
12640 2018-02-28  John Baldwin  <jhb@FreeBSD.org>
12641
12642         * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
12643         wildcard process pid for super_resume for kernels with a
12644         specific bug.
12645
12646 2018-02-27  Phil Muldoon  <pmuldoon@redhat.com>
12647
12648         * compile/compile.c (get_args): Add additional comments
12649         explaining function.
12650
12651 2018-02-27  Simon Marchi  <simon.marchi@polymtl.ca>
12652             Tom Tromey  <tom@tromey.com>
12653
12654         * target.h (memory_write_request_s): Remove typedef.  Don't define
12655         VEC.
12656         (target_write_memory_blocks): Change argument to std::vector.
12657         (struct memory_write_request): Add constructor.
12658         * target-memory.c (compare_block_starting_address): Return bool.
12659         Change argument types.
12660         (claim_memory): Change arguments to use std::vector.
12661         (split_regular_and_flash_blocks, blocks_to_erase)
12662         (compute_garbled_blocks): Likewise.
12663         (cleanup_request_data, cleanup_write_requests_vector): Remove.
12664         (target_write_memory_blocks): Change argument to std::vector.
12665         * symfile.c (struct load_section_data): Add constructor and
12666         destructor.  Use std::vector for "requests".
12667         (struct load_progress_data): Add initializers.
12668         (load_section_callback): Update.  Use "new".
12669         (clear_memory_write_data): Remove.
12670         (generic_load): Update.
12671
12672 2018-02-27  Alan Hayward  <alan.hayward@arm.com>
12673
12674         * arch/aarch64.h: Use common/tdesc.h.
12675
12676 2018-02-26  Maciej W. Rozycki  <macro@mips.com>
12677
12678         * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
12679         architecture with a 64-bit ABI.
12680
12681 2018-02-26  Maciej W. Rozycki  <macro@mips.com>
12682
12683         * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
12684         ahead of target description loading.
12685
12686 2018-02-26  Tom Tromey  <tom@tromey.com>
12687
12688         * stack.c (backtrace_command_1): Update.
12689         * python/python-internal.h (gdbpy_apply_frame_filter): Change type
12690         of "flags".
12691         * python/py-framefilter.c (py_print_frame)
12692         (gdbpy_apply_frame_filter): Change type of "flags".
12693         * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
12694         of "flags".
12695         (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
12696         (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
12697         * extension.h (enum frame_filter_flag): Rename from
12698         frame_filter_flags.
12699         (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
12700         (apply_ext_lang_frame_filter): Change type of "flags".
12701         * extension.c (apply_ext_lang_frame_filter): Change type of
12702         "flags".
12703         * extension-priv.h (struct extension_language_ops)
12704         <apply_frame_filter>: Change type of "flags".
12705
12706 2018-02-26  Tom Tromey  <tom@tromey.com>
12707
12708         PR python/16497:
12709         * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag.  Fix
12710         off-by-one in py_end computation.
12711         * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
12712         PRINT_MORE_FRAMES.
12713         * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
12714         constant.
12715
12716 2018-02-26  Tom Tromey  <tom@tromey.com>
12717
12718         * dwarf2read.c (struct variant_field): New.
12719         (struct nextfield) <variant>: New field.
12720         (dwarf2_add_field): Handle DW_TAG_variant_part.
12721         (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
12722         discriminated union.
12723         (read_structure_type): Handle DW_TAG_variant_part.
12724         (handle_struct_member_die): New function, extracted from
12725         process_structure_scope.  Handle DW_TAG_variant.
12726         (process_structure_scope): Handle discriminated unions.  Call
12727         handle_struct_member_die.
12728
12729 2018-02-26  Tom Tromey  <tom@tromey.com>
12730
12731         * rust-lang.h (rust_last_path_segment): Declare.
12732         * rust-lang.c (rust_last_path_segment): Now public.  Change
12733         contract.
12734         (struct disr_info): Remove.
12735         (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
12736         (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
12737         (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
12738         (rust_enum_p, rust_enum_variant): New function.
12739         (rust_underscore_fields): Remove "offset" parameter.
12740         (rust_print_enum): New function.
12741         (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
12742         <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
12743         (rust_print_struct_def): Add "for_rust_enum" parameter.  Handle
12744         enums.
12745         (rust_internal_print_type): New function, from rust_print_type.
12746         Remove enum code.
12747         (rust_print_type): Call rust_internal_print_type.
12748         (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
12749         Update enum handling.
12750         * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
12751         (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
12752         (rust_union_quirks): New functions.
12753         (process_full_comp_unit, process_full_type_unit): Call
12754         rust_union_quirks.
12755         (process_structure_scope): Update rust_unions if necessary.
12756
12757 2018-02-26  Tom Tromey  <tom@tromey.com>
12758
12759         * value.h (value_union_variant): Declare.
12760         * valops.c (value_union_variant): New function.
12761         * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
12762         (struct discriminant_info): New.
12763         (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
12764         enumerator.
12765         (struct main_type) <flag_discriminated_union>: New field.
12766
12767 2018-02-26  Tom Tromey  <tom@tromey.com>
12768
12769         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12770         unittests/unpack-selftests.c.
12771         * unittests/unpack-selftests.c: New file.
12772         * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
12773
12774 2018-02-26  Yao Qi  <yao.qi@linaro.org>
12775
12776         * dwarf2read.c (struct partial_die_info) <read>: New method.
12777         (read_partial_die): Remove the declaration.
12778         (load_partial_dies): Update.
12779         (partial_die_info::partial_die_info):
12780         (read_partial_die): Change it to partial_die_info::read.
12781
12782 2018-02-26  Yao Qi  <yao.qi@linaro.org>
12783
12784         * dwarf2read.c (struct partial_die_info) <fixup>: New method.
12785         (fixup_partial_die): Remove declaration.
12786         (scan_partial_symbols): Update.
12787         (partial_die_parent_scope): Likewise.
12788         (partial_die_full_name): Likewise.
12789         (fixup_partial_die): Change it to partial_die_info::fixup.
12790
12791 2018-02-26  Yao Qi  <yao.qi@linaro.org>
12792
12793         * dwarf2read.c (read_partial_die): Update the declaration.
12794         (load_partial_dies): Caller update.
12795         (read_partial_die): Remove one argument abbrev_len.
12796
12797 2018-02-26  Yao Qi  <yao.qi@linaro.org>
12798
12799         * dwarf2read.c (struct partial_die_info): Add ctor, delete
12800         assignment operator.
12801         (load_partial_dies): Use ctor and copy ctor.
12802         (read_partial_die): Update.
12803         (dwarf2_cu::find_partial_die): Use ctor.
12804
12805 2018-02-26  Yao Qi  <yao.qi@linaro.org>
12806
12807         * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
12808         (find_partial_die_in_comp_unit): Change it to
12809         dwarf2_cu::find_partial_die.
12810         (find_partial_die): Update.
12811
12812 2018-02-26  Yao Qi  <yao.qi@linaro.org>
12813
12814         * dwarf2read.c (read_partial_die): Remove the code checking abbrev
12815         is NULL.
12816
12817 2018-02-26  Yao Qi  <yao.qi@linaro.org>
12818
12819         * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
12820
12821 2018-02-26  Alan Hayward  <alan.hayward@arm.com>
12822
12823         * arch/amd64.h: Use common/tdesc.h.
12824         * arch/i386.c: Likewise.
12825         * arch/i386.h: Likewise.
12826         * arch/tic6x.c: Likewise.
12827         * arch/tdesc.h: Move file from here...
12828         * common/tdesc.h: ...to here.
12829         * features/aarch64-core.c: Regenerate.
12830         * features/aarch64-fpu.c: Regenerate.
12831         * features/i386/32bit-avx.c: Regenerate.
12832         * features/i386/32bit-avx512.c: Regenerate.
12833         * features/i386/32bit-core.c: Regenerate.
12834         * features/i386/32bit-linux.c: Regenerate.
12835         * features/i386/32bit-mpx.c: Regenerate.
12836         * features/i386/32bit-pkeys.c: Regenerate.
12837         * features/i386/32bit-sse.c: Regenerate.
12838         * features/i386/64bit-avx.c: Regenerate.
12839         * features/i386/64bit-avx512.c: Regenerate.
12840         * features/i386/64bit-core.c: Regenerate.
12841         * features/i386/64bit-linux.c: Regenerate.
12842         * features/i386/64bit-mpx.c: Regenerate.
12843         * features/i386/64bit-pkeys.c: Regenerate.
12844         * features/i386/64bit-segments.c: Regenerate.
12845         * features/i386/64bit-sse.c: Regenerate.
12846         * features/i386/x32-core.c: Regenerate.
12847         * features/tic6x-c6xp.c: Regenerate.
12848         * features/tic6x-core.c: Regenerate.
12849         * features/tic6x-gp.c: Regenerate.
12850         * target-descriptions.c: Use common/tdesc.h.
12851         * target-descriptions.h: Likewise.
12852
12853 2018-02-24  Tom Tromey  <tom@tromey.com>
12854
12855         * linux-thread-db.c (try_thread_db_load_from_pdir_1)
12856         (try_thread_db_load_from_dir, thread_db_load_search): Use
12857         std::string.
12858         (info_auto_load_libthread_db_compare): Return bool.  Change
12859         argument types.
12860         (info_auto_load_libthread_db): Use std::vector, std::string.
12861         Remove cleanups.
12862
12863 2018-02-24  Tom Tromey  <tom@tromey.com>
12864
12865         * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
12866         std::string.
12867         * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
12868         std::string*.
12869         * gdbarch.c: Rebuild.
12870         * gdbarch.h: Rebuild.
12871         * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
12872         * arch-utils.h (default_fast_tracepoint_valid_at): Update.
12873         * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
12874         std::string*.
12875
12876 2018-02-23  Simon Marchi  <simon.marchi@polymtl.ca>
12877
12878         * gdbtypes.h (sect_offset): Change type to uint64_t.
12879         (sect_offset_str): New function.
12880         * dwarf2read.c (create_addrmap_from_aranges): Use
12881         sect_offset_str.
12882         (error_check_comp_unit_head): Likewise.
12883         (create_debug_type_hash_table): Likewise.
12884         (read_cutu_die_from_dwo): Likewise.
12885         (init_cutu_and_read_dies): Likewise.
12886         (init_cutu_and_read_dies_no_follow): Likewise.
12887         (process_psymtab_comp_unit_reader): Likewise.
12888         (partial_die_parent_scope): Likewise.
12889         (peek_die_abbrev): Likewise.
12890         (process_queue): Likewise.
12891         (dwarf2_physname): Likewise.
12892         (read_namespace_alias): Likewise.
12893         (read_import_statement): Likewise.
12894         (create_dwo_cu_reader): Likewise.
12895         (create_cus_hash_table): Likewise.
12896         (lookup_dwo_cutu): Likewise.
12897         (inherit_abstract_dies): Likewise.
12898         (read_func_scope): Likewise.
12899         (read_call_site_scope): Likewise.
12900         (dwarf2_add_member_fn): Likewise.
12901         (read_common_block): Likewise.
12902         (read_module_type): Likewise.
12903         (read_typedef): Likewise.
12904         (read_subrange_type): Likewise.
12905         (load_partial_dies): Likewise.
12906         (read_partial_die): Likewise.
12907         (find_partial_die): Likewise.
12908         (read_str_index): Likewise.
12909         (dwarf2_string_attr): Likewise.
12910         (build_error_marker_type): Likewise.
12911         (lookup_die_type): Likewise.
12912         (dump_die_shallow): Likewise.
12913         (follow_die_ref): Likewise.
12914         (dwarf2_fetch_die_loc_sect_off): Likewise.
12915         (dwarf2_fetch_constant_bytes): Likewise.
12916         (follow_die_sig): Likewise.
12917         (get_signatured_type): Likewise.
12918         (get_DW_AT_signature_type): Likewise.
12919         (dwarf2_find_containing_comp_unit): Likewise.
12920         (set_die_type): Likewise.
12921
12922 2018-02-21  John Baldwin  <jhb@FreeBSD.org>
12923
12924         * arch/aarch64.c: Include "common-defs.h".
12925         * arch/amd64.c: Likewise.
12926         * arch/i386.c: Likewise.
12927
12928 2018-02-21  Tom Tromey  <tom@tromey.com>
12929
12930         * value.h: (extract_field_op): Update.
12931         * eval.c (extract_field_op): Return a const char *.
12932         * expression.h (parse_expression_for_completion): Update.
12933         * completer.c (complete_expression): Update.
12934         (add_struct_fields): Make fieldname const.
12935         * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
12936         (mark_completion_tag, parse_exp_in_context_1): Update.
12937         (parse_expression_for_completion): Change "name" to
12938         unique_xmalloc_ptr*.
12939
12940 2018-02-21  Tom Tromey  <tom@tromey.com>
12941
12942         * infcall.c (call_function_by_hand_dummy): Use std::vector.
12943
12944 2018-02-21  Yao Qi  <yao.qi@linaro.org>
12945
12946         * avr-tdep.c (avr_read_pc): Change parameter type to
12947         readable_regcache.
12948         * gdbarch.sh (read_pc): Likewise.
12949         * gdbarch.c: Re-generated.
12950         * gdbarch.h: Re-generated.
12951         * hppa-tdep.c (hppa_read_pc): Change parameter type to
12952         readable_regcache.
12953         * ia64-tdep.c (ia64_read_pc): Likewise.
12954         * mips-tdep.c (mips_read_pc): Likewise.
12955         * spu-tdep.c (spu_read_pc): Likewise.
12956
12957 2018-02-21  Yao Qi  <yao.qi@linaro.org>
12958
12959         * Makefile.in (COMMON_SFILES): Add regcache-dump.c
12960         * regcache-dump.c: New file.
12961         * regcache.c: Move register_dump to regcache-dump.c.
12962         (maintenance_print_registers): Likewise.
12963         (maintenance_print_raw_registers): Likewise.
12964         (maintenance_print_cooked_registers): Likewise.
12965         (maintenance_print_register_groups): Likewise.
12966         (maintenance_print_remote_registers): Likewise.
12967         (_initialize_regcache): Likewise.
12968         * regcache.h (register_dump): Moved from regcache.c.
12969
12970 2018-02-21  Yao Qi  <yao.qi@linaro.org>
12971
12972         * regcache.c (regcache::regcache): Update.
12973         (regcache::invalidate): Move it to detached_regcache::invalidate.
12974         (get_thread_arch_aspace_regcache): Update.
12975         (regcache::raw_update): Update.
12976         (regcache::cooked_read): Remove some code.
12977         (regcache::cooked_read_value): Likewise.
12978         (regcache::raw_write): Remove assert on m_readonly_p.
12979         (regcache::raw_supply_integer): Move it to
12980         detached_regcache::raw_supply_integer.
12981         (regcache::raw_supply_zeroed): Likewise.
12982         * regcache.h (detached_regcache) <raw_supply_integer>: New
12983         declaration.
12984         <raw_supply_zeroed, invalidate>: Likewise.
12985         (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
12986         <invalidate>: Likewise.
12987         <m_readonly_p>: Removed.
12988
12989 2018-02-21  Yao Qi  <yao.qi@linaro.org>
12990
12991         * infcmd.c (get_return_value): Let stop_regs point to
12992         get_current_regcache.
12993         * regcache.c (regcache::regcache): Remove.
12994         (register_dump_reg_buffer): New class.
12995         (regcache_print): Adjust.
12996         * regcache.h (regcache): Remove constructors.
12997
12998 2018-02-21  Yao Qi  <yao.qi@linaro.org>
12999
13000         * regcache.c (class register_dump): New class.
13001         (register_dump_regcache, register_dump_none): New class.
13002         (register_dump_remote, register_dump_groups): New class.
13003         (regcache_print): Update.
13004         * regcache.h (regcache_dump_what): Move it to regcache.c.
13005         (regcache) <dump>: Remove.
13006
13007 2018-02-21  Yao Qi  <yao.qi@linaro.org>
13008
13009         * jit.c (struct jit_unwind_private) <regcache>: Change its type to
13010          reg_buffer_rw *.
13011         (jit_unwind_reg_set_impl): Call raw_supply.
13012         (jit_frame_sniffer): Use reg_buffer_rw.
13013         * record-full.c (record_full_core_regbuf): Change its type.
13014         (record_full_core_open_1): Use reg_buffer_rw.
13015         (record_full_close): Likewise.
13016         (record_full_core_fetch_registers): Use regcache->raw_supply.
13017         (record_full_core_store_registers): Likewise.
13018         * regcache.c (regcache::get_register_status): Move it to
13019         reg_buffer.
13020         (regcache_raw_set_cached_value): Remove.
13021         (regcache::raw_set_cached_value): Remove.
13022         (regcache::raw_write): Call raw_supply.
13023         (regcache::raw_supply): Move it to reg_buffer_rw.
13024         * regcache.h (regcache_raw_set_cached_value): Remove.
13025         (reg_buffer_rw): New class.
13026
13027 2018-02-21  Yao Qi  <yao.qi@linaro.org>
13028
13029         * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
13030         readonly_detached_regcache.
13031         (dummy_frame_prev_register): Use regcache->cooked_read.
13032         * frame.c (frame_save_as_regcache): Change return type.
13033         (frame_pop): Update.
13034         * frame.h (frame_save_as_regcache): Update declaration.
13035         * inferior.h (get_infcall_suspend_state_regcache): Update
13036         declaration.
13037         * infrun.c (infcall_suspend_state) <registers>: use
13038         readonly_detached_regcache.
13039         (save_infcall_suspend_state): Don't use regcache_dup.
13040         (get_infcall_suspend_state_regcache): Change return type.
13041         * linux-fork.c (struct fork_info) <savedregs>: Change to
13042         readonly_detached_regcache.
13043         <pc>: New field.
13044         (fork_save_infrun_state): Don't use regcache_dup.
13045         (info_checkpoints_command): Adjust.
13046         * mi/mi-main.c (register_changed_p): Update declaration.
13047         (mi_cmd_data_list_changed_registers): Use
13048         readonly_detached_regcache.
13049         (register_changed_p): Change parameter type to
13050         readonly_detached_regcache.
13051         * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
13052         readonly_detached_regcache.
13053         (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
13054         * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
13055         New.
13056         (regcache::save): Move it to reg_buffer.
13057         (regcache::restore): Change parameter type.
13058         (regcache_dup): Remove.
13059         * regcache.h (reg_buffer) <save>: New method.
13060         (readonly_detached_regcache): New class.
13061         * spu-tdep.c (spu2ppu_cache) <regcache>: Use
13062         readonly_detached_regcache.
13063         (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
13064
13065 2018-02-21  Yao Qi  <yao.qi@linaro.org>
13066
13067         * frame.c (frame_save_as_regcache): Use regcache method save.
13068         (frame_pop): Use regcache method restore.
13069         * infrun.c (restore_infcall_suspend_state): Likewise.
13070         * linux-fork.c (fork_load_infrun_state): Likewise.
13071         * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
13072         save.
13073         * regcache.c (regcache_save): Remove.
13074         (regcache::restore): More asserts.
13075         (regcache_cpy): Remove.
13076         * regcache.h (regcache_save): Remove the declaration.
13077         (regcache::restore): Move from private to public.
13078         Remove the friend declaration of regcache_cpy.
13079         (regcache_cpy): Remove declaration.
13080
13081 2018-02-21  Yao Qi  <yao.qi@linaro.org>
13082
13083         * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
13084         parameter type to 'readable_regcache *'.
13085         * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
13086         * arm-tdep.c (arm_neon_quad_read): Likewise.
13087         (arm_pseudo_read): Likewise.
13088         * avr-tdep.c (avr_pseudo_register_read): Likewise.
13089         * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
13090         * frv-tdep.c (frv_pseudo_register_read): Likewise.
13091         * gdbarch.c: Re-generated.
13092         * gdbarch.h: Re-generated.
13093         * gdbarch.sh (pseudo_register_read): Change parameter type to
13094         'readable_regcache *'.
13095         (pseudo_register_read_value): Likewise.
13096         * h8300-tdep.c (pseudo_from_raw_register): Likewise.
13097         (h8300_pseudo_register_read): Likewise.
13098         * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
13099         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
13100         (i386_pseudo_register_read_into_value): Likewise.
13101         (i386_pseudo_register_read_value): Likewise.
13102         * i386-tdep.h (i386_pseudo_register_read_into_value): Update
13103         declaration.
13104         * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
13105         * m32c-tdep.c (m32c_raw_read): Likewise.
13106         (m32c_read_flg): Likewise.
13107         (m32c_banked_register): Likewise.
13108         (m32c_banked_read): Likewise.
13109         (m32c_sb_read): Likewise.
13110         (m32c_part_read): Likewise.
13111         (m32c_cat_read): Likewise.
13112         (m32c_r3r2r1r0_read): Likewise.
13113         (m32c_pseudo_register_read): Likewise.
13114         * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
13115         * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
13116         (mep_pseudo_cr64_read): Likewise.
13117         (mep_pseudo_register_read): Likewise.
13118         * mips-tdep.c (mips_pseudo_register_read): Likewise.
13119         * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
13120         * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
13121         * regcache.c (regcache::raw_read): Move it to readable_regcache.
13122         (regcache::cooked_read): Likewise.
13123         (regcache::cooked_read_value): Likewise.
13124         (regcache_cooked_read_signed):
13125         (regcache::cooked_read): Likewise.
13126         * regcache.h (readable_regcache): New class.
13127         (regcache): Inherit readable_regcache.  Move some methods to
13128         readable_regcache.
13129         * rl78-tdep.c (rl78_pseudo_register_read): Change
13130         parameter type to 'readable_regcache *'.
13131         * rs6000-tdep.c (do_regcache_raw_read): Remove.
13132         (e500_pseudo_register_read): Change parameter type to
13133         'readable_regcache *'.
13134         (dfp_pseudo_register_read): Likewise.
13135         (vsx_pseudo_register_read): Likewise.
13136         (efpr_pseudo_register_read): Likewise.
13137         * s390-tdep.c (s390_pseudo_register_read): Likewise.
13138         * sh-tdep.c (sh_pseudo_register_read): Likewise.
13139         * sh64-tdep.c (pseudo_register_read_portions): Likewise.
13140         (sh64_pseudo_register_read): Likewise.
13141         * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
13142         * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
13143         * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
13144         (spu_pseudo_register_read): Likewise.
13145         * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
13146         (xtensa_pseudo_register_read): Likewise.
13147
13148 2018-02-21  Yao Qi  <yao.qi@linaro.org>
13149
13150         * regcache.c (regcache::regcache): Call reg_buffer ctor.
13151         (regcache::arch): Move it to reg_buffer::arch.
13152         (regcache::register_buffer): Likewise.
13153         (regcache::assert_regnum): Likewise.
13154         (regcache::num_raw_registers): Likewise.
13155         * regcache.h (reg_buffer): New class.
13156         (regcache): Inherit reg_buffer.
13157
13158 2018-02-20  Simon Marchi  <simon.marchi@ericsson.com>
13159
13160         * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
13161         gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
13162
13163 2018-02-20  Markus Metzger  <markus.t.metzger@intel.com>
13164
13165         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
13166
13167 2018-02-19  Alan Hayward  <alan.hayward@arm.com>
13168
13169         * Makefile.in: (COMMON_SFILES): Add common/*.c files.
13170         (SFILES): Remove common/*.c files.
13171         (COMMON_OBS): Remove some *.o files built from common/*.c files.
13172         * common/common.host: Add common reference.
13173         * configure.ac: Likewise.
13174         * configure: Regenerate.
13175
13176 2018-02-16  Yao Qi  <yao.qi@linaro.org>
13177
13178         * block.c (block_namespace_info): Inherit allocate_on_obstack.
13179         (block_initialize_namespace): Use new.
13180         * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
13181         (dwarf2_free_objfile): Use delete.
13182         * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
13183         (copy_type_recursive): Use new.
13184         * gdb_obstack.h (allocate_on_obstack): New.
13185
13186 2018-02-15  Yao Qi  <yao.qi@linaro.org>
13187
13188         PR gdb/22849
13189         * inferior.c (exit_inferior_1): Reset inf->control.
13190
13191 2018-02-15  Joel Brobecker  <brobecker@adacore.com>
13192
13193         * ada-lang.c (ada_to_fixed_value_create): Delete advance
13194         declaration.
13195
13196 2018-02-14  Pedro Alves  <palves@redhat.com>
13197
13198         * frame-unwind.c (frame_unwind_try_unwinder): Always call
13199         frame_cleanup_after_sniffer on exception.
13200
13201 2018-02-14  Tom Tromey  <tom@tromey.com>
13202
13203         * solist.h (struct target_so_ops) <bfd_open>: Make pathname
13204         const.
13205         (solib_bfd_open): Make pathname const.
13206         * solib.c (solib_bfd_open): Make pathname const.
13207         * solib-spu.c (spu_bfd_fopen): Make name const.
13208         (spu_bfd_open): Make pathname const.
13209         * solib-darwin.c (darwin_bfd_open): Make pathname const.
13210         * solib-aix.c (solib_aix_bfd_open): Make pathname const.
13211
13212 2018-02-14  Tom Tromey  <tom@tromey.com>
13213
13214         * symfile.c (symfile_bfd_open): Update.
13215         * source.h (openp, source_full_path_of, find_and_open_source):
13216         Change argument type to unique_xmalloc_ptr.
13217         * source.c (openp): Take a unique_xmalloc_ptr.
13218         (source_full_path_of, find_and_open_source): Likewise.
13219         (open_source_file, symtab_to_fullname): Update.
13220         * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
13221         unique_xmalloc_ptr.
13222         * solib.c (solib_find_1): Use unique_xmalloc_ptr.
13223         (exec_file_find): Update.
13224         * psymtab.c (psymtab_to_fullname): Update.
13225         * nto-tdep.h (nto_find_and_open_solib): Update.
13226         * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
13227         unique_xmalloc_ptr.
13228         * exec.c (exec_file_attach): Update.
13229         * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
13230         * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
13231
13232 2018-02-14  Tom Tromey  <tom@tromey.com>
13233
13234         * solib.c: Include source.h.
13235         * nto-tdep.c: Include source.h.
13236         * mi/mi-cmd-env.c: Include source.h.
13237         * infcmd.c: Include source.h.
13238         * exec.c: Include source.h.
13239         * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
13240         (add_path, directory_switch, source_path, init_source_path): Move
13241         declarations...
13242         * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
13243         (add_path, directory_switch, source_path, init_source_path):
13244         ...here.
13245
13246 2018-02-14  Tom Tromey  <tom@tromey.com>
13247
13248         * solist.h (exec_file_find, solib_find): Return
13249         unique_xmalloc_ptr.
13250         (solib_bfd_fopen): Take a const char *.
13251         * solib.c (solib_find_1): Return unique_xmalloc_ptr.
13252         (exec_file_find, solib_find): Likewise.
13253         (solib_bfd_fopen): Do not take ownership of "pathname".
13254         (solib_bfd_open): Use unique_xmalloc_ptr.
13255         * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
13256         * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
13257         * infrun.c (follow_exec): Use unique_xmalloc_ptr.
13258         * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
13259
13260 2018-02-14  Joel Brobecker  <brobecker@adacore.com>
13261
13262         * ada-lang.c (name_match_type_from_name): Remove reference to
13263         ada_name_for_lookup in function's documentation.
13264         * ada-lang.h (ada_name_for_lookup): Delete declaration.
13265
13266 2018-02-13  Simon Marchi  <simon.marchi@polymtl.ca>
13267
13268         * defs.h (enum openp_flags): New enum.
13269         (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
13270         Move to enum openp_flags.
13271         (openp_flags): New enum flags.
13272         (openp): Change parameter type to openp_flags.
13273         * source.c (openp): Change parameter type to openp_flags.
13274         * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
13275         * dwarf2read.c (try_open_dwop_file): Use openp_flags.
13276
13277 2018-02-13  Simon Marchi  <simon.marchi@polymtl.ca>
13278
13279         * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
13280         per-command.
13281
13282 2018-02-12  Andrew Burgess  <andrew.burgess@embecosm.com>
13283
13284         * dwarf2read.c (dwarf2_release_queue): Delete function, move body
13285         into...
13286         (class dwarf2_queue_guard): ...the destructor of this new class.
13287         (dw2_do_instantiate_symtab): Create instance of the new class
13288         dwarf2_queue_guard, remove cleanup.
13289
13290 2018-02-09  Tom Tromey  <tom@tromey.com>
13291
13292         * source.c (find_source_lines): Don't reference past the end of
13293         the vector.
13294
13295 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
13296
13297         * remote.c (remote_btrace_maybe_reopen): Change error message.
13298         * btrace.c (btrace_enable): Likewise.
13299         (parse_xml_btrace): Likewise.
13300         (parse_xml_btrace_conf): Likewise.
13301
13302 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
13303
13304         * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
13305         (linux_enable_pt, linux_enable_bts): Call
13306         diagnose_perf_event_open_fail.
13307
13308 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
13309
13310         * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
13311         Remove parameter and change return type.  Update callers.  Move it.
13312         (linux_enable_bts, linux_enable_pt): Improve error message.
13313         (linux_enable_pt): Remove zero buffer size check.
13314         (linux_enable_btrace): Improve error messages.  Remove NULL return
13315         check.
13316
13317 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
13318
13319         * btrace.c (btrace_enable): Remove target_supports_btrace call.
13320         * nat/linux-btrace.c (perf_event_pt_event_type): Move.
13321         (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
13322         (linux_supports_pt, linux_supports_btrace): Remove.
13323         (linux_enable_bts): Call cpu_supports_bts.
13324         * nat/linux-btrace.h (linux_supports_btrace): Remove.
13325         * remote.c (remote_supports_btrace): Remove.
13326         (init_remote_ops): Remove remote_supports_btrace.
13327         * target-delegates.c: Regenerated.
13328         * target.c (target_supports_btrace): Remove.
13329         * target.h (target_ops) <to_supports_btrace>: Remove
13330         (target_supports_btrace): Remove.
13331         * x86-linux-nat.c (x86_linux_create_target): Remove
13332         linux_supports_btrace.
13333
13334 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
13335
13336         * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
13337         btrace failed.
13338         * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
13339         exception and use message in own exception.
13340
13341 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
13342
13343         * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
13344         (perf_event_pt_event_type): Use gdb_file_up.
13345         (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
13346         scoped_fd, and scoped_mmap.
13347
13348 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
13349
13350         * common/scoped_mmap.h: New.
13351         * unittests/scoped_mmap-selftest.c: New.
13352         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
13353         unittests/scoped_mmap-selftest.c.
13354
13355 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
13356
13357         * common/scoped_fd.h: New.
13358         * unittests/scoped_fd-selftest.c: New.
13359         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
13360         unittests/scoped_fd-selftest.c.
13361
13362 2018-02-09  Tom Tromey  <tom@tromey.com>
13363
13364         * auto-load.c (auto_load_section_scripts): Use
13365         gdb::unique_xmalloc_ptr.
13366
13367 2018-02-09  Tom Tromey  <tom@tromey.com>
13368
13369         * auto-load.c (execute_script_contents): Use std::string.
13370
13371 2018-02-09  Joel Brobecker  <brobecker@adacore.com>
13372
13373         * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
13374         Python function, rather than a new command.
13375
13376 2018-02-08  Tom Tromey  <tom@tromey.com>
13377
13378         * solib.c (solib_find_1): Use std::string.
13379         (solib_bfd_fopen): Use unique_xmalloc_ptr.
13380
13381 2018-02-08  Tom Tromey  <tom@tromey.com>
13382
13383         * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
13384
13385 2018-02-08  Tom Tromey  <tom@tromey.com>
13386
13387         * source.c (find_source_lines): Use gdb::def_vector.
13388
13389 2018-02-08  Tom Tromey  <tom@tromey.com>
13390
13391         * macrocmd.c (struct temporary_macro_definition): New.
13392         (macro_define_command): Use temporary_macro_definition.  Remove
13393         cleanups.
13394         (free_macro_definition_ptr): Remove.
13395
13396 2018-02-08  Tom Tromey  <tom@tromey.com>
13397
13398         * macroexp.c (maybe_expand): Use std::string.
13399
13400 2018-02-08  Tom Tromey  <tom@tromey.com>
13401
13402         * macroexp.c (struct macro_buffer): Add initializers for some
13403         members.
13404         (init_buffer, init_shared_buffer, free_buffer)
13405         (free_buffer_return_text): Remove.
13406         (macro_buffer): New constructors.
13407         (~macro_buffer): New destructor.
13408         (macro_buffer::set_shared): New method.
13409         (macro_buffer::resize_buffer, macro_buffer::appendc)
13410         (macro_buffer::appendmem): Now methods, not free functions.
13411         (set_token, append_tokens_without_splicing, stringify)
13412         (macro_stringify): Update.
13413         (gather_arguments): Change return type.  Remove argc_p argument,
13414         add args_ptr argument.  Use std::vector.
13415         (substitute_args): Remove argc argument.  Accept std::vector.
13416         (expand): Update.  Use std::vector.
13417         (scan, macro_expand, macro_expand_next): Update.
13418
13419 2018-02-08  Tom Tromey  <tom@tromey.com>
13420
13421         * symtab.c (default_collect_symbol_completion_matches_break_on):
13422         Use unique_xmalloc_ptr.
13423         * macroscope.h: (sal_macro_scope, user_macro_scope)
13424         (default_macro_scope): Return unique_xmalloc_ptr.
13425         * macroscope.c (sal_macro_scope, user_macro_scope)
13426         (default_macro_scope): Return unique_xmalloc_ptr.
13427         * macroexp.h (macro_expand, macro_expand_once): Return
13428         unique_xmalloc_ptr.
13429         * macroexp.c (macro_expand, macro_expand_once): Return
13430         unique_xmalloc_ptr.
13431         * macrocmd.c (macro_expand_command, macro_expand_once_command)
13432         (info_macro_command, info_macros_command): Use
13433         unique_xmalloc_ptr.
13434         * compile/compile-c-support.c (write_macro_definitions): Use
13435         unique_xmalloc_ptr.
13436         * c-exp.y (c_parse): Use unique_xmalloc_ptr.
13437
13438 2018-02-07  Simon Marchi  <simon.marchi@ericsson.com>
13439
13440         * value.c (value_static_field): Assign field type instead of
13441         containing type when returning an optimized out value.
13442
13443 2018-02-06  Yao Qi  <yao.qi@linaro.org>
13444
13445         * ft32-tdep.c (ft32_read_pc): Remove.
13446         (ft32_write_pc): Remove.
13447         (ft32_gdbarch_init): Update.
13448         * m32r-tdep.c (m32r_read_pc): Remove.
13449         (m32r_gdbarch_init): Update.
13450         * mep-tdep.c (mep_read_pc): Remove.
13451         (mep_gdbarch_init): Update.
13452         * microblaze-tdep.c (microblaze_write_pc): Remove.
13453         (microblaze_gdbarch_init): Update.
13454         * mn10300-tdep.c (mn10300_read_pc): Remove.
13455         (mn10300_write_pc): Remove.
13456         (mn10300_gdbarch_init): Update.
13457         * moxie-tdep.c (moxie_read_pc): Remove.
13458         (moxie_write_pc): Remove.
13459         (moxie_gdbarch_init): Update.
13460
13461 2018-02-06  Yao Qi  <yao.qi@linaro.org>
13462
13463         * expprint.c (print_subexp_standard): Handle
13464         OP_F77_UNDETERMINED_ARGLIST.
13465         (dump_subexp_body_standard): Likewise.
13466
13467 2018-02-05  Alan Hayward  <alan.hayward@arm.com>
13468
13469         * target-descriptions.c (tdesc_element_visitor) Add empty
13470         implementations.
13471         (tdesc_type): Move make_gdb_type from here.
13472         (tdesc_type_builtin): Likewise.
13473         (tdesc_type_vector): Likewise.
13474         (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
13475         (make_gdb_type_struct): Move from tdesc_type_with_fields.
13476         (make_gdb_type_union): Likewise.
13477         (make_gdb_type_flags): Likewise.
13478         (make_gdb_type_enum): Likewise.
13479         (make_gdb_type): New function.
13480         (tdesc_register_type): Use static make_gdb_type.
13481
13482 2018-02-05  Ruslan Kabatsayev <b7.10110111@gmail.com>
13483
13484         * infcmd.c (default_print_one_register_info): Align natural-format
13485         column values consistently one under another.
13486         (pad_to_column): New function.
13487
13488 2018-02-05  Joel Brobecker  <brobecker@adacore.com>
13489
13490         * dwarf2read.c (dwarf2_physname): Move commment.
13491
13492 2018-02-01  Leszek Swirski  <leszeks@google.com>
13493
13494         * varobj.c (varobj_formatted_print_options): Allow recursive
13495         pretty printing if pretty printing is enabled.
13496
13497 2018-02-01  Leszek Swirski  <leszeks@google.com>
13498
13499         * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
13500         names after a structop as a filename.
13501
13502 2018-02-01  Yao Qi  <yao.qi@linaro.org>
13503
13504         * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
13505         (arm_record_coproc_data_proc): Likewise.
13506
13507 2018-02-01  Yao Qi  <yao.qi@linaro.org>
13508
13509         * arm-tdep.c (arm_record_extension_space): Change ret to signed.
13510
13511 2018-01-31  Nikola Prica  <nikola.prica@rt-rk.com>
13512
13513         * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
13514         assign shifted lr_reg to fdata->lr_register when lr_reg is set.
13515
13516 2018-01-31  Pedro Alves  <palves@redhat.com>
13517
13518         * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
13519         * inflow.c (child_terminal_save_inferior): Wrap reference to
13520         tcgetpgrp in HAVE_TERMIOS_H.
13521         (child_interrupt, child_pass_ctrlc): Wrap references to signal in
13522         _WIN32.
13523         * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
13524         always iterate over all inferiors.
13525         (gdbsim_cntrl_c): Adjust.
13526         * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
13527
13528 2018-01-31  Joel Brobecker  <brobecker@adacore.com>
13529
13530         * gdbtypes.c (lookup_array_range_type): Make sure the array's
13531         index type is objfile-owned if the element type is as well.
13532
13533 2018-01-31  Joel Brobecker  <brobecker@adacore.com>
13534
13535         GDB 8.1 released.
13536
13537 2018-01-30  Philipp Rudo  <prudo@linux.vnet.ibm.com>
13538
13539         * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
13540         "features/s390x-linux64.c".
13541         (_initialize_s390_linux_tdep): Remove initialization of tdescs
13542         s390_linux32 and s390x_linux64.
13543         (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
13544         default tdesc.
13545         * s390-tdep.c: Include "features/s390-linux32.c" and
13546         "features/s390x-linux64.c".
13547         (s390_tdesc_valid): Add check for tdesc_has_registers.
13548         (s390_gdbarch_init): Make sure there is always a valid tdesc.
13549         (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
13550         tdesc_s390x_linux64.
13551         * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
13552         tdesc_s390x_linux64 to...
13553         * s390-tdep.h: ...here.
13554
13555 2018-01-30  Pedro Alves  <palves@redhat.com>
13556
13557         PR gdb/13211
13558         * config.in, configure: Regenerate.
13559         * configure.ac: Check for getpgid.
13560         * go32-nat.c (go32_pass_ctrlc): New.
13561         (go32_target): Install it.
13562         * inf-child.c (inf_child_target): Install
13563         child_terminal_save_inferior, child_pass_ctrlc and
13564         child_interrupt.
13565         * inf-ptrace.c (inf_ptrace_interrupt): Delete.
13566         (inf_ptrace_target): No longer install it.
13567         * infcmd.c (interrupt_target_1): Adjust.
13568         * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
13569         (child_interrupt): Declare.
13570         (inferior::terminal_state): New.
13571         * inflow.c (struct terminal_info): Update comments.
13572         (inferior_process_group): Delete.
13573         (terminal_is_ours): Delete.
13574         (gdb_tty_state): New.
13575         (child_terminal_init): Adjust.
13576         (is_gdb_terminal, sharing_input_terminal_1)
13577         (sharing_input_terminal): New functions.
13578         (child_terminal_inferior): Adjust.  Use sharing_input_terminal.
13579         Set the process's actual process group in the foreground if
13580         possible.  Handle is_ours_for_output/is_ours distinction.  Don't
13581         mark terminal as the inferior's if not sharing GDB's terminal.
13582         Don't check attach_flag.
13583         (child_terminal_ours_for_output, child_terminal_ours): Adjust to
13584         pass down a target_terminal_state.
13585         (child_terminal_save_inferior): New, factored out from ...
13586         (child_terminal_ours_1): ... this.  Handle
13587         target_terminal_state::is_ours_for_output.
13588         (child_interrupt, child_pass_ctrlc): New.
13589         (inflow_inferior_exit): Clear the inferior's terminal_state.
13590         (copy_terminal_info): Copy the inferior's terminal state.
13591         (_initialize_inflow): Remove reference to terminal_is_ours.
13592         * inflow.h (inferior_process_group): Delete.
13593         * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
13594         * procfs.c (procfs_target): Don't install procfs_interrupt.
13595         (procfs_interrupt): Delete.
13596         * remote.c (remote_serial_quit_handler): Adjust.
13597         (remote_interrupt): Remove ptid parameter.  Adjust.
13598         * target-delegates.c: Regenerate.
13599         * target.c: Include "terminal.h".
13600         (target_terminal::terminal_state): Rename to ...
13601         (target_terminal::m_terminal_state): ... this.
13602         (target_terminal::init): Adjust.
13603         (target_terminal::inferior): Adjust to per-inferior
13604         terminal_state.
13605         (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
13606         (target_terminal::ours, target_terminal::ours_for_output): Use
13607         target_terminal_is_ours_kind.
13608         (target_interrupt): Remove ptid parameter.  Adjust.
13609         (default_target_pass_ctrlc): Adjust.
13610         * target.h (target_ops::to_terminal_save_inferior): New field.
13611         (target_ops::to_interrupt): Remove ptid_t parameter.
13612         (target_interrupt): Remove ptid_t parameter.  Update comment.
13613         (target_pass_ctrlc): Update comment.
13614         * target/target.h (target_terminal_state): New scoped enum,
13615         factored out of ...
13616         (target_terminal::terminal_state): ... here.
13617         (target_terminal::inferior): Update comments.
13618         (target_terminal::restore_inferior): New.
13619         (target_terminal::is_inferior, target_terminal::is_ours)
13620         (target_terminal::is_ours_for_output): Adjust.
13621         (target_terminal::scoped_restore_terminal_state): Adjust to
13622         rename, and call restore_inferior() instead of inferior().
13623         (target_terminal::scoped_restore_terminal_state::m_state): Change
13624         type.
13625         (target_terminal::terminal_state): Rename to ...
13626         (target_terminal::m_terminal_state): ... this and change type.
13627
13628 2018-01-30  Pedro Alves  <palves@redhat.com>
13629
13630         * linux-nat.c (wait_for_signal): New function.
13631         (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
13632         directly.
13633         (async_terminal_is_ours)
13634         (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
13635         (linux_nat_add_target): Don't override
13636         to_terminal_inferior/to_terminal_ours.
13637
13638 2018-01-29  Sergio Durigan Junior  <sergiodj@redhat.com>
13639
13640         * remote.c (remote_follow_fork): Don't call "detach_inferior".
13641
13642 2018-01-28  Simon Marchi  <simon.marchi@ericsson.com>
13643
13644         * dwarf2read.c (free_dwo_files): Add forward-declaration.
13645         (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
13646         dwarf2_per_objfile_free here.
13647         (dwarf2_per_objfile_free): Remove.
13648         (_initialize_dwarf2_read): Don't register
13649         dwarf2_per_objfile_free as a registry cleanup.
13650
13651 2018-01-27  Eli Zaretskii  <eliz@gnu.org>
13652
13653         Avoid compilation errors in MinGW native builds
13654
13655         The error is triggered by including python-internal.h, and the
13656         error message is:
13657
13658              In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
13659                       from build-gnulib/import/math.h:27,
13660                       from d:/usr/Python26/include/pyport.h:235,
13661                       from d:/usr/Python26/include/Python.h:58,
13662                       from python/python-internal.h:94,
13663                       from python/py-arch.c:24:
13664              d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
13665         using ::hypot;
13666                 ^~~~~
13667
13668         This happens because Python headers define 'hypot' to expand t
13669         '_hypot' in the Windows builds.
13670         * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
13671         'hypoth'.  This avoids a compilation error.
13672
13673 2018-01-26  Alan Hayward  <alan.hayward@arm.com>
13674
13675         * MAINTAINERS (Write After Approval): Fix ordering.
13676
13677 2018-01-26  Alan Hayward  <alan.hayward@arm.com>
13678
13679         * MAINTAINERS (Write After Approval): Add Alan Hayward.
13680
13681 2018-01-26  Alan Modra  <amodra@gmail.com>
13682
13683         * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
13684         (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
13685         Remove nop.  Make const.  Comment.
13686         (powerpc32_plt_stub_so_2): New.
13687         (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
13688         Correct count.  Update uses.
13689         (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
13690         Move common code reading PLT entry word.  Correct
13691         powerpc32_plt_stub PLT address calculation.
13692         * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
13693         (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
13694         (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
13695         (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
13696         (ppc64_standard_linkage8): Likewise.
13697         * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
13698         Correct insns description.
13699         * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
13700
13701 2018-01-24  Pedro Alves  <palves@redhat.com>
13702
13703         GCC PR libstdc++/83906
13704         * gdbtypes.c (operator==(const dynamic_prop &,
13705         const dynamic_prop &)): New.
13706         (operator==(const range_bounds &, const range_bounds &)): New.
13707         (check_types_equal): Use them instead of memcmp.
13708         * gdbtypes.h (operator==(const dynamic_prop &,
13709         const dynamic_prop &)): Declare.
13710         (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
13711         (operator==(const range_bounds &, const range_bounds &)): Declare.
13712         (operator!=(const range_bounds &, const range_bounds &)): Declare.
13713
13714 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
13715
13716         * s390-linux-tdep.c (s390_record_address_mask)
13717         (s390_record_calc_disp_common, s390_record_calc_disp)
13718         (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
13719         (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
13720         (s390_process_record): Move to s390-tdep.c.
13721         (s390_linux_init_abi_any): Adjust.
13722         * s390-tdep.c (s390_record_address_mask)
13723         (s390_record_calc_disp_common, s390_record_calc_disp)
13724         (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
13725         (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
13726         (s390_process_record): Moved from s390-linux-tdep.c
13727         (s390_gdbarch_init): Adjust.
13728
13729 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
13730
13731         * s390-linux-nat.c (s390-tdep.h): New include.
13732         * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
13733         (HFILES_NO_SRCDIR): Add s390-tdep.h.
13734         (ALLDEPFILES): Add s390-tdep.c.
13735         * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
13736         * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
13737         * s390-tdep.h: ...this.  New file.
13738         * s390-linux-tdep.c (s390-tdep.h): New include.
13739         (_initialize_s390_tdep): Rename to...
13740         (_initialize_s390_linux_tdep): ...this and adjust.
13741         (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
13742         (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
13743         s390-tdep.h.
13744         (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
13745         (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
13746         (s390_is_partial_instruction, s390_software_single_step)
13747         (is_non_branch_ril, s390_displaced_step_copy_insn)
13748         (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
13749         (s390_prologue_data, s390_addr, s390_store, s390_load)
13750         (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
13751         (s390_register_call_saved, s390_guess_tracepoint_registers)
13752         (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
13753         (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
13754         (s390_pseudo_register_name, s390_pseudo_register_type)
13755         (s390_pseudo_register_read, s390_pseudo_register_write)
13756         (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
13757         (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
13758         (s390_addr_bits_remove, s390_address_class_type_flags)
13759         (s390_address_class_type_flags_to_name)
13760         (s390_address_class_name_to_type_flags, s390_effective_inner_type)
13761         (s390_function_arg_float, s390_function_arg_vector)
13762         (is_power_of_two, s390_function_arg_integer, s390_arg_state)
13763         (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
13764         (s390_frame_align, s390_register_return_value, s390_return_value)
13765         (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
13766         (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
13767         (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
13768         (s390_trad_frame_prev_register, s390_unwind_cache)
13769         (s390_prologue_frame_unwind_cache)
13770         (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
13771         (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
13772         (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
13773         (s390_stub_frame_this_id, s390_stub_frame_prev_register)
13774         (s390_stub_frame_sniffer, s390_stub_frame_unwind)
13775         (s390_frame_base_address, s390_local_base_address)
13776         (s390_frame_base, s390_gcc_target_options)
13777         (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
13778         (s390_validate_reg_range, s390_tdesc_valid)
13779         (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
13780         * s390-tdep.c: ...this.  New file.
13781
13782 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
13783
13784         * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
13785         (s390_process_record, s390_gdbarch_tdep_alloc)
13786         (s390_linux_init_abi_any): Use/set new hook.
13787
13788 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
13789
13790         * s390-linux-tdep.c (osabi.h): New include.
13791         (s390_linux_init_abi_31, s390_linux_init_abi_64)
13792         (s390_linux_init_abi_any): New functions.
13793         (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
13794
13795 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
13796
13797         * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
13798         tdesc_has_registers check
13799
13800 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
13801
13802         * s390-linux-tdep.c (s390_tdesc_valid): New function.
13803         (s390_validate_reg_range): New macro.
13804         (s390_gdbarch_init): Adjust.
13805
13806 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
13807
13808         * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
13809         (s390_gdbarch_tdep_alloc): Adjust.
13810         (s390_gdbarch_init): Adjust.
13811
13812 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
13813
13814         * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
13815         <have_tdb>: Change type to bool.
13816         (s390_gdbarch_tdep_alloc): Adjust.
13817         (s390_gdbarch_init): Adjust.
13818
13819 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
13820
13821         * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
13822         (gdbarch_tdep) <have_upper, have_vx>: New fields.
13823         (s390_gdbarch_tdep_alloc): New function.
13824         (s390_gdbarch_init): Allocate tdep at start and use its fields
13825         instead of separate variables.
13826
13827 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
13828
13829         * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
13830         when looking for cached gdbarch and add comment for remaining.
13831
13832 2018-01-22  Pedro Alves  <palves@redhat.com>
13833             Sergio Durigan Junior  <sergiodj@redhat.com>
13834
13835         * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
13836         case.
13837
13838 2018-01-22  Maciej W. Rozycki  <macro@mips.com>
13839
13840         * MAINTAINERS: Update my company e-mail address.
13841
13842 2018-01-22  Yao Qi  <yao.qi@linaro.org>
13843
13844         * regcache.c (cooked_write_test): New function.
13845         (_initialize_regcache): Register the test.
13846
13847 2018-01-22  Yao Qi  <yao.qi@linaro.org>
13848
13849         * ia64-tdep.c (ia64_pseudo_register_read): Call
13850         regcache->cooked_read instead of regcache_cooked_read_unsigned.
13851         * m32c-tdep.c (m32c_cat_read): Likewise.
13852         (m32c_r3r2r1r0_read): Likewise.
13853         * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
13854         * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
13855
13856 2018-01-22  Yao Qi  <yao.qi@linaro.org>
13857
13858         * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
13859         method raw_read instead of regcache_raw_read.
13860         * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
13861         * arm-tdep.c (arm_neon_quad_read): Likewise.
13862         * avr-tdep.c (avr_pseudo_register_read): Likewise.
13863         * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
13864         * frv-tdep.c (frv_pseudo_register_read): Likewise.
13865         * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
13866         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
13867         (i386_pseudo_register_read_into_value): Likewise.
13868         * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
13869         * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
13870         * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
13871         * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
13872         * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
13873         * sparc-tdep.c (sparc32_pseudo_register_read):  Likewise.
13874         * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
13875         * spu-tdep.c (spu_pseudo_register_read_spu):  Likewise.
13876         * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
13877
13878 2018-01-22  Yao Qi  <yao.qi@linaro.org>
13879
13880         * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
13881         * configure.tgt: Remove target mt.
13882         * mt-tdep.c: Remove.
13883         * regcache.c (cooked_read_test): Remove the check for mt.
13884
13885 2018-01-22  Yao Qi  <yao.qi@linaro.org>
13886
13887         * jit.c (jit_frame_prev_register): Call regcache::cooked_read
13888         instead of gdbarch_pseudo_register_read_value.
13889
13890 2018-01-22  Joel Brobecker  <brobecker@adacore.com>
13891
13892         * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
13893         language is Ada.
13894
13895 2018-01-22  Joel Brobecker  <brobecker@adacore.com>
13896
13897         * linespec.c (create_sals_line_offset): Remove code that preserved
13898         the symtab_and_line's line number.
13899
13900 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
13901
13902         * varobj.c (varobj_create): Don't set valid_block when creating a
13903         floating varobj.
13904
13905 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
13906
13907         * varobj.c (varobj_create): Remove out of date comment.
13908
13909 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
13910
13911         PR mi/20395
13912         * ada-exp.y (write_var_from_sym): Pass extra parameter when
13913         updating innermost block.
13914         * parse.c (innermost_block_tracker::update): Take extra type
13915         parameter, and check types match before updating innermost block.
13916         (write_dollar_variable): Update innermost block for registers.
13917         * parser-defs.h (enum innermost_block_tracker_type): New enum.
13918         (innermost_block_tracker::innermost_block_tracker): Initialise
13919         m_types member.
13920         (innermost_block_tracker::reset): Take type parameter.
13921         (innermost_block_tracker::update): Take type parameter, and pass
13922         type through as needed.
13923         (innermost_block_tracker::m_types): New member.
13924         * varobj.c (varobj_create): Pass type when reseting innermost
13925         block.
13926
13927 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
13928
13929         * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
13930         * ada-lang.c (resolve_subexp): Likewise.
13931         * breakpoint.c (set_breakpoint_condition) Likewise.
13932         (watch_command_1) Likewise.
13933         * c-exp.y (variable): Likewise.
13934         * d-exp.y (PrimaryExpression): Likewise.
13935         * f-exp.y (variable): Likewise.
13936         * go-exp.y (variable): Likewise.
13937         * m2-exp.y (variable): Likewise.
13938         * objfiles.c (objfile::~objfile): Likewise.
13939         * p-exp.y (variable): Likewise.
13940         * parse.c (innermost_block): Change type.
13941         * parser-defs.h (class innermost_block_tracker): New.
13942         (innermost_block): Change to innermost_block_tracker.
13943         * printcmd.c (display_command): Switch to innermost_block API.
13944         (do_one_display): Likewise.
13945         * rust-exp.y (do_one_display): Likewise.
13946         * symfile.c (clear_symtab_users): Likewise.
13947         * varobj.c (varobj_create): Switch to innermost_block API, replace
13948         use of innermost_block with block stored on varobj object.
13949
13950 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
13951
13952         * expression.h (innermost_block): Remove declaration.
13953         * varobj.c: Add 'parser-defs.h' include.
13954
13955 2018-01-19  Tom Tromey  <tom@tromey.com>
13956
13957         * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
13958         symbols in the static and global blocks.
13959
13960 2018-01-19  James Clarke  <jrtc27@jrtc27.com>
13961
13962         * nat/linux-ptrace.c: Remove unnecessary reinclusion of
13963         gdb_ptrace.h, and move including gdb_wait.h ...
13964         * nat/linux-ptrace.h: ... to here.
13965
13966 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
13967
13968         * inf-ptrace.c (inf_ptrace_detach): Adjust call to
13969         inf_ptrace_detach_success.
13970         (inf_ptrace_detach_success): Add inferior parameter, use it
13971         instead of inferior_ptid, pass it to detach_inferior.
13972         * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
13973         parameter.
13974         * inferior.c (detach_inferior): Add overload that takes an
13975         inferior object.
13976         * inferior.h (detach_inferior): Likewise.
13977         * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
13978         use inferior_ptid, adjust call to inf_ptrace_detach_success.
13979         * linux-thread-db.c (thread_db_detach): Use inf parameter.
13980
13981 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
13982
13983         * target.h (struct target_ops) <to_detach>: Add inferior
13984         parameter.
13985         (target_detach): Likewise.
13986         * target.c (dispose_inferior): Pass inferior down.
13987         (target_detach): Pass inferior down.  Assert that it is equal to
13988         the current inferior.
13989         * aix-thread.c (aix_thread_detach): Pass inferior down.
13990         * corefile.c (core_file_command): Pass current_inferior() down.
13991         * corelow.c (core_detach): Add inferior parameter.
13992         * darwin-nat.c (darwin_detach): Likewise.
13993         * gnu-nat.c (gnu_detach): Likewise.
13994         * inf-ptrace.c (inf_ptrace_detach): Likewise.
13995         * infcmd.c (detach_command): Pass current_inferior() down to
13996         target_detach.
13997         * infrun.c (follow_fork_inferior): Pass parent_inf to
13998         target_detach.
13999         (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
14000         target_detach.
14001         * linux-nat.c (linux_nat_detach): Add inferior parameter.
14002         * linux-thread-db.c (thread_db_detach): Likewise.
14003         * nto-procfs.c (procfs_detach): Likewise.
14004         * procfs.c (procfs_detach): Likewise.
14005         * record.c (record_detach): Likewise.
14006         * record.h (struct inferior): Forward-declare.
14007         (record_detach): Add inferior parameter.
14008         * remote-sim.c (gdbsim_detach): Likewise.
14009         * remote.c (remote_detach_1): Likewise.
14010         (remote_detach): Likewise.
14011         (extended_remote_detach): Likewise.
14012         * sol-thread.c (sol_thread_detach): Likewise.
14013         * target-debug.h (target_debug_print_inferior_p): New macro.
14014         * target-delegates.c: Re-generate.
14015         * top.c (kill_or_detach): Pass inferior down to target_detach.
14016         * windows-nat.c (windows_detach): Add inferior parameter.
14017
14018 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
14019
14020         * target.h (struct target_ops) <to_detach>: Remove args
14021         parameter.
14022         (target_detach): Likewise.
14023         * target.c (dispose_inferior): Adjust.
14024         (target_detach): Remove args parameter, adjust.
14025         * aix-thread.c (aix_thread_detach): Adjust.
14026         * corefile.c (core_file_command): Adjust.
14027         * corelow.c (core_detach): Adjust.
14028         * darwin-nat.c (darwin_detach): Adjust.
14029         * gnu-nat.c (gnu_detach): Adjust.
14030         * inf-ptrace.c (inf_ptrace_detach): Adjust.
14031         * infcmd.c (detach_command): Adjust
14032         * infrun.c (follow_fork_inferior): Adjust.
14033         (handle_vfork_child_exec_or_exit): Adjust.
14034         * linux-fork.c (linux_fork_detach): Remove args parameter.
14035         * linux-fork.h (linux_fork_detach): Likewise.
14036         * linux-nat.c (linux_nat_detach): Likewise, and adjust.
14037         * linux-thread-db.c (thread_db_detach): Likewise.
14038         * nto-procfs.c (procfs_detach): Likewise.
14039         * procfs.c (procfs_detach): Likewise.
14040         (do_detach): Remove signo parameter.
14041         * record.c (record_detach): Remove args parameter.
14042         * record.h (record_detach): Likewise.
14043         * remote-sim.c (gdbsim_detach): Likewise.
14044         * remote.c (remote_detach_1): Likewise.
14045         (remote_detach): Likewise.
14046         (extended_remote_detach): Likewise.
14047         * sol-thread.c (sol_thread_detach): Likewise.
14048         * target-delegates.c: Re-generate.
14049         * top.c (struct qt_args) <args>: Remove field.
14050         (kill_or_detach): Don't pass args.
14051         (quit_force): Don't set args.
14052         * windows-nat.c (windows_detach): Remove args parameter.
14053
14054 2018-01-19  Yao Qi  <yao.qi@linaro.org>
14055
14056         * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
14057         (arm_linux_init_abi): Install it.
14058
14059 2018-01-19  Yao Qi  <yao.qi@linaro.org>
14060
14061         * osabi.c (gdb_osabi_names): Extend the regexp for
14062         arm-linux-gnueabihf.
14063
14064 2018-01-18  Yao Qi  <yao.qi@linaro.org>
14065
14066         * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
14067         m_abbrevs.
14068         (abbrev_table::add_abbrev): Update.
14069         (abbrev_table::lookup_abbrev): Update.
14070
14071 2018-01-18  Yao Qi  <yao.qi@linaro.org>
14072
14073         * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
14074
14075 2018-01-17  Sergio Durigan Junior  <sergiodj@redhat.com>
14076
14077         * compile/compile.c (compile_to_object): Convert "triplet_rx"
14078         to "std::string".
14079
14080 2018-01-17  Tom Tromey  <tom@tromey.com>
14081
14082         * dwarf2read.c (symbolp): Remove typedef.  Don't instantiate VEC.
14083
14084 2018-01-17  Tom Tromey  <tom@tromey.com>
14085
14086         * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
14087         * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
14088         (create_array_type_with_stride): Update.
14089         * dwarf2read.c (set_die_type): Update.
14090
14091 2018-01-17  Tom Tromey  <tom@tromey.com>
14092
14093         * dwarf2read.c (delayed_method_info): Remove typedef.
14094         (dwarf2_cu::method_info): Now a std::vector.
14095         (add_to_method_list): Update.
14096         (free_delayed_list): Remove.
14097         (compute_delayed_physnames): Update.
14098         (process_full_comp_unit, process_full_type_unit): Clear the method
14099         list.  Remove cleanups.
14100         (psymtab_include_file_name): Add name_holder parameter.  Use
14101         unique_xmalloc_ptr.
14102         (dwarf_decode_lines): Update.
14103
14104 2018-01-17  Tom Tromey  <tom@tromey.com>
14105             Simon Marchi  <simon.marchi@ericsson.com>
14106
14107         * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
14108         (dwarf2_per_objfile::free_cached_comp_units)
14109         (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
14110         (init_cutu_and_read_dies_no_follow): Update.
14111         (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
14112         (dwarf2_cu::~dwarf2_cu): New.
14113         (free_heap_comp_unit, free_stack_comp_unit): Remove.
14114         (age_cached_comp_units, free_one_cached_comp_unit): Update.
14115
14116 2018-01-17  Tom Tromey  <tom@tromey.com>
14117             Simon Marchi  <simon.marchi@ericsson.com>
14118
14119         * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
14120         (struct die_reader_specs) <abbrev_table>: New member.
14121         (struct abbrev_table): Add constructor.
14122         <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
14123         <abbrev_obstack>: Now an auto_obstack.
14124         (abbrev_table_up): New typedef.
14125         (init_cu_die_reader): Add abbrev_table parameter.
14126         (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
14127         Add result_dwo_abbrev_table.
14128         (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
14129         (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
14130         Update.
14131         (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
14132         parameter.
14133         (skip_children): Update.
14134         (abbrev_table::alloc_abbrev): Rename from
14135         abbrev_table_alloc_abbrev.
14136         (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
14137         (abbrev_table::lookup_abbrev): Rename from
14138         abbrev_table_lookup_abbrev.
14139         (abbrev_table_read_table): Return abbrev_table_up.
14140         (abbrev_table_free, abbrev_table_free_cleanup)
14141         (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
14142         (load_partial_dies): Update.
14143
14144 2018-01-17  Tom Tromey  <tom@tromey.com>
14145
14146         * dwarf2read.c (dwarf2_compute_name): Update comment.
14147         (read_func_scope, read_variable): Update.
14148         (new_symbol): Remove.
14149         (new_symbol_full): Rename to new_symbol.
14150
14151 2018-01-17  Mike Gulick  <mgulick@mathworks.com>
14152
14153         PR gdb/16577
14154         * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
14155         a warning instead of throwing an error, set section size to 0 and return
14156         NULL.
14157         * gdb_bfd.h (gdb_bfd_map_section): Update description.
14158
14159 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
14160
14161         * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
14162         std::string.
14163         (linux_ptrace_attach_fail_reason_string): Likewise.
14164         * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
14165         Likewise.
14166         (linux_ptrace_attach_fail_reason_string): Likewise.
14167         * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
14168
14169 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
14170
14171         * linux-nat.c (linux_nat_attach): Remove xstrdup.
14172
14173 2018-01-17  Eldar Abusalimov  <eldar.abusalimov@jetbrains.com>
14174
14175         PR gdb/21559
14176         * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
14177         checking for fs_base/gs_base fields in struct user_regs_struct.
14178         * configure: Regenerate.
14179
14180 2018-01-17  Yao Qi  <yao.qi@linaro.org>
14181
14182         * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
14183         function.
14184         (aarch64_linux_init_abi): Install it to gdbarch hook
14185         gcc_target_options.
14186
14187 2018-01-15  Pedro Alves  <palves@redhat.com>
14188
14189         * common/signals-state-save-restore.c
14190         (save_original_signals_state): Fix typos.
14191
14192 2017-01-12  Tom Tromey  <tom@tromey.com>
14193             Sergio Durigan Junior  <sergiodj@redhat.com>
14194
14195         * Makefile.in (install-only): Install gdb-add-index.
14196
14197 2018-01-12  John Baldwin  <jhb@FreeBSD.org>
14198
14199         * fbsd-tdep.c (KVE_PROTECTION): Correct value.
14200
14201 2018-01-12  Andreas Arnez  <arnez@linux.vnet.ibm.com>
14202
14203         * infrun.c (keep_going_pass_signal): Clear step-over info when
14204         insert_breakpoints fails.
14205
14206 2018-01-11  Pedro Alves  <palves@redhat.com>
14207
14208         PR gdb/22583
14209         * infrun.c (resume): Rename to ...
14210         (resume_1): ... this.
14211         (resume): Reimplement as wrapper around resume_1.
14212
14213 2018-01-11  Pedro Alves  <palves@redhat.com>
14214
14215         PR remote/22597
14216         * remote.c (remote_parse_stop_reply): Default to the last-set
14217         general thread instead of to 'magic_null_ptid'.
14218
14219 2018-01-10  Pedro Alves  <palves@redhat.com>
14220
14221         * language.h (language_get_symbol_name_matcher): Rename ...
14222         (get_symbol_name_matcher): ... this.
14223         * language.c (language_get_symbol_name_matcher): Ditto.
14224         * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
14225         callers adjusted.
14226
14227 2018-01-10  Pedro Alves  <palves@redhat.com>
14228
14229         PR gdb/22670
14230         * dwarf2read.c
14231         (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
14232         Adjust to use language_get_symbol_name_matcher instead of
14233         language_defn::la_get_symbol_name_matcher.
14234         * language.c (language_get_symbol_name_matcher): If in Ada mode
14235         and the lookup name is a verbatim match, return Ada's matcher.
14236         * language.h (language_get_symbol_name_matcher): Adjust comment.
14237         (ada_lookup_name_info::verbatim_p):: New method.
14238
14239 2018-01-10  Pedro Alves  <palves@redhat.com>
14240
14241         PR gdb/22670
14242         * ada-lang.c (ada_collect_symbol_completion_matches): If the
14243         minsym's language is language_auto or language_cplus, pass down
14244         language_ada instead.
14245         * symtab.c (compare_symbol_name): Don't frob symbol language here.
14246
14247 2018-01-10  Pedro Alves  <palves@redhat.com>
14248
14249         PR gdb/22670
14250         * minsyms.c (linkage_name_str): New function.
14251         (iterate_over_minimal_symbols): Use it.
14252
14253 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
14254
14255         * NEWS: Document that 'info proc' now works on FreeBSD.
14256
14257 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
14258
14259         * configure.ac: Check for kinfo_getfile in libutil.
14260         * configure: Regenerate.
14261         * config.in: Regenerate.
14262         * fbsd-nat.c: Include "fbsd-tdep.h".
14263         (fbsd_fetch_cmdline): New.
14264         (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
14265         rather than calling error.
14266         (fbsd_info_proc): New.
14267         (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
14268         (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
14269         (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
14270
14271 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
14272
14273         * fbsd-nat.c (struct free_deleter): Remove.
14274         (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
14275
14276 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
14277
14278         * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
14279         NULL for an empty pathname.
14280
14281 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
14282
14283         * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
14284         (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
14285         (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
14286         (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
14287         (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
14288         (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
14289         (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
14290         (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
14291         (kinfo_proc_layout_32, kinfo_proc_layout_i386)
14292         (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
14293         (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
14294         (fbsd_core_fetch_timeval, fbsd_print_sigset)
14295         (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
14296         (fbsd_init_abi):  Install gdbarch "core_info_proc" method.
14297         * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
14298
14299 2018-01-08  Samuel Thibault  <samuel.thibault@ens-lyon.org>
14300
14301         * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
14302         (gnu_xfer_auxv): New function.
14303         (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
14304         TARGET_OBJECT_AUXV.
14305
14306 2018-01-08  Yao Qi  <yao.qi@linaro.org>
14307             Simon Marchi  <simon.marchi@ericsson.com>
14308
14309         * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
14310         common/selftest.c.
14311         (COMMON_OBS): Remove selftest.o.
14312         * configure.ac: Append selftest-arch.c and common/selftest.c to
14313         CONFIG_SRCS.  Append selftest-arch.o and selftest.o to COMMON_OBS.
14314         * configure: Re-generated.
14315         * maint.c (maintenance_selftest): Wrap selftests::run_tests with
14316         GDB_SELF_TEST.
14317         (maintenance_info_selftests): Likewise.
14318
14319 2018-01-08  Xavier Roirand  <roirand@adacore.com>
14320
14321         * ada-valprint.c (val_print_packed_array_elements): Use
14322         proper number of elements when printing an array indexed
14323         by an enumeration type.
14324
14325 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
14326
14327         * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
14328         (dw2_get_file_names_reader): Adjust.
14329         (lookup_dwo_signatured_type): Adjust.
14330         (lookup_dwp_signatured_type): Adjust.
14331         (lookup_signatured_type): Adjust.
14332         (create_type_unit_group): Adjust.
14333         (get_type_unit_group): Adjust.
14334         (process_psymtab_comp_unit_reader): Adjust.
14335         (build_type_psymtabs_reader): Adjust.
14336         (scan_partial_symbols): Adjust.
14337         (add_partial_symbol): Adjust.
14338         (add_partial_subprogram): Adjust.
14339         (peek_die_abbrev): Adjust.
14340         (fixup_go_packaging): Adjust.
14341         (process_imported_unit_die): Adjust.
14342         (dwarf2_compute_name): Adjust.
14343         (dwarf2_physname): Adjust.
14344         (read_import_statement): Adjust.
14345         (handle_DW_AT_stmt_list): Adjust.
14346         (read_file_scope): Adjust.
14347         (read_func_scope): Adjust.
14348         (read_lexical_block_scope): Adjust.
14349         (read_call_site_scope): Adjust.
14350         (read_variable): Adjust.
14351         (dwarf2_rnglists_process): Adjust.
14352         (dwarf2_ranges_process): Adjust.
14353         (dwarf2_ranges_read): Adjust.
14354         (dwarf2_get_pc_bounds): Adjust.
14355         (dwarf2_record_block_ranges): Adjust.
14356         (dwarf2_add_field): Adjust.
14357         (dwarf2_add_member_fn): Adjust.
14358         (read_structure_type): Adjust.
14359         (process_structure_scope): Adjust.
14360         (read_enumeration_type): Adjust.
14361         (read_array_type): Adjust.
14362         (mark_common_block_symbol_computed): Adjust.
14363         (read_common_block): Adjust.
14364         (read_namespace_type): Adjust.
14365         (read_namespace): Adjust.
14366         (read_module_type): Adjust.
14367         (read_tag_pointer_type): Adjust.
14368         (read_tag_ptr_to_member_type): Adjust.
14369         (read_tag_string_type): Adjust.
14370         (read_subroutine_type): Adjust.
14371         (read_typedef): Adjust.
14372         (read_base_type): Adjust.
14373         (attr_to_dynamic_prop): Adjust.
14374         (read_subrange_type): Adjust.
14375         (read_unspecified_type): Adjust.
14376         (dwarf2_read_abbrevs): Adjust.
14377         (load_partial_dies): Adjust.
14378         (read_partial_die): Adjust.
14379         (find_partial_die): Adjust.
14380         (guess_partial_die_structure_name): Adjust.
14381         (fixup_partial_die): Adjust.
14382         (read_attribute_value): Adjust.
14383         (read_addr_index): Adjust.
14384         (read_addr_index_from_leb128): Adjust.
14385         (read_str_index): Adjust.
14386         (dwarf2_string_attr): Adjust.
14387         (get_debug_line_section): Adjust.
14388         (dwarf_decode_line_header): Adjust.
14389         (lnp_state_machine::check_line_address): Adjust.
14390         (dwarf_decode_lines_1): Adjust.
14391         (dwarf_decode_lines): Adjust.
14392         (dwarf2_start_symtab): Adjust.
14393         (var_decode_location): Adjust.
14394         (new_symbol_full): Adjust.
14395         (dwarf2_const_value_data): Adjust.
14396         (dwarf2_const_value_attr): Adjust.
14397         (dwarf2_const_value): Adjust.
14398         (die_type): Adjust.
14399         (die_containing_type): Adjust.
14400         (build_error_marker_type): Adjust.
14401         (lookup_die_type): Adjust.
14402         (guess_full_die_structure_name): Adjust.
14403         (anonymous_struct_prefix): Adjust.
14404         (determine_prefix): Adjust.
14405         (dwarf2_name): Adjust.
14406         (follow_die_ref_or_sig): Adjust.
14407         (follow_die_offset): Adjust.
14408         (follow_die_ref): Adjust.
14409         (follow_die_sig_1): Adjust.
14410         (follow_die_sig): Adjust.
14411         (get_signatured_type): Adjust.
14412         (get_DW_AT_signature_type): Adjust.
14413         (decode_locdesc): Adjust.
14414         (dwarf_decode_macros): Adjust.
14415         (cu_debug_loc_section): Adjust.
14416         (fill_in_loclist_baton): Adjust.
14417         (dwarf2_symbol_mark_computed): Adjust.
14418         (init_one_comp_unit): Don't assign
14419         dwarf2_cu::dwarf2_per_objfile.
14420         (set_die_type): Adjust.
14421
14422 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
14423
14424         * dwarf2read.c (struct mapped_debug_names): Add constructor.
14425         <dwarf2_per_objfile>: New field.
14426         (dwarf2_per_objfile): Remove global.
14427         (get_dwarf2_per_objfile): New function.
14428         (set_dwarf2_per_objfile): New function.
14429         (dwarf2_build_psymtabs_hard): Change objfile parameter to
14430         dwarf2_per_objfile.
14431         (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
14432         (read_abbrev_offset): Likewise.
14433         (read_indirect_string): Likewise.
14434         (read_indirect_line_string): Likewise.
14435         (read_indirect_string_at_offset): Likewise.
14436         (read_indirect_string_from_dwz): Likewise.
14437         (dwarf2_find_containing_comp_unit): Change objfile parameter to
14438         dwarf2_per_objfile.
14439         (age_cached_comp_units): Add dwarf2_per_objfile parameter.
14440         (create_all_comp_units): Change objfile parameter to
14441         dwarf2_per_objfile.
14442         (create_all_type_units): Likewise.
14443         (process_queue): Add dwarf2_per_objfile parameter.
14444         (read_and_check_comp_unit_head): Likewise.
14445         (lookup_dwo_unit_in_dwp): Likewise.
14446         (get_dwp_file): Likewise.
14447         (process_cu_includes): Likewise.
14448         (struct free_dwo_file_cleanup_data): New struct.
14449         (dwarf2_has_info): Use get_dwarf2_per_objfile and
14450         set_dwarf2_per_objfile.
14451         (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
14452         (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
14453         context, adjust calls.
14454         (dw2_instantiate_symtab): Likewise.
14455         (dw2_get_cutu): Add dwarf2_per_objfile parameter.
14456         (dw2_get_cu): Likewise.
14457         (create_cu_from_index_list): Change objfile parameter to
14458         dwarf2_per_objfile.
14459         (create_cus_from_index_list): Get dwarf2_per_objfile from
14460         context, adjust calls.
14461         (create_cus_from_index): Likewise.
14462         (create_signatured_type_table_from_index): Change objfile
14463         parameter to dwarf2_per_objfile.
14464         (create_signatured_type_table_from_debug_names): Change objfile
14465         parameter to dwarf2_per_objfile.
14466         (create_addrmap_from_index): Likewise.
14467         (create_addrmap_from_aranges): Likewise.
14468         (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
14469         (dw2_setup): Remove.
14470         (dw2_get_file_names_reader): Get dwarf2_per_objfile from
14471         context.
14472         (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
14473         get_dwarf2_per_objfile.
14474         (dw2_forget_cached_source_info): Likewise.
14475         (dw2_map_symtabs_matching_filename): Likewise.
14476         (struct dw2_symtab_iterator) <index>: Remove.
14477         <dwarf2_per_objfile>: New field.
14478         (dw2_symtab_iter_init): Replace index parameter with
14479         dwarf2_per_objfile.
14480         (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
14481         (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
14482         (dw2_print_stats): Likewise.
14483         (dw2_dump): Likewise.
14484         (dw2_expand_symtabs_for_function): Likewise.
14485         (dw2_expand_all_symtabs): Likewise.
14486         (dw2_expand_symtabs_with_fullname): Likewise.
14487         (dw2_expand_marked_cus): Replace index and objfile parameters
14488         with dwarf2_per_objfile.
14489         (dw_expand_symtabs_matching_file_matcher): Add
14490         dwarf2_per_objfile parameter and adjust calls.
14491         (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
14492         adjust calls.
14493         (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
14494         (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
14495         adjust calls.
14496         (create_cus_from_debug_names_list): Replace objfile parameter
14497         with dwarf2_per_objfile and adjust calls.
14498         (create_cus_from_debug_names): Likewise.
14499         (dwarf2_read_debug_names): Likewise.
14500         (mapped_debug_names::namei_to_name): Adjust call.
14501         (dw2_debug_names_iterator::next): Likewise.
14502         (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
14503         (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
14504         (dw2_debug_names_dump): Likewise.
14505         (dw2_debug_names_expand_symtabs_for_function): Likewise.
14506         (dw2_debug_names_expand_symtabs_matching): Likewise.
14507         (dwarf2_initialize_objfile): Likewise.
14508         (dwarf2_build_psymtabs): Likewise.
14509         (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
14510         this_cu.
14511         (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
14512         (read_and_check_comp_unit_head): Likewise.
14513         (read_abbrev_offset): Likewise.
14514         (create_debug_type_hash_table): Likewise.
14515         (create_debug_types_hash_table): Likewise.
14516         (create_all_type_units): Replace objfile parameter with
14517         dwarf2_per_objfile.
14518         (add_type_unit): Add dwarf2_per_objfile parameter.
14519         (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
14520         with dwarf2_per_objfile.
14521         (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
14522         (lookup_dwp_signatured_type): Likewise.
14523         (lookup_signatured_type): Likewise.
14524         (read_cutu_die_from_dwo): Likewise.
14525         (init_tu_and_read_dwo_dies): Likewise.
14526         (init_cutu_and_read_dies): Likewise.
14527         (init_cutu_and_read_dies_no_follow): Likewise.
14528         (allocate_type_unit_groups_table): Add objfile parameter.
14529         (create_type_unit_group): Use dwarf2_per_objfile from cu.
14530         (get_type_unit_group): Likewise.
14531         (process_psymtab_comp_unit): Update call.
14532         (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
14533         (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
14534         (print_tu_stats): Likewise.
14535         (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
14536         in void* parameter.
14537         (build_type_psymtabs): Change objfile parameter to
14538         dwarf2_per_objfile.
14539         (process_skeletonless_type_unit): Use dwarf2_per_objfile
14540         passed in void* parameter.
14541         (process_skeletonless_type_units): Change objfile parameter to
14542         dwarf2_per_objfile.
14543         (set_partial_user): Likewise.
14544         (dwarf2_build_psymtabs_hard): Likewise.
14545         (read_comp_units_from_section): Likewise.
14546         (create_all_comp_units): Likewise.
14547         (scan_partial_symbols): Update calls.
14548         (add_partial_symbol): Likewise.
14549         (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
14550         (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
14551         (process_queue): Add dwarf2_per_objfile parameter.
14552         (get_compunit_symtab): Use dwarf2_per_objfile from cu.
14553         (compute_compunit_symtab_includes): Likewise.
14554         (process_cu_includes): Add dwarf2_per_objfile parameter.
14555         (process_full_comp_unit): Use dwarf2_per_objfile from cu.
14556         (process_full_type_unit): Likewise.
14557         (process_imported_unit_die): Update call.
14558         (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
14559         (read_file_scope): Likewise.
14560         (allocate_dwo_file_hash_table): Add objfile parameter.
14561         (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
14562         (create_cus_hash_table): Likewise.
14563         (create_dwp_hash_table): Likewise.
14564         (create_dwo_unit_in_dwp_v1): Likewise.
14565         (create_dwp_v2_section): Likewise.
14566         (create_dwo_unit_in_dwp_v2): Likewise.
14567         (lookup_dwo_unit_in_dwp): Likewise.
14568         (try_open_dwop_file): Likewise.
14569         (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
14570         (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
14571         cleanup to include a reference to dwarf2_per_objfile.
14572         (open_dwp_file): Add dwarf2_per_objfile parameter.
14573         (open_and_init_dwp_file): Likewise.
14574         (get_dwp_file): Likewise.
14575         (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
14576         (queue_and_load_all_dwo_tus): Update call.
14577         (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
14578         data.
14579         (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
14580         (dwarf2_ranges_process): Likewise.
14581         (dwarf2_get_pc_bounds): Likewise.
14582         (mark_common_block_symbol_computed): Likewise.
14583         (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
14584         (dwarf2_read_abbrevs): Update call.
14585         (read_partial_die): Use dwarf2_per_objfile from cu.
14586         (find_partial_die): Likewise.
14587         (fixup_partial_die): Likewise.
14588         (read_attribute_value): Likewise.
14589         (read_indirect_string_at_offset_from): Add objfile parameter.
14590         (read_indirect_string_at_offset): Add dwarf2_per_objfile
14591         parameter.
14592         (read_indirect_string_from_dwz): Add objfile parameter.
14593         (read_indirect_string): Add objfile parameter.
14594         (read_addr_index_1): Add dwarf2_per_objfile parameter.
14595         (read_addr_index): Use dwarf2_per_objfile from cu.
14596         (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
14597         call dw2_setup.
14598         (read_str_index): Use dwarf2_per_objfile from cu.
14599         (get_debug_line_section): Likewise.
14600         (read_formatted_entries): Add dwarf2_per_objfile parameter.
14601         (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
14602         (new_symbol_full): Use dwarf2_per_objfile from cu.
14603         (build_error_marker_type): Likewise.
14604         (lookup_die_type): Likewise.
14605         (determine_prefix): Likewise.
14606         (follow_die_offset): Likewise.
14607         (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
14608         (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
14609         (dwarf2_fetch_die_type_sect_off): Likewise.
14610         (dwarf2_get_die_type): Likewise.
14611         (follow_die_sig_1): Use dwarf2_per_objfile from cu.
14612         (get_signatured_type): Likewise.
14613         (get_DW_AT_signature_type): Likewise.
14614         (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
14615         (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
14616         (cu_debug_loc_section): Likewise.
14617         (fill_in_loclist_baton): Likewise.
14618         (dwarf2_symbol_mark_computed): Likewise.
14619         (dwarf2_find_containing_comp_unit): Change objfile parameter to
14620         dwarf2_per_objfile.
14621         (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
14622         parameter.
14623         (age_cached_comp_units): Add dwarf2_per_objfile parameter.
14624         (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
14625         (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
14626         (set_die_type): Use dwarf2_free_objfile from cu.
14627         (get_die_type_at_offset): Likewise.
14628         (dwarf2_per_objfile_free): Don't assign global variable.
14629         (debug_names) <constructor>: Add dwarf2_per_objfile
14630         parameter, update m_debugstrlookup construction.
14631         (debug_names::debug_str_lookup): Add dwarf2_per_objfile
14632         parameter.
14633         <m_dwarf2_per_objfile>: New field.
14634         <lookup>: Use m_dwarf2_per_objfile.
14635         (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
14636         (psyms_seen_size): Likewise.
14637         (write_gdbindex): Replace objfile parameter with
14638         dwarf2_per_objfile.
14639         (write_debug_names): Likewise.
14640         (write_psymtabs_to_index): Likewise.
14641         (save_gdb_index_command): Use get_dwarf2_per_objfile, update
14642         calls.
14643
14644 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
14645
14646         * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
14647         <dwarf2_per_objfile>: New field.
14648         (struct dwarf2_per_cu_data) <objfile>: Remove.
14649         <dwarf2_per_objfile>: New field.
14650         (create_cu_from_index_list): Assign dwarf2_per_objfile instead
14651         of objfile.
14652         (create_signatured_type_table_from_index): Likewise.
14653         (create_debug_type_hash_table): Likewise.
14654         (fill_in_sig_entry_from_dwo_entry): Likewise.
14655         (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
14656         (create_type_unit_group): Assign dwarf2_per_objfile instead of
14657         objfile.
14658         (create_partial_symtab): Access objfile through
14659         dwarf2_per_objfile.
14660         (process_psymtab_comp_unit_reader): Likewise.
14661         (read_comp_units_from_section): Likewise.
14662         (scan_partial_symbols): Likewise.
14663         (add_partial_symbol): Likewise.
14664         (add_partial_subprogram): Likewise.
14665         (peek_die_abbrev): Likewise.
14666         (fixup_go_packaging): Likewise.
14667         (process_full_comp_unit): Likewise.
14668         (process_full_type_unit): Likewise.
14669         (process_imported_unit_die): Likewise.
14670         (dwarf2_compute_name): Likewise.
14671         (dwarf2_physname): Likewise.
14672         (read_import_statement): Likewise.
14673         (create_cus_hash_table): Assign dwarf2_physname instead of
14674         objfile.
14675         (read_func_scope): Access objfile through dwarf2_per_objfile.
14676         (read_lexical_block_scope): Likewise.
14677         (read_call_site_scope): Likewise.
14678         (read_variable): Likewise.
14679         (dwarf2_rnglists_process): Likewise.
14680         (dwarf2_ranges_process): Likewise.
14681         (dwarf2_ranges_read): Likewise.
14682         (dwarf2_record_block_ranges): Likewise.
14683         (dwarf2_add_field): Likewise.
14684         (dwarf2_add_member_fn): Likewise.
14685         (read_structure_type): Likewise.
14686         (process_structure_scope): Likewise.
14687         (read_enumeration_type): Likewise.
14688         (read_array_type): Likewise.
14689         (read_common_block): Likewise.
14690         (read_namespace_type): Likewise.
14691         (read_namespace): Likewise.
14692         (read_module_type): Likewise.
14693         (read_tag_pointer_type): Likewise.
14694         (read_tag_ptr_to_member_type): Likewise.
14695         (read_tag_string_type): Likewise.
14696         (read_subroutine_type): Likewise.
14697         (read_typedef): Likewise.
14698         (read_base_type): Likewise.
14699         (attr_to_dynamic_prop): Likewise.
14700         (read_subrange_type): Likewise.
14701         (read_unspecified_type): Likewise.
14702         (load_partial_dies): Likewise.
14703         (read_partial_die): Likewise.
14704         (find_partial_die): Likewise.
14705         (guess_partial_die_structure_name): Likewise.
14706         (fixup_partial_die): Likewise.
14707         (read_attribute_value): Likewise.
14708         (read_addr_index_from_leb128): Likewise.
14709         (dwarf2_read_addr_index): Likewise.
14710         (dwarf2_string_attr): Likewise.
14711         (lnp_state_machine::check_line_address): Likewise.
14712         (dwarf_decode_lines_1): Likewise.
14713         (dwarf_decode_lines): Likewise.
14714         (dwarf2_start_symtab): Likewise.
14715         (var_decode_location): Likewise.
14716         (new_symbol_full): Likewise.
14717         (dwarf2_const_value_data): Likewise.
14718         (dwarf2_const_value_attr): Likewise.
14719         (dwarf2_const_value): Likewise.
14720         (die_type): Likewise.
14721         (die_containing_type): Likewise.
14722         (lookup_die_type): Likewise.
14723         (guess_full_die_structure_name): Likewise.
14724         (anonymous_struct_prefix): Likewise.
14725         (dwarf2_name): Likewise.
14726         (follow_die_ref_or_sig): Likewise.
14727         (follow_die_offset): Likewise.
14728         (follow_die_ref): Likewise.
14729         (dwarf2_fetch_die_loc_sect_off): Likewise.
14730         (dwarf2_fetch_constant_bytes): Likewise.
14731         (dwarf2_fetch_die_type_sect_off): Likewise.
14732         (dwarf2_get_die_type): Likewise.
14733         (follow_die_sig): Likewise.
14734         (decode_locdesc): Likewise.
14735         (dwarf2_per_cu_objfile): Likewise.
14736         (dwarf2_per_cu_text_offset): Likewise.
14737         (init_one_comp_unit): Assign dwarf2_per_objfile instead of
14738         objfile.
14739         (set_die_type): Access objfile through
14740         dwarf2_per_objfile.
14741
14742 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
14743
14744         * valprint.c (converted_character_d): Remove typedef.
14745         (DEF_VEC_O (converted_character_d)): Remove.
14746         (count_next_character): Use std::vector.
14747         (print_converted_chars_to_obstack): Likewise.
14748         (generic_printstr): Likewise.
14749
14750 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
14751
14752         * xml-support.h (struct gdb_xml_value): Add constructor.
14753         <value>: Change type to unique_xmalloc_ptr.
14754         (gdb_xml_value_s): Remove typedef.
14755         (DEF_VEC_O (gdb_xml_value_s)): Remove.
14756         (gdb_xml_element_start_handler): Change parameter type to
14757         std::vector.
14758         (xml_find_attribute): Likewise.
14759         * xml-support.c (xml_find_attribute): Change parameter type to
14760         std::vector and adjust.
14761         (gdb_xml_values_cleanup): Remove.
14762         (gdb_xml_parser::start_element): Adjust to std::vector.
14763         (xinclude_start_include): Change paraeter type to std::vector
14764         and adjust.
14765         * btrace.c (check_xml_btrace_version): Likewise.
14766         (parse_xml_btrace_block): Likewise.
14767         (parse_xml_btrace_pt_config_cpu): Likewise.
14768         (parse_xml_btrace_pt): Likewise.
14769         (parse_xml_btrace_conf_bts): Likewise.
14770         (parse_xml_btrace_conf_pt): Likewise.
14771         * memory-map.c (memory_map_start_memory): Likewise.
14772         (memory_map_start_property): Likewise.
14773         * osdata.c (osdata_start_osdata): Likewise.
14774         (osdata_start_item): Likewise.
14775         (osdata_start_column): Likewise.
14776         * remote.c (start_thread): Likewise.
14777         * solib-aix.c (library_list_start_library): Likewise.
14778         (library_list_start_list): Likewise.
14779         * solib-svr4.c (library_list_start_library): Likewise.
14780         (svr4_library_list_start_list): Likewise.
14781         * solib-target.c (library_list_start_segment): Likewise.
14782         (library_list_start_section): Likewise.
14783         (library_list_start_library): Likewise.
14784         (library_list_start_list): Likewise.
14785         * tracepoint.c (traceframe_info_start_memory): Likewise.
14786         (traceframe_info_start_tvar): Likewise.
14787         * xml-syscall.c (syscall_start_syscall): Likewise.
14788         * xml-tdesc.c (tdesc_start_target): Likewise.
14789         (tdesc_start_feature): Likewise.
14790         (tdesc_start_reg): Likewise.
14791         (tdesc_start_union): Likewise.
14792         (tdesc_start_struct): Likewise.
14793         (tdesc_start_flags): Likewise.
14794         (tdesc_start_enum): Likewise.
14795         (tdesc_start_field): Likewise.
14796         (tdesc_start_enum_value): Likewise.
14797         (tdesc_start_vector): Likewise.
14798
14799 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
14800
14801         * extension.h (struct xmethod_worker) <clone>: Remove.
14802         * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
14803         Remove.
14804         (python_xmethod_worker::clone): Remove.
14805         * valops.c (find_overload_match): Use std::move instead of
14806         clone.
14807
14808 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
14809
14810         * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
14811         (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
14812         <free_xmethod_worker_data>: Remove.
14813         <get_matching_xmethod_workers>: Chance VEC to std::vector.
14814         <get_xmethod_arg_types>: Remove.
14815         <get_xmethod_result_type>: Remove.
14816         <invoke_xmethod>: Remove.
14817         * extension.c (new_xmethod_worker): Remove.
14818         (clone_xmethod_worker): Remove.
14819         (get_matching_xmethod_workers): Return void, pass std::vector by
14820         pointer.
14821         (get_xmethod_arg_types): Rename to...
14822         (xmethod_worker::get_arg_types): ... this, and adjust.
14823         (get_xmethod_result_type): Rename to...
14824         (xmethod_worker::get_result_type): ... this, and adjust.
14825         (invoke_xmethod): Remove.
14826         (free_xmethod_worker): Remove.
14827         (free_xmethod_worker_vec): Remove.
14828         * extension.h (enum ext_lang_rc): Move here from
14829         extension-priv.h.
14830         (struct xmethod_worker): Add constructor and destructor.
14831         <data>: Remove.
14832         <value>: Remove.
14833         <invoke, clone, do_get_result_type, do_get_arg_types>: New
14834         virtual pure methods.
14835         <get_arg_types, get_result_type>: New methods.
14836         (xmethod_worker_ptr): Remove typedef.
14837         (DEF_VEC_P (xmethod_worker_ptr)): Remove.
14838         (xmethod_worker_vec): Remove typedef.
14839         (xmethod_worker_up): New typedef.
14840         (invoke_xmethod): Remove.
14841         (clone_xmethod_worker): Remove.
14842         (free_xmethod_worker): Remove.
14843         (free_xmethod_worker_vec): Remove.
14844         (get_xmethod_arg_types): Remove.
14845         (get_xmethod_result_type): Remove.
14846         * valops.c (find_method_list): Use std::vector, don't use
14847         intermediate vector.
14848         (value_find_oload_method_list): Use std::vector.
14849         (find_overload_match): Use std::vector.
14850         (find_oload_champ): Use std::vector.
14851         * value.c (value_free): Use operator delete.
14852         (value_of_xmethod): Rename to...
14853         (value_from_xmethod): ... this.  Don't assign
14854         xmethod_worker::value, take rvalue-reference.
14855         (result_type_of_xmethod): Adjust.
14856         (call_xmethod): Adjust.
14857         * value.h: Include extension.h.
14858         (struct xmethod_worker): Don't forward-declare.
14859         (value_of_xmethod): Rename to...
14860         (value_from_xmethod): ... this, take rvalue-reference.
14861         * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
14862         (struct python_xmethod_worker): ... this, add constructor and
14863         destructor.
14864         <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
14865         (gdbpy_free_xmethod_worker_data): Rename to...
14866         (python_xmethod_worker::~python_xmethod_worker): ... this and
14867         adjust.
14868         (gdbpy_clone_xmethod_worker_data): Rename to...
14869         (python_xmethod_worker::clone): ... this and adjust.
14870         (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
14871         temporary vector.
14872         (gdbpy_get_xmethod_arg_types): Rename to...
14873         (python_xmethod_worker::do_get_arg_types): ... this and adjust.
14874         (gdbpy_get_xmethod_result_type): Rename to...
14875         (python_xmethod_worker::do_get_result_type): ... this and
14876         adjust.
14877         (gdbpy_invoke_xmethod): Rename to...
14878         (python_xmethod_worker::invoke): ... this and adjust.
14879         (new_python_xmethod_worker): Rename to...
14880         (python_xmethod_worker::python_xmethod_worker): ... this and
14881         adjust.
14882         * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
14883         Remove.
14884         (gdbpy_free_xmethod_worker_data): Remove.
14885         (gdbpy_get_matching_xmethod_workers): Use std::vector.
14886         (gdbpy_get_xmethod_arg_types): Remove.
14887         (gdbpy_get_xmethod_result_type): Remove.
14888         (gdbpy_invoke_xmethod): Remove.
14889         * python/python.c (python_extension_ops): Remove obsolete
14890         callbacks.
14891
14892 2018-01-05  Pedro Alves  <palves@redhat.com>
14893
14894         PR gdb/18653
14895         * common/signals-state-save-restore.c
14896         (save_original_signals_state): New parameter 'quiet'.  Warn if we
14897         find a custom handler preinstalled, instead of internal erroring.
14898         But only warn if !quiet.
14899         * common/signals-state-save-restore.h
14900         (save_original_signals_state): New parameter 'quiet'.
14901         * main.c (captured_main_1): Move save_original_signals_state call
14902         after option handling, and pass QUIET.
14903
14904 2018-01-05  Pedro Alves  <palves@redhat.com>
14905
14906         * spu-tdep.c (spu_catch_start): Pass
14907         symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
14908
14909 2018-01-05  Pedro Alves  <palves@redhat.com>
14910
14911         PR gdb/22670
14912         * ada-lang.c (literal_symbol_name_matcher): New function.
14913         (ada_get_symbol_name_matcher): Use it for
14914         symbol_name_match_type::SEARCH_NAME.
14915         * block.c (block_lookup_symbol): New parameter 'match_type'.  Pass
14916         it down instead of assuming symbol_name_match_type::FULL.
14917         * block.h (block_lookup_symbol): New parameter 'match_type'.
14918         * c-valprint.c (print_unpacked_pointer): Use
14919         lookup_symbol_search_name instead of lookup_symbol.
14920         * compile/compile-object-load.c (get_out_value_type): Pass down
14921         symbol_name_match_type::SEARCH_NAME.
14922         * cp-namespace.c (cp_basic_lookup_symbol): Pass down
14923         symbol_name_match_type::FULL.
14924         * cp-support.c (cp_get_symbol_name_matcher): Handle
14925         symbol_name_match_type::SEARCH_NAME.
14926         * infrun.c (insert_exception_resume_breakpoint): Use
14927         lookup_symbol_search_name.
14928         * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
14929         * psymtab.c (maintenance_check_psymtabs): Use
14930         symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
14931         * stack.c (print_frame_args): Use lookup_symbol_search_name and
14932         SYMBOL_SEARCH_NAME.
14933         * symtab.c (lookup_local_symbol): Don't demangle the lookup name
14934         if symbol_name_match_type::SEARCH_NAME.
14935         (lookup_symbol_in_language): Pass down
14936         symbol_name_match_type::FULL.
14937         (lookup_symbol_search_name): New.
14938         (lookup_language_this): Pass down
14939         symbol_name_match_type::SEARCH_NAME.
14940         (lookup_symbol_aux, lookup_local_symbol): New parameter
14941         'match_type'.  Pass it down.
14942         * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
14943         (lookup_symbol_search_name): New declaration.
14944         (lookup_symbol_in_block): New 'match_type' parameter.
14945
14946 2018-01-05  Pedro Alves  <palves@redhat.com>
14947
14948         PR gdb/22670
14949         * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
14950         ada_lookup_symbol.
14951         (ada_lookup_symbol): Reimplement in terms of
14952         ada_lookup_symbol_list, bits factored out from
14953         ada_lookup_encoded_symbol.
14954
14955 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
14956
14957         * ada-exp.y (write_object_renaming): When subscripting an array
14958         using a symbol as the index, pass the block in call to
14959         ada_lookup_encoded_symbol when looking that symbol up.
14960
14961 2018-01-05  Jerome Guitton  <guitton@adacore.com>
14962
14963         * ada-lang.c (ada_array_length): Use ada_index_type instead of
14964         TYPE_INDEX_TYPE.
14965
14966 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
14967
14968         * ada-lang.c (ada_to_fixed_value_create): Add handling of
14969         the case where VALUE_LVAL (val0) is not lval_memory.
14970
14971 2018-01-05  Xavier Roirand  <roirand@adacore.com>
14972
14973         * ada-valprint.c (print_optional_low_bound): Handle
14974         character-indexed array printing like boolean-indexed array
14975         printing.
14976
14977 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
14978
14979         * NEWS: Create a new section for the next release branch.
14980         Rename the section of the current branch, now that it has
14981         been cut.
14982
14983 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
14984
14985         GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
14986         * version.in: Bump version to 8.1.50.DATE-git.
14987
14988 2018-01-03  Xavier Roirand  <roirand@adacore.com>
14989
14990         * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
14991         Add field.
14992         * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
14993         Add field.
14994         (default_exception_support_info) <catch_handlers_sym>: Add field.
14995         (exception_support_info_fallback) <catch_handlers_sym>: Add field.
14996         (ada_exception_name_addr_1): Add "catch handlers" handling.
14997         (ada_exception_catchpoint_cond_string) <ex>: New parameter.
14998         Update all callers.
14999         (create_excep_cond_exprs) <ex>: Add parameter.
15000         (re_set_exception): Update create_excep_cond_exprs call.
15001         (print_it_exception, print_one_exception, print_mention_exception)
15002         (print_recreate_exception): Add "catch handler" handling.
15003         (allocate_location_catch_handlers, re_set_catch_handlers)
15004         (check_status_catch_handlers, print_it_catch_handlers)
15005         (print_one_catch_handlers, print_mention_catch_handlers)
15006         (print_recreate_catch_handlers): New function.
15007         (catch_handlers_breakpoint_ops): New variable.
15008         (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
15009         Add parameter.  Add "catch handler" handling.
15010         (ada_exception_sym_name, ada_exception_breakpoint_ops):
15011         Add "catch handler" handling.
15012         (ada_exception_catchpoint_cond_string): Add "catch handler"
15013         handling.
15014         (create_ada_exception_catchpoint): Update create_excep_cond_exprs
15015         call.
15016         (catch_ada_handlers_command): New function.
15017         (initialize_ada_catchpoint_ops): Initialize "catch handlers"
15018         operations structure.
15019         (_initialize_ada_language): Add "catch handlers" command entry.
15020         * NEWS: Document "catch handlers" feature.
15021
15022 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
15023
15024         * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
15025         account when creating the array type of the slice.
15026         (ada_value_slice): Likewise.
15027
15028 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
15029
15030         * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
15031         New enum value.
15032         (create_array_type_with_stride): Add byte_stride_prop parameter.
15033         * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
15034         New parameter.  Update all callers in this file.
15035         (array_type_has_dynamic_stride): New function.
15036         (is_dynamic_type_internal, resolve_dynamic_array): Add handling
15037         of arrays with dynamic byte strides.
15038         * dwarf2read.c (read_array_type): Add support for dynamic
15039         DW_AT_byte_stride attributes.
15040
15041 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
15042
15043         * dwarf2read.c (read_unspecified_type): Treat
15044         DW_TAG_enumeration_type DIEs from Ada units as stubs.
15045
15046 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
15047
15048         Update copyright year range in all GDB files.
15049
15050 2018-01-01, 18  Joel Brobecker  <brobecker@adacore.com>
15051
15052         * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
15053         and gdb/testsuite/gdb.base/step-line.c.
15054
15055 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
15056
15057         * copyright.py (main): Dump the contents of
15058         MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
15059         even if BY_HAND is empty.
15060
15061 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
15062
15063         * top.c (print_gdb_version): Update Copyright year in version
15064         message.
15065
15066 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
15067
15068         * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
15069
15070 For older changes see ChangeLog-2017.
15071 \f
15072 Local Variables:
15073 mode: change-log
15074 left-margin: 8
15075 fill-column: 74
15076 version-control: never
15077 coding: utf-8
15078 End: