Zero-initialize linux note sections
[external/binutils.git] / gdb / ChangeLog
1 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
2
3         * linux-tdep.c (linux_collect_regset_section_cb): Use
4         std::vector<gdb_byte> instead of char * and malloc for buf.
5         Remove xfree.
6
7 2018-10-26  Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
8
9         * xcoffread.c (read_xcoff_symtab): Pass deduced language to
10         symtab_start instead of always using language_unknown.
11
12 2018-10-26  Andrew Burgess  <andrew.burgess@embecosm.com>
13
14         * riscv-tdep.c (riscv_read_misa_reg): Update comment, remove
15         READ_P parameter, catch and ignore register access errors from
16         either the old or new MISA location.
17         (riscv_has_feature): Update call to riscv_read_misa_reg.
18
19 2018-10-25  Andrew Burgess  <andrew.burgess@embecosm.com>
20
21         * python/py-function.c (convert_values_to_python): Return
22         gdbpy_ref<>.  Add header comment.
23         (fnpy_call): Adjust.
24
25 2018-10-25  Andrew Burgess  <andrew.burgess@embecosm.com>
26
27         * python/py-cmd.c (cmdpy_completer_helper): Return gdbpy_ref<>.
28         (cmdpy_completer_handle_brkchars): Adjust.
29         (cmdpy_completer): Adjust.
30
31 2018-10-25  Andrew Burgess  <andrew.burgess@embecosm.com>
32
33         * riscv-linux-nat.c (riscv_linux_nat_target::fetch_registers):
34         Pass correct regnum to raw_supply_zeroed.
35
36 2018-10-23  Hafiz Abid Qadeer  <abidh@codesourcery.com>
37
38         * regcache.c (cooked_read_test): Add CSKY to the list of
39         architectures with a save_reggroup
40
41 2018-10-23  Simon Marchi  <simon.marchi@polymtl.ca>
42
43         PR gdb/23368
44         * infrun.c (follow_exec): In the follow_exec_mode_new case,
45         transfer terminal state from old new new inferior.
46         * terminal.h (swap_terminal_info): New function.
47         * inflow.c (swap_terminal_info): New function.
48
49 2018-10-23  Tom Tromey  <tom@tromey.com>
50
51         * record-btrace.c (get_thread_current_frame_id): Rename from
52         get_thread_current_frame.  Return a frame_id.
53         (record_btrace_start_replaying): Update.
54
55 2018-10-23  Andrew Burgess  <andrew.burgess@embecosm.com>
56
57         * riscv-tdep.c (riscv_register_name): Use the user-friendly names
58         for CSRs.
59
60 2018-10-23  Joel Brobecker  <brobecker@adacore.com>
61
62         * riscv-tdep.c (riscv_gdbarch_init): Set the gdbarch's
63         have_nonsteppable_watchpoint attribute to 1.
64
65 2018-10-23  Andrew Burgess  <andrew.burgess@embecosm.com>
66
67         * riscv-tdep.c (riscv_gdb_reg_names): Update comment, and all
68         register names.
69         (struct register_alias): Rename to...
70         (struct riscv_register_alias): ...this, and update comment.
71         (riscv_register_aliases): Update type, and alias names.  Remove
72         CSR names from this list.
73         (riscv_register_name): Use riscv_gdb_reg_names for int and float
74         register names.  Add an extra assertion.
75         (riscv_is_regnum_a_named_csr): New function.
76         (riscv_register_reggroup_p): Use riscv_is_regnum_a_named_csr.
77
78 2018-10-22  Jim Wilson  <jimw@sifive.com>
79
80         * riscv-tdep.c (riscv_push_dummy_call) <in_reg>: Check for value in
81         FP reg smaller than FP reg size, and fill with -1 instead of 0.
82
83         * riscv-tdep.c (riscv_fpreg_d_type, riscv_fpreg_q_type): New.
84         (riscv_register_type): Use them.
85         (riscv_print_one_register_info): Handle union of floats same as float.
86         * riscv-tdep.h (struct gdbarch_tdep): Add riscv_fpreg_d_type and
87         riscv_fpreg_q_type fields.
88
89 2018-10-21  Simon Marchi  <simon.marchi@ericsson.com>
90
91         * gdbarch.sh (gdbarch_num_cooked_regs): New.
92         * gdbarch.h: Re-generate.
93         * ax-gdb.c (gen_expr): Use gdbarch_num_cooked_regs.
94         * dwarf2-frame.c (dwarf2_frame_cache): Likewise.
95         * eval.c (evaluate_subexp_standard): Likewise.
96         * findvar.c (value_of_register): Likewise.
97         (value_of_register_lazy): Likewise.
98         (address_from_register): Likewise.
99         * frame.c (get_frame_register_bytes): Likewise.
100         * gdbarch-selftests.c (register_to_value_test): Likewise.
101         * h8300-tdep.c (h8300_register_type): Likewise.
102         * i386-tdep.c (i386_dbx_reg_to_regnum): Likewise.
103         (i386_svr4_reg_to_regnum): Likewise.
104         * infcmd.c (default_print_registers_info): Likewise.
105         (registers_info): Likewise.
106         (print_vector_info): Likewise.
107         (default_print_float_info): Likewise.
108         * m68hc11-tdep.c (m68hc11_frame_unwind_cache): Likewise.
109         * mdebugread.c (mdebug_reg_to_regnum): Likewise.
110         * mi/mi-main.c (mi_cmd_data_list_register_names): Likewise.
111         (mi_cmd_data_list_changed_registers): Likewise.
112         (mi_cmd_data_list_register_values): Likewise.
113         (mi_cmd_data_write_register_values): Likewise.
114         (mi_cmd_trace_frame_collected): Likewise.
115         * mips-tdep.c (print_gp_register_row): Likewise.
116         (mips_print_registers_info): Likewise.
117         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
118         * regcache.c (init_regcache_descr): Likewise.
119         (register_size): Likewise.
120         (register_dump::dump): Likewise.
121         (cooked_read_test): Likewise.
122         (cooked_write_test): Likewise.
123         * rs6000-tdep.c (rs6000_register_sim_regno): Likewise.
124         (rs6000_gdbarch_init): Likewise.
125         * stabsread.c (stab_reg_to_regnum): Likewise.
126         * stack.c (info_frame_command): Likewise.
127         * target-descriptions.c (tdesc_register_name): Likewise.
128         * trad-frame.c (trad_frame_alloc_saved_regs): Likewise.
129         * tui/tui-regs.c (tui_show_register_group): Likewise.
130         * user-regs.c (user_reg_map_name_to_regnum): Likewise.
131         (user_reg_map_regnum_to_name): Likewise.
132         (value_of_user_reg): Likewise.
133         (maintenance_print_user_registers): Likewise.
134         * xtensa-tdep.c (xtensa_find_register_by_name): Likewise.
135         (xtensa_register_name): Likewise.
136         (xtensa_register_type): Likewise.
137         (xtensa_reg_to_regnum): Likewise.
138         (xtensa_pseudo_register_read): Likewise.
139         (xtensa_pseudo_register_write): Likewise.
140
141 2018-10-21  Simon Marchi  <simon.marchi@polymtl.ca>
142
143         * amd64-tdep.c (amd64_pseudo_register_read_value): Use
144         correctly-sized buffer with raw_read.
145         (amd64_pseudo_register_write): Use correctly-sized buffer for
146         raw_read/raw_write.
147
148 2018-10-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
149
150         * typeprint.c (_initialize_typeprint): Fix wrong prefixname arg
151         in add_prefix_cmd of set print type.
152
153 2018-10-19  Tom Tromey  <tom@tromey.com>
154
155         PR tui/18388:
156         * NEWS: Mention tabset deprecation.
157         * tui/tui-win.c (tui_tab_width, internal_tab_width): New globals.
158         (update_tab_width): New function.
159         (tui_set_tab_width, tui_show_tab_width): New functions.
160         (tui_set_tab_width_command): Use update_tab_width.
161         (_initialize_tui_win): Move to end of file.  Deprecate "tabset".
162         Add new "set tui tab-width" command.
163         * tui/tui-source.c (tui_set_source_content): Update.
164         * tui/tui-disasm.c (tui_set_disassem_content): Update.
165         * tui/tui-data.h (tui_default_tab_len, tui_set_default_tab_len):
166         Don't declare.
167         (tui_tab_width): Declare.
168         * tui/tui-data.c (default_tab_len, tui_default_tab_len)
169         (tui_set_default_tab_len): Remove.
170
171 2018-10-19  Tom Tromey  <tom@tromey.com>
172
173         * tui/tui-io.h (key_is_start_sequence, key_is_end_sequence)
174         (key_is_backspace, tui_getc): Don't declare.
175         * tui/tui-io.c (key_is_start_sequence): Now static.
176         (key_is_end_sequence, key_is_backspace): Remove.
177         (tui_getc): Now static.
178
179 2018-10-19  Tom Tromey  <tom@tromey.com>
180
181         * symfile.c (reread_symbols): Clear "static_links".
182
183 2018-10-19  Alan Hayward  <alan.hayward@arm.com>
184
185         * aarch64-linux-tdep.c (AARCH64_SIGCONTEXT_RESERVED_SIZE): New
186         define.
187         (aarch64_linux_sigframe_init): Extra boundary checks.
188
189 2018-10-19  Andreas Arnez  <arnez@linux.ibm.com>
190
191         * s390-tdep.c (s390_pseudo_register_type): For v0-v15 don't yield
192         the possibly non-existent tdesc type 'vec128', but the type of raw
193         register v16 instead.
194
195 2018-10-19  Gary Benson <gbenson@redhat.com>
196
197         * cli/cli-interp.c (cli_interp::~cli_interp): New function.
198
199 2018-10-18  Sergio Durigan Junior  <sergiodj@redhat.com>
200
201         PR cli/23785
202         * cli/cli-dump.c (restore_binary_file): Check if "file" is
203         NULL.
204
205 2018-10-17  Paul Koning  <paul_koning@dell.com>
206
207         * charset.c (convert_between_encodings): Fix unsigned overflow.
208
209 2018-10-17  John Baldwin  <jhb@FreeBSD.org>
210
211         * fbsd-nat.c (fbsd_nat_target::info_proc) Use
212         fbsd_info_proc_mappings_header and fbsd_info_proc_mappings_entry.
213         * fbsd-tdep.c (fbsd_vm_map_entry_flags): Mark static.
214         (fbsd_info_proc_mappings_header, fbsd_info_proc_mappings_entry):
215         New functions.
216         (fbsd_core_info_proc_mappings): Use fbsd_info_proc_mappings_header
217         and fbsd_info_proc_mappings_header.
218         * fbsd-tdep.h (fbsd_vm_map_entry_flags): Remove.
219         (fbsd_info_proc_mappings_header, fbsd_info_proc_mappings_entry):
220         New.
221
222 2018-10-17  Joel Brobecker  <brobecker@adacore.com>
223
224         * MAINTAINERS (Responsible Maintainers): Add Rainer Orth as
225         Solaris Maintainer.
226
227 2018-10-15  Tom Tromey  <tom@tromey.com>
228
229         * tui/tui.c (strcat_to_buf): Remove casts.
230         * tui/tui-winsource.c (tui_show_source_line)
231         (tui_set_is_exec_point_at, tui_line_is_displayed): Remove casts.
232         * tui/tui-wingeneral.c (tui_refresh_win, box_win): Remove casts.
233         * tui/tui-windata.c (tui_first_data_item_displayed)
234         (tui_delete_data_content_windows, tui_erase_data_content)
235         (tui_display_all_data, tui_display_data_from)
236         (tui_refresh_data_win, tui_vertical_data_scroll): Remove casts.
237         * tui/tui-win.c (tui_set_win_height)
238         (make_invisible_and_set_new_height, parse_scrolling_args): Remove
239         casts.
240         * tui/tui-win.c (tui_resize_all): Remove casts.
241         (tui_scroll_backward_command, tui_set_focus)
242         (tui_set_tab_width_command): Likewise.
243         * tui/tui-source.c (tui_vertical_source_scroll): Remove cast.
244         * tui/tui-regs.c (tui_show_register_group): Remove cast.
245         * tui/tui-layout.c (tui_set_layout_by_name): Remove cast.
246         * tui/tui-disasm.c (tui_vertical_disassem_scroll): Remove cast.
247         * tui/tui-data.c (tui_partial_win_by_name, tui_free_win_content):
248         Remove casts.
249
250 2018-10-15  Simon Marchi  <simon.marchi@ericsson.com>
251
252         * MAINTAINERS (Responsible Maintainers): Add Alan Hayward as
253         AArch64/ARM maintainer.
254
255 2018-10-11  Gary Benson <gbenson@redhat.com>
256
257         * interps.h (interp::m_name): Make private and mutable.
258         * interps.c (interp::~interp): Free m_name.
259
260 2018-10-10  Sergio Durigan Junior  <sergiodj@redhat.com>
261             Simon Marchi <simark@simark.ca>
262
263         * README (`configure' options): Add documentation for new
264         "--enable-unit-tests" option.
265         * acinclude.m4: Include "selftest.m4".
266         * configure: Regenerate.
267         * configure.ac: Use "GDB_AC_SELFTEST".
268         * maint.c (maintenance_selftest): Update message informing
269         that selftests have been disabled.
270         (maintenance_info_selftests): Likewise.
271         * selftest.m4: New file.
272
273 2018-10-10  Gary Benson <gbenson@redhat.com>
274
275         * remote.c (remote_target::remote_send_printf): Add
276         missing va_end found by Coverity.
277
278 2018-10-10  Markus Metzger  <markus.t.metzger@intel.com>
279
280         * btrace.c (ftrace_update_function): Add indirect jump heuristic.
281
282 2018-10-09  Tom Tromey  <tom@tromey.com>
283
284         * configure: Rebuild.
285         * sanitize.m4 (AM_GDB_UBSAN): Default to no.
286         * NEWS: Update --enable-ubsan documentation.
287
288 2018-10-09  Gary Benson <gbenson@redhat.com>
289
290         * dwarf2read.c (create_dwp_hash_table): Fix buffer overrun
291         found by Coverity.
292
293 2018-10-08  Tom Tromey  <tom@tromey.com>
294
295         * riscv-fbsd-tdep.c (riscv_fbsd_sigframe_init): Remove unused
296         variable.
297         (riscv_fbsd_init_abi): Likewise.
298
299 2018-10-08  Weimin Pan  <weimin.pan@oracle.com>
300         * valops.c (value_struct_elt_for_reference): Rename local variable
301         to work around the shadowing a previous local warning.
302
303 2018-10-08  John Baldwin  <jhb@FreeBSD.org>
304
305         * Makefile.in (ALLDEPFILES): Add riscv-fbsd-nat.c.
306         * NEWS: Mention new FreeBSD/riscv native configuration.
307         * configure.host: Add riscv*-*-freebsd*.
308         * configure.nat: Likewise.
309         * riscv-fbsd-nat.c: New file.
310
311 2018-10-08  John Baldwin  <jhb@FreeBSD.org>
312
313         * Makefile.in (ALL_TARGET_OBS): Add riscv-fbsd-tdep.o.
314         (HFILES_NO_SRCDIR): Add riscv-fbsd-tdep.h.
315         (ALLDEPFILES): Add riscv-fbsd-tdep.c.
316         * NEWS: Mention new FreeBSD/riscv target.
317         * configure.tgt: Add riscv*-*-freebsd*.
318         * riscv-fbsd-tdep.c: New file.
319         * riscv-fbsd-tdep.h: New file.
320
321 2018-10-08  John Baldwin  <jhb@FreeBSD.org>
322
323         * regcache.h (struct regcache_map_entry): Note that this type can
324         be used with traditional frame caches.
325         * trad-frame.c (trad_frame_set_reg_regmap): New.
326         * trad-frame.h (trad_frame_set_reg_regmap): New.
327
328 2018-10-08  Weimin Pan  <weimin.pan@oracle.com>
329
330         PR c++/16841
331         * valops.c (get_virtual_base_offset): New function.
332         (value_struct_elt_for_reference): Use it to get virtual base offset
333         and add it in calculating class member address.
334
335 2018-10-08   John Darrington <john@darrington.wattle.id.au>
336
337     * dwarf2read.c (dwarf2_cu) <producer_is_codewarrior>: New field.
338       (check_producer): Check if the producer is codewarrior.
339       (producer_is_codewarrior): New function.
340       (lnp_state_machine::record_line): Ignore is_stmt flag for records
341        produced by codewarrior.
342       (dwarf2_cu::dwarf2_cu): Initialize producer_is_codewarrior.
343
344 2018-10-06  Tom Tromey  <tom@tromey.com>
345
346         PR python/19399:
347         * python/py-inferior.c: Add "architecture" entry.
348         (infpy_architecture): New function.
349
350 2018-10-06  Tom Tromey  <tom@tromey.com>
351
352         PR python/21765:
353         * python/py-symbol.c (gdbpy_initialize_symbols): Redefine
354         SYMBOL_VARIABLES_DOMAIN, SYMBOL_FUNCTIONS_DOMAIN,
355         SYMBOL_TYPES_DOMAIN.  Define SYMBOL_MODULE_DOMAIN,
356         SYMBOL_COMMON_BLOCK_DOMAIN, SYMBOL_LOC_COMMON_BLOCK.
357
358 2018-10-06  Tom Tromey  <tom@tromey.com>
359
360         PR build/17077:
361         * Makefile.in (OPCODES_CFLAGS): Remove "-I$(OPCODES_SRC)/..".
362         * arc-tdep.c, frv-tdep.c, lm32-tdep.c, mep-tdep.c,
363         microblaze-tdep.c, or1k-tdep.h: Use ../opcodes, not opcodes, in
364         #include.
365
366 2018-10-06  Tom Tromey  <tom@tromey.com>
367
368         * python/py-breakpoint.c (bppy_get_location): Handle a
369         bp_breakpoint without a location.
370
371 2018-10-06  Tom Tromey  <tom@tromey.com>
372
373         * python/lib/gdb/function/strfns.py (_MemEq, _StrLen, _StrEq)
374         (_RegEx): Reformat help text.
375         * python/lib/gdb/function/caller_is.py (CallerIs, CallerMatches)
376         (AnyCallerIs, AnyCallerMatches): Reformat help text.
377         * python/lib/gdb/function/as_string.py (_AsString): Reformat help
378         text.
379         * python/lib/gdb/command/xmethods.py (InfoXMethod)
380         (EnableXMethod, DisableXMethod): Remove help indentation.
381         Capitalize meta-syntactic variables.
382         * python/lib/gdb/command/unwinders.py (InfoUnwinder)
383         (EnableUnwinder, DisableUnwinder): Remove help indentation.
384         Capitalize meta-syntactic variables.
385         * python/lib/gdb/command/explore.py (ExploreCommand)
386         (ExploreValueCommand, ExploreTypeCommand): Reformat help text.
387         * python/lib/gdb/command/type_printers.py (InfoTypePrinter)
388         (EnableTypePrinter, DisableTypePrinter): Remove help indentation.
389         * python/lib/gdb/command/pretty_printers.py (InfoPrettyPrinter):
390         Remove help indentation.
391         (EnablePrettyPrinter, DisablePrettyPrinter): Likewise.
392         * python/lib/gdb/command/frame_filters.py (EnableFrameFilter)
393         (DisableFrameFilter, SetFrameFilterPriority)
394         (ShowFrameFilterPriority, InfoFrameFilter): Reword help text.
395
396 2018-10-06  Tom Tromey  <tom@tromey.com>
397
398         PR tui/28819:
399         * tui/tui-io.c (gdb_wgetch): New function.
400         (tui_mld_getc, tui_getc): Use it.
401
402 2018-10-05  Tom Tromey  <tom@tromey.com>
403
404         * sol-thread.c (sol_thread_target::wait): Rename inner
405         "save_ptid".
406
407 2018-10-04  Tom Tromey  <tom@tromey.com>
408
409         * configure: Rebuild.
410         * warning.m4 (AM_GDB_WARNINGS): Add -Wshadow=local.
411
412 2018-10-04  Tom Tromey  <tom@tromey.com>
413
414         * guile/scm-frame.c (gdbscm_frame_read_var): Remove inner
415         declaration of "block".
416
417 2018-10-04  Tom Tromey  <tom@tromey.com>
418
419         * common/filestuff.c (fdwalk): Remove inner declaration of
420         "result".
421
422 2018-10-04  Tom Tromey  <tom@tromey.com>
423
424         * msp430-tdep.c (msp430_push_dummy_call): Rename inner
425         "structs_addr" and hoist declaration.
426
427 2018-10-04  Tom Tromey  <tom@tromey.com>
428
429         * linux-tdep.c (linux_make_mappings_corefile_notes): Introduce new
430         variable "size".
431
432 2018-10-04  Tom Tromey  <tom@tromey.com>
433
434         * mdebugread.c (parse_partial_symbols): Use std::string.
435
436 2018-10-04  Tom Tromey  <tom@tromey.com>
437
438         * ctf.c (SET_ARRAY_FIELD): Rename "u32".
439         * p-valprint.c (pascal_val_print): Split inner "i" variable.
440         * xtensa-tdep.c (xtensa_push_dummy_call): Declare "i" in loop
441         header.
442         * xstormy16-tdep.c (xstormy16_push_dummy_call): Declare "val" in
443         more inner scope.
444         * xcoffread.c (read_xcoff_symtab): Rename inner "symbol".
445         * varobj.c (varobj_update): Rename inner "newobj",
446         "type_changed".
447         * valprint.c (generic_emit_char): Rename inner "buf".
448         * valops.c (find_overload_match): Rename inner "temp".
449         (value_struct_elt_for_reference): Declare "v" in more inner
450         scope.
451         * v850-tdep.c (v850_push_dummy_call): Rename "len".
452         * unittests/array-view-selftests.c (run_tests): Rename inner
453         "vec".
454         * tui/tui-stack.c (tui_show_frame_info): Declare "i" in loop
455         header.
456         * tracepoint.c (merge_uploaded_trace_state_variables): Declare
457         "tsv" in more inner scope.
458         (print_one_static_tracepoint_marker): Rename inner
459         "tuple_emitter".
460         * tic6x-tdep.c (tic6x_analyze_prologue): Declare "inst" lower.
461         (tic6x_push_dummy_call): Don't redeclare "addr".
462         * target-float.c: Declare "dto" lower.
463         * symtab.c (lookup_local_symbol): Rename inner "sym".
464         (find_pc_sect_line): Rename inner "pc".
465         * stack.c (print_frame): Don't redeclare "gdbarch".
466         (return_command): Rename inner "gdbarch".
467         * s390-tdep.c (s390_prologue_frame_unwind_cache): Renam inner
468         "sp".
469         * rust-lang.c (rust_internal_print_type): Declare "i" in loop
470         header.
471         * rs6000-tdep.c (ppc_process_record): Rename inner "addr".
472         * riscv-tdep.c (riscv_push_dummy_call): Declare "info" in inner
473         scope.
474         * remote.c (remote_target::update_thread_list): Don't redeclare
475         "tp".
476         (remote_target::process_initial_stop_replies): Rename inner
477         "thread".
478         (remote_target::remote_parse_stop_reply): Don't redeclare "p".
479         (remote_target::wait_as): Don't redeclare "stop_reply".
480         (remote_target::get_thread_local_address): Rename inner
481         "result".
482         (remote_target::get_tib_address): Likewise.
483
484         * regcache.c (cooked_read_test): Rename "regnum".
485         * record-btrace.c (cmd_record_btrace_start): Rename inner
486         "exception".
487         * ppc-sysv-tdep.c (ppc64_sysv_abi_return_value): Declare "i" in
488         loop header.
489         * ppc-linux-tdep.c (ppc_linux_syscall_record): Declare "i" in loop
490         header.
491         (ppu2spu_sniffer): Rename inner "buf".
492         * parse.c (operator_check_standard): Rename inner "type",
493         "objfile".
494         * p-valprint.c (pascal_val_print): Introduce new scope for
495         "low_bound", "high_bound".
496         * p-exp.y (yylex): Declare "i" in loop header.
497         * objfiles.c (objfile_relocate1): Declare "i" in loop header.
498         Lower declaration of "s".
499         * nios2-tdep.c (nios2_analyze_prologue): Declare "i" in loop
500         header.
501         (nios2_push_dummy_call): Rename "len".
502         * nat/linux-osdata.c (linux_xfer_osdata_cpus): Rename static
503         "buf".
504         (linux_xfer_osdata_fds, linux_xfer_osdata_shm)
505         (linux_xfer_osdata_sem, linux_xfer_osdata_msg)
506         (linux_xfer_osdata_modules): Likewise.
507         * mips-tdep.c (mips_eabi_push_dummy_call): Rename outer "len".
508         (mips_n32n64_push_dummy_call, mips_o32_push_dummy_call)
509         (mips_o64_push_dummy_call): Likewise.
510         * microblaze-tdep.c (microblaze_analyze_prologue): Rename inner
511         "op".
512         * mi/mi-main.c (list_available_thread_groups): Rename inner
513         "tuple_emitter".
514         (mi_cmd_data_read_memory): Rename inner "opts".
515         * mi/mi-cmd-var.c (varobj_update_one): Rename inner
516         "tuple_emitter".
517         * mep-tdep.c (mep_analyze_prologue): Declare "rn" in loop header.
518         * mdebugread.c (parse_symbol): Rename inner "b".  Declare "f" in
519         more inner scope.
520         (parse_partial_symbols): Rename inner "pst", "p", "name"
521         * main.c (captured_main_1): Rename inner "i"s.
522         * machoread.c (macho_symfile_read_all_oso): Don't redeclare
523         "oso2".
524         * linux-tdep.c (linux_info_proc): Rename inner "filename".
525         * linespec.c (linespec_lexer_lex_string): Rename inner "p".
526         * infrun.c (handle_no_resumed): Don't redeclare "thread".
527         (handle_signal_stop): Rename inner "gdbarch".
528         (handle_command): Declare "signum" in loop header.
529         * ia64-tdep.c (ia64_pseudo_register_read): Don't redeclare
530         "status".
531         (examine_prologue): Rename inner "sol" and "sof".
532         (ia64_extract_return_value): Rename inner "val".  Declare another
533         "val" in a more inner scope.
534         * hppa-bsd-tdep.c (hppabsd_find_global_pointer): Declare "buf" in
535         inner scope.
536         * guile/scm-symbol.c (gdbscm_lookup_symbol): Rename inner
537         "except".
538         * findvar.c (default_read_var_value): Don't redeclare "addr".
539         * f-exp.y (yylex): Declare "i" in loop header.
540         * eval.c (evaluate_subexp_standard): Don't redeclare "type".
541         Rename inner "type", "expect_type".
542         (evaluate_subexp_for_sizeof): Rename inner "pc".
543         * elfread.c (elf_symfile_read): Rename inner "abfd".
544         * dwarf2read.c (read_debug_names_from_section): Don't redeclare
545         "bytes_read".
546         (process_psymtab_comp_unit_reader): Don't redeclare "gdbarch".
547         (add_partial_subprogram): Rename inner "lowpc" and "highpc".
548         (dwarf_decode_line_header): Rename inner "lh".
549         * dwarf2loc.c (dwarf2_compile_expr_to_ax): Don't redeclare
550         "offset".  Declare "i" in loop header.
551         (disassemble_dwarf_expression): Rename inner "addr_size".
552         * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Rename
553         inner "result".
554         (dwarf_expr_context::execute_stack_op): Rename inner "offset".
555         * dwarf2-frame.c (decode_frame_entry_1): Rename inner "length"s.
556         * disasm.c (do_mixed_source_and_assembly_deprecated): Rename inner
557         "inner_list_emitter".
558         (do_mixed_source_and_assembly): Rename inner "tuple_emitter".
559         * disasm-selftests.c (print_one_insn_test): Wrap "bplen"
560         declaration in a block.
561         * csky-tdep.c (csky_analyze_prologue): Declare "offset" lower.
562         * cp-valprint.c (cp_print_value_fields): Don't redeclare
563         "obstack_final_size".
564         * cp-support.c (inspect_type): Declare "i" in loop header.
565         * compile/compile.c (compile_instance::insert_symbol_error):
566         Rename inner "e".
567         * common/agent.c (agent_run_command): Remove inner "ret"
568         declaration.
569         * coffread.c (coff_symfile_read): Rename inner "name".
570         (coff_symfile_read): Rename inner "abfd".
571         * cli/cli-utils.c (get_number_trailer): Rename inner "val".
572         * cli/cli-cmds.c (print_disassembly): Rename inner "low" and
573         "high".
574         * c-exp.y (lex_one_token): Move "len" declaration lower.
575         * breakpoint.c (create_longjmp_master_breakpoint): Don't redeclare
576         "gdbarch".
577         (create_exception_master_breakpoint): Likewise.  Don't redeclare
578         "b".
579         (watch_command_1): Declare "mark" later.
580         (clear_command): Don't shadow "a" or "b".
581         (delete_command): Rename inner "b".
582         (delete_trace_command): Likewise.
583         * arm-tdep.c (thumb_process_displaced_32bit_insn): Rename inner
584         "op".
585         (arm_gdbarch_init): Remove inner "e_flags".
586         * arch/arm-get-next-pcs.c (thumb_get_next_pcs_raw): Declare
587         "offset" in inner blocks.
588
589 2018-10-04  Simon Marchi  <simon.marchi@ericsson.com>
590
591         * dwarf-index-write.c (file_write): Don't write if the vector is
592         empty.
593
594 2018-10-05  Tom de Vries  <tdevries@suse.de>
595
596         * python/py-progspace.c (pspy_solib_name): Fix type mismatch in
597         PyArg_ParseTuple call.
598
599 2018-10-05  Tom de Vries  <tdevries@suse.de>
600
601         * python/py-record-btrace.c (recpy_bt_goto): Fix type mismatch in
602         PyArg_ParseTuple call.
603
604 2018-10-04  Joel Brobecker  <brobecker@adacore.com>
605
606         * psymtab.c (recursively_search_psymtabs): Reformat parameters
607         to avoid exceeding 80 characters per line limit.
608
609 2018-10-04  Tom Tromey  <tom@tromey.com>
610
611         * symfile.c (syms_from_objfile_1, finish_new_objfile)
612         (reread_symbols): Update.
613         * complaints.h (clear_complaints): Remove argument.
614         * complaints.c (enum complaint_series): Remove.
615         (series): Remove global.
616         (complaint_internal): Update.
617         (clear_complaints): Remove argument.
618
619 2018-10-04  Tom Tromey  <tom@tromey.com>
620
621         * symfile.c (symbol_file_add_with_addrs): Do not print "no
622         debugging symbols" message if there is a separate debug objfile.
623
624 2018-10-04  Tom Tromey  <tom@tromey.com>
625
626         PR cli/19551:
627         * symfile.c (symbol_file_add_with_addrs): Update output.
628         * psymtab.c (require_partial_symbols): Update output.
629
630 2018-10-04  Tom Tromey  <tom@tromey.com>
631
632         PR cli/22234:
633         * complaints.c: Emit \n.
634
635 2018-10-04  Tom Tromey  <tom@tromey.com>
636
637         * symfile.c (symbol_file_add_with_addrs, symbol_file_clear)
638         (separate_debug_file_exists, find_separate_debug_file)
639         (add_symbol_file_command, reread_symbols, allocate_symtab)
640         (allocate_compunit_symtab): Use filtered printing, not
641         unfiltered.
642         * psymtab.c (require_partial_symbols, dump_psymtab)
643         (allocate_psymtab): Use filtered printing, not unfiltered.
644
645 2018-10-04  Tom Tromey  <tom@tromey.com>
646
647         * complaints.c (complaint_internal): Correctly check complaint
648         count.
649
650 2018-10-04  Tom Tromey  <tom@tromey.com>
651
652         * complaints.h (struct complaints): Remove declaration.
653         * complaints.c (clear_complaints): Remove an unused variable.
654
655 2018-10-04  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
656
657         * MAINTAINERS (Write After Approval): Add self.
658
659 2018-10-03  Tom Tromey  <tom@tromey.com>
660
661         * guile/scm-value.c (gdbscm_value_to_string): Initialize
662         "buffer_contents".
663         * coffread.c (coff_symtab_read): Initialize "newobj".
664
665 2018-10-03  Simon Marchi  <simon.marchi@polymtl.ca>
666
667         * dwarf2read.c (read_func_scope): Remove struct keyword in
668         range-based for.
669
670 2018-10-03  Tom Tromey  <tom@tromey.com>
671
672         * README: Mention --enable-ubsan.
673         * NEWS: Mention --enable-ubsan.
674         * acinclude.m4: Include sanitize.m4.
675         * configure: Rebuild.
676         * configure.ac: Call AM_GDB_UBSAN.
677         * sanitize.m4: New file.
678
679 2018-10-03  Tom Tromey  <tom@tromey.com>
680
681         * expression.h (enum exp_opcode): Use uint8_t as base type.
682         * expprint.c (op_name): Handle invalid opcodes.
683
684 2018-10-03  Tom Tromey  <tom@tromey.com>
685
686         * parse.c (prefixify_expression): Add assert.
687         (parse_exp_in_context_1): Throw exception if the expression is
688         empty.
689
690 2018-10-03  Tom Tromey  <tom@tromey.com>
691
692         * dwarf2read.c (read_signed_leb128): Work in ULONGEST.
693
694 2018-10-03  Tom Tromey  <tom@tromey.com>
695
696         * c-exp.y (parse_number): Work in unsigned.  Remove casts.
697
698 2018-10-03  Tom Tromey  <tom@tromey.com>
699
700         * dwarf2read.c (read_subrange_type): Make "negative_mask"
701         unsigned.
702
703 2018-10-03  Tom Tromey  <tom@tromey.com>
704
705         * findvar.c (extract_integer): Do work in an unsigned type.
706
707 2018-10-03  Tom Tromey  <tom@tromey.com>
708
709         * common/enum-flags.h (enum_flags::operator~): Add static assert.
710         * symfile-add-flags.h (enum symfile_add_flag): Use unsigned as
711         base type.
712         * objfile-flags.h (enum objfile_flag): Use unsigned as base type.
713         * gdbtypes.h (enum type_instance_flag_value): Use unsigned as base
714         type.
715         * c-lang.h (enum c_string_type_values): Use unsigned as base
716         type.
717         * btrace.h (enum btrace_thread_flag): Use unsigned as base type.
718
719 2018-10-03  Tom Tromey  <tom@tromey.com>
720
721         * dwarf2-frame.h (dwarf2_frame_state_reg_info)
722         <~dwarf2_frame_state_reg_info>: Update.
723         <dwarf2_frame_state_reg_info>: Update.
724         <alloc_regs>: Add assertion.  Update.
725         <reg>: Now a std::vector.
726         <num_regs>: Remove.
727         <swap>: Update.
728         * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
729         (execute_cfa_program_test, dwarf2_frame_cache): Update.
730
731 2018-10-03  Tom Tromey  <tom@tromey.com>
732
733         * namespace.c (add_using_directive): Don't pass NULL to memcpy.
734
735 2018-10-03  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
736
737         * tid-parse.c (tid_is_in_list): Fix wrong 'See' comment.
738
739 2018-10-02  Tom Tromey  <tom@tromey.com>
740
741         * aarch64-linux-tdep.c (aarch64_linux_sigframe_init): Use pulongest.
742
743 2018-10-02  John Darrington <john@darrington.wattle.id.au>
744
745         * NEWS: Mention changed commands.
746         * ser-uds.c: New file.
747         * configure.ac (SER_HARDWIRE): Add ser-uds.o.
748         * configure: Regenerate.
749         * Makefile.in: Add new file.
750         * serial.c (serial_open): Check if filename is a socket
751           and lookup the appropriate interface accordingly.
752
753 2018-10-01  Alan Hayward  <alan.hayward@arm.com>
754
755         * aarch64-linux-tdep.c (AARCH64_SIGCONTEXT_RESERVED_OFFSET): Add
756         define.
757         (AARCH64_EXTRA_MAGIC): Likewise.
758         (AARCH64_FPSIMD_MAGIC): Likewise.
759         (AARCH64_SVE_MAGIC): Likewise.
760         (AARCH64_EXTRA_DATAP_OFFSET): Likewise.
761         (AARCH64_FPSIMD_FPSR_OFFSET): Likewise.
762         (AARCH64_FPSIMD_FPCR_OFFSET): Likewise.
763         (AARCH64_FPSIMD_V0_OFFSET): Likewise.
764         (AARCH64_FPSIMD_VREG_SIZE): Likewise.
765         (AARCH64_SVE_CONTEXT_VL_OFFSET): Likewise.
766         (AARCH64_SVE_CONTEXT_REGS_OFFSET): Likewise.
767         (AARCH64_SVE_CONTEXT_P_REGS_OFFSET): Likewise.
768         (AARCH64_SVE_CONTEXT_FFR_OFFSET): Likewise.
769         (AARCH64_SVE_CONTEXT_SIZE): Likewise.
770         (read_aarch64_ctx): Add function.
771         (aarch64_linux_sigframe_init): Detect FP registers.
772
773 2018-10-01  Alan Hayward  <alan.hayward@arm.com>
774
775         * aarch64-tdep.c (AARCH64_Q0_REGNUM): Move to here.
776         (AARCH64_D0_REGNUM): Likewise.
777         (AARCH64_S0_REGNUM): Likewise.
778         (AARCH64_H0_REGNUM): Likewise.
779         (AARCH64_B0_REGNUM): Likewise.
780         (AARCH64_SVE_V0_REGNUM): Likewise.
781         * arch/aarch64.h (AARCH64_Q0_REGNUM): Move from here.
782         (AARCH64_D0_REGNUM): Likewise.
783         (AARCH64_S0_REGNUM): Likewise.
784         (AARCH64_H0_REGNUM): Likewise.
785         (AARCH64_B0_REGNUM): Likewise.
786         (AARCH64_SVE_V0_REGNUM): Likewise.
787
788 2018-10-01  Gary Benson <gbenson@redhat.com>
789
790         * gdb_proc_service.h (gdb_prfpregset_t): Remove typedef.
791         * proc-service.c (ps_lgetfpregs, ps_lsetfpregs): Use
792         prfpregset_t instead of gdb_prfpregset_t.
793         * configure.ac (PRFPREGSET_T_BROKEN): Remove check.
794         * configure, config.in: Rebuild.
795
796 2018-10-01  Gary Benson <gbenson@redhat.com>
797
798         * common/gdb_proc_service.h: New file, factored out from...
799         * gdb_proc_service.h: Moved common code to the above file.
800         * Makefile.in (HFILES_NO_SRCDIR): Add the above new file.
801
802 2018-10-01  Gary Benson <gbenson@redhat.com>
803
804         * gdb_proc_service.h: Use elf_gregset_t if prgregset_t is
805         undefined.  Use elf_fpregset_t if prfpregset_t is undefined.
806
807 2018-10-01  Gary Benson <gbenson@redhat.com>
808
809         * configure.ac: Check if sys/procfs.h defines elf_fpregset_t.
810         (AC_CHECK_HEADERS): Check for linux/elf.h.
811         * configure, config.in: Rebuild.
812         * gdb_proc_service.h: Include linux/elf.h if sys/procfs.h
813         doesn't define elf_fpregset_t.
814
815 2018-10-01  Gary Benson <gbenson@redhat.com>
816
817         * gdb_proc_service.h: Whitespace change.
818
819 2018-10-01  Tom Tromey  <tom@tromey.com>
820
821         * unittests/scoped_mmap-selftests.c: Don't check HAVE_UNISTD_H.
822         * unittests/scoped_fd-selftests.c: Don't check HAVE_UNISTD_H.
823         * common/scoped_fd.h: Don't check HAVE_UNISTD_H.
824
825 2018-10-01  Tom Tromey  <tom@tromey.com>
826
827         * README: Minor change.
828
829 2018-09-30  Pedro Alves  <palves@redhat.com>
830
831         * darwin-nat-info.c (darwin_debug_regions_recurse)
832         (info_mach_exceptions_command): Remove unused local variables.
833         * darwin-nat.c (darwin_decode_notify_message)
834         (darwin_nat_target::resume, darwin_nat_target::mourn_inferior)
835         (darwin_stop_inferior, darwin_setup_exceptions)
836         (darwin_nat_target::kill, darwin_attach_pid, darwin_ptrace_him)
837         (darwin_nat_target::attach, darwin_nat_target::detach)
838         (darwin_read_write_inferior, darwin_read_dyld_info): Remove unused
839         local variables.
840         * i386-darwin-nat.c (i386_darwin_dr_set): Remove unused local
841         variables.
842
843 2018-09-29  Tom Tromey  <tom@tromey.com>
844
845         * README: Remove some leftover text.
846
847 2018-09-29  Tom Tromey  <tom@tromey.com>
848
849         * PROBLEMS: Rewrite.
850         * README: Update.
851
852 2018-09-28  John Baldwin  <jhb@FreeBSD.org>
853
854         * disasm-selftests.c (print_one_insn_test): Add bfd_arch_riscv to
855         case with explicit breakpoint kind.
856         * riscv-tdep.c (show_use_compressed_breakpoints): Remove
857         'additional_info' and related logic.
858         (riscv_debug_breakpoints): New variable.
859         (riscv_breakpoint_kind_from_pc): Use the length of the existing
860         instruction to determine the breakpoint kind.
861         (_initialize_riscv_tdep): Add 'set/show debug riscv breakpoints'
862         flag.  Update description of 'set/show riscv
863         use-compressed-breakpoints' flag.
864
865 2018-09-28  Andrew Burgess  <andrew.burgess@embecosm.com>
866
867         (NEWS): Mention changes to frame related commands.
868         * cli/cli-decode.c (add_cmd_suppress_notification): New function.
869         (add_prefix_cmd_suppress_notification): New function.
870         (add_com_suppress_notification): Call
871         add_cmd_suppress_notification.
872         * command.h (add_cmd_suppress_notification): Declare.
873         (add_prefix_cmd_suppress_notification): Declare.
874         * mi/mi-cmd-stack.c: Add 'safe-ctype.h' include.
875         (parse_frame_specification): Moved from stack.c, with
876         simplification to handle a single argument.
877         (mi_cmd_stack_select_frame): Use parse_frame_specification, the
878         switch to the selected frame.  Add a header comment.
879         * stack.c: Remove 'safe-ctype.h' include.
880         (find_frame_for_function): Add declaration.
881         (find_frame_for_address): New function.
882         (parse_frame_specification): Moved into mi/mi-cmd-stack.c.
883         (frame_selection_by_function_completer): New function.
884         (info_frame_command): Rename to...
885         (info_frame_command_core): ...this, and update parameter types.
886         (select_frame_command): Rename to...
887         (select_frame_command_core): ...this, and update parameter types.
888         (frame_command): Rename to...
889         (frame_command_core): ...this, and update parameter types.
890         (class frame_command_helper): New class to wrap implementations of
891         frame related sub-commands.
892         (frame_apply_cmd_list): New static global.
893         (frame_cmd_list): Make static.
894         (select_frame_cmd_list): New global for sub-commands.
895         (info_frame_cmd_list): New global for sub-commands.
896         (_initialize_stack): Register sub-commands for 'frame',
897         'select-frame', and 'info frame'.  Update 'frame apply' commands
898         to use frame_apply_cmd_list.  Move function local static
899         frame_apply_list to file static frame_apply_cmd_list for
900         consistency.
901         * stack.h (select_frame_command): Delete declarationn.
902         (select_frame_for_mi): Declare new function.
903
904 2018-09-26  Andrew Burgess  <andrew.burgess@embecosm.com>
905
906         * riscv-tdep.c (riscv_insn::decode): Decode c.lui.
907         (riscv_scan_prologue): Split handling of AUIPC, LUI, ADD, ADDI,
908         and NOP.
909
910 2018-09-26  Simon Marchi  <simon.marchi@ericsson.com>
911
912         * elf32-nds32.c (elf32_nds32_allocate_dynrelocs): Remove.
913
914 2018-09-26  Tom Tromey  <tom@tromey.com>
915
916         * valops.c (auto_abandon): Remove dead code.
917
918 2018-09-26  Tom Tromey  <tom@tromey.com>
919
920         * tui/tui-win.c (WIN_HEIGHT_USAGE): Remove extra ">"s.
921
922 2018-09-24  Tom Tromey  <tom@tromey.com>
923
924         * common/pathstuff.c (get_standard_cache_dir): Make
925         "xdg_cache_home" and "home" const.
926         * top.c (init_history): Make "tmpenv" const.
927         * main.c (get_init_files): Make "homedir" const.
928
929 2018-09-23  Tom Tromey  <tom@tromey.com>
930
931         PR python/18852:
932         * python/py-param.c (get_set_value): Use gdbpy_handle_exception.
933
934 2018-09-23  Tom Tromey  <tom@tromey.com>
935
936         * python/py-function.c (fnpy_call): Use gdbpy_handle_exception.
937         * python/py-cmd.c (cmdpy_function): Use gdbpy_handle_exception.
938         * python/python-internal.h (gdbpy_handle_exception): Declare.
939         * python/py-utils.c (gdbpy_handle_exception): New function.
940
941 2018-09-23  Tom Tromey  <tom@tromey.com>
942
943         PR python/17284:
944         * python/py-type.c (typy_template_argument): Check for negative
945         argument number.
946
947 2018-09-23  Tom Tromey  <tom@tromey.com>
948
949         PR python/14062:
950         * python/python.c (gdbpy_run_events): Do not ignore exceptions.
951
952 2018-09-23  Tom Tromey  <tom@tromey.com>
953
954         PR python/18170:
955         * python/py-value.c (valpy_int): Allow conversion from pointer
956         type.
957
958 2018-09-23  Tom Tromey  <tom@tromey.com>
959
960         PR python/20126:
961         * python/py-value.c (valpy_int): Respect type sign.
962
963 2018-09-23  Tom Tromey  <tom@tromey.com>
964
965         PR python/18352;
966         * python/py-value.c (valpy_float): Allow conversions from int or
967         char.
968         (valpy_int, valpy_long): Allow conversions from float.
969
970 2018-09-23  Tom Tromey  <tom@tromey.com>
971
972         * ctf.c (ctf_start): Use gdb_fopen_cloexec.
973         * common/scoped_mmap.c (mmap_file): Use gdb_open_cloexec.
974
975 2018-09-23  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
976
977         * amd64-sol2-tdep.c (amd64_sol2_sigtramp_p): Also recognize
978         __sighndlr.
979         * i386-sol2-tdep.c (i386_sol2_sigtramp_p): Likewise.
980
981 2018-08-02  Jon Turney  <jon.turney@dronecode.org.uk>
982
983         * windows-nat.c (windows_nat_target::wait): Remove a spurious
984         target_terminal::ours().
985
986 2018-09-23  Simon Marchi  <simon.marchi@ericsson.com>
987
988         * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): Change type
989         of vl to ULONGEST.
990
991 2018-09-21  Yacov Simhony  <ysimhony@gmail.com>
992
993         * breakpoint.c (update_inserted_breakpoint_locations): Remove
994         redundant condition.
995
996 2018-09-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
997
998         * proc-utils.h (PROC_CTL_WORD_TYPE): Remove.
999
1000         * procfs.c: Don't check for PR_MODEL_NATIVE definition.
1001         * sparc-sol2-nat.c: Likewise.  Remove Linux, __arch64__ references.
1002         * sol-thread.c (ps_pdmodel): Don't guard definition.
1003
1004         * procfs.c: Fix formatting.
1005
1006         * procfs.c (sysset_t_alloc): Remove.
1007         (create_procinfo): Use XNEW instead of sysset_t_alloc.
1008         (procfs_debug_inferior): Likewise.
1009         (procfs_set_exec_trap): Likewise.
1010         (proc_set_traced_sysentry): Don't allocate argp dynamically.
1011         (proc_set_traced_sysexit): Likewise.
1012
1013         * procfs.c (create_procinfo): Use xsnprintf to fix ARI warning.
1014         (dead_procinfo): Likewise.
1015         (proc_warn): Likewise.
1016         (proc_error): Likewise.
1017         (proc_get_LDT_entry): Likewise.
1018         (do_attach): Likewise.
1019         (procfs_target::pid_to_str): Likewise.
1020         (iterate_over_mappings): Likewise.
1021
1022         * procfs.c (create_procinfo): Fix ARI warning.
1023         (proc_get_status): Likewise.
1024         (proc_stop_process): Likewise.
1025         (proc_run_process): Likewise.
1026         (proc_kill): Likewise.
1027         (proc_get_LDT_entry): Likewise.
1028         (procfs_find_LDT_entry): Likewise.
1029         (proc_update_threads): Likewise.
1030         (proc_iterate_over_threads): Likewise.
1031         (do_attach): Likewise.
1032         (procfs_xfer_memory): Likewise.
1033         (invalidate_cache): Likewise.
1034         (procfs_target::resume): Likewise.
1035         (procfs_init_inferior): Likewise.
1036         (procfs_set_exec_trap): Likewise.
1037         (procfs_target::thread_alive): Likewise.
1038         (procfs_target::pid_to_exec_file): Likewise.
1039         (iterate_over_mappings): Likewise.
1040         (procfs_target::make_corefile_notes): Likewise.
1041         * sol-thread.c (sol_thread_target::thread_alive): Likewise.
1042
1043         * procfs.c (procfs_find_LDT_entry): Silence ARI warning.
1044         (procfs_find_LDT_entry): Likewise.
1045         * sol-thread.c (ps_lgetLDT): Likewise.
1046
1047 2018-09-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1048
1049         PR tdep/17903
1050         * procfs.c (procfs_target): Declare pid_to_exec_file.
1051         (procfs_target::pid_to_exec_file): New.
1052
1053 2018-09-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1054
1055         * auxv.c (default_print_auxv_entry): Reflect AT_SUN_CAP_HW1
1056         renaming.
1057         Handle AT_SUN_EMULATOR, AT_SUN_BRANDNAME, AT_SUN_BRAND_AUX1,
1058         AT_SUN_BRAND_AUX2, AT_SUN_BRAND_AUX3, AT_SUN_CAP_HW2.
1059
1060 2018-09-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1061
1062         * i386-v4-nat.c (regmap, supply_gregset, fill_gregset)
1063         (supply_fpregset, fill_fpregset): Move ...
1064         * i386-sol2-nat.c [PR_MODEL_NATIVE != PR_MODEL_LP64]: ... here.
1065         Remove HAVE_GREGSET_T, HAVE_FPREGET_T guards.
1066         Remove references to ioctl-based procfs.
1067         Include <sys/reg.h>.
1068         Remove PR_MODEL_NATIVE guards.
1069         * configure.nat <sol2, i386> (NATDEPFILES): Remove i386-v4-nat.o.
1070         * Makefile.in (ALLDEPFILES): Remove i386-v4-nat.c.
1071
1072 2018-09-19  Xavier Roirand  <roirand@adacore.com>
1073
1074         PR gdb/20981:
1075         * solib-darwin.c (darwin_get_dyld_bfd): New function.
1076         (darwin_solib_get_all_image_info_addr_at_init): Update call.
1077         (darwin_solib_create_inferior_hook): Handle unrelocated dyld.
1078
1079 2018-09-19  John Baldwin  <jhb@FreeBSD.org>
1080
1081         * fbsd-tdep.c (fbsd_print_sockaddr_in): Style fix.
1082         (fbsd_print_sockaddr_in6): Likewise.
1083
1084 2018-09-19  Richard Bunt  <richard.bunt@arm.com>
1085             Chris January  <chris.january@arm.com>
1086
1087         * eval.c (skip_undetermined_arglist): Skip argument list helper.
1088         (evaluate_subexp_standard): Return a dummy type when
1089         honoring EVAL_SKIP in OP_VAR_VALUE and handle skipping in the
1090         OP_F77_UNDETERMINED_ARGLIST case.
1091         * expression.h (enum noside): Update comment.
1092
1093 2018-09-19  George Vasick <george.vasick@oracle.com>
1094
1095         * solib-svr4.c (svr4_same_1): Also handle amd64 ld.so.1.
1096
1097 2018-09-19  Stefan Teleman <stefan.teleman@oracle.com>
1098             April Chin <april.chin@oracle.com>
1099             Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1100
1101         * procfs.c (MAX_PROC_NAME_SIZE): Allow for 6-digit PID_MAX and
1102         uint_t lwpid_t.
1103         (create_procinfo): Print pids in /proc without leading zeros.
1104
1105 2018-09-18  Sandra Loosemore  <sandra@codesourcery.com>
1106
1107         * nios2-tdep.c (nios2_gcc_target_options): New.
1108         (nios2_gdb_arch_init): Install new hook.
1109
1110 2018-09-18  Simon Marchi  <simon.marchi@ericsson.com>
1111
1112         * patches/0001-Fix-PR-gdb-23558-Use-system-s-getcwd-when-cross-comp.patch:
1113         New file.
1114         * update-gnulib.sh: Apply patch.
1115         * configure: Re-generate.
1116
1117 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
1118
1119         * infcmd.c (_initialize_infcmd): Remove "running" from "info proc"
1120         description.  Make "info proc" command descriptions more
1121         consistent.
1122
1123 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
1124
1125         * NEWS: Mention 'info proc files' command.
1126
1127 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
1128
1129         * fbsd-nat.c (fbsd_nat_target::info_proc): List open file
1130         descriptors for IP_FILES and IP_ALL.
1131
1132 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
1133
1134         * fbsd-tdep.c (KF_FLAGS, KF_OFFSET, KF_VNODE_TYPE, KF_SOCK_DOMAIN)
1135         (KF_SOCK_TYPE, KF_SOCK_PROTOCOL, KF_SA_LOCAL, KF_SA_PEER)
1136         (KINFO_FILE_TYPE_SOCKET, KINFO_FILE_TYPE_PIPE)
1137         (KINFO_FILE_TYPE_FIFO, KINFO_FILE_TYPE_KQUEUE)
1138         (KINFO_FILE_TYPE_CRYPTO, KINFO_FILE_TYPE_MQUEUE)
1139         (KINFO_FILE_TYPE_SHM, KINFO_FILE_TYPE_SEM, KINFO_FILE_TYPE_PTS)
1140         (KINFO_FILE_TYPE_PROCDESC, KINFO_FILE_FD_TYPE_ROOT)
1141         (KINFO_FILE_FD_TYPE_JAIL, KINFO_FILE_FD_TYPE_TRACE)
1142         (KINFO_FILE_FD_TYPE_CTTY, KINFO_FILE_FLAG_READ)
1143         (KINFO_FILE_FLAG_WRITE, KINFO_FILE_FLAG_APPEND)
1144         (KINFO_FILE_FLAG_ASYNC, KINFO_FILE_FLAG_FSYNC)
1145         (KINFO_FILE_FLAG_NONBLOCK, KINFO_FILE_FLAG_DIRECT)
1146         (KINFO_FILE_FLAG_HASLOCK, KINFO_FILE_FLAG_EXEC)
1147         (KINFO_FILE_VTYPE_VREG, KINFO_FILE_VTYPE_VDIR)
1148         (KINFO_FILE_VTYPE_VCHR, KINFO_FILE_VTYPE_VLNK)
1149         (KINFO_FILE_VTYPE_VSOCK, KINFO_FILE_VTYPE_VFIFO, FBSD_AF_UNIX)
1150         (FBSD_AF_INET, FBSD_AF_INET6, FBSD_SOCK_STREAM, FBSD_SOCK_DGRAM)
1151         (FBSD_SOCK_SEQPACKET, FBSD_IPPROTO_ICMP, FBSD_IPPROTO_TCP)
1152         (FBSD_IPPROTO_UDP, FBSD_IPPROTO_SCTP): New defines.
1153         (struct fbsd_sockaddr_in, struct fbsd_sockaddr_in6)
1154         (struct fbsd_sockaddr_un): New types.
1155         (fbsd_file_fd, fbsd_file_type, fbsd_file_flags, fbsd_ipproto)
1156         (fbsd_print_sockaddr_in, fbsd_print_sockaddr_in6)
1157         (fbsd_info_proc_files_header, fbsd_info_proc_files_entry)
1158         (fbsd_core_info_proc_files): New functions.
1159         (fbsd_core_info_proc): List open file descriptors for IP_FILES and
1160         IP_ALL.
1161         * fbsd-tdep.h (fbsd_info_proc_files_header)
1162         (fbsd_info_proc_files_entry): New.
1163
1164 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
1165
1166         * defs.h (enum info_proc_what) [IP_FILES]: New value.
1167         * infcmd.c (info_proc_cmd_files): New function.
1168         (_initialize_infcmd): Register 'info proc files' command.
1169
1170 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
1171
1172         * gnulib/aclocal-m4-deps.mk: Re-generate.
1173         * gnulib/aclocal.m4: Re-generate.
1174         * gnulib/config.in: Re-generate.
1175         * gnulib/configure: Re-generate.
1176         * gnulib/import/Makefile.am: Re-generate.
1177         * gnulib/import/Makefile.in: Re-generate.
1178         * gnulib/import/m4/gnulib-cache.m4: Re-generate.
1179         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
1180         * gnulib/import/arpa_inet.in.h: New file.
1181         * gnulib/import/inet_ntop.c: New file.
1182         * gnulib/import/m4/arpa_inet_h.m4: New file.
1183         * gnulib/import/m4/inet_ntop.m4: New file.
1184         * gnulib/import/m4/netinet_in_h.m4: New file.
1185         * gnulib/import/m4/socklen.m4: New file.
1186         * gnulib/import/m4/sockpfaf.m4: New file.
1187         * gnulib/import/m4/stdalign.m4: New file.
1188         * gnulib/import/m4/sys_uio_h.m4: New file.
1189         * gnulib/import/netinet_in.in.h: New file.
1190         * gnulib/import/stdalign.in.h: New file.
1191         * gnulib/import/sys_socket.c: New file.
1192         * gnulib/import/sys_socket.in.h: New file.
1193         * gnulib/import/sys_uio.in.h: New file.
1194         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add inet_ntop
1195         module.
1196
1197 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
1198
1199         * gnulib/aclocal-m4-deps.mk: New file.
1200         * gnulib/update-gnulib.sh: Generate "aclocal-m4-deps.mk"
1201         deterministically.
1202
1203 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
1204
1205         * fbsd-tdep.c (fbsd_core_vnode_path): Use KF_PATH instead of
1206         KVE_PATH.
1207
1208 2018-09-18  Tom Tromey  <tom@tromey.com>
1209
1210         * compile/compile-object-load.c (struct
1211         link_hash_table_cleanup_data): Add constructor and destructor.
1212         Use DISABLE_COPY_AND_ASSIGN.
1213         (~link_hash_table_cleanup_data): Rename from
1214         link_hash_table_free.  Now a destructor.
1215         (copy_sections): Use gdb::unique_xmalloc_ptr.  Remove cleanups.
1216
1217 2018-09-18  Tom Tromey  <tom@tromey.com>
1218
1219         * compile/compile-object-run.c (do_module_cleanup): Use delete.
1220         * compile/compile-object-load.c (struct munmap_list): Move to
1221         header file.
1222         (munmap_list::add): Rename from munmap_list_add; rewrite.
1223         (munmap_list::~munmap_list): Rename from munmap_list_free.
1224         (munmap_listp_free_cleanup): Remove.
1225         (compile_object_load): Update.
1226         * compile/compile-object-load.h (struct munmap_list): Move from
1227         compile-object-load.c.  Rewrite.
1228
1229 2018-09-18  Alan Hayward  <alan.hayward@arm.com>
1230
1231         * aarch64-tdep.c (pass_in_v): Use register size.
1232         (aarch64_extract_return_value): Likewise.
1233         (aarch64_store_return_value): Likewise.
1234
1235 2018-09-18  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1236
1237         * utils.c (dump_core) [HAVE_SETRLIMIT]: Cast RLIM_INFINITY to
1238         rlim_t.
1239
1240 2018-09-17  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1241
1242         * python/lib/gdb/command/frame_filters.py (EnableFrameFilter):
1243         Fix short help line.
1244
1245 2018-09-17  Tom Tromey  <tom@tromey.com>
1246
1247         PR python/20445:
1248         * configure: Rebuild.
1249         * configure.ac: Conditionally use -DNDEBUG for Python.
1250
1251 2018-09-17  Tom Tromey  <tom@tromey.com>
1252
1253         * configure: Rebuild.
1254         * configure.ac: Use gmp as a library dependency when checking for
1255         mpfr.
1256
1257 2018-09-17  Pedro Alves  <palves@redhat.com>
1258
1259         * python/py-inferior.c (find_inferior_object): Delete.
1260
1261 2018-09-17  Simon Marchi  <simon.marchi@ericsson.com>
1262
1263         * compile/compile-cplus-types.c
1264         (compile_cplus_instance::enter_scope): Don't use new_scope after
1265         std::move.
1266
1267 2018-09-17  Tom Tromey  <tom@tromey.com>
1268
1269         * common/pathstuff.c (get_standard_cache_dir): Use
1270         ~/Library/Caches on macOS.
1271         * common/pathstuff.h (get_standard_cache_dir): Update comment.
1272
1273 2018-09-17  Simon Marchi  <simon.marchi@polymtl.ca>
1274
1275         PR python/23669
1276         * breakpoint.c (commands_cmd_element): New.
1277         (_initialize_breakpoint): Assign commands_cmd_element.
1278         * breakpoint.h (commands_cmd_element): New.
1279         * cli/cli-script.c (while_cmd_element, if_command,
1280         define_cmd_element): New.
1281         (command_name_equals): Remove.
1282         (process_next_line): Compare commands by pointer, not by name.
1283         (_initialize_cli_script): Assign the various cmd_list_element
1284         variables.
1285         * compile/compile.c (compile_cmd_element): New.
1286         (_initialize_compile): Assign compile_cmd_element.
1287         * compile/compile.h (compile_cmd_element): New.
1288         * guile/guile.c (guile_cmd_element): New.
1289         (install_gdb_commands): Assign guile_cmd_element.
1290         * guile/guile.h (guile_cmd_element): New.
1291         * python/python.c (python_cmd_element): New.
1292         (_initialize_python): Assign python_cmd_element.
1293         * python/python.h (python_cmd_element): New.
1294         * tracepoint.c (while_stepping_cmd_element): New.
1295         (_initialize_tracepoint): Assign while_stepping_cmd_element.
1296         * tracepoint.h (while_stepping_cmd_element): New.
1297
1298 2018-09-17  Tom Tromey  <tom@tromey.com>
1299
1300         * infrun.c (save_infcall_suspend_state): Return
1301         infcall_suspend_state_up.
1302         (save_infcall_control_state): Return infcall_control_state_up.
1303         * inferior.h (save_infcall_suspend_state)
1304         (save_infcall_control_state): Declare later.  Return unique
1305         pointers.
1306
1307 2018-09-17  Tom Tromey  <tom@tromey.com>
1308
1309         * infrun.c (struct stop_context): Declare constructor,
1310         destructor, "changed" method.
1311         (stop_context::stop_context): Rename from save_stop_context.
1312         (stop_context::~stop_context): Rename from
1313         release_stop_context_cleanup.
1314         (normal_stop): Update.
1315         (stop_context::changed): Rename from stop_context_changed.  Return
1316         bool.
1317
1318 2018-09-17  Tom Tromey  <tom@tromey.com>
1319
1320         * inferior.h (struct infcall_suspend_state_deleter): New.
1321         (infcall_suspend_state_up): New typedef.
1322         (struct infcall_control_state_deleter): New.
1323         (infcall_control_state_up): New typedef.
1324         (make_cleanup_restore_infcall_suspend_state)
1325         (make_cleanup_restore_infcall_control_state): Don't declare.
1326         * infcall.c (call_function_by_hand_dummy): Update.
1327         * infrun.c (do_restore_infcall_suspend_state_cleanup)
1328         (make_cleanup_restore_infcall_suspend_state): Remove.
1329         (do_restore_infcall_control_state_cleanup)
1330         (make_cleanup_restore_infcall_control_state): Remove.
1331
1332 2018-09-17  Tom Tromey  <tom@tromey.com>
1333
1334         * gdbthread.h (struct thread_control_state): Add initializer.
1335         (class thread_info) <control>: Remove initializer.
1336         * inferior.h (struct inferior_control_state): Add initializer.
1337         (class inferior) <control>: Remove initializer.
1338         (exit_inferior_1): Update.
1339         * infrun.c (struct infcall_control_state): Add constructors.
1340         (save_infcall_control_state): Use new.
1341         (restore_infcall_control_state, discard_infcall_control_state):
1342         Use delete.
1343
1344 2018-09-17  Tom Tromey  <tom@tromey.com>
1345
1346         * infrun.c (struct infcall_suspend_state) <registers>: Now a
1347         unique_ptr.
1348         <siginfo_data>: Now a unique_xmalloc_ptr.
1349         (save_infcall_suspend_state, restore_infcall_suspend_state)
1350         (discard_infcall_suspend_state)
1351         (get_infcall_suspend_state_regcache): Update.
1352
1353 2018-09-17  Tom Tromey  <tom@tromey.com>
1354
1355         * gdbthread.h (struct thread_suspend_state): Add initializers.
1356         (class thread_info) <suspend>: Remove initializer.
1357         * infrun.c (struct infcall_suspend_state): Add initializers.
1358         (save_infcall_suspend_state): Use new.
1359         (discard_infcall_suspend_state): Use delete.
1360
1361 2018-09-16  Tom Tromey  <tom@tromey.com>
1362
1363         * python/python-internal.h (CPYCHECKER_STEALS_REFERENCE_TO_ARG):
1364         Remove.
1365         * python/py-varobj.c (py_varobj_iter_ctor): Change pyiter to
1366         rvalue reference.  Remove CPYCHECKER_STEALS_REFERENCE_TO_ARG.
1367         (py_varobj_iter_new): Likewise.
1368         (py_varobj_get_iterator): Use gdbpy_ref.
1369
1370 2018-09-16  Tom Tromey  <tom@tromey.com>
1371
1372         * python/py-threadevent.c (py_get_event_thread): Simplify.
1373         * python/py-inferior.c (infpy_thread_from_thread_handle):
1374         Return immediately after calling thread_to_thread_object.  Use
1375         Py_RETURN_NONE.
1376         (thread_to_thread_object): Set the exception on a NULL return.
1377
1378 2018-09-16  Simon Marchi  <simon.marchi@polymtl.ca>
1379
1380         * Makefile.in (LIBGDB_OBS): Sort COMMON_OBS.
1381
1382 2018-09-16  Tom Tromey  <tom@tromey.com>
1383
1384         * python/python-internal.h (CPYCHECKER_RETURNS_BORROWED_REF):
1385         Remove.
1386
1387 2018-09-16  Tom Tromey  <tom@tromey.com>
1388
1389         * python/python-internal.h (thread_to_thread_object): Change
1390         return type.
1391         * python/py-inferior.c (thread_to_thread_object): Return a new
1392         reference.
1393         (infpy_thread_from_thread_handle): Update.
1394         * python/py-infthread.c (gdbpy_selected_thread): Update.
1395         * python/py-stopevent.c (create_stop_event_object): Update.
1396         * python/py-threadevent.c (py_get_event_thread): Return a new
1397         reference.
1398         (py_get_event_thread): Update.
1399         * python/py-event.h (py_get_event_thread): Change return type.
1400         * python/py-continueevent.c (create_continue_event_object):
1401         Update.
1402
1403 2018-09-16  Tom Tromey  <tom@tromey.com>
1404
1405         * python/py-progspace.c (pspy_get_objfiles): Update.
1406         * python/python-internal.h (objfile_to_objfile_object): Change
1407         return type.
1408         * python/py-newobjfileevent.c (create_new_objfile_event_object):
1409         Update.
1410         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers):
1411         Update.
1412         * python/python.c (gdbpy_get_current_objfile): Update.
1413         (gdbpy_objfiles): Update.
1414         * python/py-objfile.c (objfpy_get_owner, gdbpy_lookup_objfile):
1415         Update.
1416         (objfile_to_objfile_object): Return a new reference.
1417         * python/py-symtab.c (stpy_get_objfile): Update.
1418         * python/py-prettyprint.c (find_pretty_printer_from_objfiles):
1419         Update.
1420
1421 2018-09-16  Tom Tromey  <tom@tromey.com>
1422
1423         * python/py-inferior.c (infpy_get_progspace): Update.
1424         * python/python-internal.h (pspace_to_pspace_object): Change
1425         return type.
1426         * python/py-newobjfileevent.c
1427         (create_clear_objfiles_event_object): Update.
1428         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers):
1429         Update.
1430         * python/python.c (gdbpy_get_current_progspace): Update.
1431         (gdbpy_progspaces): Update.
1432         * python/py-progspace.c (pspace_to_pspace_object): Return a new
1433         reference.
1434         * python/py-objfile.c (objfpy_get_progspace): Update.
1435         * python/py-prettyprint.c (find_pretty_printer_from_progspace):
1436         Update.
1437
1438 2018-09-16  Tom Tromey  <tom@tromey.com>
1439
1440         * python/lib/gdb/__init__.py (current_progspace, objfiles)
1441         (solib_name, block_for_pc, find_pc_line): New functions.
1442         (execute_unwinders): Update.
1443         * python/py-block.c (gdbpy_block_for_pc): Remove.
1444         * python/py-inferior.c (infpy_get_progspace): New function.
1445         (inferior_object_getset) <progspace>: Add.
1446         * python/py-progspace.c (pspy_objfiles): Rewrite.
1447         (pspy_solib_name, pspy_block_for_pc)
1448         (pspy_find_pc_line, pspy_is_valid): New functions.
1449         (progspace_object_methods): Add entries for solib_name,
1450         block_for_pc, find_pc_line, is_valid.
1451         * python/python-internal.h (gdbpy_block_for_pc)
1452         (build_objfiles_list): Don't declare.
1453         * python/python.c: Don't include solib.h.
1454         (gdbpy_solib_name, gdbpy_find_pc_line)
1455         (gdbpy_get_current_progspace, build_objfiles_list)
1456         (gdbpy_objfiles): Remove.
1457         (GdbMethods) <current_progspace, objfiles, block_for_pc,
1458         solib_name, find_pc_line>: Remove entries.
1459
1460 2018-09-16  Tom Tromey  <tom@tromey.com>
1461
1462         * top.c (new_ui_command): Use GNU style for metasyntactic
1463         variables.
1464         * breakpoint.c (stopat_command): Use GNU style for metasyntactic
1465         variables.
1466         * maint.c (maintenance_translate_address): Remove "<>" around
1467         text.
1468         * interps.c (interpreter_exec_cmd): Use GNU style for
1469         metasyntactic variables.
1470         * nto-procfs.c (nto_procfs_target_info): Use GNU style for
1471         metasyntactic variables.
1472         * tracepoint.c (tfind_range_command): Use GNU style for
1473         metasyntactic variables.
1474         (tfind_outside_command): Likewise.
1475         (_initialize_tracepoint): Likewise.
1476         * remote.c (extended_remote_target::create_inferior): Use GNU
1477         style for metasyntactic variables.
1478         * sparc64-tdep.c (adi_examine_command): Use GNU style for
1479         metasyntactic variables.
1480         (adi_assign_command): Likewise.
1481
1482 2018-09-16  Tom Tromey  <tom@tromey.com>
1483
1484         * disasm.c (show_disassembler_options_sfunc): Use GNU style for
1485         metasyntactic variables.  Print message if no disassembler options
1486         are available.
1487
1488 2018-09-15  Tom Tromey  <tom@tromey.com>
1489
1490         * infcmd.c (get_inferior_args): Return const char *.
1491         * inferior.h (get_inferior_args): Return type now const.
1492         * linux-tdep.c (linux_fill_prpsinfo): Update.
1493         * procfs.c (procfs_target::make_corefile_notes): Update.
1494
1495 2018-09-07  Tom Tromey  <tom@tromey.com>
1496
1497         * python/python.c (execute_gdb_command): Call bpstat_do_actions
1498         inside the TRY.
1499
1500 2018-09-14  Sandra Loosemore  <sandra@codesourcery.com>
1501
1502         * nios2-tdep.c (nios2_type_align): New.
1503         (nios2_gdb_arch_init): Install type_align hook.
1504
1505 2018-09-10  Andrew Burgess  <andrew.burgess@embecosm.com>
1506
1507         * eval.c (fake_method::fake_method): Call xzalloc directly for a
1508         type that is neither object file owned, nor gdbarch owned.
1509         * gdbtypes.c (get_type_gdbarch): Add an assert that returned
1510         gdbarch is non-NULL.
1511         (alloc_type_instance): Allocate non-objfile owned types on the
1512         gdbarch obstack.
1513         (copy_type_recursive): Allocate TYPE_FIELDS and TYPE_RANGE_DATA
1514         using TYPE_ALLOC to ensure memory is allocated on the correct
1515         obstack.
1516         * gdbtypes.h (TYPE_ALLOC): Allocate space on either the objfile
1517         obstack, or the gdbarch obstack.
1518         (TYPE_ZALLOC): Rewrite using TYPE_ALLOC.
1519
1520 2018-09-14  Tom Tromey  <tom@tromey.com>
1521
1522         * infcall.c (call_function_by_hand_dummy): Remove unnecessary
1523         block.
1524
1525 2018-09-14  Tom Tromey  <tom@tromey.com>
1526
1527         * nat/fork-inferior.c (get_startup_shell): Remove "static".
1528
1529 2018-09-13  Tom Tromey  <tom@tromey.com>
1530
1531         * python/py-inferior.c (infpy_thread_from_thread_handle): Now
1532         static.
1533
1534 2018-09-13  Tom Tromey  <tom@tromey.com>
1535
1536         * exec.c (try_open_exec_file): Use std::string.
1537
1538 2018-09-13  Tom Tromey  <tom@tromey.com>
1539
1540         * utils.h (gdb_bfd_errmsg): Return std::string.
1541         * exec.c (exec_file_attach): Update.
1542         * compile/compile-object-load.c (compile_object_load): Update.
1543         * utils.c (gdb_bfd_errmsg): Return std::string.
1544
1545 2018-09-13  Tom Tromey  <tom@tromey.com>
1546
1547         * procfs.c (struct procinfo_deleter): New.
1548         (procinfo_up): New typedef.
1549         (do_destroy_procinfo_cleanup): Remove.
1550         (procfs_target::info_proc): Use procinfo_up.  Remove cleanups.
1551
1552 2018-09-13  Tom Tromey  <tom@tromey.com>
1553
1554         * source.c (add_path): Use gdb::unique_xmalloc_ptr.
1555
1556 2018-09-13  Simon Marchi  <simon.marchi@ericsson.com>
1557 2018-09-13  Tom Tromey  <tom@tromey.com>
1558
1559         * python/py-progspace.c (PSPY_REQUIRE_VALID): New macro.
1560         (pspy_get_objfiles): New function.
1561         (progspace_object_methods): New.
1562         (pspace_object_type): Add tp_methods callback.
1563         * python/python-internal.h (build_objfiles_list): New
1564         declaration.
1565         * python/python.c (build_objfiles_list): New function.
1566         (gdbpy_objfiles): Implement using build_objfiles_list.
1567         * NEWS: Mention the Progspace.objfiles method.
1568
1569 2018-09-13  Simon Marchi  <simon.marchi@ericsson.com>
1570
1571         * python/py-inferior.c (infpy_get_progspace): New function.
1572         (inferior_object_getset): Add progspace property.
1573         * NEWS: Mention the new property.
1574
1575 2018-09-13  Tom Tromey  <tom@tromey.com>
1576
1577         PR rust/23650:
1578         * rust-lang.c (rust_evaluate_subexp): Use field name, not "foo".
1579
1580 2018-09-13  Tom Tromey  <tom@tromey.com>
1581
1582         PR rust/23626:
1583         * rust-lang.c (rust_enum_variant): Now static.
1584         (rust_empty_enum_p): New function.
1585         (rust_print_enum, rust_evaluate_subexp, rust_print_struct_def):
1586         Handle empty enum.
1587
1588 2018-09-13  Simon Marchi  <simon.marchi@ericsson.com>
1589
1590         * python/py-inferior.c (infpy_repr): New.
1591         (inferior_object_type): Register infpy_repr.
1592         * python/py-objfile.c (objfpy_repr): New.
1593         (objfile_object_type): Register objfpy_repr.
1594
1595 2018-09-12  John Baldwin  <jhb@FreeBSD.org>
1596
1597         * fbsd-nat.c (fbsd_nat_target::info_proc): Remove unused variable.
1598
1599 2018-09-12  John Baldwin  <jhb@FreeBSD.org>
1600
1601         * aarch64-fbsd-tdep.h (AARCH64_FBSD_SIZEOF_GREGSET): Fix comment
1602         typo.
1603
1604 2018-09-12  Sergio Durigan Junior  <sergiodj@redhat.com>
1605
1606         * common/common-utils.c: Don't include '<sys/stat.h>'.
1607         (is_regular_file): Move to...
1608         * common/filestuff.c (is_regular_file): ... here.
1609         * common/common-utils.h (is_regular_file): Move to...
1610         * common/filestuff.h (is_regular_file): ... here.
1611
1612 2018-09-12  Simon Marchi  <simon.marchi@ericsson.com>
1613
1614         * skip.c (debug_skip): New variable.
1615         (skiplist_entry::do_skip_file_p): Add debug output.
1616         (skiplist_entry::do_skip_gfile_p): Likewise.
1617         (skiplist_entry::skip_function_p): Likewise.
1618         (_initialize_step_skip): Create debug command.
1619         * NEWS: Mention set/show debug skip.
1620
1621 2018-09-11  Xavier Roirand  <roirand@adacore.com>
1622
1623         * darwin-nat.c (should_disable_startup_with_shell):
1624         New function.
1625         (darwin_nat_target::create_inferior): Add call.
1626
1627 2018-09-11  Xavier Roirand  <roirand@adacore.com>
1628
1629         * darwin-nat.h (struct darwin_thread_info) <gdb_port,
1630         inf_port, msg_state>: Initialize.
1631         (struct darwin_thread_info) <signaled, single_step>: Change
1632         type and initialize.
1633         (struct darwin_thread_info) <event>: Initialize.
1634
1635 2018-09-10  Sergio Durigan Junior  <sergiodj@redhat.com>
1636
1637         PR gdb/23555
1638         PR gdb/23558
1639         * gnulib/import/m4/getcwd-path-max.m4: Add cross-compilation
1640         guesses.
1641
1642 2018-09-10  Sergio Durigan Junior  <sergiodj@redhat.com>
1643
1644         Revert:
1645         2018-08-29  Sergio Durigan Junior  <sergiodj@redhat.com>
1646
1647         PR gdb/23555
1648         PR gdb/23558
1649         * gnulib/aclocal.m4: Regenerate.
1650         * gnulib/config.in: Regenerate.
1651         * gnulib/configure: Regenerate.
1652         * gnulib/import/Makefile.am: Update.
1653         * gnulib/import/Makefile.in: Update.
1654         * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
1655         * gnulib/import/_Noreturn.h: ... this.
1656         * gnulib/import/alloca.in.h: Update.
1657         * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
1658         * gnulib/import/arg-nonnull.h: ... this.
1659         * gnulib/import/assure.h: Update.
1660         * gnulib/import/at-func.c: Update.
1661         * gnulib/import/basename-lgpl.c: Update.
1662         * gnulib/import/extra/snippet/c++defs.h: Rename to...
1663         * gnulib/import/c++defs.h: ... this.
1664         * gnulib/import/canonicalize-lgpl.c: Update.
1665         * gnulib/import/cdefs.h: Update.
1666         * gnulib/import/chdir-long.c: Update.
1667         * gnulib/import/chdir-long.h: Update.
1668         * gnulib/import/cloexec.c: Update.
1669         * gnulib/import/cloexec.h: Update.
1670         * gnulib/import/close.c: Update.
1671         * gnulib/import/closedir.c: Update.
1672         * gnulib/import/config.charset: Update.
1673         * gnulib/import/dirent-private.h: Update.
1674         * gnulib/import/dirent.in.h: Update.
1675         * gnulib/import/dirfd.c: Update.
1676         * gnulib/import/dirname-lgpl.c: Update.
1677         * gnulib/import/dirname.h: Update.
1678         * gnulib/import/dosname.h: Update.
1679         * gnulib/import/dup-safer-flag.c: Update.
1680         * gnulib/import/dup-safer.c: Update.
1681         * gnulib/import/dup.c: Update.
1682         * gnulib/import/dup2.c: Update.
1683         * gnulib/import/errno.in.h: Update.
1684         * gnulib/import/error.c: Update.
1685         * gnulib/import/error.h: Update.
1686         * gnulib/import/exitfail.c: Update.
1687         * gnulib/import/exitfail.h: Update.
1688         * gnulib/import/extra/update-copyright: Update.
1689         * gnulib/import/fchdir.c: Update.
1690         * gnulib/import/fcntl.c: Update.
1691         * gnulib/import/fcntl.in.h: Update.
1692         * gnulib/import/fd-hook.c: Update.
1693         * gnulib/import/fd-hook.h: Update.
1694         * gnulib/import/fd-safer-flag.c: Update.
1695         * gnulib/import/fd-safer.c: Update.
1696         * gnulib/import/fdopendir.c: Update.
1697         * gnulib/import/filename.h: Update.
1698         * gnulib/import/filenamecat-lgpl.c: Update.
1699         * gnulib/import/filenamecat.h: Update.
1700         * gnulib/import/flexmember.h: Update.
1701         * gnulib/import/float+.h: Update.
1702         * gnulib/import/float.c: Update.
1703         * gnulib/import/float.in.h: Update.
1704         * gnulib/import/fnmatch.c: Update.
1705         * gnulib/import/fnmatch.in.h: Update.
1706         * gnulib/import/fnmatch_loop.c: Update.
1707         * gnulib/import/fpucw.h: Update.
1708         * gnulib/import/frexp.c: Update.
1709         * gnulib/import/frexpl.c: Update.
1710         * gnulib/import/fstat.c: Update.
1711         * gnulib/import/fstatat.c: Update.
1712         * gnulib/import/getcwd-lgpl.c: Update.
1713         * gnulib/import/getcwd.c: Update.
1714         * gnulib/import/getdtablesize.c: Update.
1715         * gnulib/import/getlogin_r.c: Update.
1716         * gnulib/import/getprogname.c: Update.
1717         * gnulib/import/getprogname.h: Update.
1718         * gnulib/import/gettext.h: Update.
1719         * gnulib/import/gettimeofday.c: Update.
1720         * gnulib/import/glob-libc.h: Update.
1721         * gnulib/import/glob.c: Update.
1722         * gnulib/import/glob.in.h: Update.
1723         * gnulib/import/glob_internal.h: Update.
1724         * gnulib/import/glob_pattern_p.c: Update.
1725         * gnulib/import/globfree.c: Update.
1726         * gnulib/import/hard-locale.c: Update.
1727         * gnulib/import/hard-locale.h: Update.
1728         * gnulib/import/intprops.h: Update.
1729         * gnulib/import/inttypes.in.h: Update.
1730         * gnulib/import/isnan.c: Update.
1731         * gnulib/import/isnand-nolibm.h: Update.
1732         * gnulib/import/isnand.c: Update.
1733         * gnulib/import/isnanl-nolibm.h: Update.
1734         * gnulib/import/isnanl.c: Update.
1735         * gnulib/import/itold.c: Update.
1736         * gnulib/import/libc-config.h: Update.
1737         * gnulib/import/limits.in.h: Update.
1738         * gnulib/import/localcharset.c: Update.
1739         * gnulib/import/localcharset.h: Update.
1740         * gnulib/import/localtime-buffer.c: Update.
1741         * gnulib/import/localtime-buffer.h: Update.
1742         * gnulib/import/lstat.c: Update.
1743         * gnulib/import/m4/00gnulib.m4: Update.
1744         * gnulib/import/m4/__inline.m4: Update.
1745         * gnulib/import/m4/absolute-header.m4: Update.
1746         * gnulib/import/m4/alloca.m4: Update.
1747         * gnulib/import/m4/builtin-expect.m4: Update.
1748         * gnulib/import/m4/canonicalize.m4: Update.
1749         * gnulib/import/m4/chdir-long.m4: Update.
1750         * gnulib/import/m4/close.m4: Update.
1751         * gnulib/import/m4/closedir.m4: Update.
1752         * gnulib/import/m4/configmake.m4: Update.
1753         * gnulib/import/m4/d-ino.m4: Update.
1754         * gnulib/import/m4/d-type.m4: Update.
1755         * gnulib/import/m4/dirent_h.m4: Update.
1756         * gnulib/import/m4/dirfd.m4: Update.
1757         * gnulib/import/m4/dirname.m4: Update.
1758         * gnulib/import/m4/double-slash-root.m4: Update.
1759         * gnulib/import/m4/dup.m4: Update.
1760         * gnulib/import/m4/dup2.m4: Update.
1761         * gnulib/import/m4/eealloc.m4: Update.
1762         * gnulib/import/m4/environ.m4: Update.
1763         * gnulib/import/m4/errno_h.m4: Update.
1764         * gnulib/import/m4/error.m4: Update.
1765         * gnulib/import/m4/exponentd.m4: Update.
1766         * gnulib/import/m4/exponentl.m4: Update.
1767         * gnulib/import/m4/extensions.m4: Update.
1768         * gnulib/import/m4/extern-inline.m4: Update.
1769         * gnulib/import/m4/fchdir.m4: Update.
1770         * gnulib/import/m4/fcntl-o.m4: Update.
1771         * gnulib/import/m4/fcntl.m4: Update.
1772         * gnulib/import/m4/fcntl_h.m4: Update.
1773         * gnulib/import/m4/fdopendir.m4: Update.
1774         * gnulib/import/m4/filenamecat.m4: Update.
1775         * gnulib/import/m4/flexmember.m4: Update.
1776         * gnulib/import/m4/float_h.m4: Update.
1777         * gnulib/import/m4/fnmatch.m4: Update.
1778         * gnulib/import/m4/fnmatch_h.m4: Update.
1779         * gnulib/import/m4/fpieee.m4: Update.
1780         * gnulib/import/m4/frexp.m4: Update.
1781         * gnulib/import/m4/frexpl.m4: Update.
1782         * gnulib/import/m4/fstat.m4: Update.
1783         * gnulib/import/m4/fstatat.m4: Update.
1784         * gnulib/import/m4/getcwd-abort-bug.m4: Update.
1785         * gnulib/import/m4/getcwd-path-max.m4: Update.
1786         * gnulib/import/m4/getcwd.m4: Update.
1787         * gnulib/import/m4/getdtablesize.m4: Update.
1788         * gnulib/import/m4/getlogin.m4: Update.
1789         * gnulib/import/m4/getlogin_r.m4: Update.
1790         * gnulib/import/m4/getpagesize.m4: Update.
1791         * gnulib/import/m4/getprogname.m4: Update.
1792         * gnulib/import/m4/gettimeofday.m4: Update.
1793         * gnulib/import/m4/glibc21.m4: Update.
1794         * gnulib/import/m4/glob.m4: Update.
1795         * gnulib/import/m4/glob_h.m4: Update.
1796         * gnulib/import/m4/gnulib-cache.m4: Update.
1797         * gnulib/import/m4/gnulib-common.m4: Update.
1798         * gnulib/import/m4/gnulib-comp.m4: Update.
1799         * gnulib/import/m4/gnulib-tool.m4: Update.
1800         * gnulib/import/m4/hard-locale.m4: Update.
1801         * gnulib/import/m4/include_next.m4: Update.
1802         * gnulib/import/m4/inttypes-pri.m4: Update.
1803         * gnulib/import/m4/inttypes.m4: Update.
1804         * gnulib/import/m4/isnand.m4: Update.
1805         * gnulib/import/m4/isnanl.m4: Update.
1806         * gnulib/import/m4/largefile.m4: Update.
1807         * gnulib/import/m4/limits-h.m4: Update.
1808         * gnulib/import/m4/localcharset.m4: Update.
1809         * gnulib/import/m4/locale-fr.m4: Update.
1810         * gnulib/import/m4/locale-ja.m4: Update.
1811         * gnulib/import/m4/locale-zh.m4: Update.
1812         * gnulib/import/m4/localtime-buffer.m4: Update.
1813         * gnulib/import/m4/longlong.m4: Update.
1814         * gnulib/import/m4/lstat.m4: Update.
1815         * gnulib/import/m4/malloc.m4: Update.
1816         * gnulib/import/m4/malloca.m4: Update.
1817         * gnulib/import/m4/math_h.m4: Update.
1818         * gnulib/import/m4/mbrtowc.m4: Update.
1819         * gnulib/import/m4/mbsinit.m4: Update.
1820         * gnulib/import/m4/mbsrtowcs.m4: Update.
1821         * gnulib/import/m4/mbstate_t.m4: Update.
1822         * gnulib/import/m4/memchr.m4: Update.
1823         * gnulib/import/m4/memmem.m4: Update.
1824         * gnulib/import/m4/mempcpy.m4: Update.
1825         * gnulib/import/m4/memrchr.m4: Update.
1826         * gnulib/import/m4/mkdir.m4: Update.
1827         * gnulib/import/m4/mkstemp.m4: Update.
1828         * gnulib/import/m4/mmap-anon.m4: Update.
1829         * gnulib/import/m4/mode_t.m4: Update.
1830         * gnulib/import/m4/msvc-inval.m4: Update.
1831         * gnulib/import/m4/msvc-nothrow.m4: Update.
1832         * gnulib/import/m4/multiarch.m4: Update.
1833         * gnulib/import/m4/nocrash.m4: Update.
1834         * gnulib/import/m4/off_t.m4: Update.
1835         * gnulib/import/m4/onceonly.m4: Update.
1836         * gnulib/import/m4/open-cloexec.m4: Update.
1837         * gnulib/import/m4/open.m4: Update.
1838         * gnulib/import/m4/openat.m4: Update.
1839         * gnulib/import/m4/opendir.m4: Update.
1840         * gnulib/import/m4/pathmax.m4: Update.
1841         * gnulib/import/m4/rawmemchr.m4: Update.
1842         * gnulib/import/m4/readdir.m4: Update.
1843         * gnulib/import/m4/readlink.m4: Update.
1844         * gnulib/import/m4/realloc.m4: Update.
1845         * gnulib/import/m4/rename.m4: Update.
1846         * gnulib/import/m4/rewinddir.m4: Update.
1847         * gnulib/import/m4/rmdir.m4: Update.
1848         * gnulib/import/m4/save-cwd.m4: Update.
1849         * gnulib/import/m4/secure_getenv.m4: Update.
1850         * gnulib/import/m4/setenv.m4: Update.
1851         * gnulib/import/m4/signal_h.m4: Update.
1852         * gnulib/import/m4/ssize_t.m4: Update.
1853         * gnulib/import/m4/stat-time.m4: Update.
1854         * gnulib/import/m4/stat.m4: Update.
1855         * gnulib/import/m4/std-gnu11.m4: Update.
1856         * gnulib/import/m4/stdbool.m4: Update.
1857         * gnulib/import/m4/stddef_h.m4: Update.
1858         * gnulib/import/m4/stdint.m4: Update.
1859         * gnulib/import/m4/stdio_h.m4: Update.
1860         * gnulib/import/m4/stdlib_h.m4: Update.
1861         * gnulib/import/m4/strchrnul.m4: Update.
1862         * gnulib/import/m4/strdup.m4: Update.
1863         * gnulib/import/m4/strerror.m4: Update.
1864         * gnulib/import/m4/string_h.m4: Update.
1865         * gnulib/import/m4/strstr.m4: Update.
1866         * gnulib/import/m4/strtok_r.m4: Update.
1867         * gnulib/import/m4/sys_socket_h.m4: Update.
1868         * gnulib/import/m4/sys_stat_h.m4: Update.
1869         * gnulib/import/m4/sys_time_h.m4: Update.
1870         * gnulib/import/m4/sys_types_h.m4: Update.
1871         * gnulib/import/m4/tempname.m4: Update.
1872         * gnulib/import/m4/time_h.m4: Update.
1873         * gnulib/import/m4/unistd-safer.m4: Update.
1874         * gnulib/import/m4/unistd_h.m4: Update.
1875         * gnulib/import/m4/warn-on-use.m4: Update.
1876         * gnulib/import/m4/wchar_h.m4: Update.
1877         * gnulib/import/m4/wchar_t.m4: Update.
1878         * gnulib/import/m4/wctype_h.m4: Update.
1879         * gnulib/import/m4/wint_t.m4: Update.
1880         * gnulib/import/malloc.c: Update.
1881         * gnulib/import/malloc/scratch_buffer.h: Update.
1882         * gnulib/import/malloc/scratch_buffer_grow.c: Update.
1883         * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
1884         * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
1885         * gnulib/import/malloca.c: Update.
1886         * gnulib/import/malloca.h: Update.
1887         * gnulib/import/malloca.valgrind: Update.
1888         * gnulib/import/math.in.h: Update.
1889         * gnulib/import/mbrtowc.c: Update.
1890         * gnulib/import/mbsinit.c: Update.
1891         * gnulib/import/mbsrtowcs-impl.h: Update.
1892         * gnulib/import/mbsrtowcs-state.c: Update.
1893         * gnulib/import/mbsrtowcs.c: Update.
1894         * gnulib/import/memchr.c: Update.
1895         * gnulib/import/memmem.c: Update.
1896         * gnulib/import/mempcpy.c: Update.
1897         * gnulib/import/memrchr.c: Update.
1898         * gnulib/import/mkdir.c: Update.
1899         * gnulib/import/mkstemp.c: Update.
1900         * gnulib/import/msvc-inval.c: Update.
1901         * gnulib/import/msvc-inval.h: Update.
1902         * gnulib/import/msvc-nothrow.c: Update.
1903         * gnulib/import/msvc-nothrow.h: Update.
1904         * gnulib/import/open.c: Update.
1905         * gnulib/import/openat-die.c: Update.
1906         * gnulib/import/openat-priv.h: Update.
1907         * gnulib/import/openat-proc.c: Update.
1908         * gnulib/import/openat.c: Update.
1909         * gnulib/import/openat.h: Update.
1910         * gnulib/import/opendir.c: Update.
1911         * gnulib/import/pathmax.h: Update.
1912         * gnulib/import/pipe-safer.c: Update.
1913         * gnulib/import/rawmemchr.c: Update.
1914         * gnulib/import/readdir.c: Update.
1915         * gnulib/import/readlink.c: Update.
1916         * gnulib/import/realloc.c: Update.
1917         * gnulib/import/ref-add.sin: Update.
1918         * gnulib/import/ref-del.sin: Update.
1919         * gnulib/import/rename.c: Update.
1920         * gnulib/import/rewinddir.c: Update.
1921         * gnulib/import/rmdir.c: Update.
1922         * gnulib/import/same-inode.h: Update.
1923         * gnulib/import/save-cwd.c: Update.
1924         * gnulib/import/save-cwd.h: Update.
1925         * gnulib/import/scratch_buffer.h: Update.
1926         * gnulib/import/secure_getenv.c: Update.
1927         * gnulib/import/setenv.c: Update.
1928         * gnulib/import/signal.in.h: Update.
1929         * gnulib/import/stat-time.c: Update.
1930         * gnulib/import/stat-time.h: Update.
1931         * gnulib/import/stat-w32.c: Update.
1932         * gnulib/import/stat-w32.h: Update.
1933         * gnulib/import/stat.c: Update.
1934         * gnulib/import/stdbool.in.h: Update.
1935         * gnulib/import/stddef.in.h: Update.
1936         * gnulib/import/stdint.in.h: Update.
1937         * gnulib/import/stdio.in.h: Update.
1938         * gnulib/import/stdlib.in.h: Update.
1939         * gnulib/import/str-two-way.h: Update.
1940         * gnulib/import/strchrnul.c: Update.
1941         * gnulib/import/strdup.c: Update.
1942         * gnulib/import/streq.h: Update.
1943         * gnulib/import/strerror-override.c: Update.
1944         * gnulib/import/strerror-override.h: Update.
1945         * gnulib/import/strerror.c: Update.
1946         * gnulib/import/string.in.h: Update.
1947         * gnulib/import/stripslash.c: Update.
1948         * gnulib/import/strnlen1.c: Update.
1949         * gnulib/import/strnlen1.h: Update.
1950         * gnulib/import/strstr.c: Update.
1951         * gnulib/import/strtok_r.c: Update.
1952         * gnulib/import/sys_stat.in.h: Update.
1953         * gnulib/import/sys_time.in.h: Update.
1954         * gnulib/import/sys_types.in.h: Update.
1955         * gnulib/import/tempname.c: Update.
1956         * gnulib/import/tempname.h: Update.
1957         * gnulib/import/time.in.h: Update.
1958         * gnulib/import/unistd--.h: Update.
1959         * gnulib/import/unistd-safer.h: Update.
1960         * gnulib/import/unistd.in.h: Update.
1961         * gnulib/import/unsetenv.c: Update.
1962         * gnulib/import/verify.h: Update.
1963         * gnulib/import/extra/snippet/warn-on-use.h: Update.
1964         * gnulib/import/wchar.in.h: Update.
1965         * gnulib/import/wctype.in.h: Update.
1966         * gnulib/import/xalloc-oversized.h: Update.
1967         * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
1968         "53e2c179f26a890fa6685af4b6c1397ee370433b".
1969
1970 2018-09-10  Simon Marchi  <simon.marchi@ericsson.com>
1971
1972         * record-btrace.c (get_thread_current_frame): Remove
1973         old_inferior_ptid.
1974
1975 2018-09-10  Jerome Guitton  <guitton@adacore.com>
1976
1977         * ada-lang.c (ada_value_struct_elt): Call ada_to_fixed_type
1978         with check_tag to 1 if and only if the type is tagged and the
1979         component being searched cannot been found in the current
1980         view. Otherwise, always call ada_to_fixed_type with
1981         check_tag to 0.
1982
1983 2018-09-10  Xavier Roirand  <roirand@adacore.com>
1984
1985         * ada-lang.c (ada_is_access_to_unconstrained_array): Remove static
1986         declaration.
1987         * ada-lang.h: add ada_is_access_to_unconstrained_array prototype.
1988         * ada-varobj.c (ada_varobj_get_number_of_children,
1989         ada_varobj_describe_child, ada_value_is_changeable_p): Cleanup code.
1990
1991 2018-09-10  Xavier Roirand  <roirand@adacore.com>
1992
1993         * ada-valprint.c (ada_value_print): Use type instead of
1994         enclosing type.
1995
1996 2018-09-10  Xavier Roirand  <roirand@adacore.com>
1997
1998         * ada-lang.c (ada_value_subscript): Handle case when parameter is
1999         an array of access to unconstrained array.
2000
2001 2018-09-10  Xavier Roirand  <roirand@adacore.com>
2002
2003         * ada-lang.c (ada_is_access_to_unconstrained_array): New function.
2004         (ada_check_typedef): Use it.
2005
2006 2018-09-10  Xavier Roirand  <roirand@adacore.com>
2007
2008         * ada-varobj.c (ada_varobj_describe_struct_child)
2009         (ada_varobj_describe_child): Handle union case like struct one.
2010
2011 2018-09-10  Tom Tromey  <tom@tromey.com>
2012
2013         PR python/18380:
2014         * python/python.c (_initialize_python): Make example in "python"
2015         help work in Python 3.
2016
2017 2018-09-10  Eli Zaretskii  <eliz@gnu.org>
2018
2019         * Makefile.in (transformed_name): Use INSTALL_SCRIPT instead of
2020         INSTALL_PROGRAM to install gdb-add-index.sh.  Don't append
2021         $(EXEEXT) to the script, as it is not a program.
2022
2023 2018-09-09  Simon Marchi  <simon.marchi@ericsson.com>
2024
2025         * python/py-prettyprint.c (pretty_print_one_value): Return
2026         gdbpy_ref<>.
2027         (print_string_repr): Adjust.
2028         (apply_varobj_pretty_printer): Return gdbpy_ref<>.
2029         * python/python-internal.h (apply_varobj_pretty_printer): Return
2030         gdbpy_ref<>.
2031         * varobj.c (varobj_value_get_print_value): Adjust.
2032
2033 2018-09-08  Tom Tromey  <tom@tromey.com>
2034
2035         PR python/16047:
2036         * python/py-prettyprint.c (pretty_print_one_value): Check for
2037         to_string method.
2038
2039 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
2040
2041         * ada-lang.c (resolve_subexp): Pass correct OPLEN in call to
2042         replace_operator_with_call.
2043
2044 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
2045
2046         * ada-lang.c (ada_value_cast): Remove unnecessary parentheses.
2047
2048 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
2049
2050         * ada-typeprint.c (print_range): Print the bounds using TYPE
2051         rather than its TYPE_TARGET_TYPE.
2052
2053 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
2054
2055         * ada-lang.c (ada_to_fixed_value): Minor reformatting in
2056         call to ada_to_fixed_value_create.
2057
2058 2018-09-08  Jerome Guitton  <guitton@adacore.com>
2059
2060         * ada-lang.c (ada_decode): strip dot prefix in symbol name.
2061
2062 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
2063
2064         * ada-lang.c (ada_exception_sal): Replace gdb_assert calls
2065         by calls to error.
2066
2067 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
2068
2069         * ada-lang.c (ada_unhandled_exception_name_addr_from_raise):
2070         Move update of loop variable "fi".
2071
2072 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
2073
2074         * ada-lang.c (value_assign_to_component): In the case of
2075         big-endian targets, extract the bits of the given VAL
2076         using an src_offset of zero if container is not a scalar.
2077
2078 2018-09-06  Simon Ser  <contact@emersion.fr>
2079
2080         PR gdb/23105
2081         * fbsd-nat.c (fbsd_nat_target::xfer_partial): Add support for
2082         TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
2083         * fbsd-tdep.c (fbsd_make_note_desc): New.
2084         (fbsd_make_corefile_notes): Write NT_PROCSTAT_AUXV,
2085         NT_PROCSTAT_VMMAP and NT_PROCSTAT_PS_STRINGS notes.
2086         * target.h (enum target_object) Add FreeBSD-specific
2087         TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
2088
2089 2018-09-06  Simon Marchi  <simon.marchi@ericsson.com>
2090
2091         * compile/compile-c.h (generate_c_for_variable_locations):
2092         Change reference to pointer.
2093         * compile/compile-c-support.c (compile_program) <compute>:
2094         Likewise.
2095         * compile/compile-c-symbols.c (generate_vla_size): Likewise.
2096         (generate_c_for_for_one_variable): Likewise
2097         (generate_c_for_variable_locations): Likewise
2098         * compile/compile-c-types.c (compile_c_instance::convert_type):
2099         Likewise
2100         * compile/compile-cplus-symbols.c (convert_one_symbol):
2101         std::move the scope passed to enter_scope.
2102         * compile/compile-cplus-types.c
2103         (compile_cplus_instance::enter_scope): Make parameter
2104         rvalue-reference.
2105         (compile_cplus_instance::new_scope): Change reference to
2106         pointer.
2107         (compile_cplus_instance::convert_type): Likewise
2108         (compile_cplus_convert_typedef): std::move the scope passed to
2109         enter_scope.
2110         (compile_cplus_convert_struct_or_union): Likewise.
2111         (compile_cplus_convert_enum): Likewise.
2112         (compile_cplus_convert_namespace): Likewise.
2113         * compile/compile-cplus.h (compile_cplus_instance)
2114         <enter_scope>: Make parameter rvalue-reference.
2115         * compile/compile-internal.h (compile_instance)
2116         <get_cached_type>: Likewise
2117         * compile/compile-loc2c.c (push): Likewise
2118         (pushf): Likewise
2119         (unary): Likewise
2120         (binary): Likewise
2121         (print_label): Likewise
2122         (pushf_register_address): Likewise
2123         (pushf_register): Likewise
2124         (do_compile_dwarf_expr_to_c): Likewise
2125         (compile_dwarf_expr_to_c): Likewise
2126         (compile_dwarf_bounds_to_c): Likewise
2127         * compile/compile.c (compile_instance::get_cached_type):
2128         Likewise
2129         * compile/compile.h (compile_dwarf_expr_to_c): Likewise.
2130         (compile_dwarf_bounds_to_c): Likewise
2131         * dwarf2loc.c (locexpr_generate_c_location): Likewise.
2132         (dwarf2_compile_property_to_c): Likewise
2133         * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise
2134         * symtab.h (struct symbol_computed_ops) <generate_c_location>:
2135         Likewise
2136
2137 2018-09-06  Simon Marchi  <simon.marchi@ericsson.com>
2138
2139         * tui/tui-data.h (struct tui_win_element) <highlight>: Remove.
2140         * tui/tui-data.c (init_content_element): Don't initialize it.
2141
2142 2018-09-06  Simon Marchi  <simon.marchi@ericsson.com>
2143
2144         * tui/tui-data.h (struct tui_win_info)
2145         <detail::opaque>: Remove.
2146         * tui/tui-data.c (init_win_info): Remove assignment.
2147
2148 2018-09-05  Tom Tromey  <tom@tromey.com>
2149
2150         * warning.m4 (AM_GDB_WARNINGS): Add -Wformat when testing
2151         -Wformat-nonliteral.
2152         * target-float.c (host_float_ops<T>::to_string)
2153         (host_float_ops<T>::from_string): Use
2154         DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
2155         * configure: Rebuild.
2156
2157 2018-09-05  Simon Marchi  <simon.marchi@ericsson.com>
2158
2159         * printcmd.c (printf_c_string): Use
2160         DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
2161         (printf_wide_c_string, printf_pointer, ui_printf): Likewise.
2162
2163 2018-09-05  Tom Tromey  <tom@tromey.com>
2164
2165         * cli/cli-cmds.c (shell_escape, edit_command): Remove cast.
2166
2167 2018-09-05  Tom de Vries  <tdevries@suse.de>
2168
2169         * dwarf2loc.c (sect_variable_value): Call indirect_synthetic_pointer
2170         with resolve_abstract_p == true.
2171         (indirect_synthetic_pointer): Add resolve_abstract_p parameter,
2172         defaulting to false. Propagate resolve_abstract_p to
2173         dwarf2_fetch_die_loc_sect_off.
2174         * dwarf2loc.h (dwarf2_fetch_die_loc_sect_off): Add resolve_abstract_p
2175         parameter, defaulting to false.
2176         * dwarf2read.c (read_variable): Add variable to abstract_to_concrete.
2177         (dwarf2_fetch_die_loc_sect_off): Add and handle resolve_abstract_p
2178         parameter.
2179         * dwarf2read.h (struct die_info): Forward-declare.
2180         (die_info_ptr): New typedef.
2181         (struct dwarf2_per_objfile): Add abstract_to_concrete field.
2182
2183 2018-09-05  Joel Brobecker  <brobecker@adacore.com>
2184
2185         GDB 8.2 released.
2186
2187 2018-09-04  Sergio Durigan Junior  <sergiodj@redhat.com>
2188             Pedro Alves  <palves@redhat.com>
2189
2190         * gnulib/Makefile.in (aclocal_m4_deps): Move to
2191         "aclocal-m4-deps.mk".  Include file here.
2192         $(srcdir)/aclocal.m4: Add "configure.ac".
2193         * gnulib/aclocal-m4-deps.mk: New file.
2194         * gnulib/update-gnulib.sh: Automatically update
2195         "aclocal-m4-deps.mk".
2196
2197 2018-09-04  Tom Tromey  <tom@tromey.com>
2198
2199         * configure: Rebuild.
2200         * configure.ac: Remove multi-ice code.
2201
2202 2018-09-04  Tom Tromey  <tom@tromey.com>
2203
2204         * Makefile.in (GDB_WARN_CFLAGS_NO_DEFS): Remove.
2205         (ada-exp.o): Update.
2206
2207 2018-09-04  Tom Tromey  <tom@tromey.com>
2208
2209         * Makefile.in (printcmd.o, target-float.o): Remove.
2210         (GDB_WARN_CFLAGS_NO_FORMAT): Remove.
2211
2212 2018-09-04  Tom Tromey  <tom@tromey.com>
2213
2214         * gnulib/Makefile.in: Remove obsolete comment.
2215         * Makefile.in: Remove obsolete comment.
2216
2217 2018-09-04  Andrew Burgess  <andrew.burgess@embecosm.com>
2218
2219         * riscv-tdep.c (riscv_frame_cache): Fix ARI warning, don't end a
2220         line with '+'.
2221
2222 2018-09-03  Andrew Burgess  <andrew.burgess@embecosm.com>
2223
2224         * riscv-tdep.c: Add 'prologue-value.h' include.
2225         (struct riscv_unwind_cache): New struct.
2226         (riscv_debug_unwinder): New global.
2227         (riscv_scan_prologue): Update arguments, capture register details
2228         from prologue scan.
2229         (riscv_skip_prologue): Reformat arguments line, move end of
2230         prologue calculation into riscv_scan_prologue.
2231         (riscv_frame_cache): Update return type, create
2232         riscv_unwind_cache, scan the prologue, and fill in remaining cache
2233         details.
2234         (riscv_frame_this_id): Use frame id computed in riscv_frame_cache.
2235         (riscv_frame_prev_register): Use the trad_frame within the
2236         riscv_unwind_cache.
2237         (_initialize_riscv_tdep): Add 'set/show debug riscv unwinder'
2238         flag.
2239
2240 2018-09-03  Andrew Burgess  <andrew.burgess@embecosm.com>
2241
2242         * trad-frame.h (trad_frame_set_realreg): Declare.
2243         (trad_frame_set_addr): Declare.
2244         * trad-frame.c (trad_frame_set_realreg): Define new function.
2245         (trad_frame_set_addr): Define new function.
2246         (trad_frame_set_reg_realreg): Use new function.
2247         (trad_frame_set_reg_addr): Use new function.
2248
2249 2018-09-01  Keith Seitz  <keiths@redhat.com>
2250
2251         * compile/compile-cplus-types.c (compile_cplus_debug_output_1): Use
2252         pulongest instead of "%lld".
2253         * compile/compile-cplus-symbols.c (gcc_cplus_convert_symbol): Remove
2254         ATTRIBUTE_UNUSED.
2255
2256 2018-08-31  Tom Tromey  <tom@tromey.com>
2257
2258         * dwarf2read.c (dwarf2_add_field): Set the TYPE_LENGTH of the
2259         variant part type.
2260
2261 2018-08-31  Pedro Alves  <palves@redhat.com>
2262
2263         * gdbarch.h: Regenerate.
2264
2265 2018-08-31  Pedro Alves  <palves@redhat.com>
2266
2267         * gdbarch.sh (have_nonsteppable_watchpoint): Add comment.
2268         * target.h (Hardware watchpoint interfaces): Describe
2269         continuable/steppable/non-steppable watchpoints.
2270         * gdbarch.h, gdbarch.c: Regenerate.
2271
2272 2018-08-31  Pedro Alves  <palves@redhat.com>
2273
2274         * nto-procfs.c (nto_procfs_target::have_continuable_watchpoint):
2275         Delete.
2276         * s390-linux-nat.c
2277         (s390_linux_nat_target::have_continuable_watchpoint): Delete.
2278         * target.h (target_ops::have_continuable_watchpoint): Delete.
2279         (target_have_continuable_watchpoint): Delete.
2280         * x86-nat.h (x86_nat_target::have_continuable_watchpoint): Delete.
2281         * target-delegates.c: Regenerate.
2282
2283 2018-08-31  Sergio Durigan Junior  <sergiodj@redhat.com>
2284
2285         * gnulib/Makefile.in (aclocal_m4_deps): Update according to
2286         the files present in "gnulib/import/m4/".
2287
2288 2018-08-30  Andrew Burgess  <andrew.burgess@embecosm.com>
2289
2290         * riscv-tdep.c (riscv_insn::decode): Decode c.addi4spn, c.sd,
2291         c.sw, c.swsp, and c.sdsp.
2292
2293 2018-08-30  Andrew Burgess  <andrew.burgess@embecosm.com>
2294
2295         * riscv-tdep.c (struct riscv_inferior_data): Delete.
2296         (riscv_read_misa_reg): Don't cache value read into inferior data.
2297         (riscv_new_inferior_data): Delete.
2298         (riscv_inferior_data_cleanup): Delete.
2299         (riscv_inferior_data): Delete.
2300         (riscv_invalidate_inferior_data): Delete.
2301         (_initialize_riscv_tdep): Remove initialisation of inferior data.
2302
2303 2018-08-30  Simon Marchi  <simon.marchi@ericsson.com>
2304
2305         * compile/compile-cplus-types.c
2306         (compile_cplus_instance::leave_scope): Take the address of scope
2307         object.
2308         (compile_cplus_instance::convert_qualified_base): Compare quals
2309         to 0.
2310
2311 2018-08-30  Keith Seitz  <keiths@redhat.com>
2312
2313         * compile/compile-cplus-types.c (compile_cplus_instance::enter_scope):
2314         Use "%s" and host_address_to_string instead of "%p" in printf.
2315
2316 2018-08-29  Keith Seitz  <keiths@redhat.com>
2317
2318         * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Add compile-cplus-symbols.c
2319         and compile-cplus-types.c.
2320         (HFILES_NO_SRCDIR): Add gcc-cp-plugin.h.
2321         * c-lang.c (cplus_language_defn): Set C++ compile functions.
2322         * c-lang.h (cplus_get_compile_context, cplus_compute_program):
2323         Declare.
2324         * compile/compile-c-support.c: Include compile-cplus.h.
2325         (load_libcompile): Templatize.
2326         (get_compile_context): "New" function.
2327         (c_get_compile_context): Use get_compile_context.
2328         (cplus_get_compile_context): New function.
2329         (cplus_push_user_expression, cplus_pop_user_expression)
2330         (cplus_add_code_header, cplus_add_input, cplus_compile_program)
2331         (cplus_compute_program): Define new structs/functions.
2332         * compile/compile-cplus-symmbols.c: New file.
2333         * compile/compile-cplus-types.c: New file.
2334         * compile/compile-cplus.h: New file.
2335         * compile/compile-internal.h (debug_compile_oracle, GCC_TYPE_NONE):
2336         Declare.
2337         * compile/compile-object-load.c (get_out_value_type): Use
2338         strncmp_iw when comparing symbol names.
2339         (compile_object_load): Add mst_bss and mst_data.
2340         * compile/compile.c (_initialize_compile): Remove
2341         -Wno-implicit-function-declaration from `compile_args'.
2342         * compile/gcc-cp-plugin.h: New file.
2343         * NEWS: Mention C++ compile support and new debug options.
2344
2345 2018-08-29  Keith Seitz  <keiths@redhat.com>
2346
2347         * linespec.c (collect_info::add_symbol): Make virtual.
2348         (struct symbol_searcher_collect_info): New struct.
2349         (symbol_searcher::find_all_symbols): New method.
2350         * symtab.h (class symbol_searcher): New class.
2351
2352 2018-08-29  Keith Seitz  <keiths@redhat.com>
2353
2354         * linespec.c (struct linespec) <function_symbols, label_symbols>:
2355         Change to vector of block_symbol.  Update all users.
2356         (struct collect_info) <symbols>: Likewise.
2357         (collect_info::add_symbol): Take block_symbol as argument.
2358         Update all callers.
2359         (decode_compound_collector) <m_symbols>: Change type to vector
2360         of block_symbol.  Update all users.
2361         (decode_compound_collector::operator ()): Change parameter type
2362         to block_symbol.
2363         (find_method, find_function_symbols, find_linespec_symbols)
2364         (find_label_symbols_in_block, find_label_symbols): Change symbol
2365         vectors to block_symbol vectors.
2366         * symtab.h (symbol_found_callback_ftype): Change parameter type to
2367         block_symbol.
2368
2369 2018-08-29  Keith Seitz  <keiths@redhat.com>
2370
2371         * linespec.c (symbolp): Remove typedef and VEC definitions.
2372         (bound_minimal_symbol_d): Likewise.
2373
2374 2018-08-29  Keith Seitz  <keiths@redhat.com>
2375
2376         * linespec.c (decode_compound_collector::decode_compound_collector):
2377         Remove initialization for `m_symtabs'.
2378         (decode_compound_collector::release_symbols): Change return type
2379         to std::vector.  Update all callers.
2380         (class decode_compound_collector) <m_symbols>: Change type to
2381         std::vector.
2382         (lookup_prefix_sym): Change return type to std::vector.  Update all
2383         callers.
2384         (compare_symbols): Remove.
2385         (std_compare_symbols): Rename to `compare_symbols'.
2386         (find_method): Change `sym_classes' parameter to std::vector.
2387         Update all callers.  Use std::sort to sort sym_classes.
2388         (find_linespec_symbols): Remove cleanup.
2389
2390 2018-08-29  Keith Seitz  <keiths@redhat.com>
2391
2392         * linespec.c (struct linespec) <minimal_symbols>: Change type to
2393         std::vector.  Update all users.
2394         (convert_linespec_to_sals): Use std::sort to sort minimal symbols.
2395         (struct collect_info) <minimal_symbols>: Likewise.
2396         (compare_msymbols): Return bool.  Change parameters to const
2397         bound_minimal_symbol references.
2398         (find_method, find_function_symbols, find_linespec_symbols): Change
2399         `minsyms' parameter to std::vector.  Update all callers.
2400
2401 2018-08-29  Keith Seitz  <keiths@redhat.com>
2402
2403         * linespec.c (struct linespec) <label_symbols>: Change type to
2404         std::vector.  Update all users.
2405         (find_label_symbols_in_block): Change `result' parameter to
2406         std::vector.  Update all callers.
2407         (find_label_symbols): Return std::vector.  Update all callers.
2408
2409 2018-08-29  Keith Seitz  <keiths@redhat.com>
2410
2411         * linespec.c (struct linespec) <function_symbols>: Change type to
2412         std::vector.  Update all users.
2413         (struct collect_info) <function_symbols>: Likewise.
2414         (convert_linespec_to_sals): Use std::sort to sort function_symbols.
2415         (std_compare_symbols): New function.
2416         (find_method, find_function_symbols, find_linespec_symbols)
2417         (find_label_symbols_in_block): Change `symbols' parameter to
2418         std::vector.  Update all callers.
2419         (find_label_symbols): Likewise for `function_symbols' and
2420         `label_funcs_ret'.
2421
2422 2018-08-29  Keith Seitz  <keiths@redhat.com>
2423
2424         * linespec.c (symtab_vector_up): Define.
2425         (struct linespec) <file_symtabs>: Change type to std::vector *.
2426         Update all uses.
2427         (struct collect_info) <file_symtabs>: Likewise.
2428         (collect_symtabs_from_filename): Return symtab_vector_up.
2429         Update all callers.
2430         (decode_objc): Remove cleanup.
2431         (symtab_collector::symtab_collector): Initialize `m_symtabs'.
2432         (symtab_collector::release_symtabs): Return symtab_vector_up.
2433         Update all callers.
2434         (class symtab_collector) <m_symtabs>: Change type to symtab_vector_up.
2435         Update all users.
2436         (collect_symtabs_from_filename, symtabs_from_filename): Return
2437         symtab_vector_up.  Update all callers.
2438
2439 2018-08-29  Tom Tromey  <tom@tromey.com>
2440
2441         * csky-tdep.c (csky_analyze_prologue): Use
2442         core_addr_to_string_nz.
2443
2444 2018-08-29  Tom Tromey  <tom@tromey.com>
2445
2446         * windows-nat.c (struct xlate_exception) <them>: Change type to
2447         DWORD.
2448         (xlate): Fix formatting.  Remove last entry.
2449         (struct xlate_exception, xlate): Comment out.
2450         (windows_nat_target::resume): Use ranged for.
2451
2452 2018-08-29  Jim Wilson  <jimw@sifive.com>
2453
2454         * riscv-linux-nat.c: Include elf/common.h instead of elf.h.
2455         (riscv_linux_nat_target::fetch_registers): Use NT_FPREGSET instead
2456         of NT_PRFPREG.
2457         (riscv_linux_nat_target::store_registers): Likewise.
2458
2459 2018-08-29  Sergio Durigan Junior  <sergiodj@redhat.com>
2460
2461         PR gdb/23555
2462         PR gdb/23558
2463         * gnulib/aclocal.m4: Regenerate.
2464         * gnulib/config.in: Regenerate.
2465         * gnulib/configure: Regenerate.
2466         * gnulib/import/Makefile.am: Update.
2467         * gnulib/import/Makefile.in: Update.
2468         * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
2469         * gnulib/import/_Noreturn.h: ... this.
2470         * gnulib/import/alloca.in.h: Update.
2471         * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
2472         * gnulib/import/arg-nonnull.h: ... this.
2473         * gnulib/import/assure.h: Update.
2474         * gnulib/import/at-func.c: Update.
2475         * gnulib/import/basename-lgpl.c: Update.
2476         * gnulib/import/extra/snippet/c++defs.h: Rename to...
2477         * gnulib/import/c++defs.h: ... this.
2478         * gnulib/import/canonicalize-lgpl.c: Update.
2479         * gnulib/import/cdefs.h: Update.
2480         * gnulib/import/chdir-long.c: Update.
2481         * gnulib/import/chdir-long.h: Update.
2482         * gnulib/import/cloexec.c: Update.
2483         * gnulib/import/cloexec.h: Update.
2484         * gnulib/import/close.c: Update.
2485         * gnulib/import/closedir.c: Update.
2486         * gnulib/import/config.charset: Update.
2487         * gnulib/import/dirent-private.h: Update.
2488         * gnulib/import/dirent.in.h: Update.
2489         * gnulib/import/dirfd.c: Update.
2490         * gnulib/import/dirname-lgpl.c: Update.
2491         * gnulib/import/dirname.h: Update.
2492         * gnulib/import/dosname.h: Update.
2493         * gnulib/import/dup-safer-flag.c: Update.
2494         * gnulib/import/dup-safer.c: Update.
2495         * gnulib/import/dup.c: Update.
2496         * gnulib/import/dup2.c: Update.
2497         * gnulib/import/errno.in.h: Update.
2498         * gnulib/import/error.c: Update.
2499         * gnulib/import/error.h: Update.
2500         * gnulib/import/exitfail.c: Update.
2501         * gnulib/import/exitfail.h: Update.
2502         * gnulib/import/extra/update-copyright: Update.
2503         * gnulib/import/fchdir.c: Update.
2504         * gnulib/import/fcntl.c: Update.
2505         * gnulib/import/fcntl.in.h: Update.
2506         * gnulib/import/fd-hook.c: Update.
2507         * gnulib/import/fd-hook.h: Update.
2508         * gnulib/import/fd-safer-flag.c: Update.
2509         * gnulib/import/fd-safer.c: Update.
2510         * gnulib/import/fdopendir.c: Update.
2511         * gnulib/import/filename.h: Update.
2512         * gnulib/import/filenamecat-lgpl.c: Update.
2513         * gnulib/import/filenamecat.h: Update.
2514         * gnulib/import/flexmember.h: Update.
2515         * gnulib/import/float+.h: Update.
2516         * gnulib/import/float.c: Update.
2517         * gnulib/import/float.in.h: Update.
2518         * gnulib/import/fnmatch.c: Update.
2519         * gnulib/import/fnmatch.in.h: Update.
2520         * gnulib/import/fnmatch_loop.c: Update.
2521         * gnulib/import/fpucw.h: Update.
2522         * gnulib/import/frexp.c: Update.
2523         * gnulib/import/frexpl.c: Update.
2524         * gnulib/import/fstat.c: Update.
2525         * gnulib/import/fstatat.c: Update.
2526         * gnulib/import/getcwd-lgpl.c: Update.
2527         * gnulib/import/getcwd.c: Update.
2528         * gnulib/import/getdtablesize.c: Update.
2529         * gnulib/import/getlogin_r.c: Update.
2530         * gnulib/import/getprogname.c: Update.
2531         * gnulib/import/getprogname.h: Update.
2532         * gnulib/import/gettext.h: Update.
2533         * gnulib/import/gettimeofday.c: Update.
2534         * gnulib/import/glob-libc.h: Update.
2535         * gnulib/import/glob.c: Update.
2536         * gnulib/import/glob.in.h: Update.
2537         * gnulib/import/glob_internal.h: Update.
2538         * gnulib/import/glob_pattern_p.c: Update.
2539         * gnulib/import/globfree.c: Update.
2540         * gnulib/import/hard-locale.c: Update.
2541         * gnulib/import/hard-locale.h: Update.
2542         * gnulib/import/intprops.h: Update.
2543         * gnulib/import/inttypes.in.h: Update.
2544         * gnulib/import/isnan.c: Update.
2545         * gnulib/import/isnand-nolibm.h: Update.
2546         * gnulib/import/isnand.c: Update.
2547         * gnulib/import/isnanl-nolibm.h: Update.
2548         * gnulib/import/isnanl.c: Update.
2549         * gnulib/import/itold.c: Update.
2550         * gnulib/import/libc-config.h: Update.
2551         * gnulib/import/limits.in.h: Update.
2552         * gnulib/import/localcharset.c: Update.
2553         * gnulib/import/localcharset.h: Update.
2554         * gnulib/import/localtime-buffer.c: Update.
2555         * gnulib/import/localtime-buffer.h: Update.
2556         * gnulib/import/lstat.c: Update.
2557         * gnulib/import/m4/00gnulib.m4: Update.
2558         * gnulib/import/m4/__inline.m4: Update.
2559         * gnulib/import/m4/absolute-header.m4: Update.
2560         * gnulib/import/m4/alloca.m4: Update.
2561         * gnulib/import/m4/builtin-expect.m4: Update.
2562         * gnulib/import/m4/canonicalize.m4: Update.
2563         * gnulib/import/m4/chdir-long.m4: Update.
2564         * gnulib/import/m4/close.m4: Update.
2565         * gnulib/import/m4/closedir.m4: Update.
2566         * gnulib/import/m4/configmake.m4: Update.
2567         * gnulib/import/m4/d-ino.m4: Update.
2568         * gnulib/import/m4/d-type.m4: Update.
2569         * gnulib/import/m4/dirent_h.m4: Update.
2570         * gnulib/import/m4/dirfd.m4: Update.
2571         * gnulib/import/m4/dirname.m4: Update.
2572         * gnulib/import/m4/double-slash-root.m4: Update.
2573         * gnulib/import/m4/dup.m4: Update.
2574         * gnulib/import/m4/dup2.m4: Update.
2575         * gnulib/import/m4/eealloc.m4: Update.
2576         * gnulib/import/m4/environ.m4: Update.
2577         * gnulib/import/m4/errno_h.m4: Update.
2578         * gnulib/import/m4/error.m4: Update.
2579         * gnulib/import/m4/exponentd.m4: Update.
2580         * gnulib/import/m4/exponentl.m4: Update.
2581         * gnulib/import/m4/extensions.m4: Update.
2582         * gnulib/import/m4/extern-inline.m4: Update.
2583         * gnulib/import/m4/fchdir.m4: Update.
2584         * gnulib/import/m4/fcntl-o.m4: Update.
2585         * gnulib/import/m4/fcntl.m4: Update.
2586         * gnulib/import/m4/fcntl_h.m4: Update.
2587         * gnulib/import/m4/fdopendir.m4: Update.
2588         * gnulib/import/m4/filenamecat.m4: Update.
2589         * gnulib/import/m4/flexmember.m4: Update.
2590         * gnulib/import/m4/float_h.m4: Update.
2591         * gnulib/import/m4/fnmatch.m4: Update.
2592         * gnulib/import/m4/fnmatch_h.m4: Update.
2593         * gnulib/import/m4/fpieee.m4: Update.
2594         * gnulib/import/m4/frexp.m4: Update.
2595         * gnulib/import/m4/frexpl.m4: Update.
2596         * gnulib/import/m4/fstat.m4: Update.
2597         * gnulib/import/m4/fstatat.m4: Update.
2598         * gnulib/import/m4/getcwd-abort-bug.m4: Update.
2599         * gnulib/import/m4/getcwd-path-max.m4: Update.
2600         * gnulib/import/m4/getcwd.m4: Update.
2601         * gnulib/import/m4/getdtablesize.m4: Update.
2602         * gnulib/import/m4/getlogin.m4: Update.
2603         * gnulib/import/m4/getlogin_r.m4: Update.
2604         * gnulib/import/m4/getpagesize.m4: Update.
2605         * gnulib/import/m4/getprogname.m4: Update.
2606         * gnulib/import/m4/gettimeofday.m4: Update.
2607         * gnulib/import/m4/glibc21.m4: Update.
2608         * gnulib/import/m4/glob.m4: Update.
2609         * gnulib/import/m4/glob_h.m4: Update.
2610         * gnulib/import/m4/gnulib-cache.m4: Update.
2611         * gnulib/import/m4/gnulib-common.m4: Update.
2612         * gnulib/import/m4/gnulib-comp.m4: Update.
2613         * gnulib/import/m4/gnulib-tool.m4: Update.
2614         * gnulib/import/m4/hard-locale.m4: Update.
2615         * gnulib/import/m4/include_next.m4: Update.
2616         * gnulib/import/m4/inttypes-pri.m4: Update.
2617         * gnulib/import/m4/inttypes.m4: Update.
2618         * gnulib/import/m4/isnand.m4: Update.
2619         * gnulib/import/m4/isnanl.m4: Update.
2620         * gnulib/import/m4/largefile.m4: Update.
2621         * gnulib/import/m4/limits-h.m4: Update.
2622         * gnulib/import/m4/localcharset.m4: Update.
2623         * gnulib/import/m4/locale-fr.m4: Update.
2624         * gnulib/import/m4/locale-ja.m4: Update.
2625         * gnulib/import/m4/locale-zh.m4: Update.
2626         * gnulib/import/m4/localtime-buffer.m4: Update.
2627         * gnulib/import/m4/longlong.m4: Update.
2628         * gnulib/import/m4/lstat.m4: Update.
2629         * gnulib/import/m4/malloc.m4: Update.
2630         * gnulib/import/m4/malloca.m4: Update.
2631         * gnulib/import/m4/math_h.m4: Update.
2632         * gnulib/import/m4/mbrtowc.m4: Update.
2633         * gnulib/import/m4/mbsinit.m4: Update.
2634         * gnulib/import/m4/mbsrtowcs.m4: Update.
2635         * gnulib/import/m4/mbstate_t.m4: Update.
2636         * gnulib/import/m4/memchr.m4: Update.
2637         * gnulib/import/m4/memmem.m4: Update.
2638         * gnulib/import/m4/mempcpy.m4: Update.
2639         * gnulib/import/m4/memrchr.m4: Update.
2640         * gnulib/import/m4/mkdir.m4: Update.
2641         * gnulib/import/m4/mkstemp.m4: Update.
2642         * gnulib/import/m4/mmap-anon.m4: Update.
2643         * gnulib/import/m4/mode_t.m4: Update.
2644         * gnulib/import/m4/msvc-inval.m4: Update.
2645         * gnulib/import/m4/msvc-nothrow.m4: Update.
2646         * gnulib/import/m4/multiarch.m4: Update.
2647         * gnulib/import/m4/nocrash.m4: Update.
2648         * gnulib/import/m4/off_t.m4: Update.
2649         * gnulib/import/m4/onceonly.m4: Update.
2650         * gnulib/import/m4/open-cloexec.m4: Update.
2651         * gnulib/import/m4/open.m4: Update.
2652         * gnulib/import/m4/openat.m4: Update.
2653         * gnulib/import/m4/opendir.m4: Update.
2654         * gnulib/import/m4/pathmax.m4: Update.
2655         * gnulib/import/m4/rawmemchr.m4: Update.
2656         * gnulib/import/m4/readdir.m4: Update.
2657         * gnulib/import/m4/readlink.m4: Update.
2658         * gnulib/import/m4/realloc.m4: Update.
2659         * gnulib/import/m4/rename.m4: Update.
2660         * gnulib/import/m4/rewinddir.m4: Update.
2661         * gnulib/import/m4/rmdir.m4: Update.
2662         * gnulib/import/m4/save-cwd.m4: Update.
2663         * gnulib/import/m4/secure_getenv.m4: Update.
2664         * gnulib/import/m4/setenv.m4: Update.
2665         * gnulib/import/m4/signal_h.m4: Update.
2666         * gnulib/import/m4/ssize_t.m4: Update.
2667         * gnulib/import/m4/stat-time.m4: Update.
2668         * gnulib/import/m4/stat.m4: Update.
2669         * gnulib/import/m4/std-gnu11.m4: Update.
2670         * gnulib/import/m4/stdbool.m4: Update.
2671         * gnulib/import/m4/stddef_h.m4: Update.
2672         * gnulib/import/m4/stdint.m4: Update.
2673         * gnulib/import/m4/stdio_h.m4: Update.
2674         * gnulib/import/m4/stdlib_h.m4: Update.
2675         * gnulib/import/m4/strchrnul.m4: Update.
2676         * gnulib/import/m4/strdup.m4: Update.
2677         * gnulib/import/m4/strerror.m4: Update.
2678         * gnulib/import/m4/string_h.m4: Update.
2679         * gnulib/import/m4/strstr.m4: Update.
2680         * gnulib/import/m4/strtok_r.m4: Update.
2681         * gnulib/import/m4/sys_socket_h.m4: Update.
2682         * gnulib/import/m4/sys_stat_h.m4: Update.
2683         * gnulib/import/m4/sys_time_h.m4: Update.
2684         * gnulib/import/m4/sys_types_h.m4: Update.
2685         * gnulib/import/m4/tempname.m4: Update.
2686         * gnulib/import/m4/time_h.m4: Update.
2687         * gnulib/import/m4/unistd-safer.m4: Update.
2688         * gnulib/import/m4/unistd_h.m4: Update.
2689         * gnulib/import/m4/warn-on-use.m4: Update.
2690         * gnulib/import/m4/wchar_h.m4: Update.
2691         * gnulib/import/m4/wchar_t.m4: Update.
2692         * gnulib/import/m4/wctype_h.m4: Update.
2693         * gnulib/import/m4/wint_t.m4: Update.
2694         * gnulib/import/malloc.c: Update.
2695         * gnulib/import/malloc/scratch_buffer.h: Update.
2696         * gnulib/import/malloc/scratch_buffer_grow.c: Update.
2697         * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
2698         * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
2699         * gnulib/import/malloca.c: Update.
2700         * gnulib/import/malloca.h: Update.
2701         * gnulib/import/malloca.valgrind: Update.
2702         * gnulib/import/math.in.h: Update.
2703         * gnulib/import/mbrtowc.c: Update.
2704         * gnulib/import/mbsinit.c: Update.
2705         * gnulib/import/mbsrtowcs-impl.h: Update.
2706         * gnulib/import/mbsrtowcs-state.c: Update.
2707         * gnulib/import/mbsrtowcs.c: Update.
2708         * gnulib/import/memchr.c: Update.
2709         * gnulib/import/memmem.c: Update.
2710         * gnulib/import/mempcpy.c: Update.
2711         * gnulib/import/memrchr.c: Update.
2712         * gnulib/import/mkdir.c: Update.
2713         * gnulib/import/mkstemp.c: Update.
2714         * gnulib/import/msvc-inval.c: Update.
2715         * gnulib/import/msvc-inval.h: Update.
2716         * gnulib/import/msvc-nothrow.c: Update.
2717         * gnulib/import/msvc-nothrow.h: Update.
2718         * gnulib/import/open.c: Update.
2719         * gnulib/import/openat-die.c: Update.
2720         * gnulib/import/openat-priv.h: Update.
2721         * gnulib/import/openat-proc.c: Update.
2722         * gnulib/import/openat.c: Update.
2723         * gnulib/import/openat.h: Update.
2724         * gnulib/import/opendir.c: Update.
2725         * gnulib/import/pathmax.h: Update.
2726         * gnulib/import/pipe-safer.c: Update.
2727         * gnulib/import/rawmemchr.c: Update.
2728         * gnulib/import/readdir.c: Update.
2729         * gnulib/import/readlink.c: Update.
2730         * gnulib/import/realloc.c: Update.
2731         * gnulib/import/ref-add.sin: Update.
2732         * gnulib/import/ref-del.sin: Update.
2733         * gnulib/import/rename.c: Update.
2734         * gnulib/import/rewinddir.c: Update.
2735         * gnulib/import/rmdir.c: Update.
2736         * gnulib/import/same-inode.h: Update.
2737         * gnulib/import/save-cwd.c: Update.
2738         * gnulib/import/save-cwd.h: Update.
2739         * gnulib/import/scratch_buffer.h: Update.
2740         * gnulib/import/secure_getenv.c: Update.
2741         * gnulib/import/setenv.c: Update.
2742         * gnulib/import/signal.in.h: Update.
2743         * gnulib/import/stat-time.c: Update.
2744         * gnulib/import/stat-time.h: Update.
2745         * gnulib/import/stat-w32.c: Update.
2746         * gnulib/import/stat-w32.h: Update.
2747         * gnulib/import/stat.c: Update.
2748         * gnulib/import/stdbool.in.h: Update.
2749         * gnulib/import/stddef.in.h: Update.
2750         * gnulib/import/stdint.in.h: Update.
2751         * gnulib/import/stdio.in.h: Update.
2752         * gnulib/import/stdlib.in.h: Update.
2753         * gnulib/import/str-two-way.h: Update.
2754         * gnulib/import/strchrnul.c: Update.
2755         * gnulib/import/strdup.c: Update.
2756         * gnulib/import/streq.h: Update.
2757         * gnulib/import/strerror-override.c: Update.
2758         * gnulib/import/strerror-override.h: Update.
2759         * gnulib/import/strerror.c: Update.
2760         * gnulib/import/string.in.h: Update.
2761         * gnulib/import/stripslash.c: Update.
2762         * gnulib/import/strnlen1.c: Update.
2763         * gnulib/import/strnlen1.h: Update.
2764         * gnulib/import/strstr.c: Update.
2765         * gnulib/import/strtok_r.c: Update.
2766         * gnulib/import/sys_stat.in.h: Update.
2767         * gnulib/import/sys_time.in.h: Update.
2768         * gnulib/import/sys_types.in.h: Update.
2769         * gnulib/import/tempname.c: Update.
2770         * gnulib/import/tempname.h: Update.
2771         * gnulib/import/time.in.h: Update.
2772         * gnulib/import/unistd--.h: Update.
2773         * gnulib/import/unistd-safer.h: Update.
2774         * gnulib/import/unistd.in.h: Update.
2775         * gnulib/import/unsetenv.c: Update.
2776         * gnulib/import/verify.h: Update.
2777         * gnulib/import/extra/snippet/warn-on-use.h: Update.
2778         * gnulib/import/wchar.in.h: Update.
2779         * gnulib/import/wctype.in.h: Update.
2780         * gnulib/import/xalloc-oversized.h: Update.
2781         * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
2782         "53e2c179f26a890fa6685af4b6c1397ee370433b".
2783
2784 2018-08-16  Gary Benson <gbenson@redhat.com>
2785
2786         PR gdb/13000:
2787         * gdb/main.c (captured_main_1): Exit with nonzero status
2788         in batch mode if the last command to be executed failed.
2789         * NEWS: Mention the above.
2790
2791 2018-08-29  Simon Marchi  <simon.marchi@ericsson.com>
2792
2793         * csky-tdep.c (csky_memory_insert_breakpoint): Remove newline at
2794         end of warning message.
2795
2796 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
2797
2798         PR gdb/22943:
2799         * aarch64-tdep.c (is_hfa_or_hva): Remove function.
2800         (aarch64_extract_return_value): Use
2801         aapcs_is_vfp_call_or_return_candidate.
2802         (aarch64_return_in_memory): Likewise.
2803         (aarch64_store_return_value): Likewise.
2804
2805 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
2806
2807         * aarch64-tdep.c
2808         (aapcs_is_vfp_call_or_return_candidate): Make static
2809         (pass_in_v_or_stack): Remove function.
2810         (pass_in_v_vfp_candidate): New function.
2811         (aarch64_push_dummy_call): Check for float register candidates.
2812
2813 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
2814
2815         * aarch64-tdep.c (HA_MAX_NUM_FLDS): New macro.
2816         (aapcs_is_vfp_call_or_return_candidate_1): New function.
2817         (aapcs_is_vfp_call_or_return_candidate): Likewise.
2818
2819 2018-08-28  Simon Marchi  <simon.marchi@polymtl.ca>
2820
2821         PR build/23399
2822         * common/agent.c (IPA_SYM_STRUCT_NAME): Define.
2823         (struct ipa_sym_addresses): Rename to...
2824         (struct ipa_sym_addresses_common): ... this.
2825         * common/agent.h (IPA_SYM): Use IPA_SYM_STRUCT_NAME.
2826
2827 2018-08-28  Tom Tromey  <tom@tromey.com>
2828
2829         * c-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
2830         (token_fifo): Now a std::vector.
2831         (yylex, c_parse): Update.
2832         * d-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
2833         (token_fifo): Now a std::vector.
2834         (yylex, d_parse): Update.
2835         * go-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
2836         (token_fifo): Now a std::vector.
2837         (yylex, go_parse): Update.
2838
2839 2018-08-28  Simon Marchi  <simon.marchi@ericsson.com>
2840
2841         * parser-defs.h (struct type_stack) <elements>: Change type to
2842         std::vector<union type_stack_elt>.
2843         <depth, size>: Remove.
2844         * parse.c (parse_exp_in_context_1): Adjust.
2845         (type_stack_reserve): Remove.
2846         (check_type_stack_depth): Remove.
2847         (insert_into_type_stack): Adjust to std::vector.
2848         (insert_type): Likewise.
2849         (push_type): Likewise.
2850         (push_type_int): Likewise.
2851         (insert_type_address_space): Likewise.
2852         (pop_type): Likewise.
2853         (pop_type_int): Likewise.
2854         (pop_typelist): Likewise.
2855         (pop_type_stack): Likewise.
2856         (append_type_stack): Likewise.
2857         (push_type_stack): Likewise.
2858         (get_type_stack): Likewise.
2859         (type_stack_cleanup): Likewise.
2860         (push_typelist): Likewise.
2861         (follow_types): Likewise.
2862         (_initialize_parse): Likewise.
2863
2864 2018-08-28  Hafiz Abid Qadeer  <abidh@codesourcery.com>
2865
2866         * NEWS: Mention csky target.
2867
2868 2018-08-28  Jiangshuai Li  <jiangshuai_li@c-sky.com>
2869             Hafiz Abid Qadeer  <abidh@codesourcery.com>
2870             Don Breazeal  <donb@codesourcery.com>
2871
2872         * csky-linux-tdep.c: New file.
2873         * csky-tdep.c: Likewise.
2874         * csky-tdep.h: Likewise.
2875         * Makefile.in (ALL_TARGET_OBS): Add csky-linux-tdep.o and
2876         csky-tdep.o.
2877         (HFILES_NO_SRCDIR): Add csky-tdep.h.
2878         (ALLDEPFILES): Add csky-linux-tdep.c and csky-tdep.c
2879         * configure.tgt: Add csky support.
2880
2881 2018-08-27  Jan Vrany  <jan.vrany@fit.cvut.cz>
2882
2883         * python/py-framefilter.c (py_print_frame): Print frame architecture
2884         when printing on an MI output.
2885
2886 2018-08-27  Tom Tromey  <tom@tromey.com>
2887
2888         PR build/23087:
2889         * configure: Rebuild.
2890         * warning.m4 (AM_GDB_WARNINGS): Remove -Wno-narrowing.
2891
2892 2018-08-27  Tom Tromey  <tom@tromey.com>
2893
2894         * aarch64-linux-tdep.c
2895         (aarch64_linux_iterate_over_regset_sections) <sve_regmap>: Add
2896         casts to int.
2897
2898 2018-08-27  Tom Tromey  <tom@tromey.com>
2899
2900         * ppc64-tdep.c (insn_d, insn_ds, insn_xfx): Add casts to
2901         unsigned.
2902         (ppc64_standard_linkage1, ppc64_standard_linkage2)
2903         (ppc64_standard_linkage3, ppc64_standard_linkage4)
2904         (ppc64_standard_linkage5, ppc64_standard_linkage6)
2905         (ppc64_standard_linkage7, ppc64_standard_linkage8): Add casts to
2906         unsigned.
2907
2908 2018-08-27  Tom Tromey  <tom@tromey.com>
2909
2910         * xtensa-tdep.h (XTREG_END): Add cast to unsigned.
2911         (XTENSA_GDBARCH_TDEP_INSTANTIATE): Likewise.
2912
2913 2018-08-27  Tom Tromey  <tom@tromey.com>
2914
2915         * tramp-frame.h (TRAMP_SENTINEL_INSN): Redefine.
2916         * tilegx-linux-tdep.c (tilegx_linux_rt_sigframe): Use
2917         ULONGEST_MAX.
2918         * tic6x-linux-tdep.c (tic6x_linux_rt_sigreturn_tramp_frame): Use
2919         ULONGEST_MAX.
2920         * sparc64-linux-tdep.c (sparc64_linux_rt_sigframe): Use
2921         ULONGEST_MAX.
2922         * sparc-linux-tdep.c (sparc32_linux_sigframe)
2923         (sparc32_linux_rt_sigframe): Use ULONGEST_MAX.
2924         * ppc-nbsd-tdep.c (ppcnbsd_sigtramp, ppcnbsd2_sigtramp): Use
2925         ULONGEST_MAX.
2926         * ppc-linux-tdep.c (ppc32_linux_sigaction_tramp_frame)
2927         (ppc64_linux_sigaction_tramp_frame)
2928         (ppc32_linux_sighandler_tramp_frame)
2929         (ppc64_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
2930         * nios2-linux-tdep.c (nios2_r1_linux_rt_sigreturn_tramp_frame)
2931         (nios2_r2_linux_rt_sigreturn_tramp_frame): Use ULONGEST_MAX.
2932         * mn10300-linux-tdep.c (am33_linux_sigframe)
2933         (am33_linux_rt_sigframe): Use ULONGEST_MAX.
2934         * mips64-obsd-tdep.c (mips64obsd_sigframe): Use ULONGEST_MAX.
2935         * mips-linux-tdep.c (mips_linux_o32_sigframe)
2936         (mips_linux_o32_rt_sigframe, mips_linux_n32_rt_sigframe)
2937         (mips_linux_n64_rt_sigframe, micromips_linux_o32_sigframe)
2938         (micromips_linux_o32_rt_sigframe, micromips_linux_n32_rt_sigframe)
2939         (micromips_linux_n64_rt_sigframe): Use ULONGEST_MAX.
2940         * mips-fbsd-tdep.c (mips_fbsd_sigframe, mipsn32_fbsd_sigframe)
2941         (mips64_fbsd_sigframe): Use ULONGEST_MAX.
2942         * microblaze-linux-tdep.c
2943         (microblaze_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
2944         * i386-nbsd-tdep.c (i386nbsd_sigtramp_sc16, i386nbsd_sigtramp_sc2)
2945         (i386nbsd_sigtramp_si2, i386nbsd_sigtramp_si31)
2946         (i386nbsd_sigtramp_si4): Use ULONGEST_MAX.
2947         * hppa-nbsd-tdep.c (hppanbsd_sigtramp_si4): Use ULONGEST_MAX.
2948         * common/common-types.h (ULONGEST_MAX): New define.
2949         (CORE_ADDR_MAX): Fix formatting.
2950         * bfin-linux-tdep.c (bfin_linux_sigframe): Use ULONGEST_MAX.
2951         * arm-obsd-tdep.c (armobsd_sigframe): Use ULONGEST_MAX.
2952         * arm-linux-tdep.c (arm_linux_sigreturn_tramp_frame)
2953         (arm_linux_rt_sigreturn_tramp_frame)
2954         (arm_eabi_linux_sigreturn_tramp_frame)
2955         (arm_eabi_linux_rt_sigreturn_tramp_frame)
2956         (thumb2_eabi_linux_sigreturn_tramp_frame)
2957         (thumb2_eabi_linux_rt_sigreturn_tramp_frame)
2958         (arm_linux_restart_syscall_tramp_frame)
2959         (arm_kernel_linux_restart_syscall_tramp_frame): Use ULONGEST_MAX.
2960         * arm-fbsd-tdep.c (arm_fbsd_sigframe): Use ULONGEST_MAX.
2961         * aarch64-linux-tdep.c (aarch64_linux_rt_sigframe): Use
2962         ULONGEST_MAX.
2963         * aarch64-fbsd-tdep.c (aarch64_fbsd_sigframe): Use ULONGEST_MAX.
2964
2965 2018-08-27  Tom Tromey  <tom@tromey.com>
2966
2967         * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Use
2968         CORE_ADDR_MAX.
2969         * mips-tdep.c (mips_deal_with_atomic_sequence)
2970         (micromips_deal_with_atomic_sequence): Use CORE_ADDR_MAX.
2971         * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw)
2972         (arm_deal_with_atomic_sequence_raw): Use CORE_ADDR_MAX.
2973         * alpha-tdep.c (alpha_deal_with_atomic_sequence): Use
2974         CORE_ADDR_MAX.
2975         * aarch64-tdep.c (aarch64_software_single_step): Use
2976         CORE_ADDR_MAX.
2977
2978 2018-08-27  Tom Tromey  <tom@tromey.com>
2979
2980         * linespec.c (complete_linespec_component): Add cast to "char".
2981         * completer.c (completion_tracker::build_completion_result): Add
2982         cast to "char".
2983
2984 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
2985
2986         * solist.h (struct solist, struct target_so_ops): Fix
2987         indentation.
2988
2989 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
2990
2991         * ada-tasks.c (ada_task_info_s): Remove typedef.
2992         (DEF_VEC_O(ada_task_info_s)): Remove.
2993         (struct ada_tasks_inferior_data): Initialize fields.
2994         <task_list>: Make an std::vector.
2995         (get_ada_tasks_inferior_data): Allocate with new.
2996         (ada_get_task_number): Adjust.
2997         (get_task_number_from_id): Likewise.
2998         (valid_task_id): Likewise.
2999         (ada_get_task_info_from_ptid): Likewise.
3000         (iterate_over_live_ada_tasks): Likewise.
3001         (add_ada_task): Likewise.
3002         (read_known_tasks): Likewise.
3003         (ada_build_task_list): Likewise.
3004         (print_ada_task_info): Likewise.
3005         (info_task): Likewise.
3006         (task_command_1): Likewise.
3007
3008 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
3009
3010         * ada-lang.c (add_angle_brackets): Return std::string.
3011
3012 2018-08-25  Simon Marchi  <simon.marchi@polymtl.ca>
3013
3014         * python/py-threadevent.c (py_get_event_thread): Initialize
3015         pythread.
3016
3017 2018-08-24  Pedro Alves  <palves@redhat.com>
3018
3019         * python/py-bpevent.c (create_breakpoint_event_object): Use
3020         copy-initialization.
3021         * python/py-continueevent.c (emit_continue_event): Use
3022         copy-initialization.
3023         * python/py-exitedevent.c (create_exited_event_object): Return a
3024         gdbpy_ref<>.
3025         (emit_exited_event): Use copy-initialization.
3026         * python/py-inferior.c (python_new_inferior)
3027         (python_inferior_deleted, add_thread_object): Use
3028         copy-initialization.
3029         * python/py-infevents.c (create_inferior_call_event_object)
3030         (create_register_changed_event_object)
3031         (create_memory_changed_event_object): Return a gdbpy_ref<>.
3032         (emit_inferior_call_event, emit_memory_changed_event)
3033         (emit_register_changed_event): Use copy-initialization.
3034         * python/py-newobjfileevent.c (create_new_objfile_event_object):
3035         Return a gdbpy_ref<>.
3036         (emit_new_objfile_event): Use copy-initialization.
3037         (create_clear_objfiles_event_object): Return a gdbpy_ref<>.
3038         (emit_clear_objfiles_event): Use copy-initialization.
3039         * python/py-signalevent.c (create_signal_event_object): Use
3040         copy-initialization.
3041         * python/py-threadevent.c (create_thread_event_object): Use
3042         copy-initialization.
3043
3044 2018-08-24  Pedro Alves  <palves@redhat.com>
3045             Simon Marchi  <simon.marchi@ericsson.com>
3046
3047         PR gdb/23379
3048         * python/py-continueevent.c: Include "gdbthread.h".
3049         (create_continue_event_object): Add intro comment.  Add 'ptid'
3050         parameter.  Use it to find thread to pass to
3051         create_thread_event_object.
3052         (emit_continue_event): Pass PTID down to
3053         create_continue_event_object.
3054         * python/py-event.h (py_get_event_thread): Declare.
3055         (create_thread_event_object): Remove default from 'thread'
3056         parameter.
3057         * python/py-stopevent.c (create_stop_event_object): Use
3058         py_get_event_thread.
3059         * python/py-threadevent.c (get_event_thread): Rename to ...
3060         (py_get_event_thread): ... this, make extern, add 'ptid' parameter
3061         and use it to find the thread.
3062         (create_thread_event_object): Assert that THREAD isn't null.
3063         Don't find the event thread here.
3064
3065 2018-08-23  Kevin Buettner  <kevinb@redhat.com>
3066
3067         * block.h (blockrange, blockranges): New struct declarations.
3068         (struct block): Add new field named `ranges'.
3069         (BLOCK_RANGES, BLOCK_NRANGES, BLOCK_RANGE, BLOCK_CONTIGUOUS_P)
3070         (BLOCK_RANGE_START, BLOCK_RANGE_END, BLOCK_ENTRY_PC): New
3071         macros for accessing ranges in struct block.
3072         (make_blockranges): New declaration.
3073         block.c (make_blockranges): New function.
3074         * dwarf2read.c (dwarf2_record_block_ranges): Fill in BLOCK_RANGES
3075         for block.
3076         * symtab.h (find_pc_partial_function): Add new parameter `block'.
3077         * blockframe.c (cache_pc_function_block): New static global.
3078         (clear_pc_function_cache): Clear cache_pc_function_block.
3079         (find_pc_partial_function): Move comment to symtab.h.  Add
3080         support for non-contiguous blocks.
3081         * cli/cli-cmds.c (block.h): Include.
3082         (print_disassembly): Handle printing of non-contiguous blocks.
3083         (disassemble_current_function): Likewise.
3084         (disassemble_command): Likewise.
3085
3086         * ax-gdb.c (gen_var_ref): Use BLOCK_ENTRY_PC in place of
3087         BLOCK_START.
3088         * blockframe.c (get_pc_function_start): Likewise.
3089         * compile/compile-c-symbols.c (convert_one_symbol): Likewise.
3090         (gcc_symbol_address): Likewise.
3091         * compile/compile-object-run.c (compile_object_run): Likewise.
3092         * compile/compile.c (get_expr_block_and_pc): Likewise.
3093         * dwarf2loc.c (dwarf2_find_location_expression): Likewise.
3094         (func_addr_to_tail_call_list): Likewise.
3095         * findvar.c (default_read_var_value): Likewise.
3096         * inline-frame.c (inline_frame_this_id): Likewise.
3097         (skip-inline_frames): Likewise.
3098         * infcmd.c (until_next_command): Likewise.
3099         * linespec.c (convert_linespec_to_sals): Likewise.
3100         * parse.c (parse_exp_in_context_1): Likewise.
3101         * printcmd.c (build_address_symbolic): likewise.
3102         (info_address_command): Likewise.
3103         symtab.c (find_function_start_sal): Likewise.
3104         (skip_prologue_sal): Likewise.
3105         (find_function_alias_target): Likewise.
3106         (find_gnu_ifunc): Likewise.
3107         * stack.c (find_frame_funname): Likewise.
3108         * symtab.c (fixup_symbol_section): Likewise.
3109         (find_function_start_sal): Likewise.
3110         (skip_prologue_sal): Likewsie.
3111         (find_function_alias_target): Likewise.
3112         (find_gnu_ifunc): Likewise.
3113         * tracepoint.c (info_scope_command): Likewise.
3114         * value.c (value_fn_field): Likewise.
3115
3116         * infrun.c (fill_in_stop_func): Use find_function_entry_range_from_pc
3117         in place of find_pc_partial_function.
3118         * blockframe.c (find_function_entry_range_from_pc): New function.
3119         * symtab.h (find_function_entry_range_from_pc): Declare and document.
3120         * objfiles.c (objfile_relocate1): Relocate start and end addresses
3121         for each range in a block.
3122
3123
3124 2018-08-23  Xavier Roirand  <roirand@adacore.com>
3125
3126         * machoread.c (macho_symfile_read_all_oso): Remove uneeded
3127         incrementation.
3128
3129 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
3130
3131         * solib-svr4.c (read_program_headers_from_bfd): Return
3132         gdb::optional<gdb::byte_vector>.
3133         (svr4_exec_displacement): Adjust.
3134
3135 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
3136
3137         * solib-svr4.c (read_program_header): Return
3138         gdb::optional<gdb::byte_vector>, remove p_sect_size param.
3139         (find_program_interpreter): Return
3140         gdb::optional<gdb::byte_vector>.
3141         (scan_dyntag_auxv): Adjust.
3142         (enable_break): Adjust.
3143         (svr4_exec_displacement): Adjust.
3144
3145 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
3146
3147         * inf-child.h (inf_child_target) <terminal_save_inferior>: New.
3148         * inf-child.c (inf_child_target::terminal_save_inferior): New.
3149
3150 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
3151
3152         * guile/scm-string.c (gdbscm_scm_from_printf): Use
3153         string_vprintf.
3154         * guile/scm-utils.c (gdbscm_printf): Likewise.
3155         * serial.c (serial_printf): Likewise.
3156         * xml-support.c (gdb_xml_parser::vdebug): Likewise.
3157
3158 2018-08-22  Jan Vrany  <jan.vrany@fit.cvut.cz>
3159
3160         * stack.c (print_frame): Print frame architecture when printing on
3161         an MI output.
3162         * NEWS: Mention new "arch" attribute in frame output.
3163
3164 2018-08-21  Alan Hayward  <alan.hayward@arm.com>
3165
3166         * arch/aarch64.h (aarch64_regnum): Update comment.
3167
3168 2018-08-21  Alan Hayward  <alan.hayward@arm.com>
3169
3170         * NEWS: Add SVE to 8.2 section.
3171
3172 2018-08-21  Pedro Alves  <palves@redhat.com>
3173
3174         * guile/scm-utils.c (gdbscm_parse_function_args_1): New, factored
3175         out from gdbscm_parse_function_args.
3176         (gdbscm_parse_function_args): Rework to use gdbscm_wrap and
3177         gdbscm_parse_function_args_1.
3178
3179 2018-08-21  Simon Marchi  <simon.marchi@ericsson.com>
3180
3181         PR gdb/17816
3182         * m32c-tdep.c (m32c_decode_srcdest4): Remove unnecessary ternary
3183         operator.
3184
3185 2018-08-19  Simon Marchi  <simon.marchi@polymtl.ca>
3186
3187         * solib-svr4.c (svr4_exec_displacement): Fix formatting.
3188
3189 2018-08-19  Michael Spang  <spang@google.com>
3190
3191         PR gdb/11786
3192         * solib-svr4.c (svr4_exec_displacement): Ignore memsz fields
3193         for PT_TLS segments.
3194
3195 2018-08-18  Kevin Buettner  <kevinb@redhat.com>
3196
3197         * dwarf2expr.h (struct dwarf_expr_context): Add virtual method
3198         dwarf_variable_value.
3199         * dwarf2-frame.c (class dwarf_expr_executor):
3200         Add override for dwarf_variable_value.
3201         * dwarf2loc.c (class dwarf_evaluate_loc_desc): Likewise.
3202         (class symbol_needs_eval_context): Likewise.
3203         (indirect_synthetic_pointer): Add forward declaration.
3204         (sect_variable_value): New function.
3205         (dwarf2_compile_expr_to_ax): Add case for DW_OP_GNU_variable_value.
3206         * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Add case
3207         for DW_OP_GNU_variable_value.
3208
3209 2018-08-16  Tom Tromey  <tom@tromey.com>
3210
3211         * top.c (read_command_file): Update.
3212         (command_line_input): Remove "repeat" argument.
3213         * ada-lang.c (get_selections): Update.
3214         * linespec.c (decode_line_2): Update.
3215         * defs.h (command_line_input): Remove argument.
3216         * cli/cli-script.c (read_next_line): Update.
3217         * python/py-gdb-readline.c: Update.
3218
3219 2018-08-17  Tom Tromey  <tom@tromey.com>
3220
3221         * cli/cli-script.c (read_next_line): Pass 0 as repeat argument to
3222         command_line_input.
3223
3224 2018-08-15  Tom Tromey  <tom@tromey.com>
3225
3226         * aarch64-linux-tdep.c (aarch64_linux_core_read_vq): Use pulongest.
3227
3228 2018-08-14  Jan Vrany  <jan.vrany@fit.cvut.cz>
3229
3230         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Add -a option.
3231         If used, use find_pc_partial_function to find address range
3232         to disassemble.
3233         * mi/mi-main.c (mi_cmd_list_features): Report
3234         "data-disassemble-a-option" feature.
3235         * NEWS: Mention new -data-disassemble option -a.
3236
3237 2018-08-13  Tom Tromey  <tom@tromey.com>
3238
3239         * common/common-defs.h (_FORTIFY_SOURCE): Define.
3240
3241 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
3242
3243         * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): New function.
3244         (aarch64_linux_collect_sve_regset): Likewise.
3245         (aarch64_linux_iterate_over_regset_sections): Check for SVE.
3246         * regcache.h (regcache_map_entry_size): New function.
3247
3248 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
3249
3250         * aarch64-linux-tdep.c (SVE_HEADER_SIZE_LENGTH): Add define.
3251         (SVE_HEADER_MAX_SIZE_LENGTH): Likewise.
3252         (SVE_HEADER_VL_LENGTH): Likewise.
3253         (SVE_HEADER_MAX_VL_LENGTH): Likewise.
3254         (SVE_HEADER_FLAGS_LENGTH): Likewise.
3255         (SVE_HEADER_RESERVED_LENGTH): Likewise.
3256         (SVE_HEADER_SIZE_OFFSET): Likewise.
3257         (SVE_HEADER_MAX_SIZE_OFFSET): Likewise.
3258         (SVE_HEADER_VL_OFFSET): Likewise.
3259         (SVE_HEADER_MAX_VL_OFFSET): Likewise.
3260         (SVE_HEADER_FLAGS_OFFSET): Likewise.
3261         (SVE_HEADER_RESERVED_OFFSET): Likewise.
3262         (SVE_HEADER_SIZE): Likewise.
3263         (aarch64_linux_core_read_vq): Add function.
3264         (aarch64_linux_core_read_description): Check for SVE section.
3265
3266 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
3267
3268         * aarch64-fbsd-tdep.c
3269         (aarch64_fbsd_iterate_over_regset_sections): Add supply_size and
3270         collect_size.
3271         * aarch64-linux-tdep.c
3272         (aarch64_linux_iterate_over_regset_sections): Likewise.
3273         * alpha-linux-tdep.c
3274         (alpha_linux_iterate_over_regset_sections):
3275         * alpha-nbsd-tdep.c
3276         (alphanbsd_iterate_over_regset_sections): Likewise.
3277         * amd64-fbsd-tdep.c
3278         (amd64fbsd_iterate_over_regset_sections): Likewise.
3279         * amd64-linux-tdep.c
3280         (amd64_linux_iterate_over_regset_sections): Likewise.
3281         * arm-bsd-tdep.c
3282         (armbsd_iterate_over_regset_sections): Likewise.
3283         * arm-fbsd-tdep.c
3284         (arm_fbsd_iterate_over_regset_sections): Likewise.
3285         * arm-linux-tdep.c
3286         (arm_linux_iterate_over_regset_sections): Likewise.
3287         * corelow.c (get_core_registers_cb): Likewise.
3288         (core_target::fetch_registers): Likewise.
3289         * fbsd-tdep.c (fbsd_collect_regset_section_cb): Likewise.
3290         * frv-linux-tdep.c (frv_linux_iterate_over_regset_sections): Likewise.
3291         * gdbarch.h (void): Regenerate.
3292         * gdbarch.sh: Add supply_size and collect_size.
3293         * hppa-linux-tdep.c (hppa_linux_iterate_over_regset_sections): Likewise.
3294         * hppa-nbsd-tdep.c (hppanbsd_iterate_over_regset_sections): Likewise.
3295         * hppa-obsd-tdep.c (hppaobsd_iterate_over_regset_sections): Likewise.
3296         * i386-fbsd-tdep.c (i386fbsd_iterate_over_regset_sections): Likewise.
3297         * i386-linux-tdep.c (i386_linux_iterate_over_regset_sections): Likewise.
3298         * i386-tdep.c (i386_iterate_over_regset_sections): Likewise.
3299         * ia64-linux-tdep.c (ia64_linux_iterate_over_regset_sections): Likewise.
3300         * linux-tdep.c (linux_collect_regset_section_cb): Likewise.
3301         * m32r-linux-tdep.c (m32r_linux_iterate_over_regset_sections): Likewise.
3302         * m68k-bsd-tdep.c (m68kbsd_iterate_over_regset_sections): Likewise.
3303         * m68k-linux-tdep.c (m68k_linux_iterate_over_regset_sections): Likewise.
3304         * mips-fbsd-tdep.c (mips_fbsd_iterate_over_regset_sections): Likewise.
3305         * mips-linux-tdep.c (mips_linux_iterate_over_regset_sections): Likewise.
3306         * mips-nbsd-tdep.c (mipsnbsd_iterate_over_regset_sections): Likewise.
3307         * mips64-obsd-tdep.c (mips64obsd_iterate_over_regset_sections): Likewise.
3308         * mn10300-linux-tdep.c (am33_iterate_over_regset_sections): Likewise.
3309         * nios2-linux-tdep.c (nios2_iterate_over_regset_sections): Likewise.
3310         * ppc-fbsd-tdep.c (ppcfbsd_iterate_over_regset_sections): Likewise.
3311         * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections): Likewise.
3312         * ppc-nbsd-tdep.c (ppcnbsd_iterate_over_regset_sections): Likewise.
3313         * ppc-obsd-tdep.c (ppcobsd_iterate_over_regset_sections): Likewise.
3314         * riscv-linux-tdep.c (riscv_linux_iterate_over_regset_sections): Likewise.
3315         * rs6000-aix-tdep.c (rs6000_aix_iterate_over_regset_sections): Likewise.
3316         * s390-linux-tdep.c (s390_iterate_over_regset_sections): Likewise.
3317         * score-tdep.c (score7_linux_iterate_over_regset_sections): Likewise.
3318         * sh-tdep.c (sh_iterate_over_regset_sections): Likewise.
3319         * sparc-tdep.c (sparc_iterate_over_regset_sections): Likewise.
3320         * tilegx-linux-tdep.c (tilegx_iterate_over_regset_sections): Likewise.
3321         * vax-tdep.c (vax_iterate_over_regset_sections): Likewise.
3322         * xtensa-tdep.c (xtensa_iterate_over_regset_sections): Likewise.
3323
3324 2018-08-10  Simon Marchi  <simon.marchi@ericsson.com>
3325
3326         * nat/linux-osdata.c (commandline_from_pid): Replace xstrprintf
3327         with string_printf.
3328
3329 2018-08-10  Keith Seitz  <keiths@redhat.com>
3330
3331         * compile/compile-c-support.c (add_code_header, add_code_footer):
3332         Move into policy class.
3333         (c_push_user_expression, pop_user_expression_nop)
3334         (c_add_code_header, c_add_code_footer, c_add_input): New policy class.
3335         (compile_program): New host class.
3336         (c_compile_program): New typedef.
3337         (c_compute_porgram): Use c_compile_program.
3338
3339 2018-08-10  Keith Seitz  <keiths@redhat.com>
3340
3341         * compile/compile-internal.h (compile_instance::~compile_instance):
3342         Remove calls to htab_delete.
3343         <m_type_map, m_symbol_err_map>: Switch type to htab_up.
3344         * compile.c (compile_instance::compile_instance): Initialize
3345         htab unique pointers.
3346         (compile_instance::get_cached_type, compile_instance::insert_type)
3347         (compile_instance::error_symbol_once): Update for unique_ptr.
3348
3349 2018-08-10  Keith Seitz  <keiths@redhat.com>
3350
3351         * compile/compile-c-symbols.c (struct symbol_error)
3352         (hash_symbol_error, eq_symbol_error, del_symbol_error)
3353         (compile_instance::insert_symbol_error)
3354         (compile_instance::error_symbol_once): Move to ...
3355         * compile/compile.c: ... here.
3356
3357 2018-08-10  Keith Seitz  <keiths@redhat.com>
3358
3359         * compile/compile-c-support.c (c_get_compile_context): Use `new'
3360         instead of `new_compile_instance'.
3361         * compile/compile-c-symbols.c (compile_instance::insert_symbol_error):
3362         Update description.
3363         If the symbol error map is not initialized, create it.
3364         (generate_c_for_for_one_symbol): Do not check/initialize
3365         the symbol error map.
3366         * compile/compile-c-types.c (compile_c_instance): Make a class.
3367         Update all callers.
3368         (compile_instance::compile_instance): Initialize the type cache.
3369         (get_cached_type): New function.
3370         (insert_type): Update description.
3371         (compile_c_instance::m_default_cflags): Define.
3372         (convert_type): Update description.  Use get_cached_type.
3373         (delete_instance): Moved to destructor.
3374         (new_compile_instance): Moved to constructor.
3375         * compile/compile-c.h (compile_c_instance): Make class inheriting
3376         from compile_instance.
3377         <base>: Remove field.
3378         <type_map, symbol_err_map>: Move to base class.
3379         <c_plugin>: Rename to `m_plugin' and remove pointer type.
3380         * compile/compile-internal.h (compile_instance): Make class.
3381         <type_map_t, symbol_err_map_t>: Define.
3382         <fe>: Rename to `m_gcc_fe'.
3383         <scope, block, gcc_target_options>: Add `m_' prefix.
3384         <m_type_map, m_symbol_err_map>: New fields, moved from
3385         compile_c_instance.
3386         <destroy>: Remove.
3387         (convert_type, new_compile_instance): Remove.
3388         * compile/compile.c (cleanup_compile_instance): Remove.
3389         (compile_to_object): Use unique_ptr to eliminate cleanups.
3390         (compile_instance::set_print_callback, compile_instance::version)
3391         (compile_instance::set_verbose)
3392         (compile_instance::set_driver_filename)
3393         (compile_instance::set_triplet_regexp)
3394         (compile_instance::set_arguments)
3395         (compile_instance::set_source_file)
3396         (compile_instance::compile): Define.
3397
3398 2018-08-10  Keith Seitz  <keiths@redhat.com>
3399
3400         * Makefile.in (HFILES_NO_SRCDIR): Add compile/gcc-c-plugin.h.
3401         * compile/compile-c-types.c: Define GCC_METHODN macros and include
3402         gcc-c-fe.def to define C plugin.
3403         (delete_instance): Delete `c_plugin'.
3404         (new_compile_instance): Initialize `c_plugin'.
3405         * compile/compile-c.h: Include gcc_c_plugin.h.
3406         (struct compile_c_instance) <c_plugin>: New member.
3407         * gcc-c-plugin.h: New file.
3408         Update all callers with API change.
3409
3410 2018-08-10  Keith Seitz  <keiths@redhat.com>
3411
3412         * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Move header files ...
3413         (HFILES_NO_SRCDIR): ... to here.
3414         Add compile-internal.h and compile-c.h.
3415         * compile/compile-c-support.c: Include compile-c.h.
3416         * compile/compile-c-symbols.c: Include compile-c.h.
3417         (generate_c_for_variable_locations): Update comment.
3418         * compile/compile-c-types.c: Include compile-c.h.
3419         * compile/compile-c.h: New file -- moved C language declarations
3420         from other files here.
3421         * compile/compile-internal.h: Do not include hashtab.h or
3422         common/enum-flags.h.
3423         (gcc_qualifiers_flags, struct compile_c_instance, C_CTX)
3424         (gcc_convert_symbol, gcc_symbol_address)
3425         (generate_c_for_variable_locations, c_get_mode_for_size)
3426         (c_get_range_decl_name): Definitions moved to compile-c.h.
3427         * compile/compile-loc2c.c: Include compile-c.h.
3428
3429 2018-08-10  Keith Seitz  <keiths@redhat.com>
3430
3431         * compile/compile-c-symbols.c (symbol_substitution_name): Rename to ...
3432         (c_symbol_substitution_name): ... this.
3433         Update all callers.
3434
3435 2018-08-10  Keith Seitz  <keiths@redhat.com>
3436
3437         * compile/compile-c-support.c (c_compute_program): Use
3438         unique_xmalloc_ptr to eliminate cleanup.
3439         * compile/compile-c-symbols.c (generate_c_for_variable_locations):
3440         Return a unique_xmalloc_ptr and eliminate cleanup.
3441         * compile/compile-internal.h (generate_c_for_variable_locations):
3442         Return unique_xmalloc_ptr and update description.
3443
3444 2018-08-10  Alan Hayward  <alan.hayward@arm.com>
3445
3446         * corelow.c (core_target::get_core_register_section): Rename
3447         min_size to section_min_size.
3448
3449 2018-08-09  Jim Wilson  <jimw@sifive.com>
3450
3451         * Makefile.in (ALL_TARGET_OBS): Add riscv-linux-tdep.c.
3452         (ALLDEPFILES): Add riscv-linux-nat.c, and riscv-linux-tdep.c.
3453         * NEWS: Mention new GNU/Linux RISC-V target.
3454         * configure.host: Add riscv*-*-linux*.
3455         * configure.nat: Add riscv*.
3456         * configure.tgt: Add riscv*-*-linux*.
3457         * riscv-linux-nat.c: New file.
3458         * riscv-linux-tdep.c: New file.
3459
3460 2018-08-09  Andrew Burgess  <andrew.burgess@embecosm.com>
3461
3462         * infrun.c (resume): Make static, add forward declaration.
3463         (proceed): Update header comment.
3464         * infrun.h (resume): Delete declaration.
3465
3466 2018-08-09  Tom Tromey  <tom@tromey.com>
3467
3468         * riscv-tdep.h: Minor formatting fixes.
3469
3470 2018-08-09  Simon Marchi  <simon.marchi@ericsson.com>
3471
3472         * common/scoped_mmap.c (mmap_file): Silence ARI warning.
3473         * dwarf-index-cache.c (create_dir_and_check): Likewise.
3474         (test_mkdir_recursive): Likewise.
3475         * dwarf-index-write.c (write_psymtabs_to_index): Likewise.
3476
3477 2018-08-09  Andrew Burgess  <andrew.burgess@embecosm.com>
3478
3479         * valarith.c (value_subscripted_rvalue): If an array is not in
3480         memory, and we don't know the upper bound, then we can't know that
3481         the requested element exists or not.
3482
3483 2018-08-08  Simon Marchi  <simon.marchi@ericsson.com>
3484
3485         * target.c (str_comma_list_concat_elem): Fix typo in comment.
3486         (target_options_to_string): Add comment.
3487
3488 2018-08-08  Tom Tromey  <tom@tromey.com>
3489
3490         * unittests/scoped_mmap-selftests.c: Check result of "write".
3491
3492 2018-08-08  Jim Wilson  <jimw@sifive.com>
3493
3494         * riscv-tdep.c (enum opcode): Add jump, branch, lr, and sc opcodes.
3495         (decode_register_index_short): New.
3496         (decode_j_type_insn, decode_cj_type_insn): New.
3497         (decode_b_type_insn, decode_cb_type_insn): New.
3498         (riscv_insn::decode): Add support for jumps, branches, lr, and sc.  New
3499         local xlen.  Check xlen when decoding ambiguous compressed insns.  In
3500         compressed decode, use is_c_lui_insn instead of is_lui_insn, and
3501         is_c_sw_insn instead of is_sw_insn.
3502         (riscv_next_pc, riscv_next_pc_atomic_sequence): New.
3503         (riscv_software_single_step): New.
3504         * riscv-tdep.h (riscv_software_single_step): Declare.
3505
3506         * riscv-tdep.c (riscv_isa_xlen): Drop static.
3507         * riscv-tdep.h (riscv_isa_xlen): Add extern declaration.
3508
3509 2018-08-08  Andrew Burgess  <andrew.burgess@embecosm.com>
3510
3511         PR gdb/18050:
3512         * target.c (dispose_inferior): Don't dispose of inferiors that are
3513         already killed.
3514
3515 2018-08-08  Szabolcs Nagy  <szabolcs.nagy@arm.com>
3516
3517         * remote.c (remote_target::download_tracepoint): Change char* to
3518         const char*.
3519
3520 2018-08-07  Simon Marchi  <simon.marchi@polymtl.ca>
3521
3522         * target.h (target_options_to_string): Return an std::string.
3523         * target.c (str_comma_list_concat_elem): Return void, use
3524         std::string.
3525         (do_option): Likewise.
3526         (target_options_to_string): Return an std::string.
3527         * linux-nat.c (linux_nat_target::wait): Adjust.
3528         * target-debug.h (target_debug_print_options): Adjust.
3529
3530 2018-08-07  Tom Tromey  <tom@tromey.com>
3531
3532         * Makefile.in (CPPFLAGS): New variable.
3533         (INTERNAL_CPPFLAGS): Use it.
3534
3535 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
3536
3537         * NEWS: Mention the index cache.
3538
3539 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
3540
3541         * common/pathstuff.h (get_standard_cache_dir): New.
3542         * common/pathstuff.c (get_standard_cache_dir): New.
3543         * build-id.h (build_id_to_string): New.
3544         * dwarf-index-common.h (INDEX4_SUFFIX, INDEX5_SUFFIX,
3545         DEBUG_STR_SUFFIX): Move to here.
3546         * dwarf-index-write.c (INDEX4_SUFFIX, INDEX5_SUFFIX,
3547         DEBUG_STR_SUFFIX): Move from there.
3548         (write_psymtabs_to_index): Make non-static, add basename
3549         parameter.  Write to temporary files, rename when done.
3550         (save_gdb_index_command): Adjust call to
3551         write_psymtabs_to_index.
3552         * dwarf2read.h (dwarf2_per_objfile) <index_cache_res>: New
3553         field.
3554         * dwarf2read.c (dwz_file) <index_cache_res>: New field.
3555         (get_gdb_index_contents_from_cache): New.
3556         (get_gdb_index_contents_from_cache_dwz): New.
3557         (dwarf2_initialize_objfile): Read index from cache.
3558         (dwarf2_build_psymtabs): Save to index.
3559         * dwarf-index-cache.h: New file.
3560         * dwarf-index-cache.c: New file.
3561         * dwarf-index-write.h: New file.
3562
3563 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
3564
3565         * gnulib/aclocal.m4: Re-generate.
3566         * gnulib/config.in: Re-generate.
3567         * gnulib/configure: Re-generate.
3568         * gnulib/import/Makefile.am: Re-generate.
3569         * gnulib/import/Makefile.in: Re-generate.
3570         * gnulib/import/m4/gnulib-cache.m4: Re-generate.
3571         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
3572         * gnulib/import/m4/mkdir.m4: New file.
3573         * gnulib/import/mkdir.c: New file.
3574         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkdir
3575         module.
3576
3577 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
3578
3579         * Makefile.in (COMMON_SFILES): Add common/scoped_mmap.c.
3580         * common/scoped_mmap.c: New file.
3581         * common/scoped_mmap.h (destroy): New method.
3582         (~scoped_mmap, reset): Use destroy.
3583         (scoped_mmap): New move constructor.
3584         (mmap_file): New declaration.
3585         * unittests/scoped_mmap-selftests.c (test_normal,
3586         test_invalid_filename, run_tests): New functions.
3587         (_initialize_scoped_mmap_selftests): Register selftest.
3588
3589 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
3590
3591         * dwarf2read.c (read_gdb_index_from_section): Rename to...
3592         (read_gdb_index_from_buffer): ... this.  Remove section
3593         parameter, add buffer parameter.
3594         (get_gdb_index_contents_ftype,
3595         get_gdb_index_contents_dwz_ftype): New typedefs.
3596         (dwarf2_read_gdb_index): Add callback parameters to get the
3597         index contents.
3598         (get_gdb_index_contents_from_section): New.
3599         (dwarf2_initialize_objfile): Update call to
3600         dwarf2_read_gdb_index.
3601
3602 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
3603
3604         * common/filestuff.h (gdb_fopen_cloexec): New overload.
3605         (gdb_open_cloexec): Likewise.
3606         * nat/linux-osdata.c (command_from_pid): Use string_printf.
3607         (commandline_from_pid): Likewise.
3608         (linux_xfer_osdata_threads): Likewise.
3609         (linux_xfer_osdata_fds): Likewise.
3610         * ada-lang.c (is_package_name): Likewise.
3611         * auxv.c (procfs_xfer_auxv): Likewise.
3612         * breakpoint.c (print_one_breakpoint_location): Use
3613         uiout::field_fmt.
3614         (print_one_catch_solib): Use string_printf.
3615         * coff-pe-read.c (add_pe_exported_sym): Likewise.
3616         (add_pe_forwarded_sym): Likewise.
3617         * dwarf2read.c (create_type_unit_group): Likewise.
3618         (build_error_marker_type): Likewise.
3619         * infcall.c (get_function_name): Likewise.
3620         * valprint.c (print_converted_chars_to_obstack): Likewise.
3621         * xtensa-tdep.c (xtensa_register_type): Likewise.
3622
3623 2018-08-06  Simon Marchi  <simon.marchi@ericsson.com>
3624
3625         * remote.c (remote_target::download_tracepoint): Fix format
3626         string errors.
3627
3628 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
3629
3630         * tracefile.c: Include common/byte-vector.h.
3631         (trace_save): Change type of buf to gdb::byte_vector.  Initialize
3632         with trace_regblock_size if needed.  Update uses of buf.
3633
3634 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
3635
3636         * tracepoint.h (collection_list) <m_regs_mask>: Change type to
3637         std::vector<unsigned char>.
3638         * tracepoint.c (collection_list::collection_list): Remove
3639         m_regs_mask initializer from initializer list.  Resize
3640         m_regs_mask using the largest remote register number.
3641         (collection_list::add_remote_register): Remove size check on
3642         m_regs_mask.  Use at to access element.
3643         (collection_list::stringify): Change type of temp_buf to
3644         gdb::char_vector.  Update uses of temp_buf.  Resize if needed to
3645         stringify the register mask.  Use pack_hex_byte for the register
3646         mask.
3647
3648 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
3649
3650         * tracepoint.h (class collection_list) <add_register>: Remove.
3651         <add_remote_register, add_ax_registers, add_local_register>:
3652         Declare.
3653         <add_memrange>: Add scope parameter.
3654         * tracepoint.c (encode_actions_1): Likewise.
3655         (collection_list::add_register): Rename to ...
3656         (collection_list::add_remote_register): ... this.  Update
3657         comment.
3658         (collection_list::add_ax_registers, add_local_register): New
3659         methods.
3660         (collection_list::add_memrange): Add scope parameter.  Call
3661         add_local_register instead of add_register.
3662         (finalize_tracepoint_aexpr): New function.
3663         (collection_list::collect_symbol): Update calls to add_memrange.
3664         Call add_local_register instead of add_register.  Call
3665         add_ax_registers.  Call finalize_tracepoint_aexpr.
3666         (encode_actions_1): Get remote regnos for $reg action.  Call
3667         add_remote_register, add_ax_registers, and add_local_register.
3668         Update call to add_memrange.  Call finalize_tracepoint_aexpr.
3669         (validate_actionline): Call finalize_tracepoint_aexpr.
3670
3671 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
3672
3673         * remote.c (remote_target::download_tracepoint): Remove BUF_SIZE.
3674         Replace array buf with gdb::char_vector buf, of size
3675         get_remote_packet_size ().  Replace references to buf and
3676         BUF_SIZE to buf.data () and buf.size ().  Replace strcpy, strcat
3677         and xsnprintf with snprintf.  Raise errors if the buffer is too
3678         small.
3679
3680 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
3681
3682         * remote.c (remote_target::download_tracepoint): Fix the has_more
3683         predicate in the QTDP action list iteration.
3684
3685 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
3686
3687         * remote.c (remote_target::download_tracepoint): Fix indentation
3688         in for block.
3689
3690 2018-08-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
3691
3692         * proc-api.c (_initialize_proc_api): Remove c, unused.
3693         * procfs.c (procfs_init_inferior): Remove signals, unused.
3694         (procfs_target::make_corefile_notes): Remove old_chain, fpregs,
3695         unused.
3696
3697 2018-08-06  Sergey Korolev  <s.korolev@ndmsystems.com>
3698             Andrew Burgess  <andrew.burgess@embecosm.com>
3699
3700         * linux-nat.c (linux_nat_target::follow_fork): Avoid using
3701         'W_STOPCODE (0)' as this could be ambiguous.
3702
3703 2018-08-03  Sergio Durigan Junior  <sergiodj@redhat.com>
3704
3705         * ser-tcp.c (net_open): Fix thinko when deciding whether to
3706         disable TCP's Nagle algorithm (use "ai_protocol" instead of
3707         "ai_socktype").
3708
3709 2018-08-02  Tom Tromey  <tom@tromey.com>
3710
3711         PR symtab/16842.
3712         * dwarf2read.c (read_func_scope): Set symtab on template parameter
3713         symbols.
3714         (process_structure_scope): Likewise.
3715
3716 2018-08-02  Xavier Roirand  <roirand@adacore.com>
3717
3718         PR gdb/22629:
3719         * darwin-nat.c (darwin_kill_inferior): Fix handling of
3720         kill inferior.
3721
3722 2018-08-02  Tom Tromey  <tom@tromey.com>
3723
3724         * darwin-nat.c (find_inferior_task_it, darwin_find_thread)
3725         (darwin_suspend_inferior, darwin_resume_inferior)
3726         (darwin_decode_notify_message, darwin_resume_inferior_threads)
3727         (darwin_check_new_threads): Check result of get_darwin_inferior.
3728
3729 2018-07-31  Joel Brobecker  <brobecker@adacore.com>
3730
3731         GDB 8.1.1 released.
3732
3733 2018-07-31  Jan Vrany  <jan.vrany@fit.cvut.cz>
3734
3735         * varobj.c (varobj_get_path_expr_parent): Report an error if
3736         parent is a dynamic varobj.
3737
3738 2018-07-31  Simon Marchi  <simon.marchi@ericsson.com>
3739
3740         * gnulib/aclocal.m4: Re-generate.
3741         * gnulib/config.in: Re-generate.
3742         * gnulib/configure: Re-generate.
3743         * gnulib/import/Makefile.in: Re-generate.
3744         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
3745         * gnulib/import/m4/onceonly.m4: Re-generate.
3746
3747 2018-07-31  Simon Marchi  <simon.marchi@ericsson.com>
3748
3749         * target-descriptions.c (struct xml_test_tdesc): New.
3750         (xml_tdesc): Change type to std::vector<xml_test_tdesc>.
3751         (record_xml_tdesc): Update.
3752         (maintenance_check_xml_descriptions): Update.
3753         * target-descriptions.h (record_xml_tdesc): Update comment.
3754
3755 2018-07-30  Andrew Burgess  <andrew.burgess@embecosm.com>
3756
3757         * eval.c (evaluate_subexp_for_sizeof): Check for array type before
3758         checking array bounds are defined.
3759
3760 2018-07-30  Tom Tromey  <tom@tromey.com>
3761
3762         * nat/linux-osdata.c (pid_pgid_entry::operator<): Fix
3763         irreflexivity violation.
3764
3765 2018-07-30  Tom Tromey  <tom@tromey.com>
3766
3767         * cli/cli-decode.c (lookup_cmd): Remove lint code.
3768         * value.c (unpack_long): Remove lint code.
3769         * valops.c (value_ind): Remove lint code.
3770         * valarith.c (value_x_binop, value_x_unop, value_equal)
3771         (value_pos): Remove lint code.
3772
3773 2018-07-28  Tom de Vries  <tdevries@suse.de>
3774
3775         * eval.c (evaluate_subexp_for_sizeof): Interpret size of dynamic type
3776         with undefined upper bound as <optimized out>.
3777
3778 2018-07-27  Sergio Durigan Junior  <sergiodj@redhat.com>
3779
3780         * gcore.in: Rename variable "name" to "prefix".  Expand
3781         "usage" text.
3782
3783 2018-07-14  Jon Turney  <jon.turney@dronecode.org.uk>
3784
3785         * windows-nat.c (windows_nat_target::create_inferior): Update to
3786         call close() in global namespace.
3787
3788 2018-07-26  Tom Tromey  <tom@tromey.com>
3789
3790         * dwarf-index-write.c (add_address_entry): Don't add objfile
3791         offsets.
3792         * dbxread.c (find_stab_function): Rename from
3793         find_stab_function_addr.  Return a bound_minimal_symbol.
3794         (read_dbx_symtab): Use raw_text_low, raw_text_high.
3795         Don't add objfile offsets.
3796         (end_psymtab): Use raw_text_low, raw_text_high,
3797         MSYMBOL_VALUE_RAW_ADDRESS.
3798         (read_ofile_symtab): Update.
3799         (process_one_symbol): Update.
3800         * dwarf2read.c (create_addrmap_from_index): Don't add objfile
3801         offsets.
3802         (dw2_relocate): Remove.
3803         (dw2_find_pc_sect_symtab): Bias PC by the text offset before
3804         searching addrmap.
3805         (dwarf2_gdb_index_functions, dwarf2_debug_names_functions):
3806         Update.
3807         (process_psymtab_comp_unit_reader, add_partial_symbol)
3808         (add_partial_subprogram, dwarf2_ranges_read): Update.
3809         (load_partial_dies): Update.
3810         (add_address_entry): Don't add objfile offsets.
3811         (dwarf2_build_include_psymtabs): Update.
3812         (create_addrmap_from_aranges): Don't add objfile offsets.
3813         (dw2_find_pc_sect_compunit_symtab): Update.
3814         * mdebugread.c (parse_symbol): Don't add objfile offsets.
3815         (parse_lines): Remove 'pst' parameter, replace with 'textlow'.
3816         Update.
3817         (parse_partial_symbols): Don't add objfile offsets.  Use
3818         raw_text_low, raw_text_high.  Update.
3819         (handle_psymbol_enumerators, psymtab_to_symtab_1): Update.
3820         * objfiles.c (objfile_relocate1): Don't relocate psymtabs_addrmap
3821         or call 'relocate' quick function.  Clear psymbol_map.
3822         * psympriv.h (struct partial_symbol) <address>: Add section
3823         offset.
3824         <set_unrelocated_address>: Rename from set_address.
3825         <raw_text_low, raw_text_high>: New methods.
3826         <text_low, text_high>: Add objfile parameter.
3827         (add_psymbol_to_bcache): Add 'section' parameter.  Call
3828         set_unrelocated_address.
3829         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
3830         (find_pc_psymbol): Update.
3831         (fixup_psymbol_section, relocate_psymtabs): Remove.
3832         (dump_psymtab, psym_functions): Update.
3833         (add_psymbol_to_bcache, add_psymbol_to_list): Add 'section'
3834         parameter.
3835         (maintenance_info_psymtabs, maintenance_check_psymtabs): Update.
3836         (start_psymtab_common): Update.
3837         * symfile-debug.c (debug_qf_relocate): Remove.
3838         (debug_sym_quick_functions): Update.
3839         * symfile.h (struct quick_symbol_functions) <relocate>: Remove.
3840         * xcoffread.c (scan_xcoff_symtab): Don't add objfile offsets.
3841         Update.
3842
3843 2018-07-26  Tom Tromey  <tromey@redhat.com>
3844
3845         * dbxread.c (end_psymtab): Use text_high_valid and
3846         text_low_valid.
3847         * mdebugread.c (parse_partial_symbols): Use text_low_valid.
3848         (psymtab_to_symtab_1): Use text_high_valid and text_low_valid.
3849         * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
3850         Update comment.
3851         <text_low_valid, text_high_valid>: New fields.
3852         <set_text_low, set_text_high>: Update.
3853         * xcoffread.c (scan_xcoff_symtab): Use text_low_valid.
3854
3855 2018-07-26  Tom Tromey  <tom@tromey.com>
3856
3857         * dbxread.c (read_dbx_symtab, end_psymtab, read_ofile_symtab):
3858         Update.
3859         * dwarf2read.c (dwarf2_create_include_psymtab): Don't initialize
3860         textlow and texthigh fields.
3861         (process_psymtab_comp_unit_reader, dwarf2_build_include_psymtabs):
3862         Update.
3863         * mdebugread.c (parse_lines, parse_partial_symbols)
3864         (psymtab_to_symtab_1): Update.
3865         * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
3866         Rename fields.  Update comment.  Now private.
3867         <text_low, text_high, set_text_low, set_text_high>: New methods.
3868         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
3869         (find_pc_sect_psymbol, relocate_psymtabs, dump_psymtab)
3870         (start_psymtab_common, maintenance_info_psymtabs)
3871         (maintenance_check_psymtabs): Update.
3872         * xcoffread.c (xcoff_end_psymtab): Don't initialize textlow and
3873         texthigh fields.
3874         (scan_xcoff_symtab): Update.
3875
3876 2018-07-26  Tom Tromey  <tromey@redhat.com>
3877
3878         * psympriv.h (struct partial_symbol) <unrelocated_address,
3879         address, set_address>: New methods.
3880         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymbol)
3881         (fixup_psymbol_section, relocate_psymtabs): Update.
3882         (print_partial_symbols): Add 'objfile' parameter.  Update.
3883         (dump_psymtab, add_psymbol_to_bcache, psym_fill_psymbol_map):
3884         Update.
3885
3886 2018-07-26  Tom Tromey  <tom@tromey.com>
3887
3888         * dwarf-index-write.c (write_psymbols, debug_names::insert)
3889         (debug_names::write_psymbols): Update.
3890         * psympriv.h (struct partial_symbol): Derive from
3891         general_symbol_info.
3892         <obj_section>: New method.
3893         (PSYMBOL_DOMAIN, PSYMBOL_CLASS): Remove.n
3894         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
3895         (find_pc_sect_psymbol, fixup_psymbol_section)
3896         (match_partial_symbol, lookup_partial_symbol, relocate_psymtabs)
3897         (print_partial_symbols, recursively_search_psymtabs)
3898         (compare_psymbols, psymbol_hash, psymbol_compare)
3899         (add_psymbol_to_bcache, maintenance_check_psymtabs)
3900         (psymbol_name_matches, psym_fill_psymbol_map): Update.
3901
3902 2018-07-26  Tom Tromey  <tromey@redhat.com>
3903
3904         * dbxread.c (end_psymtab): Remove dead code.
3905
3906 2018-07-26  Andrew Burgess  <andrew.burgess@embecosm.com>
3907
3908         * dwarf2-frame-tailcall.c (tailcall_frame_sniffer): Exit early if
3909         DWARF unwinders are disabled.
3910         * dwarf2-frame.c: Add dwarf2read.h include.
3911         (dwarf2_frame_sniffer): Exit early if DWARF unwinders are
3912         disabled.
3913         (dwarf2_frame_unwinders_enabled_p): Define.
3914         (show_dwarf_unwinders_enabled_p): New function.
3915         (_initialize_dwarf2_frame): Register switch to control DWARF
3916         unwinder use.
3917         * dwarf2-frame.h (dwarf2_frame_unwinders_enabled_p): Declare.
3918         * dwarf2read.c (set_dwarf_cmdlist): Remove static keyword.
3919         (show_dwarf_cmdlist): Remove static keyword.
3920         * dwarf2read.h (set_dwarf_cmdlist): Declare.
3921         (show_dwarf_cmdlist): Declare.
3922         * NEWS: Document new feature.
3923
3924 2018-07-26  Tom de Vries  <tdevries@suse.de>
3925
3926         PR breakpoints/23366
3927         * infcmd.c (info_program_command): Handle ptid == minus_one_ptid.
3928
3929 2018-07-26  Tom de Vries  <tdevries@suse.de>
3930
3931         * dwarf2read.c (read_subrange_type): Warn if DW_AT_upper_bound or
3932         DW_AT_count can't be translated to a dynamic prop.
3933
3934 2018-07-25  Tom de Vries  <tdevries@suse.de>
3935
3936         * dwarf2loc.c (dwarf2_locexpr_baton_eval): Wrap ctx.eval call in
3937         try/catch.
3938
3939 2018-07-25  Jan Vrany  <jan.vrany@fit.cvut.cz>
3940
3941         * breakpoint.c (enable_disable_bp_num_loc): Notify observers.
3942
3943 2018-07-25  Joel Brobecker  <brobecker@adacore.com>
3944
3945         * MAINTAINERS (Global Maintainers): Add Tom Tromey.
3946
3947 2018-07-24  Keith Seitz  <keiths@redhat.comt
3948
3949         PR symtab/23010
3950         * dwarf2read.c (dw2_add_symbol_to_list): New function.
3951         (fixup_go_packaging, new_symbol): Use dw2_add_symbol_to_list
3952         instead of add_symbol_to_list.
3953         (read_file_scope): Call prepare_one_comp_unit before reading
3954         any other DIEs.
3955
3956 2018-07-24  Simon Marchi  <simon.marchi@ericsson.com>
3957
3958         * common/scoped_mmap.h (class scoped_mmap): Fix indentation.
3959
3960 2018-07-24  Tom Tromey  <tom@tromey.com>
3961
3962         * utils.c (malloc, realloc, free): Don't declare.
3963         * configure, config.in: Rebuild.
3964         * configure.ac: Don't check for declarations of free, malloc, or
3965         realloc.
3966
3967 2018-07-22  Simon Marchi  <simon.marchi@polymtl.ca>
3968
3969         * aarch64-linux-nat.c
3970         (aarch64_linux_nat_target::stopped_data_address): Remove unused
3971         variable.
3972         * arm-linux-nat.c (fetch_regs): Likewise.
3973         (store_regs): Likewise.
3974         (fetch_vfp_regs): Likewise.
3975         (store_vfp_regs): Likewise.
3976         (arm_linux_nat_target::insert_hw_breakpoint): Likewise.
3977         (arm_linux_nat_target::remove_hw_breakpoint): Likewise.
3978         (arm_linux_nat_target::insert_watchpoint): Likewise.
3979         (arm_linux_nat_target::remove_watchpoint): Likewise.
3980         * mips-linux-nat.c (mips_linux_nat_target::insert_watchpoint):
3981         Likewise.
3982         * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs):
3983         Likewise.
3984         * ppc-linux-nat.c (fetch_register): Likewise.
3985         (fetch_all_gp_regs): Likewise.
3986         (fetch_ppc_registers): Likewise.
3987         (store_all_gp_regs): Likewise.
3988         (store_ppc_registers): Likewise.
3989         (hwdebug_insert_point): Likewise.
3990         (can_use_watchpoint_cond_accel): Likewise.
3991         * remote-sim.c (gdb_os_write_stdout): Likewise.
3992
3993 2018-07-22  Simon Marchi  <simon.marchi@polymtl.ca>
3994             Tom Tromey  <tom@tromey.com>
3995
3996         * warning.m4 (AM_GDB_WARNINGS): Add -Wunused-variable and special
3997         test for it.
3998         * configure: Rebuild.
3999
4000 2018-07-22  Tom Tromey  <tom@tromey.com>
4001
4002         * regformats/regdat.sh: Define xmltarget_${name} inside
4003         #ifndef IN_PROCESS_AGENT.
4004
4005 2018-07-22  Tom Tromey  <tom@tromey.com>
4006
4007         * value.c (value_fetch_lazy_bitfield): Remove unused variable.
4008
4009 2018-07-22  Tom Tromey  <tom@tromey.com>
4010
4011         * symfile.c (reread_symbols): Notify iter, not objfile.
4012
4013 2018-07-22  Tom Tromey  <tom@tromey.com>
4014
4015         * ravenscar-thread.c (ravenscar_thread_target::store_registers):
4016         Use arch_ops.
4017         (ravenscar_thread_target::prepare_to_store): Likewise.
4018
4019 2018-07-22  Tom Tromey  <tom@tromey.com>
4020
4021         * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Remove
4022         unused variable.  Call value_fetch_lazy when needed.
4023         * guile/scm-pretty-print.c (gdbscm_apply_val_pretty_printer):
4024         Remove unused variable.  Call value_fetch_lazy when needed.
4025
4026 2018-07-22  Tom Tromey  <tom@tromey.com>
4027
4028         * m32c-tdep.c (mark_dma): Return void.
4029         (make_regs): Remove unused declarations.
4030
4031 2018-07-22  Tom Tromey  <tom@tromey.com>
4032
4033         * guile/scm-cmd.c (gdbscm_dont_repeat): Call
4034         cmdscm_get_valid_command_smob_arg_unsafe for effect.
4035         * guile/scm-block.c (gdbscm_make_block_syms_iter): Call
4036         bkscm_get_valid_block_smob_arg_unsafe for effect.
4037
4038 2018-07-22  Tom Tromey  <tom@tromey.com>
4039
4040         * bfin-tdep.c (bfin_push_dummy_call): Use arg_type, not
4041         value_type.
4042
4043 2018-07-22  Tom Tromey  <tom@tromey.com>
4044
4045         * windows-nat.c (saved_context): Conditionally define.
4046         * remote.c (remote_target::remote_btrace_maybe_reopen):
4047         Conditionally declare "warned".
4048         * inflow.c (sigquit_ours): Conditionally define.
4049         (new_tty): Move "tty" declaration inside #if.
4050         * guile/guile.c (guile_datadir): Conditionally define.
4051         * charset.c (set_be_le_names): Move some declarations inside #if.
4052         * btrace.c (parse_xml_btrace): Move "errcode" declaration inside
4053         #if.
4054         (parse_xml_btrace_conf): Likewise.
4055
4056 2018-07-22  Tom Tromey  <tom@tromey.com>
4057
4058         * spu-tdep.c (spu_get_overlay_table): Remove unused variable.
4059
4060 2018-07-22  Tom Tromey  <tom@tromey.com>
4061
4062         * guile/scm-value.c (gdbscm_value_call): Remove unused variables.
4063         * guile/scm-math.c (vlscm_unop_gdbthrow, vlscm_binop_gdbthrow)
4064         (vlscm_convert_typed_value_from_scheme): Remove unused variable.
4065         * buildsym-legacy.c (get_macro_table): Remove unused variable.
4066         * stack.c (frame_apply_level_command): Remove unused variable.
4067         * tic6x-tdep.c (tic6x_push_dummy_call): Remove unused variable.
4068         * sparc64-tdep.c (adi_examine_command): Remove unused variable.
4069         * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Remove
4070         unused variable.
4071         * nios2-tdep.c (nios2_push_dummy_call): Remove unused variable.
4072         * mep-tdep.c (mep_push_dummy_call): Remove unused variable.
4073         * ada-lang.c (ada_lookup_symbol_list_worker): Remove unused
4074         variable.
4075         * amd64-tdep.c (amd64_supply_xsave): Remove unused variable.
4076         * arm-tdep.c (arm_record_data_proc_misc_ld_str): Remove unused
4077         variable.
4078         * breakpoint.c (check_no_tracepoint_commands, update_watchpoint):
4079         Remove unused variable.
4080         * cli/cli-script.c (recurse_read_control_structure): Remove unused
4081         variable.
4082         * common/tdesc.c (print_xml_feature::visit): Remove unused
4083         variable.
4084         * compile/compile-object-load.c (store_regs): Remove unused
4085         variables.
4086         * complaints.c (clear_complaints): Remove unused variable.
4087         * corelow.c (core_target_open): Remove unused variable.
4088         * fbsd-tdep.c (fbsd_core_info_proc_status): Remove unused
4089         variable.
4090         * guile/scm-frame.c (gdbscm_frame_read_var): Remove unused
4091         variable.
4092         * guile/scm-symtab.c (stscm_print_sal_smob): Remove unused
4093         variable.
4094         * guile/scm-type.c (gdbscm_field_baseclass_p): Remove unused
4095         variable.
4096         * guile/scm-utils.c (gdbscm_parse_function_args): Remove unused
4097         variable.
4098         * hppa-tdep.c (hppa_stub_frame_unwind_cache): Remove unused
4099         variable.
4100         * ia64-tdep.c (examine_prologue): Remove unused variable.
4101         * infcall.c (run_inferior_call): Remove unused variable.
4102         * inferior.c (exit_inferior): Remove unused variable.
4103         * infrun.c (infrun_thread_ptid_changed): Remove unused variable.
4104         * linespec.c (decode_line_2): Remove unused variable.
4105         * linux-nat.c (super_close): Remove.
4106         * linux-tdep.c (linux_info_proc): Remove unused variable.
4107         * mi/mi-main.c (mi_execute_command): Remove unused variable.
4108         * microblaze-linux-tdep.c (microblaze_linux_sigtramp_cache):
4109         Remove unused variable.
4110         * parse.c (find_minsym_type_and_address): Remove unused variable.
4111         * printcmd.c (info_symbol_command, printf_floating): Remove unused
4112         variable.
4113         * python/py-breakpoint.c (bppy_set_commands): Remove unused
4114         variable.
4115         * python/py-unwind.c (unwind_infopy_dealloc): Remove unused
4116         variables.
4117         * record-btrace.c (record_btrace_target::store_registers): Remove
4118         unused variable.
4119         (cmd_show_record_btrace_cpu): Remove unused variable.
4120         * riscv-tdep.c (riscv_register_reggroup_p)
4121         (riscv_push_dummy_call, riscv_return_value): Remove unused
4122         variable.
4123         * rust-exp.y (literal): Remove unused variable.
4124         * rust-lang.c (rust_evaluate_subexp) <OP_RUST_ARARAY>: Remove
4125         unused variable.
4126         <STRUCTOP_ANONYMOUS>: Likewise.
4127         * s390-linux-tdep.c (s390_linux_init_abi_31)
4128         (s390_linux_init_abi_64): Remove unused variable.
4129         * ser-ming2.c (ser_windows_read_prim, pipe_select_thread)
4130         (file_select_thread, net_windows_open, _initialize_ser_windows):
4131         Remove unused variables.
4132         * symtab.c (find_pc_sect_line): Remove unused variable.
4133         * target-memory.c (compute_garbled_blocks): Remove unused
4134         variable.
4135         (target_write_memory_blocks): Remove unused variable.
4136         * target.c (target_stack::unpush): Remove unused variables.
4137         * tracepoint.c (start_tracing, all_tracepoint_actions)
4138         (merge_uploaded_trace_state_variables)
4139         (print_one_static_tracepoint_marker): Remove unused variable.
4140         * unittests/basic_string_view/element_access/char/1.cc (test01):
4141         Remove unused variable.
4142         * windows-nat.c (windows_continue, windows_add_all_dlls)
4143         (do_initial_windows_stuff, windows_nat_target::create_inferior):
4144         Remove unused variables.
4145
4146 2018-07-21  Simon Marchi  <simon.marchi@polymtl.ca>
4147
4148         * arm-tdep.c (arm_gdbarch_init): Declare attr_arch and
4149         attr_profile in HAVE_ELF.
4150         * rs6000-tdep.c (bfd_uses_spe_extensions): Declare vector_abi in
4151         HAVE_ELF.
4152
4153 2018-07-20  Simon Marchi  <simon.marchi@polymtl.ca>
4154
4155         * frame.c (frame_register_unwind): Change parameter name.
4156         (frame_unwind_register): Likewise.
4157         (frame_unwind_register_value): Likewise.
4158         (frame_unwind_register_signed): Likewise.
4159         (frame_unwind_register_unsigned): Likewise.
4160         * frame.h (frame_register_unwind): Likewise.
4161         (frame_unwind_register): Likewise.
4162         (frame_unwind_register_value): Likewise.
4163         (frame_unwind_register_signed): Likewise.
4164         (frame_unwind_register_unsigned): Likewise.
4165         (frame_unwind_arch): Likewise.
4166
4167 2018-07-20  Maciej W. Rozycki  <macro@mips.com>
4168
4169         * MAINTAINERS: Update my e-mail address, downgrade to MIPS I-IV
4170         ISA maintenance.
4171
4172 2018-07-20  Maciej W. Rozycki  <macro@mips.com>
4173
4174         * mips-linux-nat.c (mips_linux_nat_target::read_description):
4175         Call `get_ptrace_pid' rather than extracting the ptrace PID by
4176         hand.
4177
4178 2018-07-20  Keith Seitz  <keiths@redhat.com>
4179
4180         * buildsym.h (struct buildsym_compunit) <m_objfile, m_subfiles,
4181         m_main_subfile, m_comp_dir, m_producer, m_debugformat,
4182         m_compunit_symtab, m_language>: Add "m_" prefix.
4183         Update all uses.
4184         * buildsym.c: Update all uses.
4185
4186 2018-07-20  Tom Tromey  <tom@tromey.com>
4187
4188         * buildsym-legacy.h (record_line): Don't use record_line_ftype.
4189         * buildsym.h (record_line_ftype): Remove typedef.
4190
4191 2018-07-20  Tom Tromey  <tom@tromey.com>
4192
4193         * buildsym-legacy.h (augment_type_symtab): Don't declare.
4194         (end_expandable_symtab): Likewise.
4195         (end_symtab_get_static_block): Likewise.
4196         (end_symtab_from_static_block): Likewise.
4197         * buildsym-legacy.c (augment_type_symtab): Remove.
4198         (end_expandable_symtab): Remove.
4199         (end_symtab_get_static_block): Remove.
4200         (end_symtab_from_static_block): Remove.
4201
4202 2018-07-20  Tom Tromey  <tom@tromey.com>
4203
4204         * dwarf2read.c: Include buildsym.h.
4205         (struct dwarf2_cu) <builder>: New method.
4206         (fixup_go_packaging): Update.
4207         (process_full_comp_unit, process_full_type_unit): Update.  Don't
4208         use scoped_free_pendings.
4209         (using_directives): Add "cu" parameter, remove "language".
4210         (read_import_statement, setup_type_unit_groups, )
4211         (read_func_scope, read_lexical_block_scope)
4212         (dwarf2_record_block_ranges, read_namespace): Update.
4213         (lnp_state_machine::lnp_state_machine): Add cu parameter.
4214         (lnp_state_machine::handle_end_sequence): Update.
4215         (class lnp_state_machine) <m_cu>: New member.
4216         <m_record_line_callback>: Remove.
4217         <m_currently_recording_lines>: New member.
4218         (lnp_state_machine::handle_set_file): Update.
4219         (noop_record_line): Remove.
4220         (dwarf_record_line_p): Add cu parameter.
4221         (dwarf_record_line_1, dwarf_finish_line): Likewise.
4222         (lnp_state_machine::record_line)
4223         (lnp_state_machine::lnp_state_machine)
4224         (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
4225         (dwarf_decode_lines): Update.
4226         (dwarf2_start_subfile): Add cu parameter.
4227         (dwarf2_start_symtab, new_symbol): Update.
4228         (macro_start_file, dwarf_decode_macro_bytes): Add cu parameter.
4229         Remove dwarf2_per_objfile parameter.
4230         (dwarf_decode_macros): Update.
4231
4232 2018-07-20  Tom Tromey  <tom@tromey.com>
4233
4234         * stabsread.c (define_symbol): Update.
4235         * buildsym-legacy.h (get_buildsym_compunit): Declare.
4236         * dwarf2read.c (new_symbol): Update.
4237         * cp-support.h (cp_scan_for_anonymous_namespaces): Update.
4238         * cp-namespace.c: Include buildsym.h.
4239         (cp_scan_for_anonymous_namespaces): Add "compunit" parameter.
4240         * buildsym-legacy.c (get_buildsym_compunit): New function.
4241
4242 2018-07-20  Tom Tromey  <tom@tromey.com>
4243
4244         * xcoffread.c: Include buildsym-legacy.h.
4245         * windows-nat.c: Include buildsym-legacy.h.
4246         * stabsread.c: Include buildsym-legacy.h.
4247         * mdebugread.c: Include buildsym-legacy.h.
4248         * buildsym-legacy.h: New file.
4249         * buildsym-legacy.c: New file, from buildsym.c.
4250         * go32-nat.c: Include buildsym-legacy.h.
4251         * dwarf2read.c: Include buildsym-legacy.h.
4252         * dbxread.c: Include buildsym-legacy.h.
4253         * cp-namespace.c: Include buildsym-legacy.h.
4254         * coffread.c: Include buildsym-legacy.h.
4255         * buildsym.h: Move some contents to buildsym-legacy.h.
4256         * buildsym.c: Include buildsym-legacy.h.  Move many functions to
4257         buildsym-legacy.c.
4258         * Makefile.in (HFILES_NO_SRCDIR): Add buildsym-legacy.h.
4259
4260 2018-07-20  Tom Tromey  <tom@tromey.com>
4261
4262         * buildsym.h (struct buildsym_compunit): Move from buildsym.c.
4263         * buildsym.c (struct buildsym_compunit): Move to buildsym.h.
4264         (buildsym_compunit::buildsym_compunit)
4265         (buildsym_compunit::~buildsym_compunit)
4266         (buildsym_compunit::get_macro_table): Define.
4267
4268 2018-07-20  Tom Tromey  <tom@tromey.com>
4269
4270         * buildsym.c (reset_symtab_globals): Remove.
4271         (buildsym_compunit::end_symtab_from_static_block): Update.
4272         (buildsym_compunit::augment_type_symtab): Update.
4273         (end_symtab_from_static_block): Call free_buildsym_compunit.
4274         (augment_type_symtab, end_symtab, end_expandable_symtab):
4275         Likewise.
4276
4277 2018-07-20  Tom Tromey  <tom@tromey.com>
4278
4279         * arch-utils.c: Do not include buildsym.h.
4280         * mipsread.c: Do not include buildsym.h.
4281         * machoread.c: Do not include buildsym.h.
4282         * elfread.c: Do not include buildsym.h.
4283
4284 2018-07-20  Tom Tromey  <tom@tromey.com>
4285
4286         * buildsym.c (buildsym_compunit::buildsym_compunit): Do more
4287         initialization.
4288         (buildsym_compunit): Add new constructor.
4289         (struct buildsym_compunit) <get_last_source_file, finish_block,
4290         record_block_range, start_subfile, patch_subfile_names,
4291         push_subfile, pop_subfile, record_line, get_compunit_symtab,
4292         set_last_source_start_addr, get_last_source_start_addr,
4293         get_local_using_directives, set_local_using_directives,
4294         get_global_using_directives, outermost_context_p,
4295         get_current_context_stack, get_context_stack_depth,
4296         get_current_subfile, get_local_symbols, get_file_symbols,
4297         get_global_symbols, record_debugformat, record_producer,
4298         push_context, pop_context, end_symtab_get_static_block,
4299         end_symtab_from_static_block, end_symtab, end_expandable_symtab>:
4300         New public methods.
4301         <record_pending_block, finish_block_internal, make_blockvector,
4302         watch_main_source_file_lossage, end_symtab_with_blockvector>: New
4303         private methods.
4304         Update all users.
4305
4306 2018-05-22  Tom Tromey  <tom@tromey.com>
4307
4308         * buildsym.c (record_pending_block): Move earlier.  Remove objfile
4309         parameter.
4310         (finish_block_internal): Update.
4311
4312 2018-07-20  Tom Tromey  <tom@tromey.com>
4313
4314         * buildsym.c (record_pending_block): Move earlier.  Remove objfile
4315         parameter.
4316         (finish_block_internal): Update.
4317
4318 2018-07-20  Tom Tromey  <tom@tromey.com>
4319
4320         * buildsym.h (EXTERN): Don't define or undef.
4321         * buildsym.c (EXTERN): Don't define.
4322
4323 2018-07-20  Tom Tromey  <tom@tromey.com>
4324
4325         * buildsym.c: Remove TODO comment.
4326
4327 2018-07-20  Tom Tromey  <tom@tromey.com>
4328
4329         * coffread.c (coff_symtab_read): Update.
4330         * xcoffread.c (xcoff_psymtab_to_symtab_1): Update.
4331         (xcoff_new_init): Update.
4332         * mipsread.c (mipscoff_new_init): Update.
4333         * mdebugread.c (mdebug_build_psymtabs): Update.
4334         * elfread.c (elf_new_init): Update.
4335         * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
4336         Update.
4337         * dbxread.c (dbx_new_init, dbx_psymtab_to_symtab_1)
4338         (coffstab_build_psymtabs, elfstab_build_psymtabs)
4339         (stabsect_build_psymtabs): Update.
4340         * buildsym.h (buildsym_init): Don't declare.
4341         * buildsym.c: Update comment.
4342         (prepare_for_building): Remove.
4343         (start_symtab, restart_symtab): Update.
4344         (reset_symtab_globals): Update comment.
4345         (buildsym_init): Remove.
4346
4347 2018-07-20  Tom Tromey  <tom@tromey.com>
4348
4349         * xcoffread.c (read_xcoff_symtab, process_xcoff_symbol): Update.
4350         * stabsread.c (patch_block_stabs, define_symbol, read_type)
4351         (read_enum_type, common_block_start, common_block_end)
4352         (cleanup_undefined_types_1, finish_global_stabs): Update.
4353         * mdebugread.c (psymtab_to_symtab_1): Update.
4354         * dwarf2read.c (fixup_go_packaging, read_func_scope)
4355         (read_lexical_block_scope, new_symbol): Update.
4356         * dbxread.c (process_one_symbol): Update.
4357         * coffread.c (coff_symtab_read, process_coff_symbol)
4358         (coff_read_enum_type): Update.
4359         * buildsym.h (file_symbols, global_symbols, local_symbols): Don't
4360         declare.
4361         (get_local_symbols, get_file_symbols, get_global_symbols): New
4362         functions.
4363         * buildsym.c (~buildsym_compunit): Clean up m_file_symbols and
4364         m_global_symbols.
4365         <m_file_symbols, m_local_symbols, m_global_symbols>: New members.
4366         (~scoped_free_pendings): Update.
4367         (finish_block, prepare_for_building, reset_symtab_globals)
4368         (end_symtab_get_static_block, end_symtab_with_blockvector)
4369         (augment_type_symtab, push_context): Update.
4370         (get_local_symbols, get_file_symbols, get_global_symbols): New
4371         functions.
4372         (buildsym_init): Update.
4373
4374 2018-07-20  Tom Tromey  <tom@tromey.com>
4375
4376         * dwarf2read.c (process_full_comp_unit): Do not set list_in_scope.
4377         (process_full_type_unit): Likewise.
4378         (dwarf2_start_symtab): Set list_in_scope.
4379
4380 2018-07-20  Tom Tromey  <tom@tromey.com>
4381
4382         * dwarf2read.c (process_psymtab_comp_unit_reader)
4383         (build_type_psymtabs_reader): Do not set list_in_scope.
4384
4385 2018-07-20  Tom Tromey  <tom@tromey.com>
4386
4387         * buildsym.c (free_pendings): Remove.
4388         (add_symbol_to_list, scoped_free_pendings)
4389         (finish_block_internal, buildsym_init): Update.
4390
4391 2018-07-20  Tom Tromey  <tom@tromey.com>
4392
4393         * xcoffread.c (read_xcoff_symtab): Update.
4394         * dwarf2read.c (read_func_scope, read_lexical_block_scope):
4395         Update.
4396         * dbxread.c (process_one_symbol): Update.
4397         * coffread.c (coff_symtab_read): Update.
4398         * buildsym.h (finish_block): Update.
4399         * buildsym.c (finish_block): Remove "listhead" argument.
4400         (end_symtab_get_static_block): Update.
4401
4402 2018-07-20  Tom Tromey  <tom@tromey.com>
4403
4404         * buildsym.h (class scoped_free_pendings): Remove constructor.
4405         * buildsym.c (struct buildsym_compunit) <free_pending_blocks>: New
4406         method.
4407         <m_pending_block_obstack, m_pending_blocks>: New members.
4408         (pending_block_obstack, pending_blocks): Remove.
4409         (scoped_free_pendings::scoped_free_pendings): Default.
4410         (~scoped_free_pendings): Update.
4411         (free_pending_blocks): Remove.
4412         (finish_block_internal, record_pending_block, make_blockvector)
4413         (end_symtab_get_static_block, augment_type_symtab, push_context)
4414         (buildsym_init): Update.
4415
4416 2018-07-20  Tom Tromey  <tom@tromey.com>
4417
4418         * buildsym.c (struct buildsym_compunit) <m_pending_addrmap,
4419         m_pending_addrmap_obstack, m_pending_addrmap_interesting>: New
4420         members.
4421         (pending_addrmap, pending_addrmap_obstack)
4422         (pending_addrmap_interesting): Remove.
4423         (scoped_free_pendings, record_block_range, make_blockvector)
4424         (prepare_for_building, reset_symtab_globals, buildsym_init):
4425         Update.
4426
4427 2018-07-20  Tom Tromey  <tom@tromey.com>
4428
4429         * xcoffread.c (process_linenos): Update.
4430         * stabsread.c (define_symbol, read_type, read_enum_type): Update.
4431         * mdebugread.c (psymtab_to_symtab_1): Update.
4432         * dwarf2read.c (setup_type_unit_groups)
4433         (lnp_state_machine::handle_set_file, dwarf_record_line_p)
4434         (lnp_state_machine::record_line, dwarf_decode_lines): Update.
4435         * dbxread.c (process_one_symbol): Update.
4436         * coffread.c (coff_symtab_read, enter_linenos)
4437         (process_coff_symbol): Update.
4438         * buildsym.h (current_subfile): Don't declare.
4439         (get_current_subfile): Declare.
4440         * buildsym.c (struct buildsym_compunit) <m_current_subfile>: New
4441         member.
4442         (start_subfile, free_buildsym_compunit, push_subfile)
4443         (prepare_for_building, start_symtab): Update.
4444         (get_current_subfile): New function.
4445
4446 2018-07-20  Tom Tromey  <tom@tromey.com>
4447
4448         * coffread.c (coff_symtab_read): Update.
4449         * xcoffread.c (read_xcoff_symtab): Update.
4450         * dwarf2read.c (new_symbol): Update.
4451         (read_func_scope, read_lexical_block_scope): Update.
4452         * dbxread.c (process_one_symbol): Update.
4453         * buildsym.h (context_stack, context_stack_depth): Don't declare.
4454         (outermost_context_p): Remove macro.
4455         (outermost_context_p, get_current_context_stack)
4456         (get_context_stack_depth): Declare.
4457         (pop_context): Return struct context_stack.
4458         * buildsym.c (struct buildsym_compunit) <m_context_stack: New
4459         member.
4460         (context_stack_size): Remove.
4461         (INITIAL_CONTEXT_STACK_SIZE): Remove.
4462         (prepare_for_building, end_symtab_get_static_block)
4463         (augment_type_symtab, push_context): Update.
4464         (pop_context): Return struct context_stack.
4465         (outermost_context_p, get_current_context_stack)
4466         (get_context_stack_depth): New functions.
4467         (buildsym_init): Update.
4468
4469 2018-07-20  Tom Tromey  <tom@tromey.com>
4470
4471         * rust-exp.y: Now a pure parser.  Update all rules.
4472         (%union): Move earlier.
4473         (current_parser, work_obstack): Remove globals.
4474         (rust_parser, ~rust_parser): Update.
4475         (class rust_parser) <copy_name, concat3, crate_name, super_name,
4476         lex_character, lex_number, lex_string, lex_identifier,
4477         rust_lookup_type, convert_params_to_types, convert_ast_to_type,
4478         convert_name, convert_params_to_expression,
4479         convert_ast_to_expression, ast_basic_type, ast_operation,
4480         ast_compound_assignment, rust_op, ast_literal, ast_dliteral,
4481         ast_structop, ast_structop_anonymous, ast_unary, ast_cast,
4482         ast_call_ish, ast_path, ast_string, ast_struct, ast_range,
4483         ast_array_type, ast_slice_type, ast_reference_type,
4484         ast_pointer_type, ast_function_type, ast_tuple_type>: New methods.
4485         (rust_parse): Update.
4486         (rustyyerror, rustyylex): Add parser parameter.
4487         (rust_lex_test_one, rust_lex_int_test, rust_lex_exception_test)
4488         (rust_lex_stringish_test, rust_lex_test_sequence)
4489         (rust_lex_test_trailing_dot, rust_lex_test_completion)
4490         (rust_lex_test_push_back, rust_lex_tests): Update.
4491
4492 2018-07-19  Pedro Alves  <palves@redhat.com>
4493
4494         * guile/guile-internal.h (gdbscm_scm_to_c_string): Now returns a
4495         gdb::unique_xmalloc_ptr.
4496         * guile/scm-breakpoint.c (gdbscm_set_breakpoint_condition_x):
4497         Adjust to use dbscm_wrap and gdb::unique_xmalloc_ptr.
4498         * guile/scm-exception.c (gdbscm_exception_message_to_string): Use
4499         copy-initialization.
4500         * guile/scm-pretty-print.c (ppscm_print_children): Use
4501         gdb::unique_xmalloc_ptr instead of cleanups.
4502         (gdbscm_apply_val_pretty_printer): Remove cleanups.
4503         * guile/scm-string.c (gdbscm_scm_to_c_string): Now returns a
4504         gdb::unique_xmalloc_ptr.
4505         * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
4506         Adjust to use gdb::unique_xmalloc_ptr.
4507         * guile/scm-utils.c (extract_arg): Adjust.
4508         * guile/scm-value.c (gdbscm_value_field): Adjust to use
4509         gdb::unique_xmalloc_ptr instead of a cleanup.
4510
4511 2018-07-19  Tom Tromey  <tom@tromey.com>
4512
4513         * utils.c (do_value_free_to_mark)
4514         (make_cleanup_value_free_to_mark): Remove.
4515         * utils.h (make_cleanup_value_free_to_mark): Remove.
4516
4517 2018-07-19  Pedro Alves  <palves@redhat.com>
4518
4519         * guile/guile-internal.h (gdbscm_wrap): Really make 'args' a
4520         forwarding reference.
4521
4522 2018-07-18  Pedro Alves  <palves@redhat.com>
4523
4524         * guile/guile.c (gdbscm_execute_gdb_command): Adjust to use
4525         gdbscm_wrap.  Use gdb::unique_xmalloc_ptr<char> instead of a
4526         cleanup.
4527
4528 2018-07-18  Pedro Alves  <palves@redhat.com>
4529
4530         * guile/guile-internal.h: Add comment about mixing GDB and Scheme
4531         exceptions.
4532         (GDBSCM_HANDLE_GDB_EXCEPTION_WITH_CLEANUPS): Delete.
4533         (gdbscm_wrap): New.
4534         * guile/scm-frame.c (gdbscm_frame_read_register): Use xfree
4535         directly instead of a cleanup.
4536         * guile/scm-math.c (vlscm_unop_gdbthrow): New, factored out from ...
4537         (vlscm_unop): ... this.  Reimplement using gdbscm_wrap.
4538         (vlscm_binop_gdbthrow): New, factored out from ...
4539         (vlscm_binop): ... this.  Reimplement using gdbscm_wrap.
4540         (vlscm_rich_compare): Use gdbscm_wrap.
4541         * guile/scm-symbol.c (gdbscm_lookup_symbol): Use xfree directly
4542         instead of a cleanup.
4543         (gdbscm_lookup_global_symbol): Use xfree directly instead of a
4544         cleanup.
4545         * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
4546         Use xfree directly instead of a cleanup.
4547         * guile/scm-value.c (gdbscm_make_value, gdbscm_make_lazy_value):
4548         Adjust to use gdbscm_wrap and scoped_value_mark.
4549         (gdbscm_value_optimized_out_p): Adjust to use gdbscm_wrap.
4550         (gdbscm_value_address, gdbscm_value_dereference)
4551         (gdbscm_value_referenced_value): Adjust to use gdbscm_wrap and
4552         scoped_value_mark.
4553         (gdbscm_value_dynamic_type): Use scoped_value_mark.
4554         (vlscm_do_cast, gdbscm_value_field): Adjust to use gdbscm_wrap and
4555         scoped_value_mark.
4556         (gdbscm_value_subscript, gdbscm_value_call): Adjust to use
4557         gdbscm_wrap and scoped_value_mark.
4558         (gdbscm_value_to_string): Use xfree directly instead of a
4559         cleanup.  Move 'buffer' unique_ptr to TRY scope.
4560         (gdbscm_value_to_lazy_string): Use xfree directly instead of a
4561         cleanup.  Move 'buffer' unique_ptr to TRY scope.  Use
4562         scoped_value_mark.
4563         (gdbscm_value_fetch_lazy_x): Use gdbscm_wrap.
4564         (gdbscm_parse_and_eval): Adjust to use gdbscm_wrap and
4565         scoped_value_mark.
4566         (gdbscm_history_ref, gdbscm_history_append_x): Adjust to use
4567         gdbscm_wrap.
4568
4569 2018-07-18  Tom de Vries  <tdevries@suse.de>
4570
4571         * findvar.c (default_read_var_value): Also resolve dynamic type for
4572         LOC_OPTIMIZED_OUT vars.
4573
4574 2018-07-18  Maciej W. Rozycki  <macro@mips.com>
4575
4576         * mips-tdep.c (micromips_next_pc): Add SYSCALL instruction
4577         decoding.
4578
4579 2018-07-17  Tom Tromey  <tom@tromey.com>
4580
4581         * guile/scm-param.c (pascm_set_func, pascm_show_func)
4582         (compute_enum_list, pascm_set_param_value_x)
4583         (gdbscm_parameter_value): Update.
4584         * guile/guile-internal.h (gdbscm_scm_to_string): Update.
4585         (gdbscm_scm_to_host_string): Update.
4586         * guile/scm-math.c (vlscm_convert_typed_value_from_scheme):
4587         Update.
4588         * guile/scm-cmd.c (cmdscm_add_completion): Update.
4589         * guile/scm-pretty-print.c (ppscm_print_string_repr): Update.
4590         * guile/scm-string.c (gdbscm_scm_to_string): Return
4591         unique_xmalloc_ptr.
4592         (gdbscm_scm_to_host_string): Likewise.
4593
4594 2018-07-17  Tom Tromey  <tom@tromey.com>
4595
4596         * guile/guile.c (gdbscm_eval_from_control_command): Update.
4597         * guile/guile-internal.h (gdbscm_safe_eval_string): Update.
4598         * guile/scm-objfile.c (gdbscm_execute_objfile_script): Update.
4599         * guile/scm-safe-call.c (gdbscm_safe_eval_string): Return
4600         unique_xmalloc_ptr.
4601
4602 2018-07-17  Tom Tromey  <tom@tromey.com>
4603
4604         * guile/scm-param.c (pascm_signal_setshow_error): Update.
4605         * guile/guile-internal.h (gdbscm_exception_message_to_string):
4606         Update.
4607         * guile/scm-cmd.c (cmdscm_function): Update.
4608         * guile/scm-pretty-print.c
4609         (ppscm_print_exception_unless_memory_error): Update.
4610         * guile/scm-exception.c (gdbscm_exception_message_to_string):
4611         Return unique_xmalloc_ptr.
4612
4613 2018-07-17  Tom Tromey  <tom@tromey.com>
4614
4615         * guile/scm-pretty-print.c (ppscm_make_pp_type_error_exception):
4616         Use string_printf.
4617
4618 2018-07-17  Jim Wilson  <jimw@sifive.com>
4619
4620         * riscv-tdep.c (riscv_has_feature): Delete comment that refers to
4621         set_gdbarch_decr_pc_after_break.  Call riscv_read_misa_reg always.
4622         (riscv_gdbarch_init): Delete local has_compressed_isa.  Delete now
4623         unecessary braces after EF_RISCV_RVC test.  Delete call to
4624         set_gdbarch_decr_pc_after_break.
4625
4626         * riscv-tdep.h (DECLARE_CSR): Use RISCV_FIRST_CSR_REGNUM instead of
4627         RISCV_LAST_FP_REGNUM + 1.
4628         (RSICV_CSR_LEGACY_MISA_REGNUM): Add RISCV_FIRST_CSR_REGNUM.
4629
4630 2018-07-17  Tom Tromey  <tom@tromey.com>
4631
4632         * configure.ac: Remove --disable-gdbcli.
4633         * configure: Rebuild.
4634         * Makefile.in (SUBDIR_CLI_DEPS, SUBDIR_CLI_LDFLAGS)
4635         (SUBDIR_CLI_CFLAGS): Remove.
4636         (SFILES): Use SUBDIR_CLI_SRCS.
4637         (COMMON_OBS): Use SUBDIR_CLI_OBS.
4638
4639 2018-07-17  Tom Tromey  <tom@tromey.com>
4640
4641         PR gdb/18624:
4642         * coffread.c (coff_symtab_read): Use scoped_free_pendings.
4643
4644 2018-07-16  Jim Wilson  <jimw@sifive.com>
4645
4646         * riscv-tdep.c (riscv_gdbarch_init): Call gdbarch_init_osabi.
4647
4648 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
4649
4650         * ia64-libunwind-tdep.c (libunwind_frame_cache): Remove unused
4651         variable.
4652         (libunwind_frame_sniffer): Likewise.
4653         (libunwind_frame_prev_register): Likewise.
4654         (libunwind_sigtramp_frame_sniffer): Likewise.
4655         * ia64-tdep.c (ia64_access_reg): Likewise.
4656         (ia64_access_rse_reg): Likewise.
4657         (ia64_libunwind_sigtramp_frame_this_id): Likewise.
4658         * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Likewise.
4659
4660 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
4661
4662         * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Add cast.
4663
4664 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
4665
4666         * remote-sim.c (gdbsim_target::close,
4667         gdbsim_target::mourn_inferior): Remove unused variables.
4668
4669 2018-07-16  Simon Marchi  <simon.marchi@polymtl.ca>
4670
4671         * ia64-tdep.c (ktab_buf): New global.
4672         (getunwind_table): Return a gdb::optional<gdb::byte_vector>.
4673         (get_kernel_table): Adjust.
4674
4675 2018-07-16  Tom Tromey  <tom@tromey.com>
4676
4677         * xcoffread.c (read_xcoff_symtab): Use outermost_context_p.
4678         * dwarf2read.c (using_directives, new_symbol): Use
4679         outermost_context_p.
4680         * dbxread.c (process_one_symbol): Use outermost_context_p.
4681         * coffread.c (coff_symtab_read): Use outermost_context_p.
4682
4683 2018-07-16  Tom Tromey  <tom@tromey.com>
4684
4685         * dwarf2read.c (using_directives, read_func_scope)
4686         (read_lexical_block_scope): Update.
4687         * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
4688         * buildsym.h (local_using_directives, global_using_directives):
4689         Don't declare.
4690         (get_local_using_directives, set_local_using_directives)
4691         (get_global_using_directives): Declare.
4692         * buildsym.c (struct buildsym_compunit) <m_local_using_directives,
4693         m_global_using_directives>: New members.
4694         (finish_block_internal, prepare_for_building)
4695         (reset_symtab_globals, end_symtab_get_static_block)
4696         (push_context): Update.
4697         (get_local_using_directives, set_local_using_directives)
4698         (get_global_using_directives): New functions.
4699         (buildsym_init): Update.
4700
4701 2018-07-16  Tom Tromey  <tom@tromey.com>
4702
4703         * xcoffread.c (xcoff_initial_scan): Don't call
4704         free_pending_blocks.
4705         * dbxread.c (dbx_symfile_read): Don't call free_pending_blocks.
4706         * buildsym.h (class scoped_free_pendings): Add constructor.
4707         (free_pending_blocks): Don't declare.
4708         * buildsym.c (scoped_free_pendings::scoped_free_pendings): New.
4709         (free_pending_blocks): Now static.
4710
4711 2018-07-16  Tom Tromey  <tom@tromey.com>
4712
4713         * buildsym.h (push_subfile, pop_subfile): Update declarations.
4714         * buildsym.c (struct buildsym_compunit) <m_subfile_stack>: New
4715         member.
4716         (struct subfile_stack): Remove.
4717         (subfile_stack): Remove.
4718         (push_subfile, pop_subfile, buildsym_init): Update.
4719
4720 2018-07-16  Tom Tromey  <tom@tromey.com>
4721
4722         * buildsym.c (push_subfile): Use gdb_assert.
4723         (pop_subfile): Use gdb_assert.
4724
4725 2018-07-16  Tom Tromey  <tom@tromey.com>
4726
4727         * buildsym.h (merge_symbol_lists): Remove.
4728         * buildsym.c (merge_symbol_lists): Remove.
4729
4730 2018-07-16  Tom Tromey  <tom@tromey.com>
4731
4732         * stabsread.c (scan_file_globals): Update comment.
4733         * stabsread.h (scan_file_globals): Move from buildsym.h.
4734         * buildsym.h (scan_file_globals): Move to stabsread.h.
4735
4736 2018-07-16  Tom Tromey  <tom@tromey.com>
4737
4738         * xcoffread.c (xcoff_new_init): Update.
4739         * mipsread.c (mipscoff_new_init): Update.
4740         * mdebugread.c (mdebug_build_psymtabs): Update.
4741         * elfread.c (elf_new_init): Update.
4742         * dbxread.c (dbx_new_init, coffstab_build_psymtabs)
4743         (elfstab_build_psymtabs, stabsect_build_psymtabs): Update.
4744         * buildsym.h (buildsym_new_init): Don't declare.
4745         * buildsym.c (buildsym_new_init): Remove.
4746
4747 2018-07-16  Tom Tromey  <tom@tromey.com>
4748
4749         * stabsread.h (within_function): Move from buildsym.h.
4750         * stabsread.c (start_stabs): Clear within_function.
4751         * coffread.c (coff_start_symtab): Clear within_function.
4752         * buildsym.h (within_function): Move to stabsread.h.
4753         * buildsym.c (prepare_for_building): Update.
4754
4755 2018-07-16  Tom Tromey  <tom@tromey.com>
4756
4757         * stabsread.h (processing_gcc_compilation): Move from buildsym.h.
4758         * dwarf2read.c (dwarf2_start_symtab): Don't set
4759         processing_gcc_compilation.
4760         * buildsym.h (processing_gcc_compilation): Move to stabsread.h.
4761
4762 2018-07-16  Tom Tromey  <tom@tromey.com>
4763
4764         * stabsread.h (HASHSIZE, hashname, symnum, next_symbol_text)
4765         (next_symbol_text_func): Move from buildsym.h.
4766         * stabsread.c (hashname): Move from buildsym.c.
4767         * buildsym.h (HASHSIZE, symnum, next_symbol_text)
4768         (next_symbol_text_func, hashname): Move to stabsread.h.
4769         * buildsym.c: Don't include bcache.h
4770         (hashname): Move to stasbread.c.
4771
4772 2018-07-16  Tom Tromey  <tom@tromey.com>
4773
4774         * buildsym.h (context_stack_size): Don't declare.
4775         * buildsym.c (context_stack_size): New global.
4776
4777 2018-07-16  Tom Tromey  <tom@tromey.com>
4778
4779         * dbxread.c (processing_acc_compilation): New global.
4780         * buildsym.h (processing_acc_compilation): Don't declare.
4781
4782 2018-07-16  Tom Tromey  <tom@tromey.com>
4783
4784         * xcoffread.c (aix_process_linenos, complete_symtab): Update.
4785         * dbxread.c (read_ofile_symtab): Update.
4786         * coffread.c (coff_start_symtab, coff_end_symtab): Update.
4787         * buildsym.h (last_source_start_addr): Remove.
4788         (set_last_source_start_addr, get_last_source_start_addr):
4789         Declare.
4790         * buildsym.c (buildsym_compunit::buildsym_compunit): Add last_addr
4791         parameter.
4792         (struct buildsym_compunit) <m_last_source_start_addr>: New
4793         member.
4794         (prepare_for_building): Remove start_addr parameter.
4795         (start_symtab, restart_symtab, end_symtab_get_static_block)
4796         (end_symtab_with_blockvector): Update.
4797         (set_last_source_start_addr, get_last_source_start_addr): New
4798         functions.
4799
4800 2018-07-16  Tom Tromey  <tom@tromey.com>
4801
4802         * buildsym.c (struct buildsym_compunit) <m_have_line_numbers>: New
4803         member.
4804         (have_line_numbers): Remove.
4805         (record_line, prepare_for_building, end_symtab_get_static_block)
4806         (augment_type_symtab): Update.
4807
4808 2018-07-16  Tom Tromey  <tom@tromey.com>
4809
4810         * buildsym.c (~buildsym_compunit): Free the macro table.
4811         (struct buildsym_compunit) <get_macro_table, release_macros>: New
4812         methods.
4813         <m_pending_macros>: New member.
4814         (pending_macros): Remove.
4815         (~scoped_free_pendings, get_macro_table, prepare_for_building)
4816         (reset_symtab_globals, end_symtab_get_static_block)
4817         (end_symtab_with_blockvector, augment_type_symtab)
4818         (buildsym_init): Update.
4819
4820 2018-07-16  Tom Tromey  <tom@tromey.com>
4821
4822         * buildsym.c (buildsym_compunit::buildsym_compunit): Add name
4823         parameter.
4824         (buildsym_compunit::set_last_source_file): New method.
4825         <m_last_source_file>: New member.
4826         (prepare_for_building): Remove "name" parameter.
4827         (start_symtab, restart_symtab, reset_symtab_globals): Update.
4828         (last_source_file): Remove.
4829         (set_last_source_file, get_last_source_file): Update.
4830
4831 2018-07-16  Tom Tromey  <tom@tromey.com>
4832
4833         * buildsym.c (prepare_for_building): Add assert.
4834
4835 2018-07-16  Tom Tromey  <tom@tromey.com>
4836
4837         * buildsym.c (~buildsym_compunit): Update.
4838         (struct buildsym_compunit) <comp_unit>: Now a unique_xmalloc_ptr.
4839         (start_subfile, patch_subfile_names)
4840         (end_symtab_with_blockvector): Update.
4841
4842 2018-07-16  Tom Tromey  <tom@tromey.com>
4843
4844         * buildsym.c (struct buildsym_compunit): Add constructor,
4845         destructor, initializers.
4846         (start_buildsym_compunit): Remove.
4847         (free_buildsym_compunit): Use "delete".
4848         (start_symtab, restart_symtab): Use "new".
4849
4850 2018-07-13  Simon Marchi  <simon.marchi@polymtl.ca>
4851
4852         * symfile.c (set_objfile_default_section_offset): Remove struct
4853         keyword.
4854
4855 2018-07-14  Stafford Horne  <shorne@gmail.com>
4856
4857         * (Responsible Maintainers): Add myself as or1k maintainer.
4858
4859 2018-07-13  Tom Tromey  <tom@tromey.com>
4860
4861         * symfile.c (set_objfile_default_section_offset): Use extra braces
4862         around initializer.
4863
4864 2018-07-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
4865
4866         * s390-tdep.c (s390_displaced_step_fixup): Adjust PC for a
4867         non-branching basr.
4868
4869 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
4870
4871         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4872         unittests/cli-utils-selftests.c
4873         * unittests/cli-utils-selftests.c: New file.
4874
4875 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
4876
4877         * NEWS: Mention new commands. Mention change to 'thread apply'.
4878
4879 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
4880
4881         * thread.c (thr_try_catch_cmd): New function.
4882         (thread_apply_all_command): Handle qcs flags.
4883         (thread_apply_command): Handle qcs flags.
4884         (taas_command): New function.
4885         (tfaas_command): New function.
4886         (_initialize_thread): Update to setup the new commands 'taas
4887         and 'tfaas'. Change doc string for 'thread apply'.
4888
4889 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
4890
4891         * stack.c: (trailing_outermost_frame): New function, mostly
4892         extracted from backtrace_command_1.
4893         (leading_innermost_frame): New function.
4894         (backtrace_command_1): Update to call trailing_outermost_frame.
4895         (frame_apply_command_count): New function.
4896         (frame_apply_level_command): New function.
4897         (frame_apply_all_command): New function.
4898         (frame_apply_command): New function.
4899         (faas_command): New function.
4900         (frame_cmd_list): New variable.
4901         (_initialize_stack): Update to setup the new commands 'frame apply'
4902         and 'faas'.
4903
4904 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
4905
4906         * cli-utils.c (number_or_range_parser::get_number): Only handle
4907         numbers or convenience var as numbers.
4908         (parse_flags): New function.
4909         (parse_flags_qcs): New function.
4910         (number_or_range_parser::finished): Ensure parsing end is detected
4911         before end of string.
4912         * cli-utils.h (parse_flags): New function.
4913         (parse_flags_qcs): New function.
4914         (number_or_range_parser): Remove m_finished bool.
4915         (number_or_range_parser::skip_range): Set m_in_range to false.
4916
4917 2018-07-12  Sergio Durigan Junior  <sergiodj@redhat.com>
4918
4919         * ser-tcp.c (try_connect): Declare 'ioarg' as 'u_long' if building
4920         on Windows.
4921
4922 2018-07-11  Sergio Durigan Junior  <sergiodj@redhat.com>
4923             Jan Kratochvil  <jan.kratochvil@redhat.com>
4924             Paul Fertser  <fercerpav@gmail.com>
4925             Tsutomu Seki  <sekiriki@gmail.com>
4926             Pedro Alves  <palves@redhat.com>
4927
4928         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4929         'unittests/parse-connection-spec-selftests.c'.
4930         (COMMON_SFILES): Add 'common/netstuff.c'.
4931         (HFILES_NO_SRCDIR): Add 'common/netstuff.h'.
4932         * NEWS (Changes since GDB 8.2): Mention IPv6 support.
4933         * common/netstuff.c: New file.
4934         * common/netstuff.h: New file.
4935         * ser-tcp.c: Include 'netstuff.h' and 'wspiapi.h'.
4936         (wait_for_connect): Update comment.  New parameter
4937         'gdb::optional<int> sock' instead of 'struct serial *scb'.
4938         Use 'sock' directly instead of 'scb->fd'.
4939         (try_connect): New function, with code from 'net_open'.
4940         (net_open): Rewrite main loop to deal with multiple
4941         sockets/addresses.  Handle IPv6-style hostnames; implement
4942         support for IPv6 connections.
4943         * unittests/parse-connection-spec-selftests.c: New file.
4944
4945 2018-07-11  Pedro Alves  <palves@redhat.com>
4946
4947         PR gdb/23377
4948         * remote.c (remote_target::remote_detach_pid): Call
4949         set_current_process.
4950
4951 2018-07-11  Pedro Alves  <palves@redhat.com>
4952
4953         * h8300-tdep.c (h8300_gdbarch_init): Remove
4954         set_gdbarch_ecoff_reg_to_regnum calls.
4955
4956 2018-07-11  Sergio Durigan Junior  <sergiodj@redhat.com>
4957
4958         PR c++/23373
4959         * c-typeprint.c (c_type_print_base_struct_union): Don't print
4960         offsets/sizes for static members of a class/struct.
4961
4962 2018-07-11  Alan Hayward  <alan.hayward@arm.com>
4963
4964         * target-descriptions.c (tdesc_register_bitsize): Rename.
4965         * target-descriptions.h (tdesc_register_bitsize): Likewise.
4966         * rs6000-tdep.c (rs6000_gdbarch_init): Use new name.
4967         * aarch64-tdep.c (aarch64_get_tdesc_vq): Convert size.
4968
4969 2018-07-10  Tom Tromey  <tom@tromey.com>
4970
4971         * breakpoint.c (moribund_locations): Now static and a
4972         std::vector.
4973         (breakpoint_init_inferior, moribund_breakpoint_here_p)
4974         (build_bpstat_chain, update_global_location_list)
4975         (breakpoint_retire_moribund): Update.
4976         * breakpoint.h (bp_location_p): Remove typedef.  Don't declare
4977         VEC.
4978
4979 2018-07-10  Andrew Burgess  <andrew.burgess@embecosm.com>
4980
4981         * riscv-tdep.c (riscv_is_fp_regno_p): New function.
4982         (riscv_register_reggroup_p): Use new function, remove unneeded
4983         parenthesis.
4984         (riscv_push_dummy_call): Extend assert to compare against xlen or
4985         flen based on register type.
4986
4987 2018-07-10  Andrew Burgess  <andrew.burgess@embecosm.com>
4988
4989         * riscv-tdep.c (riscv_print_arg_location): Use TYPE_SAFE_NAME.
4990
4991 2018-07-09  Andrew Burgess  <andrew.burgess@embecosm.com>
4992
4993         * remote.c (show_hardware_watchpoint_limit): New function.
4994         (show_hardware_watchpoint_length_limit): New function.
4995         (show_hardware_breakpoint_limit): New function.
4996         (_initialize_remote): Use add_setshow_zuinteger_unlimited_cmd
4997         where appropriate, update help text.
4998
4999 2018-07-09  Tom Tromey  <tom@tromey.com>
5000
5001         * Makefile.in (CDEPS): Don't mention XM_CDEPS.
5002         (CLIBS): Don't mention NAT_CLIBS.
5003
5004 2018-07-09  Tom Tromey  <tom@tromey.com>
5005
5006         * Makefile.in (ADD_FILES, ADD_DEPS): Remove.
5007         (LIBGDB_OBS, clean mostlyclean): Update.
5008         (gdb$(EXEEXT), insight$(EXEEXT)): Update.
5009
5010 2018-07-09  Tom Tromey  <tom@tromey.com>
5011
5012         * Makefile.in (%.c: %.y): Use ECHO_YACC.
5013         (%.c: %.l): Use ECHO_LEX.  Just fail if flex not available.
5014         * silent-rules.mk (ECHO_YACC, ECHO_LEX): New variables.
5015
5016 2018-07-09  Tom Tromey  <tom@tromey.com>
5017
5018         * Makefile.in (ALLDEPFILES): Remove exec.c.
5019         (COMMON_OBS): Remove exec.o.
5020         (COMMON_SFILES): Add exec.c.
5021
5022 2018-07-09  Tom Tromey  <tom@tromey.com>
5023
5024         * Makefile.in (LINT, LINTFLAGS, LINTFILES, lint): Remove.
5025
5026 2018-07-09  Tom Tromey  <tom@tromey.com>
5027
5028         * Makefile.in (clean mostlyclean): Remove stamp-version.
5029         (version.c): Depend on stamp-version.
5030         (stamp-version): New rule, from version.c rule.
5031
5032 2018-07-09  Tom Tromey  <tom@tromey.com>
5033
5034         * Makefile.in (init.c): Depend on stamp-init.
5035         (stamp-init): New rule, from init.c rule.
5036         (clean mostlyclean): Remove stamp-init.
5037
5038 2018-07-09  Tom Tromey  <tom@tromey.com>
5039
5040         * Makefile.in (INIT_FILES): Remove CONFIG_SRCS,
5041         SUBDIR_GCC_COMPILE_SRCS.
5042
5043 2018-07-09  Tom Tromey  <tom@tromey.com>
5044
5045         * Makefile.in (init.c): Remove some unused sed rules.
5046
5047 2018-07-09  Tom Tromey  <tom@tromey.com>
5048
5049         * Makefile.in (TSOBS): Remove.
5050         (INIT_FILES): Update.
5051         (LIBGDB_OBS): Update.
5052         (COMMON_SFILES): Add inflow.c.
5053         (SFILES): Remove inflow.c.
5054
5055 2018-07-07  Jan Kratochvil  <jan.kratochvil@redhat.com>
5056
5057         * contrib/gdb-add-index.sh ($dwarf5): New, use it.
5058
5059 2018-07-07  Simon Marchi  <simon.marchi@polymtl.ca>
5060
5061         * ia64-libunwind-tdep.c (get_reg_name, get_fpreg_name,
5062         get_saveloc_name, is_signal_frame_name, step_name,
5063         init_remote_name, create_addr_space_name,
5064         destroy_addr_space_name, search_unwind_table_name,
5065         find_dyn_list_name): Constify.
5066
5067 2018-07-05  Simon Marchi  <simon.marchi@polymtl.ca>
5068
5069         * darwin-nat.c (darwin_pthread_kill): New function.
5070         (darwin_resume_thread): Use darwin_pthread_kill.
5071
5072 2018-07-05  Tom de Vries  <tdevries@suse.de>
5073
5074         * macroexp.c (macro_buffer) <operator=>: New member function.
5075
5076 2018-07-04  Tom Tromey  <tom@tromey.com>
5077
5078         * darwin-nat.c (darwin_attach_pid): Use exit_inferior.
5079
5080 2018-07-04  Simon Marchi  <simon.marchi@polymtl.ca>
5081
5082         * common/common-defs.h (HAVE_USEFUL_SBRK): Define.
5083         * main.c: Use HAVE_USEFUL_SBRK instead of HAVE_SBRK.
5084         * maint.c: Likewise.
5085         * top.c: Likewise.
5086
5087 2018-07-04  Joel Brobecker  <brobecker@adacore.com>
5088
5089         * NEWS: Create a new section for the next release branch.
5090         Rename the section of the current branch, now that it has
5091         been cut.
5092
5093 2018-07-04  Joel Brobecker  <brobecker@adacore.com>
5094
5095         GDB 8.2 branch created (1b919490e8ba30bf1d6941df0ed112b0e557017e):
5096         * version.in: Bump version to 8.2.50.DATE-git.
5097
5098 2018-07-04  Vyacheslav Barinov  <v.barinov@samsung.com>
5099             Pedro Alves  <palves@redhat.com>
5100
5101         * linux-nat.c (linux_init_ptrace): Rename to ...
5102         (linux_init_ptrace_procfs): ... this.  Call
5103         linux_proc_init_warnings.
5104         (linux_nat_target::post_attach)
5105         (linux_nat_target::post_startup_inferior): Adjust.
5106         * nat/linux-procfs.c (linux_proc_init_warnings): Define function.
5107         * nat/linux-procfs.h (linux_proc_init_warnings): Declare function.
5108
5109 2018-07-04  Tom de Vries  <tdevries@suse.de>
5110
5111         * dwarf2read.c (error_check_comp_unit_head): Move dwarf version
5112         check ...
5113         (read_comp_unit_head): ... here.
5114
5115 2018-07-03  Tom Tromey  <tom@tromey.com>
5116
5117         * tracepoint.c (process_tracepoint_on_disconnect, start_tracing)
5118         (stop_tracing, tstatus_command)
5119         (find_matching_tracepoint_location, merge_uploaded_tracepoints)
5120         (print_one_static_tracepoint_marker): Update.
5121         * breakpoint.c (static_tracepoints_here, all_tracepoints): Return
5122         std::vector.
5123         * breakpoint.h (breakpoint_p): Remove typedef.  Don't declare
5124         VEC.
5125         (all_tracepoints, static_tracepoints_here): Return std::vector.
5126
5127 2018-07-03  Tom Tromey  <tom@tromey.com>
5128
5129         * common/ptid.c (ptid_equal): Remove.
5130         * common/ptid.h (ptid_equal): Don't declare.
5131         * ada-tasks.c: Update.
5132         * breakpoint.c: Update.
5133         * common/agent.c: Update.
5134         * corelow.c: Update.
5135         * darwin-nat-info.c: Update.
5136         * darwin-nat.c: Update.
5137         * dcache.c: Update.
5138         * dtrace-probe.c: Update.
5139         * dummy-frame.c: Update.
5140         * fbsd-nat.c: Update.
5141         * frame.c: Update.
5142         * gdbthread.h: Update.
5143         * gnu-nat.c: Update.
5144         * go32-nat.c: Update.
5145         * inf-loop.c: Update.
5146         * inf-ptrace.c: Update.
5147         * infcall.c: Update.
5148         * infcmd.c: Update.
5149         * inflow.c: Update.
5150         * infrun.c: Update.
5151         * linux-fork.c: Update.
5152         * linux-nat.c: Update.
5153         * linux-thread-db.c: Update.
5154         * mi/mi-cmd-var.c: Update.
5155         * mi/mi-interp.c: Update.
5156         * mi/mi-main.c: Update.
5157         * nto-procfs.c: Update.
5158         * ppc-linux-tdep.c: Update.
5159         * procfs.c: Update.
5160         * python/py-inferior.c: Update.
5161         * python/py-record-btrace.c: Update.
5162         * python/py-record.c: Update.
5163         * ravenscar-thread.c: Update.
5164         * regcache.c: Update.
5165         * remote-sim.c: Update.
5166         * remote.c: Update.
5167         * sol-thread.c: Update.
5168         * solib.c: Update.
5169         * target.c: Update.
5170         * tui/tui-stack.c: Update.
5171         * varobj.c: Update.
5172         * windows-nat.c: Update.
5173         * windows-tdep.c: Update.
5174
5175 2018-07-03  Tom Tromey  <tom@tromey.com>
5176
5177         * common/ptid.c (ptid_match): Remove.
5178         * common/ptid.h (ptid_match): Don't declare.
5179         * fbsd-nat.c: Update.
5180         * infcmd.c: Update.
5181         * infrun.c: Update.
5182         * linux-nat.c: Update.
5183         * record-btrace.c: Update.
5184         * regcache.c: Update.
5185         * remote.c: Update.
5186
5187 2018-07-03  Tom Tromey  <tom@tromey.com>
5188
5189         * common/ptid.c (ptid_tid_p): Remove.
5190         * common/ptid.h (ptid_tid_p): Don't declare.
5191         * sol-thread.c: Update.
5192
5193 2018-07-03  Tom Tromey  <tom@tromey.com>
5194
5195         * common/ptid.c (ptid_lwp_p): Remove.
5196         * common/ptid.h (ptid_lwp_p): Don't declare.
5197         * fbsd-nat.c: Update.
5198         * linux-nat.c: Update.
5199         * nat/linux-procfs.c: Update.
5200         * nat/x86-linux-dregs.c: Update.
5201         * sol-thread.c: Update.
5202
5203 2018-07-03  Tom Tromey  <tom@tromey.com>
5204
5205         * common/ptid.c (ptid_is_pid): Remove.
5206         * common/ptid.h (ptid_is_pid): Don't declare.
5207         * infrun.c: Update.
5208         * linux-nat.c: Update.
5209         * mi/mi-interp.c: Update.
5210         * remote.c: Update.
5211         * thread.c: Update.
5212
5213 2018-07-03  Tom Tromey  <tom@tromey.com>
5214
5215         * common/ptid.c (ptid_get_tid): Remove.
5216         * common/ptid.h (ptid_get_tid): Don't declare.
5217         * ada-tasks.c: Update.
5218         * aix-thread.c: Update.
5219         * bsd-uthread.c: Update.
5220         * darwin-nat.c: Update.
5221         * fbsd-nat.c: Update.
5222         * i386-darwin-nat.c: Update.
5223         * infrun.c: Update.
5224         * linux-tdep.c: Update.
5225         * nto-procfs.c: Update.
5226         * ppc-ravenscar-thread.c: Update.
5227         * python/py-infthread.c: Update.
5228         * ravenscar-thread.c: Update.
5229         * sol-thread.c: Update.
5230         * sparc-ravenscar-thread.c: Update.
5231         * windows-nat.c: Update.
5232
5233 2018-07-03  Tom Tromey  <tom@tromey.com>
5234
5235         * common/ptid.c (ptid_get_lwp): Remove.
5236         * common/ptid.h (ptid_get_lwp): Don't declare.
5237         * aarch64-linux-nat.c: Update.
5238         * ada-tasks.c: Update.
5239         * aix-thread.c: Update.
5240         * amd64-linux-nat.c: Update.
5241         * arm-linux-nat.c: Update.
5242         * corelow.c: Update.
5243         * fbsd-nat.c: Update.
5244         * fbsd-tdep.c: Update.
5245         * gnu-nat.c: Update.
5246         * i386-cygwin-tdep.c: Update.
5247         * i386-gnu-nat.c: Update.
5248         * i386-linux-nat.c: Update.
5249         * ia64-linux-nat.c: Update.
5250         * inf-ptrace.c: Update.
5251         * infrun.c: Update.
5252         * linux-fork.c: Update.
5253         * linux-nat.c: Update.
5254         * linux-tdep.c: Update.
5255         * linux-thread-db.c: Update.
5256         * mips-linux-nat.c: Update.
5257         * nat/aarch64-linux-hw-point.c: Update.
5258         * nat/aarch64-linux.c: Update.
5259         * nat/linux-btrace.c: Update.
5260         * nat/linux-osdata.c: Update.
5261         * nat/linux-procfs.c: Update.
5262         * nat/x86-linux-dregs.c: Update.
5263         * obsd-nat.c: Update.
5264         * ppc-fbsd-nat.c: Update.
5265         * ppc-linux-nat.c: Update.
5266         * procfs.c: Update.
5267         * python/py-infthread.c: Update.
5268         * ravenscar-thread.c: Update.
5269         * remote.c: Update.
5270         * s390-linux-nat.c: Update.
5271         * sol-thread.c: Update.
5272         * sol2-tdep.c: Update.
5273         * spu-linux-nat.c: Update.
5274         * x86-linux-nat.c: Update.
5275         * xtensa-linux-nat.c: Update.
5276
5277 2018-07-03  Tom Tromey  <tom@tromey.com>
5278
5279         * common/ptid.c (ptid_get_pid): Remove.
5280         * common/ptid.h (ptid_get_pid): Don't declare.
5281         * aarch64-linux-nat.c: Update.
5282         * ada-lang.c: Update.
5283         * aix-thread.c: Update.
5284         * alpha-bsd-nat.c: Update.
5285         * amd64-fbsd-nat.c: Update.
5286         * amd64-linux-nat.c: Update.
5287         * arm-linux-nat.c: Update.
5288         * arm-nbsd-nat.c: Update.
5289         * auxv.c: Update.
5290         * break-catch-syscall.c: Update.
5291         * breakpoint.c: Update.
5292         * bsd-uthread.c: Update.
5293         * corelow.c: Update.
5294         * ctf.c: Update.
5295         * darwin-nat.c: Update.
5296         * fbsd-nat.c: Update.
5297         * fbsd-tdep.c: Update.
5298         * gcore.c: Update.
5299         * gnu-nat.c: Update.
5300         * hppa-nbsd-nat.c: Update.
5301         * hppa-obsd-nat.c: Update.
5302         * i386-fbsd-nat.c: Update.
5303         * ia64-linux-nat.c: Update.
5304         * inf-ptrace.c: Update.
5305         * infcmd.c: Update.
5306         * inferior.c: Update.
5307         * inferior.h: Update.
5308         * inflow.c: Update.
5309         * infrun.c: Update.
5310         * linux-fork.c: Update.
5311         * linux-nat.c: Update.
5312         * linux-tdep.c: Update.
5313         * linux-thread-db.c: Update.
5314         * m68k-bsd-nat.c: Update.
5315         * mi/mi-interp.c: Update.
5316         * mi/mi-main.c: Update.
5317         * mips-linux-nat.c: Update.
5318         * mips-nbsd-nat.c: Update.
5319         * mips64-obsd-nat.c: Update.
5320         * nat/aarch64-linux-hw-point.c: Update.
5321         * nat/aarch64-linux.c: Update.
5322         * nat/linux-btrace.c: Update.
5323         * nat/linux-osdata.c: Update.
5324         * nat/linux-procfs.c: Update.
5325         * nat/x86-linux-dregs.c: Update.
5326         * nto-procfs.c: Update.
5327         * obsd-nat.c: Update.
5328         * ppc-linux-nat.c: Update.
5329         * ppc-nbsd-nat.c: Update.
5330         * ppc-obsd-nat.c: Update.
5331         * proc-service.c: Update.
5332         * procfs.c: Update.
5333         * python/py-inferior.c: Update.
5334         * python/py-infthread.c: Update.
5335         * ravenscar-thread.c: Update.
5336         * record.c: Update.
5337         * remote-sim.c: Update.
5338         * remote.c: Update.
5339         * rs6000-nat.c: Update.
5340         * s390-linux-nat.c: Update.
5341         * sh-nbsd-nat.c: Update.
5342         * sol-thread.c: Update.
5343         * sparc-nat.c: Update.
5344         * sparc64-tdep.c: Update.
5345         * spu-linux-nat.c: Update.
5346         * spu-tdep.c: Update.
5347         * target-debug.h: Update.
5348         * target.c: Update.
5349         * thread.c: Update.
5350         * tid-parse.c: Update.
5351         * tracefile-tfile.c: Update.
5352         * vax-bsd-nat.c: Update.
5353         * windows-nat.c: Update.
5354         * x86-linux-nat.c: Update.
5355         * x86-nat.c: Update.
5356
5357 2018-07-03  Tom Tromey  <tom@tromey.com>
5358
5359         * common/ptid.c (pid_to_ptid): Remove.
5360         * common/ptid.h (pid_to_ptid): Don't declare.
5361         * aix-thread.c: Update.
5362         * arm-linux-nat.c: Update.
5363         * common/ptid.c: Update.
5364         * common/ptid.h: Update.
5365         * corelow.c: Update.
5366         * ctf.c: Update.
5367         * darwin-nat.c: Update.
5368         * fbsd-nat.c: Update.
5369         * fork-child.c: Update.
5370         * gnu-nat.c: Update.
5371         * go32-nat.c: Update.
5372         * inf-ptrace.c: Update.
5373         * infcmd.c: Update.
5374         * inferior.c: Update.
5375         * infrun.c: Update.
5376         * linux-fork.c: Update.
5377         * linux-nat.c: Update.
5378         * nat/aarch64-linux-hw-point.c: Update.
5379         * nat/fork-inferior.c: Update.
5380         * nat/x86-linux-dregs.c: Update.
5381         * nto-procfs.c: Update.
5382         * obsd-nat.c: Update.
5383         * procfs.c: Update.
5384         * progspace.c: Update.
5385         * remote.c: Update.
5386         * rs6000-nat.c: Update.
5387         * s390-linux-nat.c: Update.
5388         * sol-thread.c: Update.
5389         * spu-linux-nat.c: Update.
5390         * target.c: Update.
5391         * top.c: Update.
5392         * tracefile-tfile.c: Update.
5393         * windows-nat.c: Update.
5394
5395 2018-07-03  Tom Tromey  <tom@tromey.com>
5396
5397         * common/ptid.h (ptid_build): Don't declare.
5398         * common/ptid.c (ptid_build): Remove.
5399         * aix-thread.c: Update.
5400         * bsd-kvm.c: Update.
5401         * bsd-uthread.c: Update.
5402         * common/agent.c: Update.
5403         * common/ptid.c: Update.
5404         * common/ptid.h: Update.
5405         * corelow.c: Update.
5406         * darwin-nat.c: Update.
5407         * fbsd-nat.c: Update.
5408         * gnu-nat.c: Update.
5409         * linux-fork.c: Update.
5410         * linux-nat.c: Update.
5411         * linux-thread-db.c: Update.
5412         * nat/linux-osdata.c: Update.
5413         * nat/linux-procfs.c: Update.
5414         * nto-procfs.c: Update.
5415         * obsd-nat.c: Update.
5416         * proc-service.c: Update.
5417         * procfs.c: Update.
5418         * ravenscar-thread.c: Update.
5419         * remote-sim.c: Update.
5420         * remote.c: Update.
5421         * sol-thread.c: Update.
5422         * target.c: Update.
5423         * windows-nat.c: Update.
5424
5425 2018-07-03  Tom Tromey  <tom@tromey.com>
5426
5427         * infrun.c (follow_exec): Use exit_inferior_silent.
5428         * inferior.c (exit_inferior_num_silent): Remove.
5429         * inferior.h (exit_inferior_num_silent): Don't declare.
5430
5431 2018-07-03  Tom Tromey  <tom@tromey.com>
5432
5433         PR cli/23340:
5434         * darwin-nat.c (darwin_attach_pid): Reset inferior and
5435         inferior_ptid on error.
5436
5437 2018-07-02  Maciej W. Rozycki  <macro@mips.com>
5438             Simon Marchi  <simon.marchi@polymtl.ca>
5439
5440         PR tdep/8282
5441         * disasm.h (gdb_disassembler): Add
5442         `m_disassembler_options_holder'. member
5443         * disasm.c (get_all_disassembler_options): New function.
5444         (gdb_disassembler::gdb_disassembler): Use it.
5445         (gdb_buffered_insn_length_init_dis): Likewise.
5446         (gdb_buffered_insn_length): Adjust accordingly.
5447         (set_disassembler_options): Handle options with arguments.
5448         (show_disassembler_options_sfunc): Likewise.  Add a leading new
5449         line if showing options with descriptions.
5450         (disassembler_options_completer): Adapt to using the
5451         `disasm_options_and_args_t' structure.
5452         * mips-tdep.c (mips_disassembler_options): New variable.
5453         (mips_disassembler_options_o32): Likewise.
5454         (mips_disassembler_options_n32): Likewise.
5455         (mips_disassembler_options_n64): Likewise.
5456         (gdb_print_insn_mips): Don't set `disassembler_options'.
5457         (gdb_print_insn_mips_n32, gdb_print_insn_mips_n64): Remove
5458         functions.
5459         (mips_gdbarch_init): Always set `gdbarch_print_insn' to
5460         `gdb_print_insn_mips'.  Set `gdbarch_disassembler_options',
5461         `gdbarch_disassembler_options_implicit' and
5462         `gdbarch_valid_disassembler_options'.
5463         * arm-tdep.c (_initialize_arm_tdep): Adapt to using the
5464         `disasm_options_and_args_t' structure.
5465         * gdbarch.sh (disassembler_options_implicit): New `gdbarch'
5466         method.
5467         (valid_disassembler_options): Switch from `disasm_options_t' to
5468         the `disasm_options_and_args_t' structure.
5469         * NEWS: Document `set disassembler-options' support for the MIPS
5470         target.
5471         * gdbarch.h: Regenerate.
5472         * gdbarch.c: Regenerate.
5473
5474 2018-07-02  Sebastian Huber  <sebastian.huber@embedded-brains.de>
5475
5476         * riscv-tdep.c (riscv_register_aliases): Swap "fp" and "s0" entries.
5477
5478 2018-06-29  Joel Brobecker  <brobecker@adacore.com>
5479
5480         * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Add missing
5481         parameter in call to amd64_target_description.
5482         * amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise.
5483         * amd64-fbsd-tdep.c (amd64fbsd_core_read_description)
5484         (amd64fbsd_init_abi): Likewise.
5485         * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
5486         * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
5487         * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
5488         * amd64-fbsd-nat.c (amd64_fbsd_nat_target): Likewise.
5489
5490 2018-06-29  Pedro Alves  <palves@redhat.com>
5491
5492         * gdb/amd64-tdep.h (amd64_create_target_description): Add
5493         "segments" parameter.
5494         * gdb/amd64-tdep.c (amd64_none_init_abi, amd64_x32_none_init_abi)
5495         (_initialize_amd64_tdep): Update call to
5496         amd64_create_target_description.
5497         (amd64_target_description): Add "segments" parameter.  Adjust
5498         the implementation to use it.
5499         * gdb/amd64-linux-tdep.c (amd64_linux_read_description): Update
5500         call to amd64_create_target_description.
5501         * gdb/amd64-windows-tdep.c (amd64_windows_init_abi): Likewise.
5502         * gdb/arch/amd64.h (amd64_create_target_description): Add
5503         "segments" register.
5504         * gdb/arch/amd64.c (amd64_create_target_description): Add
5505         "segments" parameter.  Call create_feature_i386_64bit_segments
5506         only if SEGMENTS is true.
5507         * gdb/gdbserver/win32-i386-low.c (i386_arch_setup): Update
5508         call to amd64_create_target_description.
5509
5510 2018-06-29  Pedro Alves  <palves@redhat.com>
5511
5512         * thread.c (thread_target_id_str): New, factored out from ...
5513         (print_thread_info_1): ... here.  Use it to compute the max
5514         "Target Id" column width.
5515
5516 2018-06-29  Pedro Alves  <palves@redhat.com>
5517
5518         * remote.c (remote_target::extra_thread_info): Delete
5519         'display_buf' and 'n' locals.  from the cache, regardless of
5520         packet mechanims is in use.  Use cache for qThreadExtra and qP
5521         methods too.
5522
5523 2018-06-29  Pedro Alves  <palves@redhat.com>
5524
5525         * blockframe.c (find_pc_sect_containing_function): New function.
5526         * breakpoint.c (print_breakpoint_location): Don't call
5527         find_pc_sect_function.
5528         * linespec.c (create_sals_line_offset): Record the location's
5529         symbol in the sal.
5530         * linespec.c (convert_address_location_to_sals): Fill in sal's
5531         symbol with find_pc_sect_containing_function.
5532         * symtab.c (find_function_start_sal): Rename to ...
5533         (find_function_start_sal_1): ... this.
5534         (find_function_start_sal): Reimplement as wrapper around
5535         find_function_start_sal_1, and use
5536         find_pc_sect_containing_function to fill in the sal's symbol.
5537         (find_function_start_sal(symbol*, bool)): Adjust.
5538         * symtab.h (find_pc_function, find_pc_sect_function): Adjust
5539         comments.
5540         (find_pc_sect_containing_function): Declare.
5541
5542 2018-06-29  Pedro Alves  <palves@redhat.com>
5543
5544         * inline-frame.c (stopped_by_user_bp_inline_frame): Return
5545         true if the the location has no symbol.
5546
5547 2018-06-28  Tom Tromey  <tom@tromey.com>
5548
5549         * NEWS: Mention --enable-codesign.
5550         * silent-rules.mk (ECHO_SIGN): New variable.
5551         * configure.ac: Add --enable-codesign.
5552         * configure: Rebuild.
5553         * Makefile.in (CODESIGN, CODESIGN_CERT): New variables.
5554         (gdb$(EXEEXT)): Optionally invoke codesign.
5555
5556 2018-06-28  Pedro Alves  <palves@redhat.com>
5557
5558         * gdbthread.h (struct thread_suspend_state) <stop_pc>: Extend
5559         comments.
5560         (switch_to_thread_no_regs): Adjust comment.
5561         * infcmd.c (stop_pc): Delete.
5562         (post_create_inferior, info_program_command): Replace references
5563         to stop_pc with references to thread_info->suspend.stop_pc.
5564         * inferior.h (stop_pc): Delete declaration.
5565         * infrun.c (proceed, handle_syscall_event, fill_in_stop_func)
5566         (handle_inferior_event_1, handle_signal_stop)
5567         (process_event_stop_test, keep_going_stepped_thread)
5568         (handle_step_into_function, handle_step_into_function_backward)
5569         (print_stop_location): Replace references to stop_pc with
5570         references to thread_info->suspend.stop_pc.
5571         (struct infcall_suspend_state) <stop_pc>: Delete field.
5572         (save_infcall_suspend_state, restore_infcall_suspend_state):
5573         Remove references to inf_stat->stop_pc.
5574         * linux-fork.c (fork_load_infrun_state): Likewise.
5575         * record-btrace.c (record_btrace_set_replay): Likewise.
5576         * record-full.c (record_full_goto_entry): Likewise.
5577         * remote.c (print_one_stopped_thread): Likewise.
5578         * target.c (target_resume): Extend comment.
5579         * thread.c (set_executing_thread): New.
5580         (set_executing): Use it.
5581         (switch_to_thread_no_regs, switch_to_no_thread, switch_to_thread):
5582         Remove references to stop_pc.
5583
5584 2018-06-28  Pedro Alves  <palves@redhat.com>
5585
5586         * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>:
5587         Moving fetching stop_pc until after ecs->event_thread is refreshed.
5588
5589 2018-06-28  Tom Tromey  <tom@tromey.com>
5590
5591         * coffread.c (coff_symfile_finish): Update.
5592         * xcoffread.c (xcoff_symfile_finish): Update.
5593         * elfread.c (elf_symfile_finish): Update.
5594         * symfile.h (dwarf2_free_objfile): Don't declare.
5595         * dwarf2read.c (_initialize_dwarf2_read): Use
5596         register_objfile_data_with_cleanup.
5597         (dwarf2_free_objfile): Now static.  Change signature.
5598
5599 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
5600
5601         * symfile.c (add_symbol_file_command, _initialize_symfile): Add
5602         option "-o" to add-symbol-file-load to add an offset to each
5603         section's load address.
5604         * symfile.c (set_objfile_default_section_offset): New function.
5605
5606 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
5607
5608         * symfile.c (add_symbol_file_command): Make sure that sections
5609         with the same name are sorted in the same order.
5610
5611 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
5612
5613         * symfile.c (add_symbol_file_command, _initialize_symfile): Do not
5614         require the second argument.  If omitted, load sections at the
5615         addresses specified in the file.
5616
5617 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
5618
5619         * symfile.c (symbol_file_command, symbol_file_add_main_1)
5620         (_initialize_symfile): Add option "-o" to symbol-file to add an
5621         offset to each section of the symbol file.
5622
5623 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
5624
5625         * MAINTAINERS (Write After Approval): Add Petr Tesarik.
5626
5627 2018-06-27  Tom Tromey  <tom@tromey.com>
5628
5629         * stack.c (_initialize_stack): Update "func" help text.
5630
5631 2018-06-27  Tom Tromey  <tom@tromey.com>
5632
5633         * python/py-unwind.c (unwind_info_object) <saved_regs>: Now a
5634         std::vector.
5635         (unwind_infopy_str, pyuw_create_unwind_info)
5636         (unwind_infopy_add_saved_register, pyuw_sniffer)
5637         (unwind_infopy_dealloc, unwind_infopy_add_saved_register):
5638         Update.
5639         (struct saved_reg): Add constructor.
5640         <value>: Now a gdbpy_ref<>.
5641
5642 2018-06-27  Tom Tromey  <tom@tromey.com>
5643
5644         * machoread.c (macho_symfile_read): Define "symbol_table" earlier.
5645
5646 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
5647
5648         * gdb-gdb.py.in: Format using autopep8.
5649
5650 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
5651
5652         * gdb-gdb.py.in (CoreAddrPrettyPrinter): New class.
5653         (type_lookup_function): Recognize CORE_ADDR values.
5654
5655 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
5656
5657         * gdb-gdb.py.in (StructMainTypePrettyPrinter) <to_string>: Don't
5658         print tag_name.
5659
5660 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
5661
5662         * gdb-gdb.py.in (TypeFlag) <__cmp__>: Remove.
5663         <__lt__>: Add.
5664
5665 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
5666
5667         * gdb-gdb.py: Move to...
5668         * gdb-gdb.py.in: ... here.
5669         * configure.ac (AC_CONFIG_FILES): Add gdb-gdb.py.
5670         * Makefile.in (all): Add gdb-gdb.gdb and gdb-gdb.py as
5671         dependencies.
5672         (distclean): Remove gdb-gdb.py when cleaning.
5673         (gdb-gdb.py, gdb-gdb.gdb): New rules.
5674         * configure: Re-generate.
5675
5676 2018-06-27  Pedro Alves  <palves@redhat.com>
5677
5678         * proc-service.c (get_ps_regcache): New.
5679         (ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
5680         (ps_lsetfpregs): Use it.
5681
5682 2018-06-27  Omair Javaid  <omair.javaid@linaro.org>
5683
5684         PR gdb/21695
5685         * dwarf2read.c (lnp_state_machine::check_line_address): Update declaration.
5686         (dwarf_decode_lines_1): Adjust.
5687
5688 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
5689
5690         * fbsd-nat.h (class fbsd_nat_target) <find_memory_regions>: Add
5691         override.
5692         <info_proc>: Likewise.
5693
5694 2018-06-26  Joel Brobecker  <brobecker@adacore.com>
5695
5696         * windows-nat.c (do_windows_fetch_inferior_registers): Rename
5697         to windows_fetch_one_register, and only handle the case of
5698         fetching one register.  Move the code that reloads the context
5699         and iterates over all registers if R is negative to...
5700         (windows_nat_target::fetch_registers): ... here.
5701         (do_windows_store_inferior_registers): Rename to
5702         windows_store_one_register, and only handle the case of storing
5703         one register.  Move the code that handles the case where r is
5704         negative to...
5705         (windows_nat_target::store_registers) ... here.
5706
5707 2018-06-26  Tom Tromey  <tom@tromey.com>
5708
5709         PR rust/22574:
5710         * typeprint.c (whatis_exp): Allow ptype/o for Rust.
5711         * rust-lang.c (rust_print_struct_def): Add podata parameter.
5712         Update.
5713         (rust_internal_print_type): Add podata parameter.
5714         (rust_print_type): Update.
5715
5716 2018-06-26  Tom Tromey  <tom@tromey.com>
5717
5718         * typeprint.h (struct print_offset_data) <update, finish,
5719         maybe_print_hole>: New methods.
5720         <indentation>: New constant.
5721         * typeprint.c (print_offset_data::indentation): Define.
5722         (print_offset_data::maybe_print_hole, print_offset_data::update)
5723         (print_offset_data::finish): Move from c-typeprint.c and rename.
5724         * c-typeprint.c (OFFSET_SPC_LEN): Remove.
5725         (print_spaces_filtered_with_print_options): Update.
5726         (c_print_type_union_field_offset, maybe_print_hole)
5727         (c_print_type_struct_field_offset): Move to typeprint.c and
5728         rename.
5729         (c_type_print_base_struct_union): Update.
5730
5731 2018-06-25  Pedro Alves  <palves@redhat.com>
5732
5733         * gdbthread.h (thread_info_ref, delete_thread)
5734         (delete_thread_silent, first_thread_of_inferior)
5735         (any_thread_of_inferior, switch_to_thread)
5736         (enable_thread_stack_temporaries)
5737         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
5738         (get_last_thread_stack_temporary)
5739         (value_in_thread_stack_temporaries, can_access_registers_thread):
5740         Spell out "struct thread_info" instead of just "thread_info".
5741         * inferior.h (notice_new_inferior): Likewise.
5742
5743 2018-06-25  Pedro Alves  <palves@redhat.com>
5744
5745         * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
5746         pass thread_info pointer to delete_thread.
5747         (windows_nat_target::detach): Pass inferior pointer to
5748         detach_inferior.
5749         * aix-thread.c (sync_threadlists): Pass thread_info pointer to
5750         delete_thread.
5751         * bsd-kvm.c (bsd_kvm_target::close): Use discard_all_inferiors.
5752         * darwin-nat.c (darwin_check_new_threads): Use find_thread_ptid
5753         and pass a thread_info pointer to delete_thread.
5754         * fbsd-nat.c (fbsd_nat_target::wait): Use find_thread_ptid and
5755         pass thread_info pointer to delete_thread.
5756         * go32-nat.c (go32_nat_target::mourn_inferior): Remove
5757         delete_thread_silent call.
5758         * procfs.c (procfs_target::detach): Pass inferior pointer to
5759         detach_inferior.
5760         (procfs_target::wait): Pass thread_info pointer to delete_thread.
5761         * remote-sim.c (gdbsim_target::mourn_inferior): Remove
5762         delete_thread_silent call.
5763         * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
5764         pass thread_info pointer to delete_thread.
5765         (windows_nat_target::detach): Pass inferior pointer to
5766         delete_inferior.
5767
5768 2018-06-22  Alan Hayward  <alan.hayward@arm.com>
5769
5770         * regcache.c (readable_regcache::read_part): Fix asserts.
5771         (reg_buffer::raw_collect_part): New function.
5772         (regcache::write_part): Fix asserts.
5773         (reg_buffer::raw_supply_part): New function.
5774         (regcache::transfer_regset_register): New helper function.
5775         (regcache::transfer_regset): Call new functions.
5776         (regcache_supply_regset): Use gdb_byte*.
5777         (regcache::supply_regset): Likewise.
5778         (regcache_collect_regset): Likewise.
5779         (regcache::collect_regset): Likewise.
5780         * regcache.h (reg_buffer::raw_collect_part): New declaration.
5781         (reg_buffer::raw_supply_part): Likewise.
5782         (regcache::transfer_regset_register): Likewise.
5783         (regcache::transfer_regset): Use gdb_byte*.
5784
5785 2018-06-22  Alan Hayward  <alan.hayward@arm.com>
5786
5787         * nat/aarch64-sve-linux-ptrace.h (HAS_SVE_STATE): Use &.
5788
5789 2018-06-21  Pedro Alves  <palves@redhat.com>
5790
5791         * ada-lang.h (ada_get_task_number): Take a thread_info pointer
5792         instead of a ptid_t.  All callers adjusted.
5793         * ada-tasks.c (ada_get_task_number): Likewise.  All callers
5794         adjusted.
5795         (print_ada_task_info, display_current_task_id, task_command_1):
5796         Adjust.
5797         * breakpoint.c (watchpoint_in_thread_scope): Adjust to use
5798         inferior_thread.
5799         (breakpoint_kind): Adjust.
5800         (remove_breakpoints_pid): Rename to ...
5801         (remove_breakpoints_inf): ... this.  Adjust to take an inferior
5802         pointer.  All callers adjusted.
5803         (bpstat_clear_actions): Use inferior_thread.
5804         (get_bpstat_thread): New.
5805         (bpstat_do_actions): Use it.
5806         (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust
5807         to take a thread_info pointer.  All callers adjusted.
5808         (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint)
5809         (breakpoint_re_set_thread): Use inferior_thread.
5810         * breakpoint.h (struct inferior): Forward declare.
5811         (bpstat_stop_status): Update.
5812         (remove_breakpoints_pid): Delete.
5813         (remove_breakpoints_inf): New.
5814         * bsd-uthread.c (bsd_uthread_target::wait)
5815         (bsd_uthread_target::update_thread_list): Use find_thread_ptid.
5816         * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch)
5817         (maint_btrace_packet_history_cmd)
5818         (maint_btrace_clear_packet_history_cmd): Adjust.
5819         (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use
5820         inferior_thread.
5821         * cli/cli-interp.c: Include "inferior.h".
5822         * common/refcounted-object.h (struct
5823         refcounted_object_ref_policy): New.
5824         * compile/compile-object-load.c: Include gdbthread.h.
5825         (store_regs): Use inferior_thread.
5826         * corelow.c (core_target::close): Use current_inferior.
5827         (core_target_open): Adjust to use first_thread_of_inferior and use
5828         the current inferior.
5829         * ctf.c (ctf_target::close): Adjust to use current_inferior.
5830         * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ...
5831         <thread>: ... this new field.  All references adjusted.
5832         (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor):
5833         Take a thread_info pointer instead of a ptid_t.
5834         * dummy-frame.h (dummy_frame_push, dummy_frame_pop)
5835         (dummy_frame_discard, register_dummy_frame_dtor): Take a
5836         thread_info pointer instead of a ptid_t.
5837         * elfread.c: Include "inferior.h".
5838         (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop):
5839         Use inferior_thread.
5840         * eval.c (evaluate_subexp): Likewise.
5841         * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use
5842         inferior_thread.
5843         * gdb_proc_service.h (struct thread_info): Forward declare.
5844         (struct ps_prochandle) <ptid>: Delete, replaced by ...
5845         <thread>: ... this new field.  All references adjusted.
5846         * gdbarch.h, gdbarch.c: Regenerate.
5847         * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a
5848         'thread' parameter.  All implementations and callers adjusted.
5849         * gdbthread.h (thread_info) <set_running>: New method.
5850         (delete_thread, delete_thread_silent): Take a thread_info pointer
5851         instead of a ptid.
5852         (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete.
5853         (first_thread_of_process): Delete, replaced by ...
5854         (first_thread_of_inferior): ... this new function.  All callers
5855         adjusted.
5856         (any_live_thread_of_process): Delete, replaced by ...
5857         (any_live_thread_of_inferior): ... this new function.  All callers
5858         adjusted.
5859         (switch_to_thread, switch_to_no_thread): Declare.
5860         (is_executing): Delete.
5861         (enable_thread_stack_temporaries): Update comment.
5862         <enable_thread_stack_temporaries>: Take a thread_info pointer
5863         instead of a ptid_t.  Incref the thread.
5864         <~enable_thread_stack_temporaries>: Decref the thread.
5865         <m_ptid>: Delete
5866         <m_thr>: New.
5867         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
5868         (get_last_thread_stack_temporary)
5869         (value_in_thread_stack_temporaries, can_access_registers_thread):
5870         Take a thread_info pointer instead of a ptid_t.  All callers
5871         adjusted.
5872         * infcall.c (get_call_return_value): Use inferior_thread.
5873         (run_inferior_call): Work with thread pointers instead of ptid_t.
5874         (call_function_by_hand_dummy): Work with thread pointers instead
5875         of ptid_t.  Use thread_info_ref.
5876         * infcmd.c (proceed_thread_callback): Access thread's state
5877         directly.
5878         (ensure_valid_thread, ensure_not_running): Use inferior_thread,
5879         access thread's state directly.
5880         (continue_command): Use inferior_thread.
5881         (info_program_command): Use find_thread_ptid and access thread
5882         state directly.
5883         (proceed_after_attach_callback): Use thread state directly.
5884         (notice_new_inferior): Take a thread_info pointer instead of a
5885         ptid_t.  All callers adjusted.
5886         (exit_inferior): Take an inferior pointer instead of a pid.  All
5887         callers adjusted.
5888         (exit_inferior_silent): New.
5889         (detach_inferior): Delete.
5890         (valid_gdb_inferior_id, pid_to_gdb_inferior_id)
5891         (gdb_inferior_id_to_pid, in_inferior_list): Delete.
5892         (detach_inferior_command, kill_inferior_command): Use
5893         find_inferior_id instead of valid_gdb_inferior_id and
5894         gdb_inferior_id_to_pid.
5895         (inferior_command): Use inferior and thread pointers.
5896         * inferior.h (struct thread_info): Forward declare.
5897         (notice_new_inferior): Take a thread_info pointer instead of a
5898         ptid_t.  All callers adjusted.
5899         (detach_inferior): Delete declaration.
5900         (exit_inferior, exit_inferior_silent): Take an inferior pointer
5901         instead of a pid.  All callers adjusted.
5902         (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
5903         (valid_gdb_inferior_id): Delete.
5904         * infrun.c (follow_fork_inferior, proceed_after_vfork_done)
5905         (handle_vfork_child_exec_or_exit, follow_exec): Adjust.
5906         (struct displaced_step_inferior_state) <pid>: Delete, replaced by
5907         ...
5908         <inf>: ... this new field.
5909         <step_ptid>: Delete, replaced by ...
5910         <step_thread>: ... this new field.
5911         (get_displaced_stepping_state): Take an inferior pointer instead
5912         of a pid.  All callers adjusted.
5913         (displaced_step_in_progress_any_inferior): Adjust.
5914         (displaced_step_in_progress_thread): Take a thread pointer instead
5915         of a ptid_t.  All callers adjusted.
5916         (displaced_step_in_progress, add_displaced_stepping_state): Take
5917         an inferior pointer instead of a pid.  All callers adjusted.
5918         (get_displaced_step_closure_by_addr): Adjust.
5919         (remove_displaced_stepping_state): Take an inferior pointer
5920         instead of a pid.  All callers adjusted.
5921         (displaced_step_prepare_throw, displaced_step_prepare)
5922         (displaced_step_fixup): Take a thread pointer instead of a ptid_t.
5923         All callers adjusted.
5924         (start_step_over): Adjust.
5925         (infrun_thread_ptid_changed): Remove bit updating ptids in the
5926         displaced step queue.
5927         (do_target_resume): Adjust.
5928         (fetch_inferior_event): Use inferior_thread.
5929         (context_switch, get_inferior_stop_soon): Take an
5930         execution_control_state pointer instead of a ptid_t.  All callers
5931         adjusted.
5932         (switch_to_thread_cleanup): Delete.
5933         (stop_all_threads): Use scoped_restore_current_thread.
5934         * inline-frame.c: Include "gdbthread.h".
5935         (inline_state) <inline_state>: Take a thread pointer instead of a
5936         ptid_t.  All callers adjusted.
5937         <ptid>: Delete, replaced by ...
5938         <thread>: ... this new field.
5939         (find_inline_frame_state): Take a thread pointer instead of a
5940         ptid_t.  All callers adjusted.
5941         (skip_inline_frames, step_into_inline_frame)
5942         (inline_skipped_frames, inline_skipped_symbol): Take a thread
5943         pointer instead of a ptid_t.  All callers adjusted.
5944         * inline-frame.h (skip_inline_frames, step_into_inline_frame)
5945         (inline_skipped_frames, inline_skipped_symbol): Likewise.
5946         * linux-fork.c (delete_checkpoint_command): Adjust to use thread
5947         pointers directly.
5948         * linux-nat.c (get_detach_signal): Likewise.
5949         * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter.
5950         (thread_db_notice_clone): Adjust.
5951         (thread_db_find_new_threads_silently)
5952         (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take
5953         a thread pointer instead of a ptid_t.  All callers adjusted.
5954         * mi/mi-cmd-var.c: Include "inferior.h".
5955         (mi_cmd_var_update_iter): Update to use thread pointers.
5956         * mi/mi-interp.c (mi_new_thread): Update to use the thread's
5957         inferior directly.
5958         (mi_output_running_pid, mi_inferior_count): Delete, bits factored
5959         out to ...
5960         (mi_output_running): ... this new function.
5961         (mi_on_resume_1): Adjust to use it.
5962         (mi_user_selected_context_changed): Adjust to use inferior_thread.
5963         * mi/mi-main.c (proceed_thread): Adjust to use thread pointers
5964         directly.
5965         (interrupt_thread_callback): : Adjust to use thread and inferior
5966         pointers.
5967         * proc-service.c: Include "gdbthread.h".
5968         (ps_pglobal_lookup): Adjust to use the thread's inferior directly.
5969         * progspace-and-thread.c: Include "inferior.h".
5970         * progspace.c: Include "inferior.h".
5971         * python/py-exitedevent.c (create_exited_event_object): Adjust to
5972         hold a reference to an inferior_object.
5973         * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use
5974         inferior_thread.
5975         * python/py-inferior.c (struct inferior_object): Give the type a
5976         tag name instead of a typedef.
5977         (python_on_normal_stop): No need to check if the current thread is
5978         listed.
5979         (inferior_to_inferior_object): Change return type to
5980         inferior_object.  All callers adjusted.
5981         (find_thread_object): Delete, bits factored out to ...
5982         (thread_to_thread_object): ... this new function.
5983         * python/py-infthread.c (create_thread_object): Use
5984         inferior_to_inferior_object.
5985         (thpy_is_stopped): Use thread pointer directly.
5986         (gdbpy_selected_thread): Use inferior_thread.
5987         * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete
5988         field, replaced with ...
5989         <thread>: ... this new field.  All users adjusted.
5990         (btpy_insn_or_gap_new): Drop const.
5991         (btpy_list_new): Take a thread pointer instead of a ptid_t.  All
5992         callers adjusted.
5993         * python/py-record.c: Include "gdbthread.h".
5994         (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
5995         a ptid_t.  All callers adjusted.
5996         (gdbpy_current_recording): Use inferior_thread.
5997         * python/py-record.h (recpy_record_object) <ptid>: Delete
5998         field, replaced with ...
5999         <thread>: ... this new field.  All users adjusted.
6000         (recpy_element_object) <ptid>: Delete
6001         field, replaced with ...
6002         <thread>: ... this new field.  All users adjusted.
6003         (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
6004         a ptid_t.  All callers adjusted.
6005         * python/py-threadevent.c: Include "gdbthread.h".
6006         (get_event_thread): Use thread_to_thread_object.
6007         * python/python-internal.h (struct inferior_object): Forward
6008         declare.
6009         (find_thread_object, find_inferior_object): Delete declarations.
6010         (thread_to_thread_object, inferior_to_inferior_object): New
6011         declarations.
6012         * record-btrace.c: Include "inferior.h".
6013         (require_btrace_thread): Use inferior_thread.
6014         (record_btrace_frame_sniffer)
6015         (record_btrace_tailcall_frame_sniffer): Use inferior_thread.
6016         (get_thread_current_frame): Use scoped_restore_current_thread and
6017         switch_to_thread.
6018         (get_thread_current_frame): Use thread pointer directly.
6019         (record_btrace_replay_at_breakpoint): Use thread's inferior
6020         pointer directly.
6021         * record-full.c: Include "inferior.h".
6022         * regcache.c: Include "gdbthread.h".
6023         (get_thread_arch_regcache): Use the inferior's address space
6024         directly.
6025         (get_thread_regcache, registers_changed_thread): New.
6026         * regcache.h (get_thread_regcache(thread_info *thread)): New
6027         overload.
6028         (registers_changed_thread): New.
6029         (remote_target) <remote_detach_1>: Swap order of parameters.
6030         (remote_add_thread): <remote_add_thread>: Return the new thread.
6031         (get_remote_thread_info(ptid_t)): New overload.
6032         (remote_target::remote_notice_new_inferior): Use thread pointers
6033         directly.
6034         (remote_target::process_initial_stop_replies): Use
6035         thread_info::set_running.
6036         (remote_target::remote_detach_1, remote_target::detach)
6037         (extended_remote_target::detach): Adjust.
6038         * stack.c (frame_show_address): Use inferior_thread.
6039         * target-debug.h (target_debug_print_thread_info_pp): New.
6040         * target-delegates.c: Regenerate.
6041         * target.c (default_thread_address_space): Delete.
6042         (memory_xfer_partial_1): Use current_inferior.
6043         (target_detach): Use current_inferior.
6044         (target_thread_address_space): Delete.
6045         (generic_mourn_inferior): Use current_inferior.
6046         * target.h (struct target_ops) <thread_address_space>: Delete.
6047         (target_thread_address_space): Delete.
6048         * thread.c (init_thread_list): Use ALL_THREADS_SAFE.  Use thread
6049         pointers directly.
6050         (delete_thread_1, delete_thread, delete_thread_silent): Take a
6051         thread pointer instead of a ptid_t.  Adjust all callers.
6052         (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete.
6053         (first_thread_of_process): Delete, replaced by ...
6054         (first_thread_of_inferior): ... this new function.  All callers
6055         adjusted.
6056         (any_thread_of_process): Rename to ...
6057         (any_thread_of_inferior): ... this, and take an inferior pointer.
6058         (any_live_thread_of_process): Rename to ...
6059         (any_live_thread_of_inferior): ... this, and take an inferior
6060         pointer.
6061         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
6062         (value_in_thread_stack_temporaries)
6063         (get_last_thread_stack_temporary): Take a thread pointer instead
6064         of a ptid_t.  Adjust all callers.
6065         (thread_info::set_running): New.
6066         (validate_registers_access): Use inferior_thread.
6067         (can_access_registers_ptid): Rename to ...
6068         (can_access_registers_thread): ... this, and take a thread
6069         pointer.
6070         (print_thread_info_1): Adjust to compare thread pointers instead
6071         of ptids.
6072         (switch_to_no_thread, switch_to_thread): Make extern.
6073         (scoped_restore_current_thread::~scoped_restore_current_thread):
6074         Use m_thread pointer directly.
6075         (scoped_restore_current_thread::scoped_restore_current_thread):
6076         Use inferior_thread.
6077         (thread_command): Use thread pointer directly.
6078         (thread_num_make_value_helper): Use inferior_thread.
6079         * top.c (execute_command): Use inferior_thread.
6080         * tui/tui-interp.c: Include "inferior.h".
6081         * varobj.c (varobj_create): Use inferior_thread.
6082         (value_of_root_1): Use find_thread_global_id instead of
6083         global_thread_id_to_ptid.
6084
6085 2018-06-21  Alan Hayward  <alan.hayward@arm.com>
6086
6087         * regcache.c (readable_regcache::read_part): Avoid memcpy when
6088         possible.
6089         (regcache::write_part): Likewise.
6090         (readable_regcache::cooked_read_part): Update comment.
6091         (readable_regcache::cooked_write_part): Likewise.
6092         * regcache.h: (readable_regcache::read_part): Likewise.
6093         (regcache::write_part): Likewise.
6094
6095 2018-06-21  Richard Bunt  <richard.bunt@arm.com>
6096             Dirk Schubert  <dirk.schubert@arm.com>
6097
6098         * aarch64-linux-nat.c (post_attach): New.
6099         (aarch64_linux_nat_target::post_attach): Override post_attach to
6100         record the number of hardware debug registers.
6101
6102 2018-06-20  Tom Tromey  <tom@tromey.com>
6103
6104         * python/py-param.c (add_setshow_generic): Make parameters const.
6105         (parmpy_init): Update.
6106
6107 2018-06-20  Simon Marchi  <simon.marchi@polymtl.ca>
6108
6109         * regcache.h (regcache_cooked_read_ftype): Rename to...
6110         (register_read_ftype): ...this, change type to function_view.
6111         (class reg_buffer) <save>: Remove src parameter.
6112         (readonly_detached_regcache) <readonly_detached_regcache>: Make
6113         parameter non-const in first overload.  Remove src parameter in
6114         second overload.
6115         * regcache.c (do_cooked_read): Remove.
6116         (readonly_detached_regcache::readonly_detached_regcache): Make
6117         parameter non-const, adjust call to other constructor.
6118         (reg_buffer::save): Remove src parameter.
6119         * frame.c (do_frame_register_read): Remove.
6120         (frame_save_as_regcache): Use lambda function.
6121         * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
6122         parameter to ppu2spu_data *.
6123         (ppu2spu_sniffer): Use lambda function.
6124
6125 2018-06-20  Simon Marchi  <simon.marchi@polymtl.ca>
6126
6127         * record-full.c (record_full_target::insert_breakpoint): Remove
6128         "struct" keyword, add const.
6129
6130 2018-06-19  Simon Marchi  <simon.marchi@ericsson.com>
6131
6132         * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
6133         PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
6134         * configure.ac: Remove AC_PREREQ, add missing quoting.
6135         * gnulib/configure.ac: Modernize usage of
6136         AC_INIT/AM_INIT_AUTOMAKE.  Remove AC_PREREQ.
6137         * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
6138         (AUTOMAKE_VERSION): Bump to 1.15.1.
6139         * configure: Re-generate.
6140         * config.in: Re-generate.
6141         * aclocal.m4: Re-generate.
6142         * gnulib/aclocal.m4: Re-generate.
6143         * gnulib/config.in: Re-generate.
6144         * gnulib/configure: Re-generate.
6145         * gnulib/import/Makefile.in: Re-generate.
6146
6147 2018-06-19  Pedro Alves  <palves@redhat.com>
6148
6149         * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
6150         (lookup_minimal_symbol_by_pc_section): ... here with
6151         gdb_assert_not_reached added.
6152
6153 2018-06-19  Pedro Alves  <palves@redhat.com>
6154
6155         * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
6156         parameter with a block parameter.  Compare location's block symbol
6157         with the frame's block instead of addresses.
6158         (skip_inline_frames): Pass the current block instead of the
6159         frame's address.  Break out as soon as we determine the frame
6160         should not be skipped.
6161
6162 2018-06-18  Tom Tromey  <tom@tromey.com>
6163
6164         * solib-aix.c (solib_aix_get_section_offsets): Return
6165         unique_xmalloc_ptr.
6166         (solib_aix_solib_create_inferior_hook): Update.
6167
6168 2018-06-18  Tom Tromey  <tom@tromey.com>
6169
6170         * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
6171
6172 2018-06-18  Tom Tromey  <tom@tromey.com>
6173
6174         * solib-frv.c (frv_relocate_main_executable): Use
6175         unique_xmalloc_ptr.
6176         * solib-dsbt.c (dsbt_relocate_main_executable): Use
6177         unique_xmalloc_ptr.
6178
6179 2018-06-18  Tom Tromey  <tom@tromey.com>
6180
6181         * objfiles.h (inhibit_section_map_updates): Update.
6182         (resume_section_map_updates, resume_section_map_updates_cleanup):
6183         Remove.
6184         * solib-svr4.c (svr4_handle_solib_event): Update.
6185         * objfiles.c (inhibit_section_map_updates): Return
6186         scoped_restore_tmpl<int>.
6187         (resume_section_map_updates, resume_section_map_updates_cleanup):
6188         Remove.
6189
6190 2018-06-18  Tom Tromey  <tom@tromey.com>
6191
6192         * valprint.h (read_string): Update.
6193         * valprint.c (read_string): Change type of "buffer".
6194         (val_print_string): Update.
6195         * python/py-value.c (valpy_string): Update.
6196         * language.h (struct language_defn) <la_get_string>: Change
6197         type of "buffer".
6198         (default_get_string, c_get_string): Update.
6199         * language.c (default_get_string): Change type of "buffer".
6200         * guile/scm-value.c (gdbscm_value_to_string): Update.
6201         * c-lang.c (c_get_string): Change type of "buffer".
6202
6203 2018-06-18  Tom Tromey  <tom@tromey.com>
6204
6205         * ser-mingw.c (struct pipe_state_destroyer): New.
6206         (pipe_state_up): New typedef.
6207         (cleanup_pipe_state): Remove.
6208         (pipe_windows_open): Use pipe_state_up.  Don't release argv.
6209
6210 2018-06-18  Tom Tromey  <tom@tromey.com>
6211
6212         * rust-lang.h (rust_yyerror): Don't declare.
6213         * rust-lang.c (rust_language_defn): Update.
6214         * rust-exp.y (yyerror): Now static.
6215         * parse.c (parse_exp_in_context_1): Update.
6216         * p-lang.h (p_yyerror): Don't declare.
6217         * p-lang.c (p_language_defn): Update.
6218         * p-exp.y (yyerror): Now static.
6219         * opencl-lang.c (opencl_language_defn): Update.
6220         * objc-lang.c (objc_language_defn): Update.
6221         * m2-lang.h (m2_yyerror): Don't declare.
6222         * m2-lang.c (m2_language_defn): Update.
6223         * m2-exp.y (yyerror): Now static.
6224         * language.h (struct language_defn) <la_error>: Remove.
6225         * language.c (unk_lang_error): Remove.
6226         (unknown_language_defn, auto_language_defn): Remove.
6227         * go-lang.h (go_yyerror): Don't declare.
6228         * go-lang.c (go_language_defn): Update.
6229         * go-exp.y (yyerror): Now static.
6230         * f-lang.h (f_yyerror): Don't declare.
6231         * f-lang.c (f_language_defn): Update.
6232         * f-exp.y (yyerror): Now static.
6233         * d-lang.h (d_yyerror): Don't declare.
6234         * d-lang.c (d_language_defn): Update.
6235         * d-exp.y (yyerror): Now static.
6236         * c-lang.h (c_yyerror): Don't declare.
6237         * c-lang.c (c_language_defn, cplus_language_defn)
6238         (asm_language_defn, minimal_language_defn): Update.
6239         * c-exp.y (yyerror): Now static.
6240         * ada-lang.h (ada_yyerror): Don't declare.
6241         * ada-lang.c (ada_language_defn): Update.
6242         * ada-exp.y (yyerror): Now static.
6243
6244 2018-06-18  Alan Hayward  <alan.hayward@arm.com>
6245
6246         * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
6247         (store_sveregs_to_thread): Likewise.
6248         (aarch64_linux_fetch_inferior_registers): Check for SVE.
6249         (aarch64_linux_store_inferior_registers): Likewise.
6250         * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
6251         function.
6252         (aarch64_sve_regs_copy_to_regcache): Likewise.
6253         (aarch64_sve_regs_copy_from_regcache): Likewise.
6254         * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
6255         declaration.
6256         (aarch64_sve_regs_copy_to_regcache): Likewise.
6257         (aarch64_sve_regs_copy_from_regcache): Likewise.
6258         (sve_context): Structure from Linux headers.
6259         (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
6260         (SVE_SIG_ZREG_SIZE): Likewise.
6261         (SVE_SIG_PREG_SIZE): Likewise.
6262         (SVE_SIG_FFR_SIZE): Likewise.
6263         (SVE_SIG_REGS_OFFSET): Likewise.
6264         (SVE_SIG_ZREGS_OFFSET): Likewise.
6265         (SVE_SIG_ZREG_OFFSET): Likewise.
6266         (SVE_SIG_ZREGS_SIZE): Likewise.
6267         (SVE_SIG_PREGS_OFFSET): Likewise.
6268         (SVE_SIG_PREG_OFFSET): Likewise.
6269         (SVE_SIG_PREGS_SIZE): Likewise.
6270         (SVE_SIG_FFR_OFFSET): Likewise.
6271         (SVE_SIG_REGS_SIZE): Likewise.
6272         (SVE_SIG_CONTEXT_SIZE): Likewise.
6273         (SVE_PT_REGS_MASK): Likewise.
6274         (SVE_PT_REGS_FPSIMD): Likewise.
6275         (SVE_PT_REGS_SVE): Likewise.
6276         (SVE_PT_VL_INHERIT): Likewise.
6277         (SVE_PT_VL_ONEXEC): Likewise.
6278         (SVE_PT_REGS_OFFSET): Likewise.
6279         (SVE_PT_FPSIMD_OFFSET): Likewise.
6280         (SVE_PT_FPSIMD_SIZE): Likewise.
6281         (SVE_PT_SVE_ZREG_SIZE): Likewise.
6282         (SVE_PT_SVE_PREG_SIZE): Likewise.
6283         (SVE_PT_SVE_FFR_SIZE): Likewise.
6284         (SVE_PT_SVE_FPSR_SIZE): Likewise.
6285         (SVE_PT_SVE_FPCR_SIZE): Likewise.
6286         (__SVE_SIG_TO_PT): Likewise.
6287         (SVE_PT_SVE_OFFSET): Likewise.
6288         (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
6289         (SVE_PT_SVE_ZREG_OFFSET): Likewise.
6290         (SVE_PT_SVE_ZREGS_SIZE): Likewise.
6291         (SVE_PT_SVE_PREGS_OFFSET): Likewise.
6292         (SVE_PT_SVE_PREG_OFFSET): Likewise.
6293         (SVE_PT_SVE_PREGS_SIZE): Likewise.
6294         (SVE_PT_SVE_FFR_OFFSET): Likewise.
6295         (SVE_PT_SVE_FPSR_OFFSET): Likewise.
6296         (SVE_PT_SVE_FPCR_OFFSET): Likewise.
6297         (SVE_PT_SVE_SIZE): Likewise.
6298         (SVE_PT_SIZE): Likewise.
6299         (HAS_SVE_STATE): New define.
6300
6301 2018-06-18  Alan Hayward  <alan.hayward@arm.com>
6302
6303         * nat/aarch64-sve-linux-sigcontext.h: New file.
6304         * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
6305         new files.
6306         (SVE_VQ_MIN): Likewise.
6307         (SVE_VQ_MAX): Likewise.
6308         (SVE_VL_MIN): Likewise.
6309         (SVE_VL_MAX): Likewise.
6310         (SVE_NUM_ZREGS): Likewise.
6311         (SVE_NUM_PREGS): Likewise.
6312         (sve_vl_valid): Likewise.
6313         (struct user_sve_header): Likewise.
6314
6315 2018-06-16  Andrew Burgess  <andrew.burgess@embecosm.com>
6316             Richard Bunt <Richard.Bunt@arm.com>
6317
6318         * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
6319         was requested by GDB.
6320
6321 2018-06-15  Tom de Vries  <tdevries@suse.de>
6322
6323         * MAINTAINERS (Write After Approval): Add Tom de Vries.
6324
6325 2018-06-14  Simon Marchi  <simon.marchi@polymtl.ca>
6326
6327         * gnulib/update-gnulib.sh: Print expected versions of
6328         autoconf/aclocal.
6329
6330 2018-06-14  Simon Marchi  <simon.marchi@ericsson.com>
6331
6332         * arch-utils.c (default_type_align): Use type_length_units.
6333         * gdbtypes.c (type_align): Use type_length_units.
6334
6335 2018-06-14  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
6336
6337         * cli/cli-script.c (_initialize_cli_script): Fix online documentation
6338         of 'define' command.
6339
6340 2018-06-14  Tom de Vries  <tdevries@suse.de>
6341
6342         PR cli/22573
6343         * infcmd.c (print_return_value_1): Use get_user_print_options instead of
6344         get_no_prettyformat_print_options.
6345
6346 2018-06-13  Simon Marchi  <simon.marchi@ericsson.com>
6347
6348         * sparc-nat.h: Include target.h.
6349         * sparc64-linux-nat.c (class sparc64_linux_nat_target)
6350         <fetch_registers>: Remove this argument in function call.
6351         <store_registers>: Remove this argument in function call, remove
6352         extra semicolon.
6353         <low_forget_process>: Call sparc64_forget_process instead of
6354         sparc_forget_process.
6355
6356 2018-06-13  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
6357
6358         * procfs.c (_initialize_procfs): Use add_inf_child_target.
6359         (procfs_target::make_corefile_notes): Adjust to new
6360         target_read_alloc return type.
6361
6362 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
6363             Stephen Roberts  <stephen.roberts@arm.com>
6364
6365         PR gdb/22882
6366         * infrun.c (fetch_inferior_event): If GDB is not proceeding then
6367         run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
6368         Move should_notify_stop local into more inner scope.
6369
6370 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
6371             Stephen Roberts  <stephen.roberts@arm.com>
6372
6373         PR gdb/22882
6374         * infrun.c (resume_1): Add call to mark_async_event_handler.
6375
6376 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
6377
6378         * infrun.c (do_target_wait): Change old version of $pc printed.
6379
6380 2018-06-11  Simon Marchi  <simon.marchi@ericsson.com>
6381
6382         * dwarf2read.c (read_index_from_section): Rename to...
6383         (read_gdb_index_from_section): ... this, update all callers.
6384         (dwarf2_read_index): Rename to...
6385         (dwarf2_read_gdb_index): ... this, update all callers.
6386
6387 2018-06-11  John David Anglin  <danglin@gcc.gnu.org>
6388
6389         * gdb/hppa-linux-nat.c
6390         (hppa_linux_nat_target::fetch_inferior_registers): Rename to
6391         hppa_linux_nat_target::fetch_registers.
6392
6393 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
6394
6395         * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
6396         * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
6397         (AARCH64_DWARF_SVE_FFR): Likewise.
6398         (AARCH64_DWARF_SVE_P0): Likewise.
6399         (AARCH64_DWARF_SVE_Z0): Likewise.
6400
6401 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
6402
6403         * common/common-regcache.h (raw_compare): New function.
6404         * regcache.c (regcache::raw_compare): Likewise.
6405         * regcache.h (regcache::raw_compare): New declaration.
6406
6407 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
6408
6409         * common/common-regcache.h (reg_buffer_common): New structure.
6410         * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
6411         (reg_buffer::raw_supply): Likewise.
6412         (reg_buffer::raw_supply_integer): Likewise.
6413         (reg_buffer::raw_supply_zeroed): Likewise.
6414         (reg_buffer::raw_collect): Likewise.
6415         (reg_buffer::raw_collect_integer): Likewise.
6416         * regcache.h (reg_buffer::invalidate): Move from detached_regcache.
6417         (reg_buffer::raw_supply): Likewise.
6418         (reg_buffer::raw_supply_integer): Likewise.
6419         (reg_buffer::raw_supply_zeroed): Likewise.
6420         (reg_buffer::raw_collect): Likewise.
6421         (reg_buffer::raw_collect_integer): Likewise.
6422
6423 2018-06-10  Tom Tromey  <tom@tromey.com>
6424
6425         * remote.c (stop_reply_p): Remove typedef.  Don't declare queue.
6426         (class remote_state) <stop_reply_queue>: Now std::vector.
6427         (remote_state::~remote_state)
6428         (remote_target::stop_reply_queue_length): Update.
6429         (struct queue_iter_param, remove_child_of_pending_fork)
6430         (struct check_pending_event_prevents_wildcard_vcont_callback_data)
6431         (check_pending_event_prevents_wildcard_vcont_callback)
6432         (remove_stop_reply_for_inferior)
6433         (remove_stop_reply_of_remote_state)
6434         (remote_notif_remove_once_on_match)
6435         (stop_reply_match_ptid_and_ws)
6436         (remote_kill_child_of_pending_fork): Remove.
6437         (remote_target::remove_new_fork_children)
6438         (remote_target::check_pending_events_prevent_wildcard_vcont)
6439         (remote_target::discard_pending_stop_replies)
6440         (remote_target::discard_pending_stop_replies_in_queue)
6441         (remote_target::remote_notif_remove_queued_reply)
6442         (remote_target::queued_stop_reply)
6443         (remote_target::push_stop_reply, remote_target::peek_stop_reply)
6444         (remote_target::wait, remote_target::kill_new_fork_children)
6445         (remote_target::async): Update.
6446
6447 2018-06-10  Tom Tromey  <tom@tromey.com>
6448
6449         * record-full.c (record_full_arch_list_cleanups): Remove.
6450         (record_full_message): Use try/catch.
6451         (record_full_wait_cleanups): Remove.
6452         (record_full_wait_1): Use try/catch.
6453         (record_full_restore): Likewise.
6454
6455 2018-06-10  Tom Tromey  <tom@tromey.com>
6456
6457         * record-full.c (record_full_breakpoint_p): Remove typedef.  Don't
6458         declare VEC.  Add constructor.
6459         <in_target_beneath>: Now bool.
6460         (record_full_breakpoints): Now a std::vector, static.
6461         (record_full_sync_record_breakpoints)
6462         (record_full_init_record_breakpoints)
6463         (record_full_target::insert_breakpoint)
6464         (record_full_target::remove_breakpoint): Update.  Don't use XNEW.
6465
6466 2018-06-10  Simon Marchi  <simon.marchi@polymtl.ca>
6467
6468         * dwarf2read.c (process_cu_includes): Remove struct keyword.
6469         * serial.c (serial_interface_lookup): Remove struct keyword.
6470
6471 2018-06-10  Tom Tromey  <tom@tromey.com>
6472
6473         * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
6474         method.
6475         * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
6476         a method.
6477         * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
6478         method.
6479         * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
6480         "beneath" as a method.
6481         * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
6482         Use "beneath" as a method.
6483
6484 2018-06-10  Tom Tromey  <tom@tromey.com>
6485
6486         * tracefile.c (struct trace_file_writer_deleter): New.
6487         <operator()>: Rename from trace_file_writer_xfree.
6488         (trace_file_writer_up): New typedef.
6489         (tsave_command, trace_save_tfile, trace_save_ctf): Update.
6490
6491 2018-06-09  Simon Marchi  <simon.marchi@ericsson.com>
6492
6493         * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
6494         <m_registers, m_register_status>: Change type to
6495         std::unique_ptr.
6496         * regcache.c (reg_buffer::reg_buffer): Use new instead of
6497         XCNEWVEC.
6498
6499 2018-06-09  Simon Marchi  <simon.marchi@ericsson.com>
6500
6501         * common/common-regcache.h (enum register_status): Add
6502         underlying type "signed char".
6503         * regcache.h (reg_buffer) <m_register_status>: Change type to
6504         register_status *.
6505         * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
6506         register_status instead of signed char.
6507         (reg_buffer::save): Use REG_UNKNOWN instead of 0.
6508         (reg_buffer::get_register_status): Remove cast.
6509         (readable_regcache::raw_read): Remove cast.
6510         (readable_regcache::cooked_read): Remove cast.
6511
6512 2018-06-09  Tom Tromey  <tom@tromey.com>
6513
6514         * source.c (reverse_search_command, forward_search_command): Use
6515         scoped_fd.
6516
6517 2018-06-09  Tom Tromey  <tom@tromey.com>
6518
6519         * serial.c (serial_ops_p): Remove typedef.  Don't declare VEC.
6520         (serial_ops_list): Now static, std::vector.
6521         (serial_interface_lookup, serial_add_interface): Update.
6522
6523 2018-06-09  Tom Tromey  <tom@tromey.com>
6524
6525         * dwarf2read.c (process_cu_includes): Update.
6526         (process_full_comp_unit): Update.
6527         * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
6528         std::vector.
6529
6530 2018-06-08  Paul Koning  <paul_koning@dell.com>
6531
6532         PR gdb/23252
6533
6534         * python/python.c (do_start_initialization):
6535         Avoid call to internal Python API.
6536         (init__gdb_module): New function.
6537
6538 2018-06-08  Gary Benson <gbenson@redhat.com>
6539
6540         * linux-thread-db.c (valprint.h): New include.
6541         (struct check_thread_db_info): New structure.
6542         (check_thread_db_on_load, tdb_testinfo): New static globals.
6543         (check_thread_db, check_thread_db_callback): New functions.
6544         (try_thread_db_load_1): Run integrity checks if requested.
6545         (maintenance_check_libthread_db): New function.
6546         (_initialize_thread_db): Register "maint check libthread-db"
6547         and "maint set/show check-libthread-db".
6548         * NEWS: Mention the above new commands.
6549
6550 2018-06-08  Tom Tromey  <tom@tromey.com>
6551
6552         * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
6553         now a method.
6554
6555 2018-06-08  Tom Tromey  <tom@tromey.com>
6556
6557         * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
6558
6559 2018-06-08  Tom Tromey  <tom@tromey.com>
6560
6561         * common/btrace-common.h (struct btrace_data): Add constructor,
6562         destructor, move assignment operator.
6563         <empty, clear, fini>: New methods.
6564         <format>: Initialize.
6565         (btrace_data_init, btrace_data_fini, btrace_data_clear)
6566         (btrace_data_empty): Don't declare.
6567         * common/btrace-common.c (btrace_data_init): Remove.
6568         (btrace_data::fini): Rename from btrace_data_fini.
6569         (btrace_data::empty): Rename from btrace_data_empty.
6570         (btrace_data::clear): Rename from btrace_data_clear.  Return
6571         bool.
6572         * btrace.h (make_cleanup_btrace_data): Don't declare.
6573         * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
6574         (parse_xml_btrace): Update.
6575         (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
6576         (maint_btrace_clear_packet_history_cmd): Update.
6577
6578 2018-06-07  Pedro Alves  <palves@redhat.com>
6579
6580         * target.h (target_ops) <beneath>: Now a method.  All references
6581         updated.
6582         (class target_stack): New.
6583         * target.c (g_target_stack): New.
6584         (g_current_top_target): Delete.
6585         (current_top_target): Get the top target out of g_target_stack.
6586         (target_stack::push, target_stack::unpush): New.
6587         (push_target, unpush_target): Reimplement.
6588         (target_is_pushed): Reimplement in terms of g_target_stack.
6589         (target_ops::beneath, target_stack::find_beneath): New.
6590
6591 2018-06-07  Pedro Alves  <palves@redhat.com>
6592
6593         * target.h (find_target_beneath): Delete declaration.
6594         * target.c (find_target_beneath): Delete definition.
6595         * aix-thread.c: All callers of find_target_beneath adjusted to
6596         call target_ops::beneath instead.
6597         * bsd-uthread.c: Likewise.
6598         * linux-thread-db.c: Likewise.
6599         * ravenscar-thread.c: Likewise.
6600         * sol-thread.c: Likewise.
6601         * spu-multiarch.c: Likewise.
6602
6603 2018-06-07  Pedro Alves  <palves@redhat.com>
6604
6605         * target.h (target_ops) <beneath>: Now a method.  All references
6606         updated.
6607         (target_ops) <m_beneath>: New.
6608         * target.c (target_ops::beneath): New.
6609         * corelow.c: Adjust all references to target_ops::beneath.
6610         * linux-thread-db.c: Likewise.
6611         * make-target-delegates: Likewise.
6612         * record-btrace.c: Likewise.
6613         * record-full.c: Likewise.
6614         * remote.c: Likewise.
6615         * target.c: Likewise.
6616         * target-delegates.c: Regenerate.
6617
6618 2018-06-07  Pedro Alves  <palves@redhat.com>
6619
6620         * target.h (target_stack): Delete.
6621         (current_top_target): Declare function.
6622         * target.c (target_stack): Delete.
6623         (g_current_top_target): New.
6624         (current_top_target): New function.
6625         * auxv.c: Use current_top_target instead of target_stack
6626         throughout.
6627         * avr-tdep.c: Likewise.
6628         * breakpoint.c: Likewise.
6629         * corefile.c: Likewise.
6630         * elfread.c: Likewise.
6631         * eval.c: Likewise.
6632         * exceptions.c: Likewise.
6633         * frame.c: Likewise.
6634         * gdbarch-selftests.c: Likewise.
6635         * gnu-v3-abi.c: Likewise.
6636         * ia64-tdep.c: Likewise.
6637         * ia64-vms-tdep.c: Likewise.
6638         * infcall.c: Likewise.
6639         * infcmd.c: Likewise.
6640         * infrun.c: Likewise.
6641         * linespec.c: Likewise.
6642         * linux-tdep.c: Likewise.
6643         * minsyms.c: Likewise.
6644         * ppc-linux-nat.c: Likewise.
6645         * ppc-linux-tdep.c: Likewise.
6646         * procfs.c: Likewise.
6647         * regcache.c: Likewise.
6648         * remote.c: Likewise.
6649         * rs6000-tdep.c: Likewise.
6650         * s390-linux-nat.c: Likewise.
6651         * s390-tdep.c: Likewise.
6652         * solib-aix.c: Likewise.
6653         * solib-darwin.c: Likewise.
6654         * solib-dsbt.c: Likewise.
6655         * solib-spu.c: Likewise.
6656         * solib-svr4.c: Likewise.
6657         * solib-target.c: Likewise.
6658         * sparc-tdep.c: Likewise.
6659         * sparc64-tdep.c: Likewise.
6660         * spu-tdep.c: Likewise.
6661         * symfile.c: Likewise.
6662         * symtab.c: Likewise.
6663         * target-descriptions.c: Likewise.
6664         * target-memory.c: Likewise.
6665         * target.c: Likewise.
6666         * target.h: Likewise.
6667         * tracefile-tfile.c: Likewise.
6668         * tracepoint.c: Likewise.
6669         * valops.c: Likewise.
6670         * valprint.c: Likewise.
6671         * value.c: Likewise.
6672         * windows-tdep.c: Likewise.
6673         * mi/mi-main.c: Likewise.
6674
6675 2018-06-07  Tom Tromey  <tom@tromey.com>
6676
6677         * valprint.h (build_address_symbolic): Declare.
6678         * printcmd.c (print_address_symbolic): Update.
6679         (build_address_symbolic): Change "name" and "filename" to
6680         std::string.
6681         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
6682         Update.
6683         * defs.h (build_address_symbolic): Remove declaration.
6684
6685 2018-06-07  Alan Hayward  <alan.hayward@arm.com>
6686
6687         * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
6688         (aarch64_vnv_type): Add function.
6689         (aarch64_pseudo_register_name): Add V regs for SVE.
6690         (aarch64_pseudo_register_type): Likewise.
6691         (aarch64_pseudo_register_reggroup_p): Likewise.
6692         (aarch64_pseudo_read_value_2): Use V0 offset for SVE
6693         (aarch64_pseudo_read_value): Add V regs for SVE.
6694         (aarch64_pseudo_write_2): Use V0 offset for SVE
6695         (aarch64_pseudo_write): Add V regs for SVE.
6696         * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
6697
6698 2018-06-06  Sergio Durigan Junior  <sergiodj@redhat.com>
6699
6700         * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
6701         (sve_vl_from_vq): Likewise.
6702
6703 2018-06-05  Tom Tromey  <tom@tromey.com>
6704
6705         * cli/cli-cmds.c (show_version): Update.
6706         * top.c (print_gdb_version): Add "interactive" parameter.
6707         Update.
6708         * main.c (captured_main_1): Update.
6709         * top.h (print_gdb_version): Add "interactive" parameter and a
6710         comment.
6711
6712 2018-06-05  David Malcolm  <dmalcolm@redhat.com>
6713
6714         * common/enum-flags.h: Add trailing semicolon to example in
6715         comment.
6716
6717 2018-06-05  Tom Tromey  <tom@tromey.com>
6718
6719         PR cli/12326:
6720         * NEWS: Add entry about pager.
6721         * utils.c (pagination_disabled_for_command): New global.
6722         (prompt_for_continue): Allow "c" response to prompt.
6723         (reinitialize_more_filter): Clear
6724         pagination_disabled_for_command.
6725         (fputs_maybe_filtered): Check pagination_disabled_for_command.
6726
6727 2018-06-04  Tom Tromey  <tom@tromey.com>
6728
6729         * ada-lang.h (ada_lookup_symbol_list): Update.
6730         * ada-lang.c (resolve_subexp): Update.
6731         (symbols_are_identical_enums): Change type of syms.  Remove nsyms
6732         parameter.
6733         (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
6734         (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
6735         results parameter to std::vector.
6736         (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
6737         Update.
6738         * ada-exp.y (block_lookup): Update.
6739         (select_possible_type_sym): Change type of syms.  Remove nsyms
6740         parameter.
6741         (write_var_or_type, write_name_assoc): Update.
6742
6743 2018-06-04  Joel Brobecker  <brobecker@adacore.com>
6744
6745         * windows-nat.c (windows_nat_target::xfer_partial): Return
6746         TARGET_XFER_E_IO if we need to delegate to the target beneath
6747         but BENEATH is NULL.
6748
6749 2018-06-04  Simon Marchi  <simon.marchi@ericsson.com>
6750
6751         * Makefile.in (config.status): Add configure.nat as a
6752         dependency.
6753
6754 2018-06-04  Tom Tromey  <tom@tromey.com>
6755
6756         * cp-name-parser.y (cpname_state): Add method declarations.
6757         (HANDLE_QUAL): Update.
6758         (cpname_state::d_grab, cpname_state::fill_comp)
6759         (cpname_state::make_operator, cpname_state::make_dtor)
6760         (cpname_state::make_builtin_type, cpname_state::make_name)
6761         (cpname_state::d_qualify, cpname_state::d_int_type)
6762         (cpname_state::d_unary, cpname_state::d_binary): Now methods.
6763         (%union): Move earlier.
6764
6765 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
6766
6767         * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
6768
6769 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
6770
6771         * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
6772         (aarch64_pseudo_write_1): Likewise.
6773         (aarch64_pseudo_read_value): Use helper.
6774         (aarch64_pseudo_write): Likewise.
6775
6776 2018-06-04  Pedro Alves  <palves@redhat.com>
6777
6778         * darwin-nat.c (darwin_ops): Delete.
6779         (darwin_attach_pid): Use get_native_target.
6780
6781 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
6782
6783         * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
6784         * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
6785
6786 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
6787
6788         * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
6789         * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
6790         (aarch64_gdbarch_init): Check for SVE.
6791         * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
6792
6793 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
6794
6795         * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
6796         * aarch64-tdep.h (aarch64_read_description): Likewise.
6797         * arch/aarch64.c (aarch64_create_target_description): Likewise.
6798         * arch/aarch64.h (aarch64_create_target_description): Likewise.
6799         * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
6800         * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
6801         * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
6802
6803 2018-06-02  Simon Marchi  <simon.marchi@ericsson.com>
6804
6805         * value.c (value_fetch_lazy_bitfield): New.
6806         (value_fetch_lazy_memory): New.
6807         (value_fetch_lazy_register): New.
6808         (value_fetch_lazy): Factor out to smaller functions.
6809
6810 2018-06-01  Tom Tromey  <tom@tromey.com>
6811
6812         * cp-name-parser.y (backslashable, represented): Now const.
6813
6814 2018-06-01  Tom Tromey  <tom@tromey.com>
6815
6816         * cp-name-parser.y: Include parser-defs.h.
6817         (parser_fprintf): Remove declaration.
6818
6819 2018-06-01  Tom Tromey  <tom@tromey.com>
6820
6821         * cp-name-parser.y: Use %pure-parser, %lex-param, and
6822         %parse-param.
6823         (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
6824         (global_result): Remove globals.
6825         (struct cpname_state): New.
6826         (yyparse): Don't declare.
6827         (yylex, yyerror): Move declarations after %union.
6828         (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
6829         (make_name): Add state parameter.
6830         Update all callers.
6831         (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
6832         parameter.
6833         (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
6834         Update.
6835         (yylex): Add lvalp, state parameters.
6836         (yyerror): Add state parameter.
6837         (cp_demangled_name_to_comp): Update.
6838
6839 2018-06-01  Tom Tromey  <tom@tromey.com>
6840
6841         * cp-name-parser.y (parser_fprintf): Declare.
6842         (GDB_YY_REMAP_PREFIX): Define.
6843         Include yy-remap.h.  Don't redefine yy* identifiers.
6844
6845 2018-06-01  Tom Tromey  <tom@tromey.com>
6846
6847         * python/py-type.c (typy_legacy_template_argument): Update.
6848         * cp-support.h (cp_demangled_name_to_comp): Update.
6849         * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
6850         parameter to be a "std::string *".
6851         (main): Update.
6852
6853 2018-06-01  H.J. Lu  <hongjiu.lu@intel.com>
6854
6855         * ada-lex.l: Include "diagnostics.h" instead of
6856         "common/diagnostics.h".
6857         * unittests/environ-selftests.c: Likewise.
6858         * common/diagnostics.h: Moved to ../include.
6859
6860 2018-06-01  Joel Brobecker  <brobecker@adacore.com>
6861
6862         * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
6863         to language_mode_manual while calling breakpoint_re_set_one.
6864
6865 2018-06-01  Tom Tromey  <tom@tromey.com>
6866
6867         * valops.c (value_cast_structs, destructor_name_p): Update.
6868         * symtab.c (gdb_mangle_name): Update.
6869         * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
6870         Update.
6871         * p-valprint.c (pascal_object_is_vtbl_ptr_type)
6872         (pascal_object_print_value_fields, pascal_object_print_value):
6873         Update.
6874         * p-typeprint.c (pascal_type_print_derivation_info): Update.
6875         * linespec.c (find_methods): Update.
6876         * gdbtypes.h (type_name_no_tag): Remove.
6877         (type_name_or_error): Rename from type_name_no_tag_or_error.
6878         * gdbtypes.c (type_name_no_tag): Remove.
6879         (type_name_or_error): Rename from type_name_no_tag_or_error.
6880         (lookup_struct_elt_type, check_typedef): Update.
6881         * expprint.c (print_subexp_standard): Update.
6882         * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
6883         * d-namespace.c (d_lookup_nested_symbol): Update.
6884         * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
6885         (cp_print_class_member): Update.
6886         * cp-namespace.c (cp_lookup_nested_symbol): Update.
6887         * completer.c (add_struct_fields): Update.
6888         * c-typeprint.c (cp_type_print_derivation_info)
6889         (c_type_print_varspec_prefix, c_type_print_base_struct_union):
6890         Update.
6891         * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
6892         (ada_prefer_type, ada_is_exception_sym): Update.
6893
6894 2018-06-01  Tom Tromey  <tom@tromey.com>
6895
6896         * valops.c (enum_constant_from_type, value_namespace_elt)
6897         (value_maybe_namespace_elt): Update.
6898         * valarith.c (find_size_for_pointer_math): Update.
6899         * target-descriptions.c (make_gdb_type): Update.
6900         * symmisc.c (print_symbol): Update.
6901         * stabsread.c (define_symbol, read_type)
6902         (complain_about_struct_wipeout, add_undefined_type)
6903         (cleanup_undefined_types_1): Update.
6904         * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
6905         (rust_range_type_p, val_print_struct, rust_print_struct_def)
6906         (rust_internal_print_type, rust_composite_type)
6907         (rust_evaluate_funcall, rust_evaluate_subexp)
6908         (rust_inclusive_range_type_p): Update.
6909         * python/py-type.c (typy_get_tag): Update.
6910         * p-typeprint.c (pascal_type_print_base): Update.
6911         * mdebugread.c (parse_symbol, parse_type): Update.
6912         * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
6913         Update.
6914         * guile/scm-type.c (gdbscm_type_tag): Update.
6915         * go-lang.c (sixg_string_p): Update.
6916         * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
6917         Update.
6918         * gdbtypes.h (struct main_type) <tag_name>: Remove.
6919         (TYPE_TAG_NAME): Remove.
6920         * gdbtypes.c (type_name_no_tag): Simplify.
6921         (check_typedef, check_types_equal, recursive_dump_type)
6922         (copy_type_recursive, arch_composite_type): Update.
6923         * f-typeprint.c (f_type_print_base): Update.  Print "Type" prefix
6924         in summary mode when needed.
6925         * eval.c (evaluate_funcall): Update.
6926         * dwarf2read.c (fixup_go_packaging, read_structure_type)
6927         (process_structure_scope, read_enumeration_type)
6928         (read_namespace_type, read_module_type, determine_prefix): Update.
6929         * cp-support.c (inspect_type): Update.
6930         * coffread.c (process_coff_symbol, decode_base_type): Update.
6931         * c-varobj.c (c_is_path_expr_parent): Update.
6932         * c-typeprint.c (c_type_print_base_struct_union): Update.
6933         (c_type_print_base_1): Update.  Print struct/class/union/enum in
6934         summary when using C language.
6935         * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
6936         (gen_maybe_namespace_elt): Update.
6937         * ada-lang.c (ada_type_name): Simplify.
6938         (empty_record, ada_template_to_fixed_record_type_1)
6939         (template_to_static_fixed_type)
6940         (to_record_with_fixed_variant_part, ada_check_typedef): Update.
6941
6942 2018-06-01  Tom Tromey  <tom@tromey.com>
6943
6944         * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
6945         c_print_type.
6946         * c-typeprint.c (c_print_type_1): Add "language" parameter.
6947         (c_print_type): Update.
6948         (c_print_type): New overload.
6949         (c_type_print_varspec_prefix, c_type_print_args)
6950         (c_type_print_varspec_suffix, c_print_type_no_offsets)
6951         (c_type_print_base_struct_union, c_type_print_base_1)
6952         (cp_type_print_method_args): Add "language" parameter.
6953         (c_type_print_base): Update.
6954         * c-lang.h (c_print_type): Add new overload.
6955
6956 2018-06-01  Tom Tromey  <tom@tromey.com>
6957
6958         * typeprint.h (c_type_print_varspec_suffix): Don't declare.
6959         * c-typeprint.c (c_type_print_varspec_suffix): Now static.
6960
6961 2018-06-01  Alan Hayward  <alan.hayward@arm.com>
6962
6963         * aarch64-tdep.c (aarch64_sve_register_names): New const
6964         var.
6965         * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
6966         (AARCH64_SVE_Z_REGS_NUM): New define.
6967         (AARCH64_SVE_P_REGS_NUM): Likewise.
6968         (AARCH64_SVE_NUM_REGS): Likewise.
6969
6970 2018-05-31  Uros Bizjak  <ubizjak@gmail.com>
6971
6972         * nat/linux-ptrace.h [__alpha__]
6973         (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
6974         definitions.
6975
6976 2018-05-31  Maciej W. Rozycki  <macro@mips.com>
6977
6978         * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
6979         the endianness selected.
6980         * NEWS: Document `set endian auto' mode operation update.
6981
6982 2018-05-31  Alan Hayward  <alan.hayward@arm.com>
6983
6984         * Makefile.in: Add new header.
6985         * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
6986         (sve_vl_from_vg): Likewise.
6987         (sve_vq_from_vl): Likewise.
6988         (sve_vl_from_vq): Likewise.
6989         (sve_vq_from_vg): Likewise.
6990         (sve_vg_from_vq): Likewise.
6991         * configure.nat: Add new c file.
6992         * nat/aarch64-sve-linux-ptrace.c: New file.
6993         * nat/aarch64-sve-linux-ptrace.h: New file.
6994
6995 2018-05-31  Alan Hayward  <alan.hayward@arm.com>
6996
6997         * aarch64-linux-nat.c (aarch64_linux_read_description):
6998         Add parmeter zero.
6999         * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
7000         Likewise.
7001         * aarch64-tdep.c (tdesc_aarch64_list): Add.
7002         (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
7003         (aarch64_gdbarch_init): Add parmeter zero.
7004         * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
7005         * arch/aarch64.c (aarch64_create_target_description): Check VQ.
7006         * arch/aarch64.h (aarch64_create_target_description): Add VQ.
7007         parmeter.
7008         * doc/gdb.texinfo: Describe SVE feature
7009         * features/aarch64-sve.c: New file.
7010
7011 2018-05-31  Omair Javaid  <omair.javaid@linaro.org>
7012
7013         PR gdb/23210
7014         * gdbarch.sh (significant_addr_bit): Default to zero when
7015         not set by target architecture.
7016         * gdbarch.c: Re-generated.
7017         * utils.c (address_significant): Update.
7018
7019 2018-05-30  Joel Brobecker  <brobecker@adacore.com>
7020
7021         * stack.c (func_command): Remove trailing newline in call to error.
7022
7023 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7024
7025         * regcache.h (regcache_raw_collect): Remove, update callers to
7026         use regcache::raw_collect.
7027         * regcache.c (regcache_raw_collect): Remove.
7028
7029 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7030
7031         * regcache.h (regcache_raw_supply): Remove, update callers to
7032         use detached_regcache::raw_supply.
7033         * regcache.c (regcache_raw_supply): Remove.
7034
7035 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7036
7037         * regcache.h (regcache_cooked_write_part): Remove, update
7038         callers to use regcache::cooked_write_part.
7039         * regcache.c (regcache_cooked_write_part): Remove.
7040
7041 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7042
7043         * regcache.h (regcache_cooked_read_part): Remove, update callers
7044         to use readable_regcache::cooked_read_part.
7045         * regcache.c (regcache_cooked_read_part): Remove.
7046
7047 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7048
7049         * regcache.h (regcache_cooked_read_value): Remove, update
7050         callers to use readable_regcache::cooked_read_value.
7051         * regcache.c (regcache_cooked_read_value): Remove.
7052
7053 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7054
7055         * regcache.h (regcache_cooked_write): Remove, update callers to
7056         use regcache::cooked_write.
7057         * regcache.c (regcache_cooked_write): Remove.
7058
7059 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7060
7061         * regcache.h (regcache_invalidate): Remove, update callers to
7062         use detached_regcache::invalidate instead.
7063         * regcache.c (regcache_invalidate): Remove.
7064
7065 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7066
7067         * regcache.h (regcache_raw_write_part): Remove, update callers
7068         to use regcache::raw_write_part instead.
7069         * regcache.c (regcache_raw_write_part): Remove.
7070
7071 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7072
7073         * regcache.h (regcache_raw_read_part): Remove, update callers to
7074         use readable_regcache::raw_read_part instead.
7075         * regcache.c (regcache_raw_read_part): Remove.
7076
7077 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7078
7079         * regcache.h (regcache_cooked_read): Remove, update callers to
7080         use readable_regcache::cooked_read instead.
7081         * regcache.c (regcache_cooked_read): Remove.
7082
7083 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7084
7085         * regcache.h (regcache_raw_write): Remove, update callers to use
7086         regcache::raw_write instead.
7087         * regcache.c (regcache_raw_write): Remove.
7088
7089 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7090
7091         * regcache.h (regcache_raw_read): Remove, update callers to use
7092         readable_regcache::raw_read instead.
7093         * regcache.c (regcache_raw_read): Remove.
7094
7095 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7096
7097         * regcache.h (regcache_raw_update): Remove, update callers to
7098         use readable_regcache::raw_update instead.
7099         * regcache.c (regcache_raw_update): Remove.
7100
7101 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7102
7103         * regcache.h (regcache_register_status): Remove, update callers
7104         to use reg_buffer::get_register_status directly instead.
7105         * regcache.c (regcache_register_status): Remove.
7106
7107 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7108
7109         * regcache.h (regcache_get_ptid): Remove, update all callers to
7110         call regcache::ptid instead.
7111         * regcache.c (regcache_get_ptid): Remove.
7112
7113 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7114
7115         * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
7116
7117 2018-05-30  Pedro Alves  <palves@redhat.com>
7118
7119         * common/common-exceptions.h (exception_rethrow): Use
7120         ATTRIBUTE_NORETURN.
7121
7122 2018-05-29  Simon Marchi  <simon.marchi@polymtl.ca>
7123
7124         * breakpoint.c (print_solib_event, check_status_catch_solib):
7125         Remove struct keyword in range-based for loops.
7126         * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
7127         * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
7128         Likewise.
7129         * linespec.c (find_superclass_methods, search_minsyms_for_name):
7130         Likewise.
7131         * symfile.c (addr_info_make_relative): Likewise.
7132         * thread.c (value_in_thread_stack_temporaries): Likewise.
7133
7134 2018-06-12  Weimin Pan  <weimin.pan@oracle.com>
7135
7136         PR gdb/16841
7137         * valops.c (value_struct_elt_for_reference): Call check_typedef on
7138         aggregate type to get its real type before accessing it.
7139
7140 2018-05-29  Weimin Pan  <weimin.pan@oracle.com>
7141
7142         * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
7143         * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
7144         * coff-pe-read.c (add_pe_forwarded_sym): Replace
7145         lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
7146         * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
7147         * jit.c (jit_breakpoint_re_set_internal): Likewise.
7148         * printcmd.c (info_address_command): Likewise.
7149
7150 2018-05-29  Tom Tromey  <tom@tromey.com>
7151
7152         * windows-nat.c (handle_exception): Update fall-through comment.
7153
7154 2018-05-29  Tom Tromey  <tom@tromey.com>
7155
7156         * progspace.h (so_list_ptr): Remove typedef.  Don't declare VEC.
7157         (struct program_space) <added_solibs>: Now a std::vector.
7158         * breakpoint.c (print_solib_event): Update.
7159         (check_status_catch_solib): Update.
7160         * progspace.c (clear_program_space_solib_cache): Update.
7161         * solib.c (update_solib_list): Update.
7162
7163 2018-05-29  Tom Tromey  <tom@tromey.com>
7164
7165         * python/py-type.c (typy_richcompare): Update.
7166         * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
7167         * gdbtypes.h (types_deeply_equal): Return bool.
7168         (types_equal): Likewise.
7169         * gdbtypes.c (type_equality_entry_d): Remove typedef.  Don't
7170         declare VEC.
7171         (check_types_equal): Change worklist to std::vector.  Return
7172         bool.
7173         (struct type_equality_entry): Add constructor.
7174         (compare_maybe_null_strings): Return bool.
7175         (check_types_worklist): Return bool.  Change worklist to
7176         std::vector.
7177         (types_deeply_equal): Use std::vector.
7178         (types_equal): Return bool.
7179         (compare_maybe_null_strings): Simplify.
7180
7181 2018-05-29  Tom Tromey  <tom@tromey.com>
7182
7183         * record-btrace.c (tp_t): Remove typedef.  Don't declare VEC.
7184
7185 2018-05-29  Tom Tromey  <tom@tromey.com>
7186
7187         * objc-lang.h: Don't include cp-support.h.
7188         * common/gdb_vecs.h (const_char_ptr): Remove typedef.  Don't
7189         declare VEC.
7190
7191 2018-05-27  Tom Tromey  <tom@tromey.com>
7192
7193         * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
7194
7195 2018-05-25  Tom Tromey  <tom@tromey.com>
7196
7197         * value.c (value::location): Initialize.
7198
7199 2018-05-25  Tom Tromey  <tom@tromey.com>
7200
7201         * dbxread.c (init_bincl_list): Remove.
7202         (bincl_list): Now a std::vector.
7203         (bincls_allocated, next_bincl): Remove.
7204         (free_bincl_list, do_free_bincl_list_cleanup)
7205         (make_cleanup_free_bincl_list): Remove.
7206         (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
7207         unique_xmalloc_ptr.
7208         (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
7209         (struct header_file_location): Add constructor.
7210         (add_bincl_to_list): Remove.
7211
7212 2018-05-25  Tom Tromey  <tom@tromey.com>
7213
7214         * tui/tui.c (tui_enable): Update.
7215         * mi/mi-interp.c (mi_interp::init): Update.
7216         * interps.h (class interp) <name>: New method.
7217         <m_name>: Rename from name.
7218         (~scoped_restore_interp): Update.
7219         * interps.c (interp::interp): Update.
7220         (interp_add, interp_set, interp_lookup_existing)
7221         (current_interp_named_p): Update.
7222
7223 2018-05-25  Tom Tromey  <tom@tromey.com>
7224
7225         * interps.c (interp_name): Remove.
7226         * mi/mi-interp.c (mi_interp::init): Update.
7227         * interps.h (interp_name): Remove.
7228         (~scoped_restore_interp): Update.
7229         * tui/tui.c (tui_enable): Update.
7230
7231 2018-05-25  Tom Tromey  <tom@tromey.com>
7232
7233         * utils.c (fputs_maybe_filtered): Update.
7234         * linespec.c (decode_line_full): Update.
7235         * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
7236         (mi_print_breakpoint_for_event, mi_solib_loaded)
7237         (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
7238         (mi_user_selected_context_changed): Update.
7239         * mi/mi-main.c (mi_execute_command): Update.
7240         * cli/cli-script.c (execute_control_command): Update.
7241         * python/python.c (execute_gdb_command): Update.
7242         * solib.c (info_sharedlibrary_command): Update.
7243         * interps.c (interp_ui_out): Remove.
7244         * interps.h (interp_ui_out): Remove.
7245
7246 2018-05-25  Tom Tromey  <tom@tromey.com>
7247
7248         * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
7249         * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
7250         * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
7251
7252 2018-05-25  Tom Tromey  <tom@tromey.com>
7253
7254         * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
7255         * interps.c (interp_exec): Use scoped_restore.
7256
7257 2018-05-25  Tom Tromey  <tom@tromey.com>
7258
7259         * remote.c (remote_target::remote_file_get): Use
7260         gdb::byte_vector.
7261         (remote_target::remote_file_put): Likewise.
7262
7263 2018-05-25  Tom Tromey  <tom@tromey.com>
7264
7265         * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
7266         a std::string.
7267         (get_pe_section_index, add_pe_exported_sym): Update.
7268         (read_pe_exported_syms): Use gdb::def_vector.
7269
7270 2018-05-25  Tom Tromey  <tom@tromey.com>
7271
7272         * frame.c (remove_prev_frame): Remove.
7273         (get_prev_frame_if_no_cycle): Use TRY/CATCH.
7274
7275 2018-05-25  Maciej W. Rozycki  <macro@mips.com>
7276
7277         * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
7278         Remove prototypes.
7279         * mips-linux-nat.c (supply_fpregset): Always call
7280         `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
7281         (fill_fpregset): Always call `mips64_fill_fpregset' rather than
7282         `mips_fill_fpregset'.
7283         * mips-linux-tdep.c (mips_supply_fpregset)
7284         (mips_supply_fpregset_wrapper, mips_fill_fpregset)
7285         (mips_fill_fpregset_wrapper): Remove functions.
7286         (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
7287         (mips_linux_fpregset): Remove variable.
7288         (mips_linux_iterate_over_regset_sections): Use
7289         `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
7290         (mips_linux_o32_sigframe_init): Remove comment.
7291
7292 2018-05-25  Pedro Alves  <palves@redhat.com>
7293
7294         * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
7295         (struct readahead_cache, struct packet_reg, struct
7296         remote_arch_state, class remote_state): Move higher up in the
7297         file.
7298         (remote_target::m_remote_state): Now an object instead of a pointer.
7299         (remote_target::get_remote_state): Adjust.
7300
7301 2018-05-24  Andrew Burgess  <andrew.burgess@embecosm.com>
7302
7303         * stack.c (select_and_print_frame): Delete.
7304         (struct function_bounds): Move struct within function.
7305         (func_command): Most content moved into new function
7306         find_frame_for_function, use new function, print result, add
7307         function comment.
7308         (find_frame_for_function): New function, now returns a result.
7309
7310 2018-05-24  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
7311
7312         * stack.c (iterate_over_block_arg_vars): Fix comment.
7313         (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
7314
7315 2018-05-24  Andrew Burgess  <andrew.burgess@embecosm.com>
7316
7317         PR gdb/23203
7318         * frame.c
7319         (scoped_restore_selected_frame::scoped_restore_selected_frame):
7320         Define.
7321         (scoped_restore_selected_frame::~scoped_restore_selected_frame):
7322         Define.
7323         * frame.h (class scoped_restore_selected_frame): New class.
7324         * stack.c (print_frame_local_vars): Remove catching and rethrowing
7325         of any exception, use scoped_restore_selected_frame to restore the
7326         frame instead.
7327
7328 2018-05-24  Pedro Alves  <palves@redhat.com>
7329
7330         * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
7331         override.
7332
7333 2018-05-23  Tom Tromey  <tom@tromey.com>
7334
7335         * complaints.c (struct complaints): Remove.
7336         (symfile_complaint_book): Remove.
7337         (series): New global.
7338         (complaint_internal): Update.
7339         (clear_complaints): Update.
7340
7341 2018-05-23  Tom Tromey  <tom@tromey.com>
7342
7343         * complaints.c (counters): New global.
7344         (struct complain): Remove.
7345         (struct complaints) <root>: Remove.
7346         (complaint_sentinel): Remove.
7347         (symfile_complaint_book): Update.
7348         (find_complaint) Remove.
7349         (complaint_internal, clear_complaints): Update.
7350
7351 2018-05-23  Tom Tromey  <tom@tromey.com>
7352
7353         * complaints.c (struct complain) <file, line>: Remove.
7354         (find_complaint): Remove file, line parameters.
7355         (complaint_internal): Update.
7356
7357 2018-05-23  Tom Tromey  <tom@tromey.com>
7358
7359         * complaints.c (vcomplaint): Remove.
7360         (complaint_internal) Merge in contents of vcomplaint.
7361
7362 2018-05-23  Tom Tromey  <tom@tromey.com>
7363
7364         * complaints.c (struct complaints) <explanation>: Remove.
7365         (symfile_explanations): Remove.
7366         (symfile_complaint_book): Update.
7367         (vcomplaint): Update.
7368         (struct explanation): Remove.
7369
7370 2018-05-23  Tom Tromey  <tom@tromey.com>
7371
7372         * complaints.c (symfile_complaints): Remove.
7373         (complaint_internal): Remove "complaints" parameter.
7374         (clear_complaints, vcomplaint): Remove "c" parameter.
7375         (get_complaints): Remove.
7376         * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
7377         (dwarf2_debug_line_missing_file_complaint)
7378         (dwarf2_debug_line_missing_end_sequence_complaint)
7379         (dwarf2_complex_location_expr_complaint)
7380         (dwarf2_const_value_length_mismatch_complaint)
7381         (dwarf2_section_buffer_overflow_complaint)
7382         (dwarf2_macro_malformed_definition_complaint)
7383         (dwarf2_invalid_attrib_class_complaint)
7384         (create_addrmap_from_index, dw2_symtab_iter_next)
7385         (dw2_expand_marked_cus)
7386         (dw2_debug_names_iterator::find_vec_in_debug_names)
7387         (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
7388         (create_debug_type_hash_table, init_cutu_and_read_dies)
7389         (partial_die_parent_scope, add_partial_enumeration)
7390         (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
7391         (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
7392         (read_import_statement, read_file_scope, create_dwo_cu_reader)
7393         (create_cus_hash_table, create_dwp_hash_table)
7394         (inherit_abstract_dies, read_func_scope, read_call_site_scope)
7395         (dwarf2_rnglists_process, dwarf2_ranges_process)
7396         (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
7397         (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
7398         (handle_struct_member_die, process_structure_scope)
7399         (read_array_type, read_common_block, read_module_type)
7400         (read_tag_pointer_type, read_typedef, read_base_type)
7401         (read_subrange_type, load_partial_dies, partial_die_info::read)
7402         (partial_die_info::read, partial_die_info::read)
7403         (partial_die_info::read, read_checked_initial_length_and_offset)
7404         (dwarf2_string_attr, read_formatted_entries)
7405         (dwarf_decode_line_header)
7406         (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
7407         (new_symbol, dwarf2_const_value_attr, lookup_die_type)
7408         (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
7409         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
7410         (get_signatured_type, get_DW_AT_signature_type)
7411         (decode_locdesc, file_file_name, consume_improper_spaces)
7412         (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
7413         (dwarf_decode_macro_bytes, dwarf_decode_macros)
7414         (dwarf2_symbol_mark_computed, set_die_type)
7415         (read_attribute_value): Update.
7416         * stap-probe.c (handle_stap_probe, get_stap_base_address):
7417         Update.
7418         * dbxread.c (unknown_symtype_complaint)
7419         (lbrac_mismatch_complaint, repeated_header_complaint)
7420         (set_namestring, function_outside_compilation_unit_complaint)
7421         (read_dbx_symtab, process_one_symbol): Update.
7422         * gdbtypes.c (stub_noname_complaint): Update.
7423         * windows-nat.c (handle_unload_dll): Update.
7424         * coffread.c (coff_symtab_read, enter_linenos, decode_type)
7425         (decode_base_type): Update.
7426         * xcoffread.c (bf_notfound_complaint, ef_complaint)
7427         (eb_complaint, record_include_begin, record_include_end)
7428         (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
7429         (process_xcoff_symbol, read_symbol)
7430         (function_outside_compilation_unit_complaint)
7431         (scan_xcoff_symtab): Update.
7432         * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
7433         * buildsym.c (finish_block_internal, make_blockvector)
7434         (end_symtab_get_static_block, augment_type_symtab): Update.
7435         * dtrace-probe.c (dtrace_process_dof)
7436         (dtrace_static_probe_ops::get_probes): Update.
7437         * complaints.h (struct complaint): Don't declare.
7438         (symfile_complaints): Remove.
7439         (complaint_internal): Remove "complaints" parameter.
7440         (complaint): Likewise.
7441         (clear_complaints): Likewise.
7442         * symfile.c (syms_from_objfile_1, finish_new_objfile)
7443         (reread_symbols): Update.
7444         * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
7445         (dwarf2_frame_cache, decode_frame_entry): Update.
7446         * dwarf2loc.c (dwarf_reg_to_regnum): Update.
7447         * objc-lang.c (lookup_objc_class, lookup_child_selector)
7448         (info_selectors_command): Update.
7449         * macrotab.c (macro_include, check_for_redefinition)
7450         (macro_undef): Update.
7451         * objfiles.c (filter_overlapping_sections): Update.
7452         * stabsread.c (invalid_cpp_abbrev_complaint)
7453         (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
7454         (define_symbol, error_type, read_type, rs6000_builtin_type)
7455         (stabs_method_name_from_physname, read_member_functions)
7456         (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
7457         (attach_fields_to_type, complain_about_struct_wipeout)
7458         (read_range_type, read_args, common_block_start)
7459         (common_block_end, cleanup_undefined_types_1, scan_file_globals):
7460         Update.
7461         * mdebugread.c (index_complaint, unknown_ext_complaint)
7462         (basic_type_complaint, bad_tag_guess_complaint)
7463         (bad_rfd_entry_complaint, unexpected_type_code_complaint)
7464         (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
7465         (parse_procedure, parse_lines)
7466         (function_outside_compilation_unit_complaint)
7467         (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
7468         (bad_tag_guess_complaint, reg_value_complaint): Update.
7469         * cp-support.c (demangled_name_complaint): Update.
7470         * macroscope.c (sal_macro_scope): Update.
7471         * dwarf-index-write.c (class debug_names): Update.
7472
7473 2018-05-23  Tom Tromey  <tom@tromey.com>
7474
7475         * complaints.c (clear_complaints): Remove "noisy" parameter.
7476         * complaints.h (clear_complaints): Update.
7477         * symfile.c (syms_from_objfile_1, finish_new_objfile)
7478         (reread_symbols): Update.
7479
7480 2018-05-23  Tom Tromey  <tom@tromey.com>
7481
7482         * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
7483         SUBSEQUENT_MESSAGE.
7484         (vcomplaint, clear_complaints): Update.
7485         (symfile_explanations): Remove some messages.
7486
7487 2018-05-23  Tom Tromey  <tom@tromey.com>
7488
7489         * complaints.c (internal_complaint): Remove.
7490         * complaints.h (internal_complaint): Remove.
7491
7492 2018-05-22  Maciej W. Rozycki  <macro@mips.com>
7493
7494         * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
7495
7496 2018-05-22  Pedro Alves  <palves@redhat.com>
7497
7498         * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
7499         (remote_fileio_badfd, remote_fileio_return_errno)
7500         (remote_fileio_return_success, remote_fileio_func_open)
7501         (remote_fileio_func_open, remote_fileio_func_close)
7502         (remote_fileio_func_read, remote_fileio_func_write)
7503         (remote_fileio_func_lseek, remote_fileio_func_rename)
7504         (remote_fileio_func_unlink, remote_fileio_func_stat)
7505         (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
7506         (remote_fileio_func_isatty, remote_fileio_func_system): Add
7507         remote_target parameter.
7508         (remote_fio_func_map) <func>: Add remote_target parameter.
7509         (do_remote_fileio_request, remote_fileio_request):
7510         * remote-fileio.h (remote_fileio_request):
7511         * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
7512         remote_target parameter.
7513         (remote_notif_process, handle_notification): Adjust to pass down
7514         the remote.
7515         (remote_notif_state_allocate): Add remote_target parameter.  Save
7516         it.
7517         * remote-notif.h (struct remote_target): Forward declare.
7518         (struct notif_client) <parse, ack, can_get_pending_events>: Add
7519         remote_target parameter.
7520         (struct remote_notif_state) <remote>: New field.
7521         (remote_notif_ack, remote_notif_parse): Add remote_target
7522         parameter.
7523         (remote_notif_state_allocate, remote_notif_state_allocate): Add
7524         remote_target parameter.
7525         * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
7526         (threads_listing_context, rmt_thread_action, protocol_feature)
7527         (packet_reg, stop_reply, stop_reply_p, enum packet_support)
7528         (packet_result, struct threads_listing_context, remote_state):
7529         Move definitions and declarations higher up.
7530         (remote_target) <~remote_target>: Declare.
7531         (remote_download_command_source, remote_file_put, remote_file_get)
7532         (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
7533         (remote_hostio_pread_vFile, remote_hostio_send_command)
7534         (remote_hostio_set_filesystem, remote_hostio_open)
7535         (remote_hostio_close, remote_hostio_unlink, remote_state)
7536         (get_remote_state, get_remote_packet_size, get_memory_packet_size)
7537         (get_memory_write_packet_size, get_memory_read_packet_size)
7538         (append_pending_thread_resumptions, remote_detach_1)
7539         (append_resumption, remote_resume_with_vcont)
7540         (add_current_inferior_and_thread, wait_ns, wait_as)
7541         (process_stop_reply, remote_notice_new_inferior)
7542         (process_initial_stop_replies, remote_add_thread)
7543         (btrace_sync_conf, remote_btrace_maybe_reopen)
7544         (remove_new_fork_children, kill_new_fork_children)
7545         (discard_pending_stop_replies, stop_reply_queue_length)
7546         (check_pending_events_prevent_wildcard_vcont)
7547         (discard_pending_stop_replies_in_queue, stop_reply)
7548         (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
7549         (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
7550         (remote_interrupt_as, remote_interrupt_ns)
7551         (remote_get_noisy_reply, remote_query_attached)
7552         (remote_add_inferior, remote_current_thread, get_current_thread)
7553         (set_thread, set_general_thread, set_continue_thread)
7554         (set_general_process, write_ptid)
7555         (remote_unpack_thread_info_response, remote_get_threadinfo)
7556         (parse_threadlist_response, remote_get_threadlist)
7557         (remote_threadlist_iterator, remote_get_threads_with_ql)
7558         (remote_get_threads_with_qxfer)
7559         (remote_get_threads_with_qthreadinfo, extended_remote_restart)
7560         (get_offsets, remote_check_symbols, remote_supported_packet)
7561         (remote_query_supported, remote_packet_size)
7562         (remote_serial_quit_handler, remote_detach_pid)
7563         (remote_vcont_probe, remote_resume_with_hc)
7564         (send_interrupt_sequence, interrupt_query)
7565         (remote_notif_get_pending_events, fetch_register_using_p)
7566         (send_g_packet, process_g_packet, fetch_registers_using_g)
7567         (store_register_using_P, store_registers_using_G)
7568         (set_remote_traceframe, check_binary_download)
7569         (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
7570         (remote_xfer_live_readonly_partial, remote_read_bytes)
7571         (remote_send_printf, remote_flash_write, readchar)
7572         (remote_serial_write, putpkt, putpkt_binary, skip_frame)
7573         (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
7574         (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
7575         (extended_remote_disable_randomization, extended_remote_run)
7576         (send_environment_packet, extended_remote_environment_support)
7577         (extended_remote_set_inferior_cwd, remote_write_qxfer)
7578         (remote_read_qxfer, push_stop_reply, vcont_r_supported)
7579         (packet_command): Now methods of ...
7580         (remote_target): ... this class.
7581         (m_remote_state) <remote_target>: New field.
7582         (struct remote_state) <stop_reply_queue,
7583         remote_async_inferior_event_token, wait_forever_enabled_p>: New
7584         fields.
7585         (remote_state::remote_state): Allocate stop_reply_queue.
7586         (remote_state): Delete global.
7587         (get_remote_state_raw): Delete.
7588         (remote_target::get_remote_state): Allocate m_remote_state on
7589         demand.
7590         (get_current_remote_target): New.
7591         (remote_ops, extended_remote_ops): Delete.
7592         (wait_forever_enabled_p, remote_async_inferior_event_token):
7593         Delete, moved to struct remote_state.
7594         (remote_target::close): Delete self.  Destruction bits split to
7595         ...
7596         (remote_target::~remote_target): ... this.
7597         (show_memory_packet_size): Adjust to use
7598         get_current_remote_target.
7599         (struct protocol_feature) <func>: Add remote_target parameter.
7600         All callers adjusted.
7601         (curr_quit_handler_target): New.
7602         (remote_serial_quit_handler): Reimplement.
7603         (remote_target::open_1): Adjust to use get_current_remote_target.
7604         Heap-allocate remote_target/extended_remote_target instances.
7605         (vcont_builder::vcont_builder): Add remote_target parameter, and
7606         save it in m_remote.  All callers adjusted.
7607         (vcont_builder::m_remote): New field.
7608         (vcont_builder::restart, vcont_builder::flush)
7609         (vcont_builder::push_action): Use it.
7610         (remote_target::commit_resume): Use it.
7611         (struct queue_iter_param) <remote>: New field.
7612         (remote_target::remove_new_fork_children): Fill in 'remote' field.
7613         (check_pending_event_prevents_wildcard_vcont_callback_data): New.
7614         (check_pending_event_prevents_wildcard_vcont_callback)
7615         (remote_target::check_pending_events_prevent_wildcard_vcont)
7616         (remote_target::discard_pending_stop_replies)
7617         (remote_target::discard_pending_stop_replies_in_queue)
7618         (remote_target::remote_notif_remove_queued_reply): Fill in
7619         'remote' field.
7620         (remote_notif_get_pending_events): New.
7621         (remote_target::readchar, remote_target::remote_serial_write):
7622         Save/restore curr_quit_handler_target.
7623         (putpkt): New.
7624         (kill_new_fork_children): Fill in 'remote' field.
7625         (packet_command): Use get_current_remote_target, defer to
7626         remote_target method of same name.
7627         (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
7628         parameter, and save it in m_remote.  All callers adjusted.
7629         (scoped_remote_fd::release): Use m_remote.
7630         (scoped_remote_fd::m_remote): New field.
7631         (remote_file_put, remote_file_get, remote_file_delete): Use
7632         get_current_remote_target, defer to remote_target method of same
7633         name.
7634         (remote_btrace_reset): Add remote_state paremeter.  Update all
7635         callers.
7636         (remote_async_inferior_event_handler). Pass down 'data'.
7637         (remote_new_objfile): Use get_current_remote_target.
7638         (remote_target::vcont_r_supported): New.
7639         (set_range_stepping): Use get_current_remote_target and
7640         remote_target::vcont_r_supported.
7641         (_initialize_remote): Don't allocate 'remote_state' and
7642         'stop_reply_queue' globals.
7643         * remote.h (struct remote_target): Forward declare.
7644         (getpkt, putpkt, remote_notif_get_pending_events): Add
7645         'remote_target' parameter.
7646
7647 2018-05-22  Pedro Alves  <palves@redhat.com>
7648
7649         * remote.c (vcont_builder): Now a class.  Make all data members
7650         private.
7651         (vcont_builder) <vcont_builder, restart, flush, push_action>:
7652         Declare methods.
7653         (vcont_builder_restart): Rename to ...
7654         (vcont_builder::restart): ... this.
7655         (vcont_builder_flush): Rename to ...
7656         (vcont_builder::flush): ... this.
7657         (vcont_builder_push_action): Rename to ...
7658         (vcont_builder::push_action): ... this.
7659         (remote_target::commit_resume): Adjust.
7660
7661 2018-05-22  Pedro Alves  <palves@redhat.com>
7662
7663         * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
7664         (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
7665         (get_fixed_memory_packet_size): New.
7666         (get_memory_packet_size): Use it.
7667         (set_memory_packet_size): Don't override the config size with
7668         DEFAULT_MAX_MEMORY_PACKET_SIZE.
7669         (show_memory_packet_size): Use get_fixed_memory_packet_size.
7670         Don't refer to get_memory_packet_size if not connected to a remote
7671         target.  Show "(default)" if configured size is 0.
7672
7673 2018-05-22  Pedro Alves  <palves@redhat.com>
7674
7675         * remote.c (remote_target::mourn_inferior): Move
7676         discard_pending_stop_replies call here from ...
7677         (_initialize_remote): ... here.
7678
7679 2018-05-22  Pedro Alves  <palves@redhat.com>
7680
7681         * remote.c (compare_section_command): Remove set_general_process
7682         call.
7683
7684 2018-05-22  Pedro Alves  <palves@redhat.com>
7685
7686         * remote.c (struct packet_reg, struct remote_arch_state):
7687         Move higher up in the file.
7688         (remote_state) <m_arch_states>: Store remote_arch_state values
7689         instead of remote_arch_state pointers.
7690         (remote_state::get_remote_arch_state): Adjust.
7691
7692 2018-05-22  Pedro Alves  <palves@redhat.com>
7693
7694         * remote.c: Include <unordered_map>.
7695         (remote_state): Now a class.
7696         (remote_state) <get_remote_arch_state>: Declare method.
7697         <get_remote_arch_state>: New field.
7698         (remote_arch_state) <remote_arch_state>: Declare ctor.
7699         <regs>: Now a unique_ptr.
7700         (remote_gdbarch_data_handle): Delete.
7701         (get_remote_arch_state): Delete.
7702         (remote_state::get_remote_arch_state): New.
7703         (get_remote_state): Adjust to call remote_state's
7704         get_remote_arch_state method.
7705         (init_remote_state): Delete, bits factored out to ...
7706         (remote_arch_state::remote_arch_state): ... this new method.
7707         (get_remote_packet_size, get_memory_packet_size)
7708         (process_g_packet, remote_target::fetch_registers)
7709         (remote_target::prepare_to_store, store_registers_using_G)
7710         (remote_target::store_registers, remote_target::get_trace_status):
7711         Adjust to call remote_state's method.
7712         (_initialize_remote): Remove reference to
7713         remote_gdbarch_data_handle.
7714
7715 2018-05-22  Pedro Alves  <palves@redhat.com>
7716
7717         * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
7718         pread>: New method declarations.
7719         (remote_target::open_1): Adjust.
7720         (readahead_cache_invalidate): Rename to ...
7721         (readahead_cache::invalidate): ... this, and adjust to be a class
7722         method.
7723         (readahead_cache_invalidate_fd): Rename to ...
7724         (readahead_cache::invalidate_fd): ... this, and adjust to be a
7725         class method.
7726         (remote_hostio_pwrite): Adjust.
7727         (remote_hostio_pread_from_cache): Rename to ...
7728         (readahead_cache::pread): ... this, and adjust to be a class
7729         method.
7730         (remote_hostio_close): Adjust.
7731
7732 2018-05-22  Pedro Alves  <palves@redhat.com>
7733
7734         * remote.c (remote_hostio_close_cleanup): Delete.
7735         (class scoped_remote_fd): New.
7736         (remote_file_put, remote_file_get): Use it.
7737
7738 2018-05-22  Pedro Alves  <palves@redhat.com>
7739
7740         (struct vCont_action_support): Use bool and initialize all fields.
7741         (struct readahead_cache): Initialize all fields.
7742         (remote_state): Use bool and initialize all fields.
7743         (remote_state::remote_state, remote_state::~remote_state): New.
7744         (new_remote_state): Delete.
7745         (_initialize_remote): Use new to allocate remote_state.
7746
7747 2018-05-22  Pedro Alves  <palves@redhat.com>
7748             張俊芝  <zjz@zjz.name>
7749
7750         PR gdb/22973
7751         * c-exp.y: Include "c-support.h".
7752         (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
7753         of tolower.  Use c_ident_is_alpha to scan names.
7754         * c-lang.c: Include "c-support.h".
7755         (convert_ucn, convert_octal, convert_hex, convert_escape): Use
7756         ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
7757         * c-support.h: New file, with bits factored out from ...
7758         * cp-name-parser.y: ... this file.
7759         Include "c-support.h".
7760         (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
7761         c-support.h and renamed.
7762         (symbol_end, yylex): Adjust.
7763
7764 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
7765
7766         * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
7767         parameter type to CORE_ADDR.
7768         * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
7769         parameter type in declaration to CORE_ADDR.
7770         * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
7771         target_auxv_search to get AT_HWCAP and use the result to get the
7772         target description.
7773         * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
7774         to CORE_ADDR. Remove the cast of the return value to unsigned
7775         long. Fix error predicate of target_auxv_search.
7776         (ppc_linux_nat_target::read_description): Change the type of the
7777         hwcap variable to CORE_ADDR.
7778
7779 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
7780
7781         * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
7782         if the size of fpscr is larger than 32 bits.
7783
7784 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
7785
7786         * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
7787         (ppc32_linux_vsxregmap): New global.
7788         (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
7789         regcache_supply_regset, and regcache_collect_regset.
7790         * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
7791         * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
7792         (fetch_vsx_register, store_vsx_register): Remove.
7793         (fetch_vsx_registers): Add regno parameter. Get regset using
7794         ppc_linux_vsxregset. Use regset to supply registers.
7795         (store_vsx_registers): Add regno parameter. Get regset using
7796         ppc_linux_vsxregset. Use regset to collect registers.
7797         (fetch_register): Call fetch_vsx_registers instead of
7798         fetch_vsx_register.
7799         (store_register): Call store_vsx_registers instead of
7800         store_vsx_register.
7801         (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
7802         new regno parameter.
7803         (store_ppc_registers): Call store_vsx_registers with -1 for the
7804         new regno parameter.
7805         * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
7806         (ppc_collect_vsxregset): Remove.
7807
7808 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
7809
7810         * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
7811         offset fields.
7812         * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
7813         for vector register offset fields.
7814         (ppc64_fbsd_reg_offsets): Likewise.
7815         * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
7816         to vector register offset fields.
7817         * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
7818         to vector register offset fields.
7819         * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
7820         vector register offset fields.
7821         * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
7822         initializers for vector register offset fields.
7823         (rs6000_aix64_reg_offsets): Likewise.
7824         * rs6000-tdep.c (ppc_vrreg_offset): Remove.
7825         (ppc_supply_vrregset): Remove.
7826         (ppc_collect_vrregset): Remove.
7827         * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
7828         (ppc_linux_vrregset) : New function.
7829         (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
7830         (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
7831         (ppc32_linux_vrregset): Remove.
7832         (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
7833         and use result instead of ppc32_linux_vrregset.
7834         (ppc32_linux_reg_offsets): Remove initializers for vector register
7835         offset fields.
7836         (ppc64_linux_reg_offsets): Likewise.
7837         * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
7838         * ppc-linux-nat.c: Include regset.h.
7839         (gdb_vrregset_t): Adjust comment to account for little-endian
7840         mode.
7841         (supply_vrregset, fill_vrregset): Remove.
7842         (fetch_altivec_register, store_altivec_register): Remove.
7843         (fetch_altivec_registers): Add regno parameter. Get regset using
7844         ppc_linux_vrregset. Use regset to supply registers.
7845         (store_altivec_registers): Add regno parameter. Get regset using
7846         ppc_linux_vrregset. Use regset to collect registers.
7847         (fetch_register): Call fetch_altivec_registers instead of
7848         fetch_altivec_register.
7849         (store_register): Call store_altivec_registers instead of
7850         store_altivec_register.
7851         (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
7852         the new regno parameter.
7853         (store_ppc_registers): Call store_altivec_registers with -1 for
7854         the new regno parameter.
7855
7856 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
7857
7858         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
7859         (PPC_LINUX_SIZEOF_VSXREGSET): Define.
7860         * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
7861         (gdb_vrregset_t): Change array type size to
7862         PPC_LINUX_SIZEOF_VRREGSET.
7863         (gdb_vsxregset_t): Change array type size to
7864         PPC_LINUX_SIZEOF_VSXREGSET.
7865         * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
7866         Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
7867         PPC_LINUX_SIZEOF_VSXREGSET.
7868
7869 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
7870
7871         * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
7872         * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
7873         nat/ppc-linux.c.
7874         (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
7875         ppc_linux_target_wordsize with tid.
7876         (ppc_linux_nat_target::read_description): Call ppc_linux_target
7877         wordsize with tid.
7878         * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
7879         (ppc64_64bit_inferior_p): Add static and inline specifiers.
7880         (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
7881         tid parameter. Remove static specifier.
7882         * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
7883         (ppc_linux_target_wordsize): New declaration.
7884
7885 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
7886
7887         * arch/ppc-linux-common.c: New file.
7888         * arch/ppc-linux-common.h: New file.
7889         * arch/ppc-linux-tdesc.h: New file.
7890         * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
7891         * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
7892         (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
7893         arch/ppc-linux-tdesc.h.
7894         * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
7895         arch/ppc-linux-tdesc.h.
7896         (ppc_linux_nat_target::read_description): Remove target
7897         description matching code. Fill a ppc_linux_features struct and
7898         call ppc_linux_match_description with it. Move comment about ISA
7899         2.05 to ppc-linux-common.c.
7900         * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
7901         arch/ppc-linux-tdesc.h.
7902         (ppc_linux_core_read_description): Remove target description
7903         matching code. Fill a ppc_linux_features struct and call
7904         ppc_linux_match_description with it.
7905         * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
7906         (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
7907         (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
7908         (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
7909         (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
7910         (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
7911         (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
7912         (tdesc_powerpc_e500l): Remove.
7913
7914 2018-05-22  Joel Brobecker  <brobecker@adacore.com>
7915
7916         * ada-lang.c (catch_assert_command): Pass empty string instead
7917         of NULL for excep_string argument.
7918
7919 2018-05-22  Maciej W. Rozycki  <macro@mips.com>
7920
7921         * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
7922         the width of the requested register exceeds the width of the
7923         `ptrace' data type.
7924
7925 2018-05-21  Tom Tromey  <tom@tromey.com>
7926
7927         * printcmd.c (output_command): Remove.
7928         (output_command_const): Rename to output_command.
7929         * valprint.h (output_command): Rename from output_command_const.
7930         * tracepoint.c (trace_dump_actions): Call output_command.
7931
7932 2018-05-21  Tom Tromey  <tom@tromey.com>
7933
7934         * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
7935         (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
7936         * ada-lang.h (create_ada_exception_catchpoint): Update.
7937         * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
7938         std::string.
7939         (create_excep_cond_exprs, ~ada_catchpoint)
7940         (should_stop_exception, print_one_exception)
7941         (print_mention_exception, print_recreate_exception): Update.
7942         (ada_get_next_arg): Remove.
7943         (catch_ada_exception_command_split): Use std::string.  Change type
7944         of "excep_string", "cond_string".
7945         (catch_ada_exception_command): Update.
7946         (create_ada_exception_catchpoint): Change type of excep_string.
7947         (ada_exception_sal): Remove excep_string parameter.
7948         (~ada_catchpoint): Remove.
7949
7950 2018-05-21  Tom Tromey  <tom@tromey.com>
7951
7952         * ada-lang.c (ada_collect_symbol_completion_matches): Remove
7953         cleanup.
7954
7955 2018-05-21  Tom Tromey  <tom@tromey.com>
7956
7957         * ada-lang.c (ada_exception_message_1, ada_exception_message):
7958         Return unique_xmalloc_ptr.
7959         (print_it_exception): Update.
7960
7961 2018-05-21  Tom Tromey  <tom@tromey.com>
7962
7963         * tracepoint.c (trace_dump_actions): Use std::string.
7964
7965 2018-05-21  Tom Tromey  <tom@tromey.com>
7966
7967         * symfile.c (reread_symbols): Use std::string for original_name.
7968
7969 2018-05-21  Tom Tromey  <tom@tromey.com>
7970
7971         * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
7972         (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN.  Default
7973         constructor.
7974
7975 2018-05-20  Simon Marchi  <simon.marchi@polymtl.ca>
7976
7977         * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
7978         instance to...
7979         (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
7980         * objfiles.c (get_objfile_bfd_data): Allocate
7981         objfile_per_bfd_storage with obstack_new when allocating on
7982         obstack.
7983
7984 2018-05-20  Simon Marchi  <simon.marchi@ericsson.com>
7985
7986         * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
7987         OBSTACK_ZALLOC.
7988         * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
7989         * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
7990         * mdebugread.c (mdebug_build_psymtabs): Likewise.
7991         (add_pending): Likewise.
7992         (parse_symbol): Likewise.
7993         (parse_partial_symbols): Likewise.
7994         (psymtab_to_symtab_1): Likewise.
7995         (new_psymtab): Likewise.
7996         (elfmdebug_build_psymtabs): Likewise.
7997         * minsyms.c (terminate_minimal_symbol_table): Likewise.
7998         * objfiles.c (get_objfile_bfd_data): Likewise.
7999         (objfile_register_static_link): Likewise.
8000         * psymtab.c (allocate_psymtab): Likewise.
8001         * stabsread.c (read_member_functions): Likewise.
8002         * xcoffread.c (xcoff_end_psymtab): Likewise.
8003
8004 2018-05-20  Simon Marchi  <simon.marchi@ericsson.com>
8005
8006         * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
8007         compiler supports std::is_trivially_constructible.
8008         * common/poison.h: Include obstack.h.
8009         (IsMallocable): Define to is_trivially_constructible if the
8010         compiler supports it, define to true_type otherwise.
8011         (xobnew): New.
8012         (XOBNEW): Redefine.
8013         (xobnewvec): New.
8014         (XOBNEWVEC): Redefine.
8015         * gdb_obstack.h (obstack_zalloc): New.
8016         (OBSTACK_ZALLOC): Redefine.
8017         (obstack_calloc): New.
8018         (OBSTACK_CALLOC): Redefine.
8019         (obstack_new): New.
8020         * gdbarch.sh: Include gdb_obstack in gdbarch.h.
8021         (gdbarch_obstack): New declaration in gdbarch.h, definition in
8022         gdbarch.c.
8023         (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
8024         obstack_calloc/obstack_zalloc.
8025         (gdbarch_obstack_zalloc): Remove.
8026         * target-descriptions.c (tdesc_data_init): Use obstack_new.
8027
8028 2018-05-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
8029
8030         * stack.c (backtrace_command_1): Remove useless variable int i.
8031
8032 2018-05-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
8033
8034         * stack.c (print_frame_info): Fix comment.
8035
8036 2018-05-18  Tom Tromey  <tom@tromey.com>
8037
8038         * dwarf2read.c (struct dwz_file): Add constructor, initializers.
8039         <dwz_bfd>: Now a gdb_bfd_ref_ptr.
8040         (~dwarf2_per_objfile): Update
8041         (dwarf2_get_dwz_file): Use new.
8042         * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
8043         unique_ptr.
8044
8045 2018-05-18  Tom Tromey  <tom@tromey.com>
8046
8047         * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
8048         unique_ptr.
8049         * dwarf2read.c (struct dwp_file): Add constructor and
8050         initializers.
8051         (open_and_init_dwp_file): Return a unique_ptr.
8052         (dwarf2_per_objfile, create_dwp_hash_table)
8053         (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
8054         (lookup_dwo_unit_in_dwp): Update.
8055         (open_and_init_dwp_file, get_dwp_file): Update.
8056
8057 2018-05-18  Tom Tromey  <tom@tromey.com>
8058
8059         * dwarf2read.c (dwarf2_per_objfile): Update.
8060         (struct mapped_index): Add initializers.
8061         (dwarf2_read_index): Use new.
8062         (dw2_symtab_iter_init): Update.
8063         * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
8064         unique_ptr.
8065
8066 2018-05-18  Simon Marchi  <simon.marchi@ericsson.com>
8067
8068         * dwarf2read.c (mapped_index) <total_size>: Remove.
8069
8070 2018-05-18  Simon Marchi  <simon.marchi@ericsson.com>
8071
8072         * unittests/format_pieces-selftests.c (test_format_specifier):
8073         Add ARI comments.
8074
8075 2018-05-18  Tom Tromey  <tom@tromey.com>
8076
8077         * c-typeprint.c (maybe_print_hole): New function.
8078         (c_print_type_struct_field_offset): Update.
8079         (c_type_print_base_struct_union): Call maybe_print_hole.
8080
8081 2018-05-17  Keith Seitz  <keiths@redhat.com>
8082
8083         * breakpoint.c (build_bpstat_chain): New function, moved from
8084         bpstat_stop_status.
8085         (bpstat_stop_status): Add optional parameter, `stop_chain'.
8086         If no stop chain is passed, call build_bpstat_chain to build it.
8087         * breakpoint.h (build_bpstat_chain): Declare.
8088         (bpstat_stop_status): Move documentation here from breakpoint.c.
8089         * infrun.c (handle_signal_stop): Before eliding inlined frames,
8090         build the stop chain and pass it to skip_inline_frames.
8091         Pass this stop chain to bpstat_stop_status.
8092         * inline-frame.c: Include breakpoint.h.
8093         (stopped_by_user_bp_inline_frame): New function.
8094         (skip_inline_frames): Add parameter `stop_chain'.
8095         Move documention to inline-frame.h.
8096         If non-NULL, use stopped_by_user_bp_inline_frame to determine
8097         whether the frame should be elided.
8098         * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
8099         Add moved documentation and update for new parameter.
8100
8101 2018-05-17  Simon Marchi  <simon.marchi@ericsson.com>
8102
8103         PR cli/14975
8104         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8105         unittests/format_pieces-selftests.c.
8106         * common/format.h (format_piece) <operator==>: New.
8107         (format_pieces) <operator[]>: Remove.
8108         * common/format.c (format_pieces::format_pieces): Handle \e.
8109         * unittests/format_pieces-selftests.c: New.
8110
8111 2018-05-17  Tom Tromey  <tom@tromey.com>
8112
8113         PR symtab/23010:
8114         * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
8115         (dw2_instantiate_symtab): Add skip_partial parameter.
8116         (dw2_find_last_source_symtab, dw2_map_expand_apply)
8117         (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
8118         (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
8119         (dw2_expand_symtabs_matching_one)
8120         (dw2_find_pc_sect_compunit_symtab)
8121         (dw2_debug_names_lookup_symbol)
8122         (dw2_debug_names_expand_symtabs_for_function): Update.
8123         (init_cutu_and_read_dies): Add skip_partial parameter.
8124         (process_psymtab_comp_unit, build_type_psymtabs_1)
8125         (process_skeletonless_type_unit, load_partial_comp_unit)
8126         (psymtab_to_symtab_1): Update.
8127         (load_full_comp_unit): Add skip_partial parameter.
8128         (process_imported_unit_die, dwarf2_read_addr_index)
8129         (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
8130         (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
8131         (read_signatured_type): Update.
8132
8133 2018-05-17  Simon Marchi  <simon.marchi@ericsson.com>
8134
8135         * value.c (release_value): Remove unused variable.
8136         (record_latest_value): Likewise.
8137         (access_value_history): Likewise.
8138         (preserve_values): Likewise.
8139
8140 2018-05-17  Tom Tromey  <tom@tromey.com>
8141
8142         * extension.h (struct ext_lang_type_printers) <py_type_printers>:
8143         Initialize.
8144
8145 2018-05-16  Maciej W. Rozycki  <macro@mips.com>
8146
8147         PR gdb/22286
8148         * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
8149         Also handle registers whose width is not a multiple of
8150         PTRACE_TYPE_RET.
8151         (linux_nat_trad_target::store_register): Likewise.
8152
8153 2018-05-16  Tom Tromey  <tom@tromey.com>
8154
8155         * gdbcore.h (core_bfd): Redefine.
8156         * corelow.c (core_target::close): Update.
8157         (core_target_open): Update.
8158         * progspace.h (struct program_space) <cbfd>: Now a
8159         gdb_bfd_ref_ptr.
8160
8161 2018-05-16  Tom Tromey  <tom@tromey.com>
8162
8163         PR cli/19551:
8164         * symfile-add-flags.h (enum symfile_add_flags)
8165         <SYMFILE_NOT_FILENAME>: New constant.
8166         * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME.  Get
8167         objfile name from BFD.
8168         (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
8169         * minidebug.c (find_separate_debug_file_in_section): Put
8170         ".gnu_debugdata" into BFD's file name.
8171
8172 2018-05-16  Simon Marchi  <simon.marchi@ericsson.com>
8173
8174         * regcache.c (regcache_read_ftype, regcache_write_ftype):
8175         Remove.
8176
8177 2018-05-15  Tamar Christina  <tamar.christina@arm.com>
8178
8179         PR binutils/21446
8180         * aarch64-tdep.c (aarch64_analyze_prologue,
8181         aarch64_software_single_step, aarch64_displaced_step_copy_insn):
8182         Indicate not interested in errors.
8183
8184 2018-05-15  Maciej W. Rozycki  <macro@mips.com>
8185
8186         * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
8187         Supply the MIPS_ZERO_REGNUM register.
8188
8189 2018-05-15  Maciej W. Rozycki  <macro@mips.com>
8190
8191         * mips-tdep.c (mask_address_var): Make variable static.
8192
8193 2018-05-14  Tom Tromey  <tom@tromey.com>
8194
8195         * dwarf2read.c (rust_union_quirks): Clear rust_unions.
8196
8197 2018-05-11  Andrew Burgess  <andrew.burgess@embecosm.com>
8198
8199         * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
8200         FXSAVE_ADDR for the mxcsr register.
8201
8202 2018-05-11  Max Filippov  <jcmvbkbc@gmail.com>
8203
8204         * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
8205
8206 2018-05-11  Pedro Alves  <palves@redhat.com>
8207
8208         * corelow.c (core_target) <core_target>: No longer inline.
8209         Initialize m_core_gdbarch, m_core_vec and build the section table
8210         here.
8211         <~core_target>: New.
8212         <core_gdbarch, get_core_register_section>: New methods.
8213         <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
8214         factored out from ...
8215         <core_data, core_vec, core_gdbarch>: ... these deleted globals.
8216         (core_ops): Delete.
8217         (sniff_core_bfd): Add gdbarch parameter.
8218         (core_close): Delete, merged into ...
8219         (core_target::close): ... here.  Delete self.
8220         (core_close_cleanup): Delete.
8221         (core_target_open): Allocate a core_target on the heap.  Use a
8222         unique_ptr instead of a cleanup.  Bits moved into the core_target
8223         ctor.  Adjust to use core_target methods instead of globals.
8224         (get_core_register_section): Rename to ...
8225         (core_target::get_core_register_section): ... this and adjust.
8226         (struct get_core_registers_cb_data): New.
8227         (get_core_registers_cb): Use it.  Use bool.
8228         (core_target::fetch_registers, core_target::files_info)
8229         (core_target::xfer_partial, core_target::read_description)
8230         (core_target::pid_to, core_target::thread_name): Adjust to
8231         reference class fields instead of globals.
8232         * target.h (struct target_ops_deleter, target_ops_up): New.
8233
8234 2018-05-11  Pedro Alves  <palves@redhat.com>
8235
8236         * corefile.c (core_file_command): Move to corelow.c.
8237         * corelow.c (the_core_target): Delete.
8238         (core_file_command): Moved from corefile.c.  Check exec_bfd
8239         instead of the_core_target.  Use target_detach instead of calling
8240         into the_core_target directly.
8241         (maybe_say_no_core_file_now): New.
8242         (core_target::detach): Use it.
8243         (_initialize_corelow): Remove references to the_core_target.
8244         * gdbcore.h (the_core_target): Delete.
8245
8246 2018-05-11  Tom Tromey  <tromey@redhat.com>
8247             Pedro Alves  <palves@redhat.com>
8248
8249         * corefile.c (core_bfd): Remove.
8250         * gdbcore.h (core_bfd): Now a macro.
8251         * progspace.h (struct program_space) <cbfd>: New field.
8252
8253 2018-05-11  Tom Tromey  <tom@tromey.com>
8254
8255         * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
8256         gdb::def_vector.
8257
8258 2018-05-10  Tom Tromey  <tom@tromey.com>
8259
8260         * configure: Rebuild.
8261         * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
8262
8263 2018-05-10  Joel Brobecker  <brobecker@adacore.com>
8264
8265         PR server/23158:
8266         * regformats/regdat.sh: Adjust script, following the addition
8267         of the new expedite_regs parameter to init_target_desc.
8268
8269 2018-05-10  Omair Javaid  <omair.javaid@linaro.org>
8270     
8271         PR gdb/23127
8272         * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
8273         set_gdbarch_significant_addr_bit.
8274         * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
8275         set_gdbarch_significant_addr_bit.
8276         * utils.c (address_significant): Update to sign extend addr.
8277
8278 2018-05-09  Max Filippov  <jcmvbkbc@gmail.com>
8279
8280         * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
8281         (xtensa_linux_init_abi): Limit tdep->num_regs by
8282         tdep->num_nopriv_regs.
8283         * xtensa-tdep.c (xtensa_derive_tdep): Calculate
8284         tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
8285         not initialized.
8286
8287 2018-05-08  Simon Marchi  <simon.marchi@ericsson.com>
8288
8289         * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
8290
8291 2018-05-08  Andrew Burgess  <andrew.burgess@embecosm.com>
8292
8293         * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
8294         (I387_MXCSR_INIT_VAL): New constant.
8295         * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
8296         buffer if it was supplied by the inferior.
8297         * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
8298         (i387_xsave_get_clear_bv): New function.
8299         (i387_supply_xsave): Only read x87 control registers from the
8300         xsave buffer if the feature is enabled, and the state will have
8301         been written, otherwise, provide a suitable default.
8302         (i387_collect_xsave): Pre-clear all registers in xsave buffer,
8303         including x87 control registers.  Update control registers if they
8304         have changed from the default value, and mark features as enabled
8305         as required.
8306         * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
8307
8308 2018-05-08  Ulrich Weigand  <uweigand@de.ibm.com>
8309
8310         * spu-tdep.c (info_spu_event_command): Fix output formatting.
8311
8312 2018-05-07  Tom Tromey  <tom@tromey.com>
8313
8314         * configure: Rebuild.
8315         * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
8316
8317 2018-05-07  Tom Tromey  <tom@tromey.com>
8318
8319         PR tdep/20362:
8320         * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
8321         bit.  Use correct value for VDIV.
8322
8323 2018-05-04  Tom Tromey  <tom@tromey.com>
8324
8325         * configure: Rebuild.
8326         * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
8327
8328 2018-05-04  Tom Tromey  <tom@tromey.com>
8329
8330         * linux-record.c (record_linux_system_call) <case
8331         RECORD_SYS_RECVFROM>: Add "break".
8332
8333 2018-05-04  Tom Tromey  <tom@tromey.com>
8334
8335         * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
8336         Add missing "break".
8337         * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
8338         Add missing "break".
8339
8340 2018-05-04  Tom Tromey  <tom@tromey.com>
8341
8342         * rs6000-tdep.c (ppc_process_record_op4)
8343         (ppc_process_record_op63): Add fall-through comment.
8344
8345 2018-05-04  Tom Tromey  <tom@tromey.com>
8346
8347         * i386-tdep.c (i386_process_record): Add fall-through comment.
8348
8349 2018-05-04  Tom Tromey  <tom@tromey.com>
8350
8351         * stabsread.c (define_symbol) <case 'p'>: Add fall-through
8352         comment.
8353
8354 2018-05-04  Tom Tromey  <tom@tromey.com>
8355
8356         * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
8357         * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
8358         * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
8359         comment.
8360         * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
8361         comment.
8362         * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
8363         comment.
8364
8365 2018-05-04  Tom Tromey  <tom@tromey.com>
8366
8367         * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
8368
8369 2018-05-04  Tom Tromey  <tom@tromey.com>
8370
8371         * s390-tdep.c (s390_process_record): Fix fall-through comments.
8372         * xcoffread.c (scan_xcoff_symtab): Move comment later.
8373         * symfile.c (section_is_mapped): Fix fall-through comment.
8374         * stabsread.c (define_symbol, read_member_functions): Fix
8375         fall-through comment.
8376         * s390-linux-tdep.c (s390_process_record): Fix fall-through
8377         comment.
8378         * remote.c (remote_wait_as): Fix fall-through comment.
8379         * p-exp.y (yylex): Fix fall-through comment.
8380         * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
8381         comment.
8382         * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
8383         * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
8384         * jv-exp.y (yylex): Fix fall-through comment.
8385         * go-exp.y (lex_one_token): Fix fall-through comment.
8386         * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
8387         fall-through comment.
8388         * f-exp.y (yylex): Fix fall-through comment.
8389         * dwarf2read.c (process_die): Fix fall-through comments.
8390         * dbxread.c (process_one_symbol): Fix fall-through comment.
8391         * d-exp.y (lex_one_token): Fix fall-through comment.
8392         * cp-name-parser.y (yylex): Fix fall-through comment.
8393         * coffread.c (coff_symtab_read): Fix fall-through comment.
8394         * c-exp.y (lex_one_token): Fix fall-through comment.
8395         * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
8396         comment.
8397         * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
8398         comment.
8399
8400 2018-05-04  Tom Tromey  <tom@tromey.com>
8401
8402         PR python/22730:
8403         * NEWS: Mention gdb.execute change.
8404         * gdbcmd.h (execute_control_command): Don't declare.
8405         * python/python.c (execute_gdb_command): Use read_command_lines_1,
8406         execute_control_commands, execute_control_commands_to_string.
8407         * cli/cli-script.h (execute_control_commands)
8408         (execute_control_commands_to_string): Declare.
8409         (execute_control_command): Add from_tty parameter.
8410         * cli/cli-script.c (execute_control_commands)
8411         (execute_control_commands_to_string): New functions.
8412         (execute_user_command): Use execute_control_commands.
8413         (execute_control_command_1): Add "from_tty" parameter.  Update.
8414         (execute_control_command): Likewise.
8415
8416 2018-05-04  Tom Tromey  <tom@tromey.com>
8417
8418         PR python/22731:
8419         * NEWS: Mention that breakpoint commands are writable.
8420         * python/py-breakpoint.c (bppy_set_commands): New function.
8421         (breakpoint_object_getset) <"commands">: Use it.
8422
8423 2018-05-04  Tom Tromey  <tom@tromey.com>
8424
8425         * tracepoint.c (actions_command): Update.
8426         * mi/mi-cmd-break.c (mi_command_line_array)
8427         (mi_command_line_array_cnt, mi_command_line_array_ptr)
8428         (mi_read_next_line): Remove.
8429         (mi_cmd_break_commands): Update.
8430         * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
8431         function_view.
8432         * cli/cli-script.c (get_command_line): Update.
8433         (process_next_line): Use function_view.  Constify.
8434         (recurse_read_control_structure, read_command_lines)
8435         (read_command_lines_1): Change argument types to function_view.
8436         (do_define_command, document_command): Update.
8437         * breakpoint.h (check_tracepoint_command): Don't declare.
8438         * breakpoint.c (check_tracepoint_command): Remove.
8439         (commands_command_1, create_tracepoint_from_upload): Update.
8440
8441 2018-05-04  Tom Tromey  <tom@tromey.com>
8442
8443         PR gdb/11750:
8444         * cli/cli-script.h (enum command_control_type) <define_control>:
8445         New constant.
8446         * cli/cli-script.c (multi_line_command_p): Handle define_control.
8447         (build_command_line, execute_control_command_1)
8448         (process_next_line): Likewise.
8449         (do_define_command): New function, extracted from define_command.
8450         (define_command): Use it.
8451
8452 2018-05-04  Tom Tromey  <tom@tromey.com>
8453
8454         * tracepoint.c (actions_command): Update.
8455         * cli/cli-script.h (read_command_lines): Update.
8456         * cli/cli-script.c (read_command_lines): Constify prompt_arg.
8457         (MAX_TMPBUF): Remove define.
8458         (define_command): Use string_printf.
8459         (document_command): Likewise.
8460         * breakpoint.c (commands_command_1): Update.
8461
8462 2018-05-04  Tom Tromey  <tom@tromey.com>
8463
8464         * top.c (execute_command): Update.
8465         * cli/cli-script.h (print_command_lines): Now varargs.
8466         * cli/cli-script.c (print_command_lines): Now varargs.
8467         (execute_control_command_1) <case while_control, case if_control>:
8468         Update.
8469
8470 2018-05-04  Tom Tromey  <tom@tromey.com>
8471
8472         * tracepoint.c (all_tracepoint_actions): Rename from
8473         all_tracepoint_actions_and_cleanup.  Change return type.
8474         (actions_command, encode_actions_1, encode_actions)
8475         (trace_dump_actions, tdump_command): Update.
8476         * remote.c (remote_download_command_source): Update.
8477         * python/python.c (gdbpy_eval_from_control_command)
8478         (python_command, python_interactive_command): Update.
8479         * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
8480         * guile/guile.c (guile_command)
8481         (gdbscm_eval_from_control_command, guile_command): Update.
8482         * compile/compile.c (compile_code_command)
8483         (compile_print_command, compile_to_object): Update.
8484         * cli/cli-script.h (struct command_lines_deleter): New.
8485         (counted_command_line): New typedef.
8486         (struct command_line): Add constructor, destructor.
8487         <body_list>: Remove.
8488         <body_list_0, body_list_1>: New members.
8489         (command_line_up): Remove typedef.
8490         (read_command_lines, read_command_lines_1, get_command_line):
8491         Update.
8492         (copy_command_lines): Don't declare.
8493         * cli/cli-script.c (build_command_line): Use "new".
8494         (get_command_line): Return counted_command_line.
8495         (print_command_lines, execute_user_command)
8496         (execute_control_command_1, while_command, if_command): Update.
8497         (realloc_body_list): Remove.
8498         (process_next_line, recurse_read_control_structure): Update.
8499         (read_command_lines, read_command_lines_1): Return counted_command_line.
8500         (free_command_lines): Use "delete".
8501         (copy_command_lines): Remove.
8502         (define_command, document_command, show_user_1): Update.
8503         * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
8504         a counted_command_line.
8505         * breakpoint.h (counted_command_line): Remove typedef.
8506         (breakpoint_set_commands): Update.
8507         * breakpoint.c (check_no_tracepoint_commands)
8508         (validate_commands_for_breakpoint): Update.
8509         (breakpoint_set_commands): Change commands to be a
8510         counted_command_line.
8511         (commands_command_1, update_dprintf_command_list)
8512         (create_tracepoint_from_upload): Update.
8513
8514 2018-05-04  Tom Tromey  <tom@tromey.com>
8515
8516         * cli/cli-decode.h (cmd_list_element): New constructor.
8517         (~cmd_list_element): New destructor.
8518         (struct cmd_list_element): Add initializers.
8519         * cli/cli-decode.c (do_add_cmd): Use "new".
8520         (delete_cmd): Use "delete".
8521
8522 2018-05-04  Jan Kratochvil  <jan.kratochvil@redhat.com>
8523             Pedro Alves <palves@redhat.com>
8524
8525         PR breakpoints/19806 and support for PR external/20207.
8526         * NEWS: Mention Aarch64 watchpoint improvements.
8527         * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
8528         watchpoints and PR external/20207 watchpoints.
8529         * nat/aarch64-linux-hw-point.c
8530         (kernel_supports_any_contiguous_range): New.
8531         (aarch64_watchpoint_offset): New.
8532         (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
8533         (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
8534         (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
8535         (aarch64_align_watchpoint): New parameters aligned_offset_p and
8536         next_addr_orig_p.  Support PR external/20207 watchpoints.
8537         (aarch64_downgrade_regs): New.
8538         (aarch64_dr_state_insert_one_point): New parameters offset and
8539         addr_orig.
8540         (aarch64_dr_state_remove_one_point): Likewise.
8541         (aarch64_handle_breakpoint): Update caller.
8542         (aarch64_handle_aligned_watchpoint): Likewise.
8543         (aarch64_handle_unaligned_watchpoint): Support addr_orig and
8544         aligned_offset.
8545         (aarch64_linux_set_debug_regs): Remove const from state.  Call
8546         aarch64_downgrade_regs.
8547         (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
8548         * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
8549         (DR_CONTROL_MASK): ... this.
8550         (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
8551         (unsigned int aarch64_watchpoint_offset): New prototype.
8552         (aarch64_linux_set_debug_regs): Remove const from state.
8553         * utils.c (align_up, align_down): Move to ...
8554         * common/common-utils.c (align_up, align_down): ... here.
8555         * utils.h (align_up, align_down): Move to ...
8556         * common/common-utils.h (align_up, align_down): ... here.
8557
8558 2018-05-04  Joel Brobecker  <brobecker@adacore.com>
8559
8560         * sparc-tdep.c (sparc_structure_return_p): Re-implement to
8561         match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
8562         (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
8563         Re-implement to match the ABI as summarized in GCC's
8564         gcc/config/sparc/sparc.c.  All callers updated.
8565         (sparc32_store_arguments): Remove assertion.
8566
8567 2018-05-04  Tom Tromey  <tom@tromey.com>
8568
8569         * printcmd.c: Don't include tui.h.
8570         (decode_format): Use skip_spaces.
8571
8572 2018-05-04  Tom Tromey  <tom@tromey.com>
8573
8574         PR gdb/22619:
8575         * printcmd.c (last_count): New global.
8576         (x_command): Use saved count when repeating.
8577
8578 2018-05-04  Tom Tromey  <tom@tromey.com>
8579
8580         * nto-procfs.c (do_closedir_cleanup): Remove.
8581         (procfs_pidlist): Use gdb_dir_up.
8582         * procfs.c (do_closedir_cleanup): Remove.
8583         (proc_update_threads): Use gdb_dir_up.
8584         * common/filestuff.h (struct gdb_dir_deleter): New.
8585         (gdb_dir_up): New typedef.
8586
8587 2018-05-04  Tom Tromey  <tom@tromey.com>
8588
8589         * ada-lang.c (print_mention_exception): Use std::string.
8590
8591 2018-05-04  Tom Tromey  <tom@tromey.com>
8592
8593         * ada-lang.c (create_excep_cond_exprs): Update.
8594         (ada_exception_catchpoint_cond_string): Use std::string.
8595
8596 2018-05-04  Tom Tromey  <tom@tromey.com>
8597
8598         * ada-lang.c (xget_renaming_scope): Return std::string.
8599         (old_renaming_is_invisible): Update.
8600
8601 2018-05-04  Tom Tromey  <tom@tromey.com>
8602
8603         * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
8604         (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
8605
8606 2018-05-04  Ulrich Weigand  <uweigand@de.ibm.com>
8607
8608         * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
8609
8610 2018-05-04  Tom Tromey  <tom@tromey.com>
8611
8612         * remote.c (remote_query_supported_append): Change type.
8613         (remote_check_symbols): Update.
8614
8615 2018-05-04  Paul Pluzhnikov  <ppluzhnikov@google.com>
8616
8617         PR gdb/11420
8618         * configure.ac: Prepend libpython.
8619         * python/python-config.py: Likewise.
8620         * configure: Regenerate.
8621
8622 2018-05-03  Simon Marchi  <simon.marchi@ericsson.com>
8623
8624         * Makefile.in (%.c: %.l): Use -t instead of --stdout.
8625
8626 2018-05-03  Pedro Alves  <palves@redhat.com>
8627
8628         * s390-linux-nat.c
8629         (s390_linux_nat_target::have_continuable_watchpoint): Mark with
8630         override.  Write 'true' instead of '1'.
8631         (s390_linux_nat_target::watchpoint_addr_within_range): Remove
8632         declaration.
8633
8634 2018-05-02  Pedro Alves  <palves@redhat.com>
8635
8636         * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
8637         add_inf_child_target.
8638         * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
8639         add_inf_child_target.
8640         * aix-thread.c (aix_thread_target_info): New.
8641         (aix_thread_target) <shortname, longname, doc>: Delete.
8642         <info>: New.
8643         * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
8644         add_inf_child_target.
8645         * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
8646         add_inf_child_target.
8647         * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
8648         add_inf_child_target.
8649         * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
8650         add_inf_child_target.
8651         * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
8652         add_inf_child_target.
8653         * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
8654         add_inf_child_target.
8655         * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
8656         add_inf_child_target.
8657         * arm-linux-nat.c (_initialize_arm_linux_nat): Use
8658         add_inf_child_target.
8659         * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
8660         add_inf_child_target.
8661         * bfd-target.c (target_bfd_target_info): New.
8662         (target_bfd) <shortname, longname, doc>: Delete.
8663         <info>: New.
8664         * bsd-kvm.c (bsd_kvm_target_info): New.
8665         (bsd_kvm_target) <shortname, longname, doc>: Delete.
8666         <info>: New.
8667         (bsd_kvm_target::open): Rename to ...
8668         (bsd_kvm_target_open): ... this.  Adjust.
8669         * bsd-uthread.c (bsd_uthread_target_info): New.
8670         (bsd_uthread_target) <shortname, longname, doc>: Delete.
8671         <info>: New.
8672         * corefile.c (core_file_command): Adjust.
8673         * corelow.c (core_target_info): New.
8674         (core_target) <shortname, longname, doc>: Delete.
8675         <info>: New.
8676         (core_target::open): Rename to ...
8677         (core_target_open): ... this.  Adjust.
8678         * ctf.c (ctf_target_info): New.
8679         (ctf_target) <shortname, longname, doc>: Delete.
8680         <info>: New.
8681         (ctf_target::open): Rename to ...
8682         (ctf_target_open): ... this.
8683         (_initialize_ctf): Adjust.
8684         * exec.c (exec_target_info): New.
8685         (exec_target) <shortname, longname, doc>: Delete.
8686         <info>: New.
8687         (exec_target::open): Rename to ...
8688         (exec_target_open): ... this.
8689         * gdbcore.h (core_target_open): Declare.
8690         * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
8691         * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
8692         add_inf_child_target.
8693         * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
8694         add_inf_child_target.
8695         * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
8696         add_inf_child_target.
8697         * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
8698         add_inf_child_target.
8699         * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
8700         add_inf_child_target.
8701         * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
8702         add_inf_child_target.
8703         * i386-linux-nat.c (_initialize_i386_linux_nat): Use
8704         add_inf_child_target.
8705         * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
8706         add_inf_child_target.
8707         * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
8708         add_inf_child_target.
8709         * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
8710         add_inf_child_target.
8711         * inf-child.c (inf_child_target_info): New.
8712         (inf_child_target::info): New.
8713         (inf_child_open_target): Remove 'target' parameter.  Use
8714         get_native_target instead.
8715         (inf_child_target::open): Delete.
8716         (add_inf_child_target): New.
8717         * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
8718         Delete.
8719         <info>: New.
8720         (add_inf_child_target): Declare.
8721         (inf_child_open_target): Declare.
8722         * linux-thread-db.c (thread_db_target_info): New.
8723         (thread_db_target) <shortname, longname, doc>: Delete.
8724         <info>: New.
8725         * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
8726         add_inf_child_target.
8727         * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
8728         add_inf_child_target.
8729         * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
8730         add_inf_child_target.
8731         * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
8732         add_inf_child_target.
8733         * make-target-delegates (print_class): Adjust.
8734         * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
8735         add_inf_child_target.
8736         * mips-linux-nat.c (_initialize_mips_linux_nat): Use
8737         add_inf_child_target.
8738         * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
8739         add_inf_child_target.
8740         * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
8741         add_inf_child_target.
8742         * nto-procfs.c (nto_native_target_info): New.
8743         (nto_procfs_target_native) <shortname, longname, doc>:
8744         Delete.
8745         <info>: New.
8746         (nto_procfs_target_info): New.
8747         (nto_procfs_target_procfs) <shortname, longname, doc>:
8748         Delete.
8749         <info>: New.
8750         (init_procfs_targets): Adjust.
8751         * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
8752         add_inf_child_target.
8753         * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
8754         add_inf_child_target.
8755         * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
8756         add_inf_child_target.
8757         * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
8758         add_inf_child_target.
8759         * ravenscar-thread.c (ravenscar_target_info): New.
8760         (ravenscar_thread_target) <shortname, longname, doc>:
8761         Delete.
8762         <info>: New.
8763         * record-btrace.c (record_btrace_target_info):
8764         (record_btrace_target) <shortname, longname, doc>: Delete.
8765         <info>: New.
8766         (record_btrace_target::open): Rename to ...
8767         (record_btrace_target_open): ... this.  Adjust.
8768         * record-full.c (record_longname, record_doc): New.
8769         (record_full_base_target) <shortname, longname, doc>: Delete.
8770         <info>: New.
8771         (record_full_target_info): New.
8772         (record_full_target): <shortname>: Delete.
8773         <info>: New.
8774         (record_full_core_open_1, record_full_open_1): Update comments.
8775         (record_full_base_target::open): Rename to ...
8776         (record_full_open): ... this.
8777         (cmd_record_full_restore): Update.
8778         (_initialize_record_full): Update.
8779         * remote-sim.c (remote_sim_target_info): New.
8780         (gdbsim_target) <shortname, longname, doc>: Delete.
8781         <info>: New.
8782         (gdbsim_target::open): Rename to ...
8783         (gdbsim_target_open): ... this.
8784         (_initialize_remote_sim): Adjust.
8785         * remote.c (remote_doc): New.
8786         (remote_target_info): New.
8787         (remote_target) <shortname, longname, doc>: Delete.
8788         <info>: New.
8789         (extended_remote_target_info): New.
8790         (extended_remote_target) <shortname, longname, doc>: Delete.
8791         <info>: New.
8792         (remote_target::open_1): Make static.  Adjust.
8793         * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
8794         * s390-linux-nat.c (_initialize_s390_nat): Use
8795         add_inf_child_target.
8796         * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
8797         add_inf_child_target.
8798         * sol-thread.c (thread_db_target_info): New.
8799         (sol_thread_target) <shortname, longname, doc>: Delete.
8800         <info>: New.
8801         * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
8802         add_inf_child_target.
8803         * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
8804         add_inf_child_target.
8805         * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
8806         add_inf_child_target.
8807         * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
8808         add_inf_child_target.
8809         * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
8810         add_inf_child_target.
8811         * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
8812         add_inf_child_target.
8813         * spu-linux-nat.c (_initialize_spu_nat): Use
8814         add_inf_child_target.
8815         * spu-multiarch.c (spu_multiarch_target_info): New.
8816         (spu_multiarch_target) <shortname, longname, doc>: Delete.
8817         <info>: New.
8818         * target-delegates.c: Regenerate.
8819         * target.c: Include <unordered_map>.
8820         (target_ops_p): Delete.
8821         (DEF_VEC_P(target_ops_p)): Delete.
8822         (target_factories): New.
8823         (test_target_info): New.
8824         (test_target_ops::info): New.
8825         (open_target): Adjust to use target_factories.
8826         (add_target_with_completer): Rename to ...
8827         (add_target): ... this.  Change prototype.  Register target_info
8828         and open callback in target_factories.  Register target_info in
8829         command context instead of target_ops.
8830         (add_target): Delete old implementation.
8831         (add_deprecated_target_alias): Change prototype.  Adjust.
8832         (the_native_target): New.
8833         (set_native_target, get_native_target): New.
8834         (find_default_run_target): Use the_native_target.
8835         (find_attach_target, find_run_target): Simplify.
8836         (target_ops::open): Delete.
8837         (dummy_target_info): New.
8838         (dummy_target::shortname, dummy_target::longname)
8839         (dummy_target::doc): Delete.
8840         (dummy_target::info): New.
8841         (debug_target::shortname, debug_target::longname)
8842         (debug_target::doc): Delete.
8843         (debug_target::info): New.
8844         * target.h (struct target_info): New.
8845         (target_ops::~target_ops): Add comment.
8846         (target_ops::info): New.
8847         (target_ops::shortname, target_ops::longname, target_ops::doc): No
8848         longer virtual.  Implement in terms of target_info.
8849         (set_native_target, get_native_target): Declare.
8850         (target_open_ftype): New.
8851         (add_target, add_target_with_completer)
8852         (add_deprecated_target_alias): Change prototype.
8853         (test_target) <shortname, longname, doc>: Delete.
8854         <info>: New.
8855         * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
8856         add_inf_child_target.
8857         * tracefile-tfile.c (tfile_target_info): New.
8858         (tfile_target) <shortname, longname, doc>: Delete.
8859         <info>: New.
8860         (tfile_target::open): Rename to ...
8861         (tfile_target_open): ... this.
8862         (_initialize_tracefile_tfile): Adjust.
8863         * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
8864         add_inf_child_target.
8865         * windows-nat.c (_initialize_windows_nat): Use
8866         add_inf_child_target.
8867         * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
8868         add_inf_child_target.
8869
8870 2018-05-02  Pedro Alves  <palves@redhat.com>
8871
8872         * linux-nat.h (linux_nat_target) <low_new_thread,
8873         low_delete_thread, low_new_fork, low_forget_process,
8874         low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
8875         New virtual methods.
8876         (linux_nat_set_new_thread, linux_nat_set_delete_thread)
8877         (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
8878         (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
8879         (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
8880         (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
8881         Delete.
8882         * linux-fork.c (delete_fork): Adjust to call low method.
8883         * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
8884         (linux_nat_new_fork, linux_nat_forget_process_hook)
8885         (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
8886         (linux_nat_status_is_event):
8887         (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
8888         (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
8889         to call low method.
8890         (sigtrap_is_event): Rename to ...
8891         (linux_nat_target::low_status_is_event): ... this.
8892         (linux_nat_set_status_is_event): Delete.
8893         (save_stop_reason, linux_nat_wait_1)
8894         (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
8895         low methods.
8896         (linux_nat_set_new_thread, linux_nat_set_delete_thread)
8897         (linux_nat_set_new_fork, linux_nat_set_forget_process)
8898         (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
8899         (linux_nat_set_prepare_to_resume): Delete.
8900         * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
8901         low virtual methods.
8902         * amd64-linux-nat.c: Likewise.
8903         * arm-linux-nat.c: Likewise.
8904         * i386-linux-nat.c: Likewise.
8905         * ia64-linux-nat.c: Likewise.
8906         * mips-linux-nat.c: Likewise.
8907         * ppc-linux-nat.c: Likewise.
8908         * s390-linux-nat.c: Likewise.
8909         * sparc64-linux-nat.c: Likewise.
8910         * x86-linux-nat.c: Likewise.
8911         * x86-linux-nat.h: Include "nat/x86-linux.h".
8912         (x86_linux_nat_target) <low_new_fork, low_forget_process,
8913         low_prepare_to_resume, low_new_thread, low_delete_thread>:
8914         Override methods.
8915
8916 2018-05-02  Pedro Alves  <palves@redhat.com>
8917
8918         * target.h (target_ops)
8919         <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
8920         stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
8921         stopped_by_watchpoint, have_continuable_watchpoint,
8922         stopped_data_address, watchpoint_addr_within_range,
8923         can_accel_watchpoint_condition, can_run, thread_alive,
8924         has_all_memory, has_memory, has_stack, has_registers,
8925         has_execution, can_async_p, is_async_p, supports_non_stop,
8926         always_non_stop_p, can_execute_reverse, supports_multi_process,
8927         supports_enable_disable_tracepoint,
8928         supports_disable_randomization, supports_string_tracing,
8929         supports_evaluation_of_breakpoint_conditions,
8930         can_run_breakpoint_commands, filesystem_is_local,
8931         can_download_tracepoint, get_trace_state_variable_value,
8932         set_trace_notes, get_tib_address, use_agent, can_use_agent,
8933         record_is_replaying, record_will_replay,
8934         augmented_libraries_svr4_read>: Adjust to return bool.
8935         * aarch64-linux-nat.c: All implementations adjusted.
8936         * aix-thread.c: All implementations adjusted.
8937         * arm-linux-nat.c: All implementations adjusted.
8938         * breakpoint.c: All implementations adjusted.
8939         * bsd-kvm.c: All implementations adjusted.
8940         * bsd-uthread.c: All implementations adjusted.
8941         * corelow.c: All implementations adjusted.
8942         * ctf.c: All implementations adjusted.
8943         * darwin-nat.c: All implementations adjusted.
8944         * darwin-nat.h: All implementations adjusted.
8945         * exec.c: All implementations adjusted.
8946         * fbsd-nat.c: All implementations adjusted.
8947         * fbsd-nat.h: All implementations adjusted.
8948         * gnu-nat.c: All implementations adjusted.
8949         * gnu-nat.h: All implementations adjusted.
8950         * go32-nat.c: All implementations adjusted.
8951         * ia64-linux-nat.c: All implementations adjusted.
8952         * inf-child.c: All implementations adjusted.
8953         * inf-child.h: All implementations adjusted.
8954         * inf-ptrace.c: All implementations adjusted.
8955         * inf-ptrace.h: All implementations adjusted.
8956         * linux-nat.c: All implementations adjusted.
8957         * linux-nat.h: All implementations adjusted.
8958         * mips-linux-nat.c: All implementations adjusted.
8959         * nto-procfs.c: All implementations adjusted.
8960         * ppc-linux-nat.c: All implementations adjusted.
8961         * procfs.c: All implementations adjusted.
8962         * ravenscar-thread.c: All implementations adjusted.
8963         * record-btrace.c: All implementations adjusted.
8964         * record-full.c: All implementations adjusted.
8965         * remote-sim.c: All implementations adjusted.
8966         * remote.c: All implementations adjusted.
8967         * s390-linux-nat.c: All implementations adjusted.
8968         * sol-thread.c: All implementations adjusted.
8969         * spu-multiarch.c: All implementations adjusted.
8970         * target-delegates.c: All implementations adjusted.
8971         * target.c: All implementations adjusted.
8972         * target.h: All implementations adjusted.
8973         * tracefile-tfile.c: All implementations adjusted.
8974         * tracefile.c: All implementations adjusted.
8975         * tracefile.h: All implementations adjusted.
8976         * windows-nat.c: All implementations adjusted.
8977         * x86-linux-nat.h: All implementations adjusted.
8978         * x86-nat.h: All implementations adjusted.
8979
8980 2018-05-02  Pedro Alves  <palves@redhat.com>
8981
8982         * make-target-delegates (scan_target_h): Don't trim lines here.
8983         Replace sequences of tabs and/or whitespace with a single
8984         whitespace.
8985         (top level, parsing methods): Trim each line before processing it
8986         here.
8987
8988 2018-05-02  Pedro Alves  <palves@redhat.com>
8989             John Baldwin  <jhb@freebsd.org>
8990
8991         * target.h (enum strata) <debug_stratum>: New.
8992         (struct target_ops) <all delegation methods>: Replace by C++
8993         virtual methods, and drop "to_" prefix.  All references updated
8994         throughout.
8995         <to_shortname, to_longname, to_doc, to_data,
8996         to_have_steppable_watchpoint, to_have_continuable_watchpoint,
8997         to_has_thread_control, to_attach_no_wait>: Delete, replaced by
8998         virtual methods.  All references updated throughout.
8999         <can_attach, supports_terminal_ours, can_create_inferior,
9000         get_thread_control_capabilities, attach_no_wait>: New
9001         virtual methods.
9002         <insert_breakpoint, remove_breakpoint>: Now
9003         TARGET_DEFAULT_NORETURN methods.
9004         <info_proc>: Now returns bool.
9005         <to_magic>: Delete.
9006         (OPS_MAGIC): Delete.
9007         (current_target): Delete.  All references replaced by references
9008         to ...
9009         (target_stack): ... this.  New.
9010         (target_shortname, target_longname): Adjust.
9011         (target_can_run): Now a function declaration.
9012         (default_child_has_all_memory, default_child_has_memory)
9013         (default_child_has_stack, default_child_has_registers)
9014         (default_child_has_execution): Remove target_ops parameter.
9015         (complete_target_initialization): Delete.
9016         (memory_breakpoint_target): New template class.
9017         (test_target_ops): Refactor as a C++ class with virtual methods.
9018         * make-target-delegates (NAME_PART): Tighten.
9019         (POINTER_PART, CP_SYMBOL): New.
9020         (SIMPLE_RETURN_PART): Reimplement.
9021         (VEC_RETURN_PART): Expect less.
9022         (RETURN_PART, VIRTUAL_PART): New.
9023         (METHOD): Adjust to C++ virtual methods.
9024         (scan_target_h): Remove reference to C99.
9025         (dname): Output "target_ops::" prefix.
9026         (write_function_header): Adjust to output a C++ class method.
9027         (write_declaration): New.
9028         (write_delegator): Adjust to output a C++ class method.
9029         (tdname): Output "dummy_target::" prefix.
9030         (write_tdefault, write_debugmethod): Adjust to output a C++ class
9031         method.
9032         (tdefault_names, debug_names): Delete.
9033         (return_types, tdefaults, styles, argtypes_array): New.
9034         (top level): All methods are delegators.
9035         (print_class): New.
9036         (top level): Print dummy_target and debug_target classes.
9037         * target-delegates.c: Regenerate.
9038         * target-debug.h (target_debug_print_enum_info_proc_what)
9039         (target_debug_print_thread_control_capabilities)
9040         (target_debug_print_thread_info_p): New.
9041         * target.c (dummy_target): Delete.
9042         (the_dummy_target, the_debug_target): New.
9043         (target_stack): Now extern.
9044         (set_targetdebug): Push/unpush debug target.
9045         (default_child_has_all_memory, default_child_has_memory)
9046         (default_child_has_stack, default_child_has_registers)
9047         (default_child_has_execution): Remove target_ops parameter.
9048         (complete_target_initialization): Delete.
9049         (add_target_with_completer): No longer call
9050         complete_target_initialization.
9051         (target_supports_terminal_ours): Use regular delegation.
9052         (update_current_target): Delete.
9053         (push_target): No longer check magic number.  Don't call
9054         update_current_target.
9055         (unpush_target): Don't call update_current_target.
9056         (target_is_pushed): No longer check magic number.
9057         (target_require_runnable): Skip for all stratums over
9058         process_stratum.
9059         (target_ops::info_proc): New.
9060         (target_info_proc): Use find_target_at and
9061         find_default_run_target.
9062         (target_supports_disable_randomization): Use regular delegation.
9063         (target_get_osdata): Use find_target_at.
9064         (target_ops::open, target_ops::close, target_ops::can_attach)
9065         (target_ops::attach, target_ops::can_create_inferior)
9066         (target_ops::create_inferior, target_ops::can_run)
9067         (target_can_run): New.
9068         (default_fileio_target): Use regular delegation.
9069         (target_ops::fileio_open, target_ops::fileio_pwrite)
9070         (target_ops::fileio_pread, target_ops::fileio_fstat)
9071         (target_ops::fileio_close, target_ops::fileio_unlink)
9072         (target_ops::fileio_readlink): New.
9073         (target_fileio_open_1, target_fileio_unlink)
9074         (target_fileio_readlink): Always call the target method.  Handle
9075         FILEIO_ENOSYS.
9076         (return_zero, return_zero_has_execution): Delete.
9077         (init_dummy_target): Delete.
9078         (dummy_target::dummy_target, dummy_target::shortname)
9079         (dummy_target::longname, dummy_target::doc)
9080         (debug_target::debug_target, debug_target::shortname)
9081         (debug_target::longname, debug_target::doc): New.
9082         (target_supports_delete_record): Use regular delegation.
9083         (setup_target_debug): Delete.
9084         (maintenance_print_target_stack): Skip debug_stratum.
9085         (initialize_targets): Instantiate the_dummy_target and
9086         the_debug_target.
9087         * auxv.c (target_auxv_parse): Remove 'ops' parameter.  Adjust to
9088         use target_stack.
9089         (target_auxv_search, fprint_target_auxv): Adjust.
9090         (info_auxv_command): Adjust to use target_stack.
9091         * auxv.h (target_auxv_parse): Remove 'ops' parameter.
9092         * exceptions.c (print_flush): Handle a NULL target_stack.
9093         * regcache.c (target_ops_no_register): Refactor as class with
9094         virtual methods.
9095
9096         * exec.c (exec_target): New class.
9097         (exec_ops): Now an exec_target.
9098         (exec_open, exec_close_1, exec_get_section_table)
9099         (exec_xfer_partial, exec_files_info, exec_has_memory)
9100         (exec_make_note_section): Refactor as exec_target methods.
9101         (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
9102         Delete.
9103         (exec_target::find_memory_regions): New.
9104         (_initialize_exec): Don't call init_exec_ops.
9105         * gdbcore.h (exec_file_clear): Delete.
9106
9107         * corefile.c (core_target): Delete.
9108         (core_file_command): Adjust.
9109         * corelow.c (core_target): New class.
9110         (the_core_target): New.
9111         (core_close): Remove target_ops parameter.
9112         (core_close_cleanup): Adjust.
9113         (core_target::close): New.
9114         (core_open, core_detach, get_core_registers, core_files_info)
9115         (core_xfer_partial, core_thread_alive, core_read_description)
9116         (core_pid_to_str, core_thread_name, core_has_memory)
9117         (core_has_stack, core_has_registers, core_info_proc): Rework as
9118         core_target methods.
9119         (ignore, core_remove_breakpoint, init_core_ops): Delete.
9120         (_initialize_corelow): Initialize the_core_target.
9121         * gdbcore.h (core_target): Delete.
9122         (the_core_target): New.
9123
9124         * ctf.c: (ctf_target): New class.
9125         (ctf_ops): Now a ctf_target.
9126         (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
9127         (ctf_xfer_partial, ctf_get_trace_state_variable_value)
9128         (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
9129         methods.
9130         (init_ctf_ops): Delete.
9131         (_initialize_ctf): Don't call it.
9132         * tracefile-tfile.c (tfile_target): New class.
9133         (tfile_ops): Now a tfile_target.
9134         (tfile_open, tfile_close, tfile_files_info)
9135         (tfile_get_tracepoint_status, tfile_trace_find)
9136         (tfile_fetch_registers, tfile_xfer_partial)
9137         (tfile_get_trace_state_variable_value, tfile_traceframe_info):
9138         Refactor as tfile_target methods.
9139         (tfile_xfer_partial_features): Remove target_ops parameter.
9140         (init_tfile_ops): Delete.
9141         (_initialize_tracefile_tfile): Don't call it.
9142         * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
9143         (tracefile_has_stack, tracefile_has_registers)
9144         (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
9145         tracefile_target methods.
9146         (init_tracefile_ops): Delete.
9147         (tracefile_target::tracefile_target): New.
9148         * tracefile.h: Include "target.h".
9149         (tracefile_target): New class.
9150         (init_tracefile_ops): Delete.
9151
9152         * spu-multiarch.c (spu_multiarch_target): New class.
9153         (spu_ops): Now a spu_multiarch_target.
9154         (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
9155         (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
9156         (spu_search_memory, spu_mourn_inferior): Refactor as
9157         spu_multiarch_target methods.
9158         (init_spu_ops): Delete.
9159         (_initialize_spu_multiarch): Remove references to init_spu_ops,
9160         complete_target_initialization.
9161
9162         * ravenscar-thread.c (ravenscar_thread_target): New class.
9163         (ravenscar_ops): Now a ravenscar_thread_target.
9164         (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
9165         (ravenscar_thread_alive, ravenscar_pid_to_str)
9166         (ravenscar_fetch_registers, ravenscar_store_registers)
9167         (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
9168         (ravenscar_stopped_by_hw_breakpoint)
9169         (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
9170         (ravenscar_mourn_inferior, ravenscar_core_of_thread)
9171         (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
9172         methods.
9173         (init_ravenscar_thread_ops): Delete.
9174         (_initialize_ravenscar): Remove references to
9175         init_ravenscar_thread_ops and complete_target_initialization.
9176
9177         * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
9178         (bsd_uthread_target): New class.
9179         (bsd_uthread_ops): Now a bsd_uthread_target.
9180         (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
9181         (bsd_uthread_close, bsd_uthread_mourn_inferior)
9182         (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
9183         (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
9184         (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
9185         (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
9186         (bsd_uthread_target): Delete function.
9187         (_initialize_bsd_uthread): Remove reference to
9188         complete_target_initialization.
9189
9190         * bfd-target.c (target_bfd_data): Delete.  Fields folded into ...
9191         (target_bfd): ... this new class.
9192         (target_bfd_xfer_partial, target_bfd_get_section_table)
9193         (target_bfd_close): Refactor as target_bfd methods.
9194         (target_bfd::~target_bfd): New.
9195         (target_bfd_reopen): Adjust.
9196         (target_bfd::close): New.
9197
9198         * record-btrace.c (record_btrace_target): New class.
9199         (record_btrace_ops): Now a record_btrace_target.
9200         (record_btrace_open, record_btrace_stop_recording)
9201         (record_btrace_disconnect, record_btrace_close)
9202         (record_btrace_async, record_btrace_info)
9203         (record_btrace_insn_history, record_btrace_insn_history_range)
9204         (record_btrace_insn_history_from, record_btrace_call_history)
9205         (record_btrace_call_history_range)
9206         (record_btrace_call_history_from, record_btrace_record_method)
9207         (record_btrace_is_replaying, record_btrace_will_replay)
9208         (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
9209         (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
9210         (record_btrace_store_registers, record_btrace_prepare_to_store)
9211         (record_btrace_to_get_unwinder)
9212         (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
9213         (record_btrace_commit_resume, record_btrace_wait)
9214         (record_btrace_stop, record_btrace_can_execute_reverse)
9215         (record_btrace_stopped_by_sw_breakpoint)
9216         (record_btrace_supports_stopped_by_sw_breakpoint)
9217         (record_btrace_stopped_by_hw_breakpoint)
9218         (record_btrace_supports_stopped_by_hw_breakpoint)
9219         (record_btrace_update_thread_list, record_btrace_thread_alive)
9220         (record_btrace_goto_begin, record_btrace_goto_end)
9221         (record_btrace_goto, record_btrace_stop_replaying_all)
9222         (record_btrace_execution_direction)
9223         (record_btrace_prepare_to_generate_core)
9224         (record_btrace_done_generating_core): Refactor as
9225         record_btrace_target methods.
9226         (init_record_btrace_ops): Delete.
9227         (_initialize_record_btrace): Remove reference to
9228         init_record_btrace_ops.
9229         * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
9230         the execution_direction global.
9231         (record_full_base_target, record_full_target)
9232         (record_full_core_target): New classes.
9233         (record_full_ops): Now a record_full_target.
9234         (record_full_core_ops): Now a record_full_core_target.
9235         (record_full_target::detach, record_full_target::disconnect)
9236         (record_full_core_target::disconnect)
9237         (record_full_target::mourn_inferior, record_full_target::kill):
9238         New.
9239         (record_full_open, record_full_close, record_full_async): Refactor
9240         as methods of the record_full_base_target class.
9241         (record_full_resume, record_full_commit_resume): Refactor
9242         as methods of the record_full_target class.
9243         (record_full_wait, record_full_stopped_by_watchpoint)
9244         (record_full_stopped_data_address)
9245         (record_full_stopped_by_sw_breakpoint)
9246         (record_full_supports_stopped_by_sw_breakpoint)
9247         (record_full_stopped_by_hw_breakpoint)
9248         (record_full_supports_stopped_by_hw_breakpoint): Refactor as
9249         methods of the record_full_base_target class.
9250         (record_full_store_registers, record_full_xfer_partial)
9251         (record_full_insert_breakpoint, record_full_remove_breakpoint):
9252         Refactor as methods of the record_full_target class.
9253         (record_full_can_execute_reverse, record_full_get_bookmark)
9254         (record_full_goto_bookmark, record_full_execution_direction)
9255         (record_full_record_method, record_full_info, record_full_delete)
9256         (record_full_is_replaying, record_full_will_replay)
9257         (record_full_goto_begin, record_full_goto_end, record_full_goto)
9258         (record_full_stop_replaying): Refactor as methods of the
9259         record_full_base_target class.
9260         (record_full_core_resume, record_full_core_kill)
9261         (record_full_core_fetch_registers)
9262         (record_full_core_prepare_to_store)
9263         (record_full_core_store_registers, record_full_core_xfer_partial)
9264         (record_full_core_insert_breakpoint)
9265         (record_full_core_remove_breakpoint)
9266         (record_full_core_has_execution): Refactor
9267         as methods of the record_full_core_target class.
9268         (record_full_base_target::supports_delete_record): New.
9269         (init_record_full_ops): Delete.
9270         (init_record_full_core_ops): Delete.
9271         (record_full_save): Refactor as method of the
9272         record_full_base_target class.
9273         (_initialize_record_full): Remove references to
9274         init_record_full_ops and init_record_full_core_ops.
9275
9276         * remote.c (remote_target, extended_remote_target): New classes.
9277         (remote_ops): Now a remote_target.
9278         (extended_remote_ops): Now an extended_remote_target.
9279         (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
9280         (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
9281         (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
9282         (remote_pass_signals, remote_set_syscall_catchpoint)
9283         (remote_program_signals, )
9284         (remote_thread_always_alive): Remove target_ops parameter.
9285         (remote_thread_alive, remote_thread_name)
9286         (remote_update_thread_list, remote_threads_extra_info)
9287         (remote_static_tracepoint_marker_at)
9288         (remote_static_tracepoint_markers_by_strid)
9289         (remote_get_ada_task_ptid, remote_close, remote_start_remote)
9290         (remote_open): Refactor as methods of remote_target.
9291         (extended_remote_open, extended_remote_detach)
9292         (extended_remote_attach, extended_remote_post_attach):
9293         (extended_remote_supports_disable_randomization)
9294         (extended_remote_create_inferior): : Refactor as method of
9295         extended_remote_target.
9296         (remote_set_permissions, remote_open_1, remote_detach)
9297         (remote_follow_fork, remote_follow_exec, remote_disconnect)
9298         (remote_resume, remote_commit_resume, remote_stop)
9299         (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
9300         (remote_terminal_ours, remote_wait, remote_fetch_registers)
9301         (remote_prepare_to_store, remote_store_registers)
9302         (remote_flash_erase, remote_flash_done, remote_files_info)
9303         (remote_kill, remote_mourn, remote_insert_breakpoint)
9304         (remote_remove_breakpoint, remote_insert_watchpoint)
9305         (remote_watchpoint_addr_within_range)
9306         (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
9307         (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
9308         (remote_supports_stopped_by_sw_breakpoint)
9309         (remote_stopped_by_hw_breakpoint)
9310         (remote_supports_stopped_by_hw_breakpoint)
9311         (remote_stopped_by_watchpoint, remote_stopped_data_address)
9312         (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
9313         (remote_verify_memory): Refactor as methods of remote_target.
9314         (remote_write_qxfer, remote_read_qxfer): Remove target_ops
9315         parameter.
9316         (remote_xfer_partial, remote_get_memory_xfer_limit)
9317         (remote_search_memory, remote_rcmd, remote_memory_map)
9318         (remote_pid_to_str, remote_get_thread_local_address)
9319         (remote_get_tib_address, remote_read_description): Refactor as
9320         methods of remote_target.
9321         (remote_target::fileio_open, remote_target::fileio_pwrite)
9322         (remote_target::fileio_pread, remote_target::fileio_close): New.
9323         (remote_hostio_readlink, remote_hostio_fstat)
9324         (remote_filesystem_is_local, remote_can_execute_reverse)
9325         (remote_supports_non_stop, remote_supports_disable_randomization)
9326         (remote_supports_multi_process, remote_supports_cond_breakpoints)
9327         (remote_supports_enable_disable_tracepoint)
9328         (remote_supports_string_tracing)
9329         (remote_can_run_breakpoint_commands, remote_trace_init)
9330         (remote_download_tracepoint, remote_can_download_tracepoint)
9331         (remote_download_trace_state_variable, remote_enable_tracepoint)
9332         (remote_disable_tracepoint, remote_trace_set_readonly_regions)
9333         (remote_trace_start, remote_get_trace_status)
9334         (remote_get_tracepoint_status, remote_trace_stop)
9335         (remote_trace_find, remote_get_trace_state_variable_value)
9336         (remote_save_trace_data, remote_get_raw_trace_data)
9337         (remote_set_disconnected_tracing, remote_core_of_thread)
9338         (remote_set_circular_trace_buffer, remote_traceframe_info)
9339         (remote_get_min_fast_tracepoint_insn_len)
9340         (remote_set_trace_buffer_size, remote_set_trace_notes)
9341         (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
9342         (remote_disable_btrace, remote_teardown_btrace)
9343         (remote_read_btrace, remote_btrace_conf)
9344         (remote_augmented_libraries_svr4_read, remote_load)
9345         (remote_pid_to_exec_file, remote_can_do_single_step)
9346         (remote_execution_direction, remote_thread_handle_to_thread_info):
9347         Refactor as methods of remote_target.
9348         (init_remote_ops, init_extended_remote_ops): Delete.
9349         (remote_can_async_p, remote_is_async_p, remote_async)
9350         (remote_thread_events, remote_upload_tracepoints)
9351         (remote_upload_trace_state_variables): Refactor as methods of
9352         remote_target.
9353         (_initialize_remote): Remove references to init_remote_ops and
9354         init_extended_remote_ops.
9355
9356         * remote-sim.c (gdbsim_target): New class.
9357         (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
9358         (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
9359         (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
9360         (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
9361         (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
9362         (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
9363         Refactor as methods of gdbsim_target.
9364         (gdbsim_ops): Now a gdbsim_target.
9365         (init_gdbsim_ops): Delete.
9366         (gdbsim_cntrl_c): Adjust.
9367         (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
9368
9369         * amd64-linux-nat.c (amd64_linux_nat_target): New class.
9370         (the_amd64_linux_nat_target): New.
9371         (amd64_linux_fetch_inferior_registers)
9372         (amd64_linux_store_inferior_registers): Refactor as methods of
9373         amd64_linux_nat_target.
9374         (_initialize_amd64_linux_nat): Adjust.  Set linux_target.
9375         * i386-linux-nat.c: Don't include "linux-nat.h".
9376         (i386_linux_nat_target): New class.
9377         (the_i386_linux_nat_target): New.
9378         (i386_linux_fetch_inferior_registers)
9379         (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
9380         as methods of i386_linux_nat_target.
9381         (_initialize_i386_linux_nat): Adjust.  Set linux_target.
9382         * inf-child.c (inf_child_ops): Delete.
9383         (inf_child_fetch_inferior_registers)
9384         (inf_child_store_inferior_registers): Delete.
9385         (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
9386         methods of inf_child_target.
9387         (inf_child_target::supports_terminal_ours)
9388         (inf_child_target::terminal_init)
9389         (inf_child_target::terminal_inferior)
9390         (inf_child_target::terminal_ours_for_output)
9391         (inf_child_target::terminal_ours, inf_child_target::interrupt)
9392         (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
9393         New.
9394         (inf_child_open, inf_child_disconnect, inf_child_close)
9395         (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
9396         (inf_child_post_startup_inferior, inf_child_can_run)
9397         (inf_child_pid_to_exec_file): Refactor as methods of
9398         inf_child_target.
9399         (inf_child_follow_fork): Delete.
9400         (inf_child_target::can_create_inferior)
9401         (inf_child_target::can_attach): New.
9402         (inf_child_target::has_all_memory, inf_child_target::has_memory)
9403         (inf_child_target::has_stack, inf_child_target::has_registers)
9404         (inf_child_target::has_execution): New.
9405         (inf_child_fileio_open, inf_child_fileio_pwrite)
9406         (inf_child_fileio_pread, inf_child_fileio_fstat)
9407         (inf_child_fileio_close, inf_child_fileio_unlink)
9408         (inf_child_fileio_readlink, inf_child_use_agent)
9409         (inf_child_can_use_agent): Refactor as methods of
9410         inf_child_target.
9411         (return_zero, inf_child_target): Delete.
9412         (inf_child_target::inf_child_target): New.
9413         * inf-child.h: Include "target.h".
9414         (inf_child_target): Delete function prototype.
9415         (inf_child_target): New class.
9416         (inf_child_open_target, inf_child_mourn_inferior)
9417         (inf_child_maybe_unpush_target): Delete.
9418         * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
9419         (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
9420         (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
9421         (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
9422         (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
9423         (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
9424         (inf_ptrace_wait, inf_ptrace_xfer_partial)
9425         (inf_ptrace_thread_alive, inf_ptrace_files_info)
9426         (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
9427         methods of inf_ptrace_target.
9428         (inf_ptrace_target): Delete function.
9429         * inf-ptrace.h: Include "inf-child.h".
9430         (inf_ptrace_target): Delete function declaration.
9431         (inf_ptrace_target): New class.
9432         (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
9433         * linux-nat.c (linux_target): New.
9434         (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
9435         (linux_nat_target::~linux_nat_target): New.
9436         (linux_child_post_attach, linux_child_post_startup_inferior)
9437         (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
9438         (linux_child_remove_fork_catchpoint)
9439         (linux_child_insert_vfork_catchpoint)
9440         (linux_child_remove_vfork_catchpoint)
9441         (linux_child_insert_exec_catchpoint)
9442         (linux_child_remove_exec_catchpoint)
9443         (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
9444         (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
9445         (linux_nat_resume, linux_nat_stopped_by_watchpoint)
9446         (linux_nat_stopped_data_address)
9447         (linux_nat_stopped_by_sw_breakpoint)
9448         (linux_nat_supports_stopped_by_sw_breakpoint)
9449         (linux_nat_stopped_by_hw_breakpoint)
9450         (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
9451         (linux_nat_kill, linux_nat_mourn_inferior)
9452         (linux_nat_xfer_partial, linux_nat_thread_alive)
9453         (linux_nat_update_thread_list, linux_nat_pid_to_str)
9454         (linux_nat_thread_name, linux_child_pid_to_exec_file)
9455         (linux_child_static_tracepoint_markers_by_strid)
9456         (linux_nat_is_async_p, linux_nat_can_async_p)
9457         (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
9458         (linux_nat_supports_multi_process)
9459         (linux_nat_supports_disable_randomization, linux_nat_async)
9460         (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
9461         (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
9462         (linux_nat_fileio_open, linux_nat_fileio_readlink)
9463         (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
9464         methods of linux_nat_target.
9465         (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
9466         (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
9467         parameter.
9468         (check_stopped_by_watchpoint): Adjust.
9469         (linux_xfer_partial): Delete.
9470         (linux_target_install_ops, linux_target, linux_nat_add_target):
9471         Delete.
9472         (linux_nat_target::linux_nat_target): New.
9473         * linux-nat.h: Include "inf-ptrace.h".
9474         (linux_nat_target): New.
9475         (linux_target, linux_target_install_ops, linux_nat_add_target):
9476         Delete function declarations.
9477         (linux_target): Declare global.
9478         * linux-thread-db.c (thread_db_target): New.
9479         (thread_db_target::thread_db_target): New.
9480         (thread_db_ops): Delete.
9481         (the_thread_db_target): New.
9482         (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
9483         (thread_db_update_thread_list, thread_db_pid_to_str)
9484         (thread_db_extra_thread_info)
9485         (thread_db_thread_handle_to_thread_info)
9486         (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
9487         (thread_db_resume): Refactor as methods of thread_db_target.
9488         (init_thread_db_ops): Delete.
9489         (_initialize_thread_db): Remove reference to init_thread_db_ops.
9490         * x86-linux-nat.c: Don't include "linux-nat.h".
9491         (super_post_startup_inferior): Delete.
9492         (x86_linux_nat_target::~x86_linux_nat_target): New.
9493         (x86_linux_child_post_startup_inferior)
9494         (x86_linux_read_description, x86_linux_enable_btrace)
9495         (x86_linux_disable_btrace, x86_linux_teardown_btrace)
9496         (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
9497         methods of x86_linux_nat_target.
9498         (x86_linux_create_target): Delete.  Bits folded ...
9499         (x86_linux_add_target): ... here.  Now takes a linux_nat_target
9500         pointer.
9501         * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
9502         (x86_linux_nat_target): New class.
9503         (x86_linux_create_target): Delete.
9504         (x86_linux_add_target): Now takes a linux_nat_target pointer.
9505         * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
9506         (x86_region_ok_for_watchpoint, x86_stopped_data_address)
9507         (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
9508         (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
9509         (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
9510         make extern.
9511         (x86_use_watchpoints): Delete.
9512         * x86-nat.h: Include "breakpoint.h" and "target.h".
9513         (x86_use_watchpoints): Delete.
9514         (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
9515         (x86_stopped_by_watchpoint, x86_stopped_data_address)
9516         (x86_insert_watchpoint, x86_remove_watchpoint)
9517         (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
9518         (x86_stopped_by_hw_breakpoint): New declarations.
9519         (x86_nat_target): New template class.
9520
9521         * ppc-linux-nat.c (ppc_linux_nat_target): New class.
9522         (the_ppc_linux_nat_target): New.
9523         (ppc_linux_fetch_inferior_registers)
9524         (ppc_linux_can_use_hw_breakpoint)
9525         (ppc_linux_region_ok_for_hw_watchpoint)
9526         (ppc_linux_ranged_break_num_registers)
9527         (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
9528         (ppc_linux_insert_mask_watchpoint)
9529         (ppc_linux_remove_mask_watchpoint)
9530         (ppc_linux_can_accel_watchpoint_condition)
9531         (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
9532         (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
9533         (ppc_linux_watchpoint_addr_within_range)
9534         (ppc_linux_masked_watch_num_registers)
9535         (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
9536         (ppc_linux_read_description): Refactor as methods of
9537         ppc_linux_nat_target.
9538         (_initialize_ppc_linux_nat): Adjust.  Set linux_target.
9539
9540         * procfs.c (procfs_xfer_partial): Delete forward declaration.
9541         (procfs_target): New class.
9542         (the_procfs_target): New.
9543         (procfs_target): Delete function.
9544         (procfs_auxv_parse, procfs_attach, procfs_detach)
9545         (procfs_fetch_registers, procfs_store_registers, procfs_wait)
9546         (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
9547         (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
9548         (procfs_create_inferior, procfs_update_thread_list)
9549         (procfs_thread_alive, procfs_pid_to_str)
9550         (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
9551         (procfs_stopped_data_address, procfs_insert_watchpoint)
9552         (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
9553         (proc_find_memory_regions, procfs_info_proc)
9554         (procfs_make_note_section): Refactor as methods of procfs_target.
9555         (_initialize_procfs): Adjust.
9556         * sol-thread.c (sol_thread_target): New class.
9557         (sol_thread_ops): Now a sol_thread_target.
9558         (sol_thread_detach, sol_thread_resume, sol_thread_wait)
9559         (sol_thread_fetch_registers, sol_thread_store_registers)
9560         (sol_thread_xfer_partial, sol_thread_mourn_inferior)
9561         (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
9562         (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
9563         (init_sol_thread_ops): Delete.
9564         (_initialize_sol_thread): Adjust.  Remove references to
9565         init_sol_thread_ops and complete_target_initialization.
9566
9567         * windows-nat.c (windows_nat_target): New class.
9568         (windows_fetch_inferior_registers)
9569         (windows_store_inferior_registers, windows_resume, windows_wait)
9570         (windows_attach, windows_detach, windows_pid_to_exec_file)
9571         (windows_files_info, windows_create_inferior)
9572         (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
9573         (windows_close, windows_pid_to_str, windows_xfer_partial)
9574         (windows_get_tib_address, windows_get_ada_task_ptid)
9575         (windows_thread_name, windows_thread_alive): Refactor as
9576         windows_nat_target methods.
9577         (do_initial_windows_stuff): Adjust.
9578         (windows_target): Delete function.
9579         (_initialize_windows_nat): Adjust.
9580
9581         * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
9582         (darwin_mourn_inferior, darwin_kill_inferior)
9583         (darwin_create_inferior, darwin_attach, darwin_detach)
9584         (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
9585         (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
9586         (darwin_supports_multi_process): Refactor as darwin_nat_target
9587         methods.
9588         (darwin_resume_to, darwin_files_info): Delete.
9589         (_initialize_darwin_inferior): Rename to ...
9590         (_initialize_darwin_nat): ... this.  Adjust to C++ification.
9591         * darwin-nat.h: Include "inf-child.h".
9592         (darwin_nat_target): New class.
9593         (darwin_complete_target): Delete.
9594         * i386-darwin-nat.c (i386_darwin_nat_target): New class.
9595         (darwin_target): New.
9596         (i386_darwin_fetch_inferior_registers)
9597         (i386_darwin_store_inferior_registers): Refactor as methods of
9598         darwin_nat_target.
9599         (darwin_complete_target): Delete, with ...
9600         (_initialize_i386_darwin_nat): ... bits factored out here.
9601
9602         * alpha-linux-nat.c (alpha_linux_nat_target): New class.
9603         (the_alpha_linux_nat_target): New.
9604         (alpha_linux_register_u_offset): Refactor as
9605         alpha_linux_nat_target method.
9606         (_initialize_alpha_linux_nat): Adjust.
9607         * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
9608         (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
9609         (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
9610         methods of linux_nat_trad_target.
9611         (linux_trad_target): Delete.
9612         * linux-nat-trad.h (linux_trad_target): Delete function.
9613         (linux_nat_trad_target): New class.
9614         * mips-linux-nat.c (mips_linux_nat_target): New class.
9615         (super_fetch_registers, super_store_registers, super_close):
9616         Delete.
9617         (the_mips_linux_nat_target): New.
9618         (mips64_linux_regsets_fetch_registers)
9619         (mips64_linux_regsets_store_registers)
9620         (mips64_linux_fetch_registers, mips64_linux_store_registers)
9621         (mips_linux_register_u_offset, mips_linux_read_description)
9622         (mips_linux_can_use_hw_breakpoint)
9623         (mips_linux_stopped_by_watchpoint)
9624         (mips_linux_stopped_data_address)
9625         (mips_linux_region_ok_for_hw_watchpoint)
9626         (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
9627         (mips_linux_close): Refactor as methods of mips_linux_nat.
9628         (_initialize_mips_linux_nat): Adjust to C++ification.
9629
9630         * aix-thread.c (aix_thread_target): New class.
9631         (aix_thread_ops): Now an aix_thread_target.
9632         (aix_thread_detach, aix_thread_resume, aix_thread_wait)
9633         (aix_thread_fetch_registers, aix_thread_store_registers)
9634         (aix_thread_xfer_partial, aix_thread_mourn_inferior)
9635         (aix_thread_thread_alive, aix_thread_pid_to_str)
9636         (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
9637         Refactor as methods of aix_thread_target.
9638         (init_aix_thread_ops): Delete.
9639         (_initialize_aix_thread): Remove references to init_aix_thread_ops
9640         and complete_target_initialization.
9641         * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
9642         (rs6000_nat_target): New class.
9643         (the_rs6000_nat_target): New.
9644         (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
9645         (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
9646         (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
9647         (super_create_inferior): Delete.
9648         (_initialize_rs6000_nat): Adjust to C++ification.
9649
9650         * arm-linux-nat.c (arm_linux_nat_target): New class.
9651         (the_arm_linux_nat_target): New.
9652         (arm_linux_fetch_inferior_registers)
9653         (arm_linux_store_inferior_registers, arm_linux_read_description)
9654         (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
9655         (arm_linux_remove_hw_breakpoint)
9656         (arm_linux_region_ok_for_hw_watchpoint)
9657         (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
9658         (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
9659         (arm_linux_watchpoint_addr_within_range): Refactor as methods of
9660         arm_linux_nat_target.
9661         (_initialize_arm_linux_nat): Adjust to C++ification.
9662
9663         * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
9664         (the_aarch64_linux_nat_target): New.
9665         (aarch64_linux_fetch_inferior_registers)
9666         (aarch64_linux_store_inferior_registers)
9667         (aarch64_linux_child_post_startup_inferior)
9668         (aarch64_linux_read_description)
9669         (aarch64_linux_can_use_hw_breakpoint)
9670         (aarch64_linux_insert_hw_breakpoint)
9671         (aarch64_linux_remove_hw_breakpoint)
9672         (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
9673         (aarch64_linux_region_ok_for_hw_watchpoint)
9674         (aarch64_linux_stopped_data_address)
9675         (aarch64_linux_stopped_by_watchpoint)
9676         (aarch64_linux_watchpoint_addr_within_range)
9677         (aarch64_linux_can_do_single_step): Refactor as methods of
9678         aarch64_linux_nat_target.
9679         (super_post_startup_inferior): Delete.
9680         (_initialize_aarch64_linux_nat): Adjust to C++ification.
9681
9682         * hppa-linux-nat.c (hppa_linux_nat_target): New class.
9683         (the_hppa_linux_nat_target): New.
9684         (hppa_linux_fetch_inferior_registers)
9685         (hppa_linux_store_inferior_registers): Refactor as methods of
9686         hppa_linux_nat_target.
9687         (_initialize_hppa_linux_nat): Adjust to C++ification.
9688
9689         * ia64-linux-nat.c (ia64_linux_nat_target): New class.
9690         (the_ia64_linux_nat_target): New.
9691         (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
9692         (ia64_linux_stopped_data_address)
9693         (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
9694         (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
9695         ia64_linux_nat_target methods.
9696         (super_xfer_partial): Delete.
9697         (_initialize_ia64_linux_nat): Adjust to C++ification.
9698
9699         * m32r-linux-nat.c (m32r_linux_nat_target): New class.
9700         (the_m32r_linux_nat_target): New.
9701         (m32r_linux_fetch_inferior_registers)
9702         (m32r_linux_store_inferior_registers): Refactor as
9703         m32r_linux_nat_target methods.
9704         (_initialize_m32r_linux_nat): Adjust to C++ification.
9705
9706         * m68k-linux-nat.c (m68k_linux_nat_target): New class.
9707         (the_m68k_linux_nat_target): New.
9708         (m68k_linux_fetch_inferior_registers)
9709         (m68k_linux_store_inferior_registers): Refactor as
9710         m68k_linux_nat_target methods.
9711         (_initialize_m68k_linux_nat): Adjust to C++ification.
9712
9713         * s390-linux-nat.c (s390_linux_nat_target): New class.
9714         (the_s390_linux_nat_target): New.
9715         (s390_linux_fetch_inferior_registers)
9716         (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
9717         (s390_insert_watchpoint, s390_remove_watchpoint)
9718         (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
9719         (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
9720         (s390_auxv_parse, s390_read_description): Refactor as methods of
9721         s390_linux_nat_target.
9722         (_initialize_s390_nat): Adjust to C++ification.
9723
9724         * sparc-linux-nat.c (sparc_linux_nat_target): New class.
9725         (the_sparc_linux_nat_target): New.
9726         (_initialize_sparc_linux_nat): Adjust to C++ification.
9727         * sparc-nat.c (sparc_fetch_inferior_registers)
9728         (sparc_store_inferior_registers): Remove target_ops parameter.
9729         * sparc-nat.h (sparc_fetch_inferior_registers)
9730         (sparc_store_inferior_registers): Remove target_ops parameter.
9731         * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
9732         (the_sparc64_linux_nat_target): New.
9733         (_initialize_sparc64_linux_nat): Adjust to C++ification.
9734
9735         * spu-linux-nat.c (spu_linux_nat_target): New class.
9736         (the_spu_linux_nat_target): New.
9737         (spu_child_post_startup_inferior, spu_child_post_attach)
9738         (spu_child_wait, spu_fetch_inferior_registers)
9739         (spu_store_inferior_registers, spu_xfer_partial)
9740         (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
9741         methods.
9742         (_initialize_spu_nat): Adjust to C++ification.
9743
9744         * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
9745         (the_tilegx_linux_nat_target): New.
9746         (fetch_inferior_registers, store_inferior_registers):
9747         Refactor as methods.
9748         (_initialize_tile_linux_nat): Adjust to C++ification.
9749
9750         * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
9751         (the_xtensa_linux_nat_target): New.
9752         (xtensa_linux_fetch_inferior_registers)
9753         (xtensa_linux_store_inferior_registers): Refactor as
9754         xtensa_linux_nat_target methods.
9755         (_initialize_xtensa_linux_nat): Adjust to C++ification.
9756
9757         * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
9758         (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
9759         (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
9760         (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
9761         (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
9762         (fbsd_stopped_by_sw_breakpoint)
9763         (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
9764         (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
9765         (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
9766         (fbsd_post_startup_inferior, fbsd_post_attach)
9767         (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
9768         (fbsd_set_syscall_catchpoint)
9769         (super_xfer_partial, super_resume, super_wait)
9770         (fbsd_supports_stopped_by_hw_breakpoint): Delete.
9771         (fbsd_handle_debug_trap): Remove target_ops parameter.
9772         (fbsd_nat_add_target): Delete.
9773         * fbsd-nat.h: Include "inf-ptrace.h".
9774         (fbsd_nat_add_target): Delete.
9775         (USE_SIGTRAP_SIGINFO): Define.
9776         (fbsd_nat_target): New class.
9777
9778         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
9779         (amd64bsd_store_inferior_registers): Remove target_ops parameter.
9780         (amd64bsd_target): Delete.
9781         * amd64-bsd-nat.h: New file.
9782         * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
9783         "x86-bsd-nat.h".
9784         (amd64_fbsd_nat_target): New class.
9785         (the_amd64_fbsd_nat_target): New.
9786         (amd64fbsd_read_description): Refactor as method of
9787         amd64_fbsd_nat_target.
9788         (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
9789         (_initialize_amd64fbsd_nat): Adjust to C++ification.
9790         * amd64-nat.h (amd64bsd_target): Delete function declaration.
9791         * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
9792         (i386bsd_store_inferior_registers): Remove target_ops parameter.
9793         (i386bsd_target): Delete.
9794         * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
9795         (i386bsd_fetch_inferior_registers)
9796         (i386bsd_store_inferior_registers): Declare.
9797         (i386_bsd_nat_target): New class.
9798         * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
9799         (the_i386_fbsd_nat_target): New.
9800         (i386fbsd_resume, i386fbsd_read_description): Refactor as
9801         i386_fbsd_nat_target methods.
9802         (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
9803         (_initialize_i386fbsd_nat): Adjust to C++ification.
9804         * x86-bsd-nat.c (super_mourn_inferior): Delete.
9805         (x86bsd_mourn_inferior, x86bsd_target): Delete.
9806         (_initialize_x86_bsd_nat): Adjust to C++ification.
9807         * x86-bsd-nat.h: Include "x86-nat.h".
9808         (x86bsd_target): Delete declaration.
9809         (x86bsd_nat_target): New class.
9810
9811         * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
9812         (the_aarch64_fbsd_nat_target): New.
9813         (aarch64_fbsd_fetch_inferior_registers)
9814         (aarch64_fbsd_store_inferior_registers): Refactor as methods of
9815         aarch64_fbsd_nat_target.
9816         (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
9817         * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
9818         (the_alpha_bsd_nat_target): New.
9819         (alphabsd_fetch_inferior_registers)
9820         (alphabsd_store_inferior_registers): Refactor as
9821         alpha_bsd_nat_target methods.
9822         (_initialize_alphabsd_nat): Refactor as methods of
9823         alpha_bsd_nat_target.
9824         * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
9825         (the_amd64_nbsd_nat_target): New.
9826         (_initialize_amd64nbsd_nat): Adjust to C++ification.
9827         * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
9828         (the_amd64_obsd_nat_target): New.
9829         (_initialize_amd64obsd_nat): Adjust to C++ification.
9830         * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
9831         (the_arm_fbsd_nat_target): New.
9832         (arm_fbsd_fetch_inferior_registers)
9833         (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
9834         (_initialize_arm_fbsd_nat): Refactor as methods of
9835         arm_fbsd_nat_target.
9836         (_initialize_arm_fbsd_nat): Adjust to C++ification.
9837         * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
9838         (the_arm_netbsd_nat_target): New.
9839         (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
9840         arm_netbsd_nat_target.
9841         (_initialize_arm_netbsd_nat): Adjust to C++ification.
9842         * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
9843         (the_hppa_nbsd_nat_target): New.
9844         (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
9845         hppa_nbsd_nat_target methods.
9846         (_initialize_hppanbsd_nat): Adjust to C++ification.
9847         * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
9848         (the_hppa_obsd_nat_target): New.
9849         (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
9850         methods of hppa_obsd_nat_target.
9851         (_initialize_hppaobsd_nat): Adjust to C++ification.  Use
9852         add_target.
9853         * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
9854         (_initialize_i386nbsd_nat): Adjust to C++ification.  Use
9855         add_target.
9856         * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
9857         (_initialize_i386obsd_nat): Use add_target.
9858         * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
9859         (the_m68k_bsd_nat_target): New.
9860         (m68kbsd_fetch_inferior_registers)
9861         (m68kbsd_store_inferior_registers): Refactor as methods of
9862         m68k_bsd_nat_target.
9863         (_initialize_m68kbsd_nat): Adjust to C++ification.
9864         * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
9865         (the_mips_fbsd_nat_target): New.
9866         (mips_fbsd_fetch_inferior_registers)
9867         (mips_fbsd_store_inferior_registers): Refactor as methods of
9868         mips_fbsd_nat_target.
9869         (_initialize_mips_fbsd_nat): Adjust to C++ification.  Use
9870         add_target.
9871         * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
9872         (the_mips_nbsd_nat_target): New.
9873         (mipsnbsd_fetch_inferior_registers)
9874         (mipsnbsd_store_inferior_registers): Refactor as methods of
9875         mips_nbsd_nat_target.
9876         (_initialize_mipsnbsd_nat): Adjust to C++ification.
9877         * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
9878         (the_mips64_obsd_nat_target): New.
9879         (mips64obsd_fetch_inferior_registers)
9880         (mips64obsd_store_inferior_registers): Refactor as methods of
9881         mips64_obsd_nat_target.
9882         (_initialize_mips64obsd_nat): Adjust to C++ification.  Use
9883         add_target.
9884         * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
9885         nbsd_nat_target.
9886         * nbsd-nat.h: Include "inf-ptrace.h".
9887         (nbsd_nat_target): New class.
9888         * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
9889         (obsd_wait): Refactor as methods of obsd_nat_target.
9890         (obsd_add_target): Delete.
9891         * obsd-nat.h: Include "inf-ptrace.h".
9892         (obsd_nat_target): New class.
9893         * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
9894         (the_ppc_fbsd_nat_target): New.
9895         (ppcfbsd_fetch_inferior_registers)
9896         (ppcfbsd_store_inferior_registers): Refactor as methods of
9897         ppc_fbsd_nat_target.
9898         (_initialize_ppcfbsd_nat): Adjust to C++ification.  Use
9899         add_target.
9900         * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
9901         (the_ppc_nbsd_nat_target): New.
9902         (ppcnbsd_fetch_inferior_registers)
9903         (ppcnbsd_store_inferior_registers): Refactor as methods of
9904         ppc_nbsd_nat_target.
9905         (_initialize_ppcnbsd_nat): Adjust to C++ification.
9906         * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
9907         (the_ppc_obsd_nat_target): New.
9908         (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
9909         methods of ppc_obsd_nat_target.
9910         (_initialize_ppcobsd_nat): Adjust to C++ification.  Use
9911         add_target.
9912         * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
9913         (the_sh_nbsd_nat_target): New.
9914         (shnbsd_fetch_inferior_registers)
9915         (shnbsd_store_inferior_registers): Refactor as methods of
9916         sh_nbsd_nat_target.
9917         (_initialize_shnbsd_nat): Adjust to C++ification.
9918         * sparc-nat.c (sparc_xfer_wcookie): Make extern.
9919         (inf_ptrace_xfer_partial): Delete.
9920         (sparc_xfer_partial, sparc_target): Delete.
9921         * sparc-nat.h (sparc_fetch_inferior_registers)
9922         (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
9923         (sparc_target): Delete function declaration.
9924         (sparc_target): New template class.
9925         * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
9926         (_initialize_sparcnbsd_nat): Adjust to C++ification.
9927         * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
9928         (_initialize_sparc64fbsd_nat): Adjust to C++ification.  Use
9929         add_target.
9930         * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
9931         (_initialize_sparc64nbsd_nat): Adjust to C++ification.
9932         * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
9933         (_initialize_sparc64obsd_nat): Adjust to C++ification.  Use
9934         add_target.
9935         * vax-bsd-nat.c (vax_bsd_nat_target): New class.
9936         (the_vax_bsd_nat_target): New.
9937         (vaxbsd_fetch_inferior_registers)
9938         (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
9939         methods.
9940         (_initialize_vaxbsd_nat): Adjust to C++ification.
9941
9942         * bsd-kvm.c (bsd_kvm_target): New class.
9943         (bsd_kvm_ops): Now a bsd_kvm_target.
9944         (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
9945         (bsd_kvm_files_info, bsd_kvm_fetch_registers)
9946         (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
9947         bsd_kvm_target.
9948         (bsd_kvm_return_one): Delete.
9949         (bsd_kvm_add_target): Adjust to C++ification.
9950
9951         * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
9952         (nto_procfs_target_procfs): New classes.
9953         (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
9954         (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
9955         (procfs_post_attach, procfs_wait, procfs_fetch_registers)
9956         (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
9957         (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
9958         (procfs_remove_hw_breakpoint, procfs_resume)
9959         (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
9960         (procfs_kill_inferior, procfs_store_registers)
9961         (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
9962         as methods of nto_procfs_target.
9963         (nto_procfs_ops): Now an nto_procfs_target_procfs.
9964         (nto_native_ops): Delete.
9965         (procfs_open, procfs_native_open): Delete.
9966         (nto_native_ops): Now an nto_procfs_target_native.
9967         (init_procfs_targets): Adjust to C++ification.
9968         (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
9969         (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
9970         Refactor as methods of nto_procfs_target.
9971
9972         * go32-nat.c (go32_nat_target): New class.
9973         (the_go32_nat_target): New.
9974         (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
9975         (go32_store_registers, go32_xfer_partial, go32_files_info)
9976         (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
9977         (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
9978         (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
9979         (go32_pid_to_str): Refactor as methods of go32_nat_target.
9980         (go32_target): Delete.
9981         (_initialize_go32_nat): Adjust to C++ification.
9982
9983         * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
9984         (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
9985         (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
9986         (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
9987         gnu_nat_target.
9988         (gnu_target): Delete.
9989         * gnu-nat.h (gnu_target): Delete.
9990         (gnu_nat_target): New class.
9991         * i386-gnu-nat.c (gnu_base_target): New.
9992         (i386_gnu_nat_target): New class.
9993         (the_i386_gnu_nat_target): New.
9994         (_initialize_i386gnu_nat): Adjust to C++ification.
9995
9996 2018-05-02  Pedro Alves  <palves@redhat.com>
9997
9998         * bfd-target.c (target_bfd_xclose): Rename to ...
9999         (target_bfd_close): ... this.
10000         (target_bfd_reopen): Adjust.
10001         * target.c (target_close): Remove references to to_xclose.
10002         * target.h (target_ops::to_xclose): Delete.
10003         (target_ops::to_close): Update comments.
10004
10005 2018-05-02  Pedro Alves  <palves@redhat.com>
10006
10007         * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
10008         "linux-nat.h".
10009         * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
10010         * inf-ptrace.c (inf_ptrace_register_u_offset)
10011         (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
10012         (inf_ptrace_store_register, inf_ptrace_store_registers)
10013         (inf_ptrace_trad_target): Move to ...
10014         * linux-nat-trad.c: ... this new file.
10015         * linux-nat-trad.h: New file.
10016         * linux-nat.c (linux_target_install_ops): Make extern.
10017         (linux_trad_target): Delete.
10018         * linux-nat.h (linux_trad_target): Delete declaration.
10019         (linux_target_install_ops): Declare.
10020         * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
10021         "linux-nat.h".
10022
10023 2018-05-02  Pedro Alves  <palves@redhat.com>
10024
10025         * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
10026         procfs_target/add_target here.
10027         * procfs.c (procfs_target): Make static.
10028         (_initialize_procfs): Call add_target here.
10029         * procfs.h (struct target_ops): Remove forward declaration.
10030         (procfs_target): Remove declaration.
10031         * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
10032
10033 2018-05-02  Pedro Alves  <palves@redhat.com>
10034
10035         * procfs.c (procfs_stopped_by_watchpoint)
10036         (procfs_insert_watchpoint, procfs_remove_watchpoint)
10037         (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
10038         Forward declare.
10039         (procfs_use_watchpoints): Delete, move contents...
10040         (procfs_target): ... here.
10041         * procfs.h (procfs_use_watchpoints): Delete declaration.
10042         * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
10043         procfs_use_watchpoints.
10044         * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
10045         procfs_use_watchpoints.
10046
10047 2018-05-02  Tom Tromey  <tom@tromey.com>
10048
10049         PR python/20084:
10050         * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
10051         and var_zuinteger_unlimited.
10052         * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
10053         and PARAM_ZUINTEGER_UNLIMITED.
10054         (set_parameter_value): Handle var_zuinteger and
10055         var_zuinteger_unlimited.
10056         (add_setshow_generic): Likewise.
10057         (parmpy_init): Likewise.
10058
10059 2018-04-28  Dan Robertson  <danlrobertson89@gmail.com>
10060
10061         PR rust/23124
10062         * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
10063         pointer is not null before dereferencing it.
10064
10065 2018-04-30  Tom Tromey  <tom@tromey.com>
10066
10067         * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
10068         is_mi_like_p.
10069
10070 2018-04-30  Tom Tromey  <tom@tromey.com>
10071
10072         * breakpoint.c (mention): Remove use of is_mi_like_p.
10073         (print_mention_ranged_breakpoint): Likewise.
10074         * break-catch-throw.c (print_it_exception_catchpoint): Remove use
10075         of is_mi_like_p.
10076
10077 2018-04-30  Tom Tromey  <tom@tromey.com>
10078
10079         * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
10080
10081 2018-04-30  Tom Tromey  <tom@tromey.com>
10082
10083         * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
10084         (info_spu_event_command): Remove some uses of is_mi_like_p.
10085
10086 2018-04-30  Tom Tromey  <tom@tromey.com>
10087
10088         * python/py-framefilter.c (py_print_single_arg)
10089         (enumerate_locals, py_print_args, py_print_frame): Remove some
10090         uses of is_mi_like_p.
10091
10092 2018-04-30  Tom Tromey  <tom@tromey.com>
10093
10094         * ui-out.c: Update.
10095         * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
10096         * ui-out.h (ui_out::is_mi_like_p): Now const.
10097         (ui_out::do_is_mi_like_p): Now const.
10098         * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
10099
10100 2018-04-30  Tom Tromey  <tom@tromey.com>
10101
10102         * varobj.c (varobj_set_visualizer): Use new_reference.
10103         * python/python.c (gdbpy_decode_line): Use new_reference.
10104         * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
10105         new_reference.
10106
10107 2018-04-30  Tom Tromey  <tom@tromey.com>
10108
10109         * varobj.c (install_new_value): Use new_reference.
10110         * value.h (value_incref): Return void.  Swap intro comment with
10111         value_decref.
10112         * value.c (set_value_parent): Use new_reference.
10113         (value_incref): Return void.  Update intro comment.
10114         (release_value): Use new_reference.
10115         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
10116
10117 2018-04-30  Tom Tromey  <tom@tromey.com>
10118
10119         * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
10120         * gdb_bfd.h (new_bfd_ref): Remove.
10121         (gdb_bfd_open): Update comment.
10122         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
10123         (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
10124         (gdb_bfd_fdopenr): Use new_reference.
10125         * exec.c (exec_file_attach): Use new_reference.
10126
10127 2018-04-30  Tom Tromey  <tom@tromey.com>
10128
10129         * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
10130         method.
10131
10132 2018-04-30  Tom Tromey  <tom@tromey.com>
10133
10134         * jit.c (jit_read_code_entry): Use type_align.
10135         * i386-tdep.c (i386_gdbarch_init): Don't call
10136         set_gdbarch_long_long_align_bit.
10137         * gdbarch.sh: Remove long_long_align_bit.
10138         * gdbarch.c, gdbarch.h: Rebuild.
10139         * arc-tdep.c (arc_type_align): New function.
10140         (arc_gdbarch_init): Use arc_type_align.  Don't call
10141         set_gdbarch_long_long_align_bit.
10142
10143 2018-04-30  Tom Tromey  <tom@tromey.com>
10144
10145         * rust-lang.c (rust_type_alignment): Remove.
10146         (rust_composite_type): Use type_align.
10147
10148 2018-04-30  Tom Tromey  <tom@tromey.com>
10149
10150         * NEWS: Mention Type.align.
10151         * python/py-type.c (typy_get_alignof): New function.
10152         (type_object_getset): Add "alignof".
10153
10154 2018-04-30  Tom Tromey  <tom@tromey.com>
10155
10156         PR exp/17095:
10157         * NEWS: Update.
10158         * std-operator.def (UNOP_ALIGNOF): New operator.
10159         * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
10160         New.
10161         * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
10162         * c-lang.c (c_op_print_tab): Add alignof.
10163         * c-exp.y (ALIGNOF): New token.
10164         (exp): Add "ALIGNOF" production.
10165         (ident_tokens): Add _Alignof and alignof.
10166
10167 2018-04-30  Tom Tromey  <tom@tromey.com>
10168
10169         * i386-tdep.c (i386_type_align): New function.
10170         (i386_gdbarch_init): Update.
10171         * gdbarch.sh (type_align): New method.
10172         * gdbarch.c, gdbarch.h: Rebuild.
10173         * arch-utils.h (default_type_align): Declare.
10174         * arch-utils.c (default_type_align): New function.
10175         * gdbtypes.h (TYPE_ALIGN_BITS): New define.
10176         (struct type) <align_log2>: New field.
10177         <instance_flags>: Now a bitfield.
10178         (TYPE_RAW_ALIGN): New macro.
10179         (type_align, type_raw_align, set_type_align): Declare.
10180         * gdbtypes.c (type_align, type_raw_align, set_type_align): New
10181         functions.
10182         * dwarf2read.c (quirk_rust_enum): Set type alignment.
10183         (get_alignment, maybe_set_alignment): New functions.
10184         (read_structure_type, read_enumeration_type, read_array_type)
10185         (read_set_type, read_tag_pointer_type, read_tag_reference_type)
10186         (read_subrange_type, read_base_type): Set type alignment.
10187
10188 2018-04-30  Simon Marchi  <simon.marchi@ericsson.com>
10189
10190         * dwarf2read.c (read_index_from_section): Use bool.
10191
10192 2018-04-29  Fabian Groffen  <grobian@gentoo.org>
10193
10194         PR gdb/22950
10195         * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
10196         with #ifdef.
10197
10198 2018-04-29  John Reiser  <jreiser@BitWagon.com>
10199
10200         PR build/22873
10201         * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
10202         last step, and do it atomically.
10203
10204 2018-04-27  Alexandre Oliva  <aoliva@redhat.com>
10205
10206         * compile/compile-c-types.c (convert_int, convert_float):
10207         Update for C FE v1.
10208
10209 2018-04-27  Tom Tromey  <tom@tromey.com>
10210
10211         PR rust/22545:
10212         * rust-lang.c (rust_inclusive_range_type_p): New function.
10213         (rust_range): Handle inclusive ranges.
10214         (rust_compute_range): Likewise.
10215         * rust-exp.y (struct rust_op) <inclusive>: New field.
10216         (DOTDOTEQ): New constant.
10217         (range_expr): Add "..=" productions.
10218         (operator_tokens): Add "..=" token.
10219         (ast_range): Add "inclusive" parameter.
10220         (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
10221         ranges.
10222         * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
10223         bounds values.
10224         * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
10225         LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
10226         Update comments.
10227         * expprint.c (print_subexp_standard): Handle new bounds values.
10228         (dump_subexp_body_standard): Likewise.
10229
10230 2018-04-27  Tom Tromey  <tom@tromey.com>
10231
10232         * configure: Rebuild.
10233         * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
10234         * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
10235         "OVERRIDE".
10236         (class symbol_needs_eval_context): Likewise.
10237         * dwarf2read.c (mock_mapped_index::symbol_name_count)
10238         (mock_mapped_index::symbol_name_at): Use "override".  Remove
10239         "virtual".
10240         * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
10241         "override".
10242         (class dwarf_expr_executor): Use "override", not "OVERRIDE".
10243         * aarch64-tdep.c (instruction_reader::read): Use "override".
10244         (instruction_reader_test::read): Likewise.
10245         * arm-tdep.c (instruction_reader::read): Use "override".
10246         (instruction_reader_thumb::read): Likewise.
10247
10248 2018-04-26  Andrzej Kaczmarek  <andrzej.kaczmarek@codecoup.pl>
10249
10250         PR remote/9665
10251         * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
10252         instead of remote_send.
10253         (remote_send): Remove.
10254
10255 2018-04-26  Pedro Alves  <palves@redhat.com>
10256
10257         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
10258         find_function_start_sal instead of find_pc_line.
10259
10260 2018-04-26  Pedro Alves  <palves@redhat.com>
10261
10262         * breakpoint.c (set_breakpoint_location_function): Handle
10263         mst_data_gnu_ifunc.
10264         * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
10265         * elfread.c (elf_symtab_read): Give data symbols with
10266         BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
10267         (elf_rel_plt_read): Update comment.
10268         * linespec.c (convert_linespec_to_sals): Handle
10269         mst_data_gnu_ifunc.
10270         (minsym_found): Handle mst_data_gnu_ifunc.
10271         * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
10272         (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
10273         * parse.c (find_minsym_type_and_address): Handle
10274         mst_data_gnu_ifunc.
10275         * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
10276         * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
10277         * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
10278         comment.
10279         <mst_data_gnu_ifunc>: New enumerator.
10280
10281 2018-04-26  Pedro Alves  <palves@redhat.com>
10282
10283         * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
10284         (lookup_minimal_symbol_by_pc_section): ... this.  Replace
10285         'want_trampoline' parameter by a lookup_msym_prefer parameter.
10286         Handle it.
10287         (lookup_minimal_symbol_by_pc_section): Delete old implementation.
10288         (lookup_minimal_symbol_by_pc): Adjust.
10289         (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
10290         (lookup_solib_trampoline_symbol_by_pc): Adjust.
10291         * minsyms.h (lookup_msym_prefer): New enum.
10292         (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
10293         parameter by a lookup_msym_prefer parameter.
10294
10295 2018-04-26  Pedro Alves  <palves@redhat.com>
10296
10297         * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
10298         ends in "@plt" instead of looking at the symbol's section.
10299
10300 2018-04-26  Pedro Alves  <palves@redhat.com>
10301
10302         * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete.  Remove
10303         all references.
10304         (find_pc_partial_function_gnu_ifunc): Rename to ...
10305         (find_pc_partial_function): ... this, and remove references to
10306         'is_gnu_ifunc_p'.
10307         (find_pc_partial_function): Delete old implementation.
10308         * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
10309
10310 2018-04-26  Pedro Alves  <palves@redhat.com>
10311
10312         * linespec.c (struct bound_minimal_symbol_search_key): New.
10313         (convert_linespec_to_sals): Sort minimal symbols earlier.  Don't
10314         skip first line if we found a GNU ifunc minimal symbol by name.
10315         (compare_msymbols): Change parameters to work with a destructured
10316         lhs minsym.
10317         (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
10318         functions.
10319
10320 2018-04-26  Pedro Alves  <palves@redhat.com>
10321
10322         * breakpoint.c (set_breakpoint_location_function): Don't resolve
10323         ifunc targets here.  Instead, if we have an ifunc minsym, use its
10324         address/name.
10325         (add_location_to_breakpoint): Store the minsym and the objfile in
10326         the breakpoint location.
10327         * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
10328         * linespec.c (minsym_found): Resolve GNU ifunc targets here.
10329         Record the minsym in the sal.
10330         * symtab.h (symtab_and_line) <msymbol>: New field.
10331
10332 2018-04-26  Pedro Alves  <palves@redhat.com>
10333
10334         * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
10335         unless we actually resolved the ifunc.
10336
10337 2018-04-26  Pedro Alves  <palves@redhat.com>
10338
10339         * c-exp.y (variable production): Prefer ifunc minsyms over
10340         regular function symbols.
10341         * symtab.c (find_gnu_ifunc): New function.
10342         * minsyms.h (lookup_msym_prefer): New enum.
10343         (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
10344         parameter by a lookup_msym_prefer parameter.
10345         * symtab.h (find_gnu_ifunc): New declaration.
10346
10347 2018-04-26  Pedro Alves  <palves@redhat.com>
10348
10349         * blockframe.c (find_gnu_ifunc_target_type): New function.
10350         (find_function_type): New.
10351         * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
10352         return a value with a memory address.
10353         (eval_call): For calls to GNU ifunc functions, try to find the
10354         type of the target function from the type that the resolver
10355         returns.
10356         * gdbtypes.c (objfile_type): Don't install a return type for ifunc
10357         symbols.
10358         * infcall.c (find_function_return_type): Delete.
10359         (find_function_addr): Add 'function_type' parameter.  For calls to
10360         GNU ifunc functions, try to find the type of the target function
10361         from the type that the resolver returns, and return it via
10362         FUNCTION_TYPE.
10363         (call_function_by_hand_dummy): Adjust to use the function type
10364         returned by find_function_addr.
10365         (find_function_addr): Add 'function_type' parameter and move
10366         description here.
10367         * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
10368         declarations.
10369
10370 2018-04-26  Pedro Alves  <palves@redhat.com>
10371
10372         * c-exp.y (variable production): Skip finding an alias for ifunc
10373         symbols.
10374
10375 2018-04-26  Pedro Alves  <palves@redhat.com>
10376
10377         * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
10378
10379 2018-04-25  Pedro Alves  <palves@redhat.com>
10380
10381         * infcmd.c (kill_command): Print the pid as string, not the whole
10382         thread's ptid.  Add comment.  s/has been killed/killed/ in output
10383         message.
10384         * remote.c (remote_detach_1): Print the pid as string, not the
10385         whole thread's ptid.
10386
10387 2018-04-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
10388             Sergio Durigan Junior  <sergiodj@redhat.com>
10389             Pedro Alves  <palves@redhat.com>
10390
10391         * infcmd.c (kill_command): Print message when inferior has
10392         been killed.
10393         * inferior.c (print_inferior_events): Remove 'static'.  Set as
10394         '1'.
10395         (add_inferior): Improve message printed when
10396         'print_inferior_events' is on.
10397         (exit_inferior): Remove message printed when
10398         'print_inferior_events' is on.
10399         (detach_inferior): Improve message printed when
10400         'print_inferior_events' is on.
10401         (initialize_inferiors): Use 'add_inferior_silent' to set
10402         'current_inferior_'.
10403         * inferior.h (print_inferior_events): Declare here as
10404         'extern'.
10405         * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
10406         '[Detaching...]' messages when 'print_inferior_events' is on.
10407         Use 'add_thread_silent' instead of 'add_thread'.  Add '[' and ']'
10408         as prefix/suffix for messages.  Remove periods.  Fix erroneous
10409         'Detaching after fork from child...', replace it by '... from
10410         parent...'.
10411         (handle_vfork_child_exec_or_exit): Add '[' and ']' as
10412         prefix/suffix when printing 'Detaching...' messages.  Print
10413         them when 'print_inferior_events' is on.
10414         * remote.c (remote_detach_1): Print message when detaching
10415         from inferior and '!is_fork_parent'.
10416
10417 2018-04-24  Tom Tromey  <tom@tromey.com>
10418
10419         * cli-out.h: Reindent.
10420
10421 2018-04-24  Tom Tromey  <tom@tromey.com>
10422
10423         * cli-out.c (cli_ui_out::out_field_fmt): Remove.
10424         (cli_ui_out::do_field_string): Use fputs_filtered.
10425         * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
10426
10427 2018-04-23  Tom Tromey  <tom@tromey.com>
10428
10429         * guile/scm-frame.c (gdbscm_frame_read_var): Use
10430         gdb::unique_xmalloc_ptr.
10431
10432 2018-04-23  Tom Tromey  <tom@tromey.com>
10433
10434         * configure: Rebuild.
10435
10436 2018-04-22  Rajendra SY  <rajendra.sy@gmail.com>
10437
10438         PR gdb/23095
10439         * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
10440         prepare_for_testing.  Set normal_bp to r_debug_state if target
10441         is bsd.
10442
10443 2018-04-21  Pedro Alves  <palves@redhat.com>
10444             Rajendra SY  <rajendra.sy@gmail.com>
10445
10446         * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
10447         * remote.c (extended_remote_attach): In all-stop mode, mark the
10448         thread as executing.
10449
10450 2018-04-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
10451
10452         * thread.c (thread_apply_all_command): Fix comment.
10453         (thread_command): Fix comment.
10454
10455 2018-04-10  Alan Hayward  <alan.hayward@arm.com>
10456
10457         * common/tdesc.h (tdesc_create_feature): Remove xml filename
10458         parameter.
10459         * features/aarch64-core.c (create_feature_aarch64_core):
10460         Regenerate.
10461         * features/aarch64-fpu.c (create_feature_aarch64_fpu):
10462         Likewise.
10463         * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
10464         Likewise.
10465         * features/i386/32bit-avx512.c
10466         (create_feature_i386_32bit_avx512): Likewise.
10467         * features/i386/32bit-core.c (create_feature_i386_32bit_core):
10468         Likewise.
10469         * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
10470         Likewise.
10471         * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
10472         Likewise.
10473         * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
10474         Likewise.
10475         * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
10476         Likewise.
10477         * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
10478         Likewise.
10479         * features/i386/64bit-avx512.c
10480         (create_feature_i386_64bit_avx512): Likewise.
10481         * features/i386/64bit-core.c (create_feature_i386_64bit_core):
10482         Likewise.
10483         * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
10484         Likewise.
10485         * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
10486         Likewise.
10487         * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
10488         Likewise.
10489         * features/i386/64bit-segments.c
10490         (create_feature_i386_64bit_segments): Likewise.
10491         * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
10492         Likewise.
10493         * features/i386/x32-core.c
10494         (create_feature_i386_x32_core): Likewise.
10495         * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
10496         * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
10497         * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
10498         * target-descriptions.c: In generated code, don't pass xml
10499         filename.
10500
10501 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
10502
10503         * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
10504         (print_xml_feature::visit_post): Likewise.
10505         (print_xml_feature::visit): Likewise.
10506         * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
10507         (print_xml_feature): Add new class.
10508         * regformats/regdat.sh: Null xmltarget on feature targets.
10509         * target-descriptions.c (struct target_desc): Add xmltarget.
10510         (maintenance_check_tdesc_xml_convert): Add unittest function.
10511         (tdesc_get_features_xml): Add function to get xml.
10512         (maintenance_check_xml_descriptions): Test xml generation.
10513         * xml-tdesc.c (string_read_description_xml): Add function.
10514         * xml-tdesc.h (string_read_description_xml): Add declaration.
10515
10516 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
10517
10518         * features/Makefile: Add feature marker to targets with new style
10519         target descriptions.
10520         * regformats/aarch64.dat: Regenerate.
10521         * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
10522         * regformats/i386/amd64-avx-linux.dat: Likewise.
10523         * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
10524         * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
10525         * regformats/i386/amd64-linux.dat: Likewise.
10526         * regformats/i386/amd64-mpx-linux.dat: Likewise.
10527         * regformats/i386/amd64.dat: Likewise.
10528         * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
10529         * regformats/i386/i386-avx-linux.dat: Likewise.
10530         * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
10531         * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
10532         * regformats/i386/i386-linux.dat: Likewise.
10533         * regformats/i386/i386-mmx-linux.dat: Likewise.
10534         * regformats/i386/i386-mpx-linux.dat: Likewise.
10535         * regformats/i386/i386.dat: Likewise.
10536         * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
10537         * regformats/i386/x32-avx-linux.dat: Likewise.
10538         * regformats/i386/x32-linux.dat: Likewise.
10539         * regformats/tic6x-c62x-linux.dat: Likewise.
10540         * regformats/tic6x-c64x-linux.dat: Likewise.
10541         * regformats/tic6x-c64xp-linux.dat: Likewise.
10542         * regformats/regdat.sh: Parse feature marker.
10543
10544 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
10545
10546         * common/tdesc.h (tdesc_architecture_name): Add new declaration.
10547         (tdesc_osabi_name): Likewise.
10548         * target-descriptions.c (tdesc_architecture_name): Add new
10549         function.
10550         (tdesc_osabi_name): Likewise.
10551
10552 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
10553
10554         * common/tdesc.c (tdesc_predefined_type): Move to here.
10555         (tdesc_named_type): Likewise.
10556         (tdesc_create_vector): Likewise.
10557         (tdesc_create_struct): Likewise.
10558         (tdesc_set_struct_size): Likewise.
10559         (tdesc_create_union): Likewise.
10560         (tdesc_create_flags): Likewise.
10561         (tdesc_create_enum): Likewise.
10562         (tdesc_add_field): Likewise.
10563         (tdesc_add_typed_bitfield): Likewise.
10564         (tdesc_add_bitfield): Likewise.
10565         (tdesc_add_flag): Likewise.
10566         (tdesc_add_enum_value): Likewise.
10567         * common/tdesc.h (struct tdesc_type_builtin): Likewise.
10568         (struct tdesc_type_vector): Likewise.
10569         (struct tdesc_type_field): Likewise.
10570         (struct tdesc_type_with_fields): Likewise.
10571         (tdesc_create_enum): Add declaration.
10572         (tdesc_add_typed_bitfield): Likewise.
10573         (tdesc_add_enum_value): Likewise.
10574         * target-descriptions.c (tdesc_type_field): Move from here.
10575         (tdesc_type_builtin): Likewise.
10576         (tdesc_type_vector): Likewise.
10577         (tdesc_type_with_fields): Likewise.
10578         (tdesc_predefined_types): Likewise.
10579         (tdesc_named_type): Likewise.
10580         (tdesc_create_vector): Likewise.
10581         (tdesc_create_struct): Likewise.
10582         (tdesc_set_struct_size): Likewise.
10583         (tdesc_create_union): Likewise.
10584         (tdesc_create_flags): Likewise.
10585         (tdesc_create_enum): Likewise.
10586         (tdesc_add_field): Likewise.
10587         (tdesc_add_typed_bitfield): Likewise.
10588         (tdesc_add_bitfield): Likewise.
10589         (tdesc_add_flag): Likewise.
10590         (tdesc_add_enum_value): Likewise.
10591         * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
10592         (tdesc_add_typed_bitfield): Likewise.
10593         (tdesc_add_enum_value): Likewise.
10594
10595 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
10596
10597         * common/tdesc.c (tdesc_feature::accept): Move to here.
10598         (tdesc_feature::operator==): Likewise.
10599         (tdesc_create_reg): Likewise.
10600         * common/tdesc.h (tdesc_type_kind): Likewise.
10601         (struct tdesc_type): Likewise.
10602         (struct tdesc_feature): Likewise.
10603         * regformats/regdat.sh: Create a feature.
10604         * target-descriptions.c (tdesc_type_kind): Move from here.
10605         (tdesc_type): Likewise.
10606         (tdesc_type_up): Likewise.
10607         (tdesc_feature): Likewise.
10608         (tdesc_create_reg): Likewise.
10609
10610 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
10611
10612         * Makefile.in: Add arch/tdesc.c
10613         * common/tdesc.c: New file.
10614         * common/tdesc.h (tdesc_element_visitor): Move to here.
10615         (tdesc_element): Likewise.
10616         (tdesc_reg): Likewise.
10617         (tdesc_reg_up): Likewise.
10618         * regformats/regdef.h (reg): Add offset to constructors.
10619         * target-descriptions.c (tdesc_element_visitor): Move from here.
10620         (tdesc_element): Likewise.
10621         (tdesc_reg): Likewise.
10622         (tdesc_reg_up): Likewise.
10623
10624 2018-04-17  Tom Tromey  <tom@tromey.com>
10625
10626         * dwarf2read.c (quirk_rust_enum): Conditionally drop the
10627         discriminant field.
10628
10629 2018-04-17  Tom Tromey  <tom@tromey.com>
10630
10631         * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
10632
10633 2018-04-17  Andreas Arnez  <arnez@linux.vnet.ibm.com>
10634
10635         * symtab.c (print_symbol_info): Skip printing filename and line
10636         number when `last' is NULL.
10637         (symtab_symbol_info): Use empty string instead of NULL for first
10638         invocation of print_symbol_info.
10639         (rbreak_command): Pass NULL to `last' parameter of
10640         print_symbol_info.
10641
10642 2018-04-16  Simon Marchi  <simon.marchi@ericsson.com>
10643
10644         * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
10645         instead of nullptr.
10646
10647 2018-04-16  Pedro Alves  <palves@redhat.com>
10648
10649         * MAINTAINERS (sh): Remove.
10650         * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
10651         (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
10652         (ALLDEPFILES): Remove sh64-tdep.c.
10653         * NEWS: Mentions that support for SH-5/SH64 is removed.
10654         * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
10655         (sh*-*-openbsd*): Ditto.
10656         (sh64-*-elf*): Remove.
10657         (sh*): Remove.
10658         * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
10659         * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
10660         * sh-tdep.c: No longer include "sh64-tdep.h".
10661         (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
10662         * sh64-tdep.c, sh64-tdep.h: Remove files.
10663
10664 2018-04-16  Pedro Alves  <palves@redhat.com>
10665
10666         * MAINTAINERS: Remove m88k.
10667         * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
10668         (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
10669         (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
10670         * NEWS: Mention that support for m88k was removed.
10671         * configure.host (m88*-*-*): Remove support.
10672         * configure.nat (m88k-*-*): Remove support.
10673         * configure.tgt (m88*-*-openbsd*): Remove.
10674         * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
10675
10676 2018-04-15  Simon Marchi  <simon.marchi@polymtl.ca>
10677
10678         * configure.tgt (x86_tobjs): New variable.
10679         (amd64_tobjs, i386_tobjs): Use it.
10680
10681 2018-04-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
10682
10683         * symtab.c (print_symbol_info): Precede the symbol definition by
10684         the line number when available.
10685         * NEWS: Advertise this enhancement.
10686
10687 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
10688
10689         * NEWS (New options): announce set/show record btrace cpu.
10690         * btrace.c: Include record-btrace.h.
10691         (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
10692         the vendor is unknown.
10693         (btrace_compute_ftrace_1): Add cpu parameter.  Update callers.
10694         Maybe overwrite the btrace configuration's cpu.
10695         (btrace_compute_ftrace): Add cpu parameter.  Update callers.
10696         (btrace_fetch): Add cpu parameter.  Update callers.
10697         (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
10698         Maybe overwrite the btrace configuration's cpu.  Skip enabling
10699         errata workarounds if the vendor is unknown.
10700         * python/py-record-btrace.c: Include record-btrace.h.
10701         (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
10702         (recpy_bt_function_call_history): Call record_btrace_get_cpu.
10703         * record-btrace.c (record_btrace_cpu_state_kind): New.
10704         (record_btrace_cpu): New.
10705         (set_record_btrace_cpu_cmdlist): New.
10706         (record_btrace_get_cpu): New.
10707         (require_btrace_thread, record_btrace_info)
10708         (record_btrace_resume_thread): Call record_btrace_get_cpu.
10709         (cmd_set_record_btrace_cpu_none): New.
10710         (cmd_set_record_btrace_cpu_auto): New.
10711         (cmd_set_record_btrace_cpu): New.
10712         (cmd_show_record_btrace_cpu): New.
10713         (_initialize_record_btrace): Initialize set/show record btrace cpu
10714         commands.
10715         * record-btrace.h (record_btrace_get_cpu): New.
10716
10717 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
10718
10719         * record.c (set_record_command): Fix typo in message.
10720
10721 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
10722
10723         * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
10724
10725 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
10726
10727         * infrun.c (process_event_stop_test): Call
10728         gdbarch_in_indirect_branch_thunk.
10729         * gdbarch.sh (in_indirect_branch_thunk): New.
10730         * gdbarch.c: Regenerated.
10731         * gdbarch.h: Regenerated.
10732         * x86-tdep.h: New.
10733         * x86-tdep.c: New.
10734         * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
10735         (HFILES_NO_SRCDIR): Add x86-tdep.h.
10736         (ALLDEPFILES): Add x86-tdep.c.
10737         * arch-utils.h (default_in_indirect_branch_thunk): New.
10738         * arch-utils.c (default_in_indirect_branch_thunk): New.
10739         * i386-tdep: Include x86-tdep.h.
10740         (i386_in_indirect_branch_thunk): New.
10741         (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
10742         function.
10743         * amd64-tdep: Include x86-tdep.h.
10744         (amd64_in_indirect_branch_thunk): New.
10745         (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
10746
10747 2018-04-12  Jan Kratochvil  <jan.kratochvil@redhat.com>
10748
10749         PR gdb/23053
10750         * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
10751         (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
10752         (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
10753         regression.
10754
10755 2018-04-12  Tom Tromey  <tom@tromey.com>
10756
10757         * rust-lang.c (rust_print_struct_def): Remove univariant code.
10758         (rust_evaluate_subexp): Likewise.
10759
10760 2018-04-12  Pedro Alves  <palves@redhat.com>
10761
10762         * procfs.c (procfs_detach): Make forward declaration's prototype
10763         match definition's protototype.
10764         (proc_get_LDT_entry): Remove stale do_cleanups call.
10765
10766 2018-04-12  Pedro Alves  <palves@redhat.com>
10767
10768         * target.h (target_ops::to_has_exited): Delete.
10769         (target_has_exited): Delete.
10770         * target-delegates.c: Regenerate.
10771
10772 2018-04-11  Pedro Alves  <palves@redhat.com>
10773
10774         * target.c (fileio_fh_t::t): Add comment.
10775         (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
10776         (target_fileio_close): Handle a NULL target.
10777         (invalidate_fileio_fh): New.
10778         (target_close): Call it.
10779         * remote.c (remote_hostio_send_command): No longer check whether
10780         remote_desc is open.
10781
10782 2018-04-11  Pedro Alves  <palves@redhat.com>
10783
10784         * target.c (fileio_fh_t): Make it a named struct instead of a
10785         typedef.
10786         (fileio_fh_t::is_closed): New method.
10787         (DEF_VEC_O (fileio_fh_t)): Remove.
10788         (fileio_fhandles): Now a std::vector.
10789         (is_closed_fileio_fh): Delete.
10790         (acquire_fileio_fd): Adjust.  Rename parameters.
10791         (release_fileio_fd): Adjust.
10792         (fileio_fd_to_fh): Reimplement as a function instead of a macro.
10793         (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
10794         (target_fileio_close): Adjust.
10795
10796 2018-04-10  Simon Marchi  <simon.marchi@ericsson.com>
10797
10798         * auto-load.c (auto_load_safe_path_vec_update): Iterate by
10799         index.
10800
10801 2018-04-10  Pedro Alves  <palves@redhat.com>
10802
10803         * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
10804         (scoped_finish_thread_state): New class.
10805         * infcmd.c (run_command_1): Use it instead of finish_thread_state
10806         cleanup.
10807         * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
10808         (fetch_inferior_event, normal_stop): Likewise.
10809         * thread.c (finish_thread_state_cleanup): Delete.
10810
10811 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
10812             Pedro Alves  <palves@redhat.com>
10813
10814         * value.c: Include "selftest.h" and "common/array-view.h".
10815         (struct range) <operator ==>: New.
10816         (test_ranges_contain): New.
10817         (check_ranges_vector): New.
10818         (test_insert_into_bit_range_vector): New.
10819         (_initialize_values): Register selftests.
10820         * common/array-view.h (operator==, operator!=): New.
10821
10822 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
10823
10824         * common/gdb_vecs.h (unordered_remove): Add overload that takes
10825         an iterator.
10826         * inline-frame.c: Include <algorithm>.
10827         (struct inline_state): Add constructor.
10828         (inline_state_s): Remove.
10829         (DEF_VEC_O(inline_state_s)): Remove.
10830         (inline_states): Change type to std::vector.
10831         (find_inline_frame_state): Adjust to std::vector.
10832         (allocate_inline_frame_state): Remove.
10833         (clear_inline_frame_state): Adjust to std::vector.
10834         (skip_inline_frames): Adjust to std::vector.
10835
10836 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
10837
10838         * tracepoint.h (struct trace_state_variable): Add constructor.
10839         <name>: Change type to std::string.
10840         * tracepoint.c (tsv_s): Remove.
10841         (DEF_VEC_O(tsv_s)): Remove.
10842         (tvariables): Change to std::vector.
10843         (create_trace_state_variable): Adjust to std::vector.
10844         (find_trace_state_variable): Likewise.
10845         (find_trace_state_variable_by_number): Likewise.
10846         (delete_trace_state_variable): Likewise.
10847         (trace_variable_command): Adjust to std::string.
10848         (delete_trace_variable_command): Likewise.
10849         (tvariables_info_1): Adjust to std::vector.
10850         (save_trace_state_variables): Likewise.
10851         (start_tracing): Likewise.
10852         (merge_uploaded_trace_state_variables): Adjust to std::vector
10853         and std::string.
10854         * target.h (struct target_ops)
10855         <to_download_trace_state_variable>: Pass reference to
10856         trace_state_variable.
10857         * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
10858         * target-delegates.c: Re-generate.
10859         * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
10860         (mi_tsv_deleted): Likewise.
10861         * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
10862         * remote.c (remote_download_trace_state_variable): Change
10863         pointer to reference and adjust.
10864         * make-target-delegates (parse_argtypes): Handle references.
10865         (write_function_header): Likewise.
10866         (munge_type): Likewise.
10867
10868 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
10869
10870         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10871         string_view-selftests.c.
10872         * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
10873         testsuite.
10874         * unittests/basic_string_view/cons/char/1.cc: Likewise.
10875         * unittests/basic_string_view/cons/char/2.cc: Likewise.
10876         * unittests/basic_string_view/cons/char/3.cc: Likewise.
10877         * unittests/basic_string_view/element_access/char/1.cc:
10878         Likewise.
10879         * unittests/basic_string_view/element_access/char/empty.cc:
10880         Likewise.
10881         * unittests/basic_string_view/element_access/char/front_back.cc:
10882         Likewise.
10883         * unittests/basic_string_view/inserters/char/2.cc: Likewise.
10884         * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
10885         Likewise.
10886         * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
10887         Likewise.
10888         * unittests/basic_string_view/modifiers/swap/char/1.cc:
10889         Likewise.
10890         * unittests/basic_string_view/operations/compare/char/1.cc:
10891         Likewise.
10892         * unittests/basic_string_view/operations/compare/char/13650.cc:
10893         Likewise.
10894         * unittests/basic_string_view/operations/copy/char/1.cc:
10895         Likewise.
10896         * unittests/basic_string_view/operations/data/char/1.cc:
10897         Likewise.
10898         * unittests/basic_string_view/operations/find/char/1.cc:
10899         Likewise.
10900         * unittests/basic_string_view/operations/find/char/2.cc:
10901         Likewise.
10902         * unittests/basic_string_view/operations/find/char/3.cc:
10903         Likewise.
10904         * unittests/basic_string_view/operations/find/char/4.cc:
10905         Likewise.
10906         * unittests/basic_string_view/operations/rfind/char/1.cc:
10907         Likewise.
10908         * unittests/basic_string_view/operations/rfind/char/2.cc:
10909         Likewise.
10910         * unittests/basic_string_view/operations/rfind/char/3.cc:
10911         Likewise.
10912         * unittests/basic_string_view/operations/substr/char/1.cc:
10913         Likewise.
10914         * unittests/basic_string_view/operators/char/2.cc: Likewise.
10915         * unittests/string_view-selftests.c: New file.
10916
10917 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
10918
10919         * unittests/basic_string_view/capacity/1.cc: New file.
10920         * unittests/basic_string_view/capacity/empty_neg.cc: New file.
10921         * unittests/basic_string_view/cons/char/1.cc: New file.
10922         * unittests/basic_string_view/cons/char/2.cc: New file.
10923         * unittests/basic_string_view/cons/char/3.cc: New file.
10924         * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
10925         * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
10926         * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
10927         * unittests/basic_string_view/element_access/char/1.cc: New file.
10928         * unittests/basic_string_view/element_access/char/2.cc: New file.
10929         * unittests/basic_string_view/element_access/char/empty.cc: New file.
10930         * unittests/basic_string_view/element_access/char/front_back.cc: New file.
10931         * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
10932         * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
10933         * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
10934         * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
10935         * unittests/basic_string_view/include.cc: New file.
10936         * unittests/basic_string_view/inserters/char/1.cc: New file.
10937         * unittests/basic_string_view/inserters/char/2.cc: New file.
10938         * unittests/basic_string_view/inserters/char/3.cc: New file.
10939         * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
10940         * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
10941         * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
10942         * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
10943         * unittests/basic_string_view/literals/types.cc: New file.
10944         * unittests/basic_string_view/literals/values.cc: New file.
10945         * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
10946         * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
10947         * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
10948         * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
10949         * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
10950         * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
10951         * unittests/basic_string_view/operations/compare/char/1.cc: New file.
10952         * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
10953         * unittests/basic_string_view/operations/compare/char/2.cc: New file.
10954         * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
10955         * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
10956         * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
10957         * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
10958         * unittests/basic_string_view/operations/copy/char/1.cc: New file.
10959         * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
10960         * unittests/basic_string_view/operations/data/char/1.cc: New file.
10961         * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
10962         * unittests/basic_string_view/operations/find/char/1.cc: New file.
10963         * unittests/basic_string_view/operations/find/char/2.cc: New file.
10964         * unittests/basic_string_view/operations/find/char/3.cc: New file.
10965         * unittests/basic_string_view/operations/find/char/4.cc: New file.
10966         * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
10967         * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
10968         * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
10969         * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
10970         * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
10971         * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
10972         * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
10973         * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
10974         * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
10975         * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
10976         * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
10977         * unittests/basic_string_view/operations/substr/char/1.cc: New file.
10978         * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
10979         * unittests/basic_string_view/operators/char/2.cc: New file.
10980         * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
10981         * unittests/basic_string_view/range_access/char/1.cc: New file.
10982         * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
10983         * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
10984         * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
10985         * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
10986         * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
10987         * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
10988         * unittests/basic_string_view/requirements/typedefs.cc: New file.
10989         * unittests/basic_string_view/typedefs.cc: New file.
10990         * unittests/basic_string_view/types/1.cc: New file.
10991
10992 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
10993
10994         * common/gdb_string_view.h: Remove libstdc++ implementation
10995         details, adjust to gdb reality.
10996         * common/gdb_string_view.tcc: Likewise.
10997         * cli/cli-script.c (struct string_view): Remove.
10998         (user_args) <m_args>: Change element type to gdb::string_view.
10999         (user_args::insert_args): Adjust.
11000
11001 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
11002
11003         * common/gdb_string_view.h: New file.
11004         * common/gdb_string_view.tcc: New file.
11005
11006 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
11007
11008         * ax_cxx_compile_stdcxx.m4: Sync with upstream.
11009         * configure: Re-generate.
11010
11011 2018-04-09  Pedro Alves  <palves@redhat.com>
11012
11013         * gdbarch.sh: Include "observable.h" instead of "observer.h".
11014         (set_target_gdbarch): Call
11015         gdb::observers::architecture_changed.notify instead of
11016         observer_notify_architecture_changed.
11017
11018 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
11019
11020         * tracepoint.c (struct current_traceframe_cleanup): Remove.
11021         (do_restore_current_traceframe_cleanup): Remove.
11022         (restore_current_traceframe_cleanup_dtor): Remove.
11023         (make_cleanup_restore_current_traceframe): Remove.
11024         (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
11025         New.
11026         * tracepoint.h (struct scoped_restore_current_traceframe): New.
11027         * infrun.c (fetch_inferior_event): Use
11028         scoped_restore_current_traceframe.
11029
11030 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
11031
11032         * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
11033         Remove.
11034         <n_allocated_type_units>: Remove.
11035         <all_type_units>: Change to std::vector.
11036         * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
11037         to std::vector change.
11038         (dwarf2_per_objfile::get_cutu): Likewise.
11039         (dwarf2_per_objfile::get_tu): Likewise.
11040         (create_signatured_type_table_from_index): Likewise.
11041         (create_signatured_type_table_from_debug_names): Likewise.
11042         (dw2_symtab_iter_next): Likewise.
11043         (dw2_print_stats): Likewise.
11044         (dw2_expand_all_symtabs): Likewise.
11045         (dw2_expand_marked_cus): Likewise.
11046         (dw2_debug_names_iterator::next): Likewise.
11047         (dwarf2_initialize_objfile): Likewise.
11048         (add_signatured_type_cu_to_table): Likewise.
11049         (create_all_type_units): Likewise.
11050         (add_type_unit): Likewise.
11051         (struct tu_abbrev_offset): Add constructor.
11052         (build_type_psymtabs_1): Adjust to std::vector change.
11053         (print_tu_stats): Likewise.
11054         * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
11055         (write_debug_names): Likewise.
11056
11057 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
11058
11059         * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
11060         Make an std::vector.
11061         <n_comp_units>: Remove.
11062         * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
11063         to std::vector change.
11064         (dwarf2_per_objfile::get_cutu): Likewise.
11065         (dwarf2_per_objfile::get_cu): Likewise.
11066         (create_cus_from_index): Likewise.
11067         (create_addrmap_from_index): Likewise.
11068         (create_addrmap_from_aranges): Likewise.
11069         (dwarf2_read_index): Likewise.
11070         (dw2_find_last_source_symtab): Likewise.
11071         (dw2_map_symtabs_matching_filename): Likewise.
11072         (dw2_symtab_iter_next): Likewise.
11073         (dw2_print_stats): Likewise.
11074         (dw2_expand_all_symtabs): Likewise.
11075         (dw2_expand_symtabs_with_fullname): Likewise.
11076         (dw2_expand_marked_cus): Likewise.
11077         (dw2_map_symbol_filenames): Likewise.
11078         (create_cus_from_debug_names): Likewise.
11079         (dwarf2_read_debug_names): Likewise.
11080         (dw2_debug_names_iterator::next): Likewise.
11081         (dwarf2_initialize_objfile): Likewise.
11082         (set_partial_user): Likewise.
11083         (dwarf2_build_psymtabs_hard): Likewise.
11084         (read_comp_units_from_section): Remove arguments, adjust to
11085         std::vector change.
11086         (create_all_comp_units): Adjust to std::vector and
11087         read_comp_units_from_section changes.
11088         (dwarf2_find_containing_comp_unit): Adjust to std::vector
11089         change.
11090         * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
11091         (psyms_seen_size): Likewise.
11092         (write_gdbindex): Likewise.
11093         (write_debug_names): Likewise.
11094
11095 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
11096
11097         * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
11098         with dwarf2_per_objfile.
11099         (create_cus_from_index): Likewise.
11100         (create_signatured_type_table_from_index): Likewise.
11101         (dwarf2_read_index): Likewise.
11102         (dwarf2_initialize_objfile): Likewise.
11103         (dwarf2_fetch_die_loc_sect_off):  Get dwarf2_per_objfile from
11104         per_cu rather than get_dwarf2_per_objfile.
11105
11106 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
11107
11108         * dwarf2read.h (struct signatured_type): Forward declare.
11109         (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
11110         New methods.
11111         * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
11112         (dw2_get_cutu): ...this.
11113         (dwarf2_per_objfile::get_cu): Rename from...
11114         (dw2_get_cu): ...this.
11115         (dwarf2_per_objfile::get_tu): New.
11116         (create_addrmap_from_index): Adjust.
11117         (create_addrmap_from_aranges): Adjust.
11118         (dw2_find_last_source_symtab): Adjust.
11119         (dw2_map_symtabs_matching_filename): Adjust.
11120         (dw2_symtab_iter_next): Adjust.
11121         (dw2_print_stats): Adjust.
11122         (dw2_expand_all_symtabs): Adjust.
11123         (dw2_expand_symtabs_with_fullname): Adjust.
11124         (dw2_expand_marked_cus): Adjust.
11125         (dw_expand_symtabs_matching_file_matcher): Adjust.
11126         (dw2_map_symbol_filenames): Adjust.
11127         (dw2_debug_names_iterator::next): Adjust.
11128         (dwarf2_initialize_objfile): Adjust.
11129         (set_partial_user): Adjust.
11130         (dwarf2_build_psymtabs_hard): Adjust.
11131
11132 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
11133
11134         * dwarf2read.c (create_signatured_type_table_from_debug_names):
11135         Remove unused variables.
11136         (dw2_map_symtabs_matching_filename): Likewise.
11137         (dwarf2_record_block_ranges): Likewise.
11138         (dwarf2_read_addr_index): Likewise.
11139         (follow_die_offset): Likewise.
11140
11141 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
11142
11143         * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
11144         to symbol_file_add_main.
11145
11146 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
11147
11148         PR mi/22299
11149         * mi/mi-console.c (do_fputc_async_safe): New.
11150         (mi_console_file::write_async_safe): New.
11151         (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
11152         * mi/mi-console.h (class mi_console_file) <write_async_safe>:
11153         New.
11154         * ui-file.c (ui_file::putstrn): Adjust call to
11155         fputstrn_unfiltered.
11156         * utils.c (printchar): Replace do_fputs and do_fprintf
11157         parameters by do_fputc.
11158         (fputstr_filtered): Adjust call to printchar.
11159         (fputstr_unfiltered): Likewise.
11160         (fputstrn_filtered): Likewise.
11161         (fputstrn_unfiltered): Add do_fputc parameter, pass to
11162         printchar.
11163         * utils.h (do_fputc_ftype): New typedef.
11164         (fputstrn_unfiltered): Add do_fputc parameter.
11165
11166 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
11167
11168         * regformats/i386/i386-avx.dat: Remove.
11169
11170 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
11171
11172         PR gdb/22979
11173         * amd64-tdep.c (amd64_none_init_abi): New function.
11174         (amd64_x32_none_init_abi): New function.
11175         (_initialize_amd64_tdep): Register handlers for x86-64 and
11176         x64_32 with GDB_OSABI_NONE.
11177         * osabi.c (gdbarch_init_osabi): Allow running handlers for the
11178         GDB_OSABI_NONE osabi.
11179
11180 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
11181
11182         PR gdb/22980
11183         * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
11184         GDB_OSABI_NONE.
11185         * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
11186         * osabi.c (gdb_osabi_names): Add "unknown" entry.
11187
11188 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
11189
11190         * common/byte-vector.h (char_vector): New type.
11191         * target.h (target_read_alloc): Return
11192         gdb::optional<byte_vector>.
11193         (target_read_stralloc): Return gdb::optional<char_vector>.
11194         (target_get_osdata): Return gdb::optional<char_vector>.
11195         * target.c (target_read_alloc_1): Templatize.  Replacement
11196         manual memory management with vector.
11197         (target_read_alloc): Change return type, adjust.
11198         (target_read_stralloc): Change return type, adjust.
11199         (target_get_osdata): Change return type, adjust.
11200         * auxv.c (struct auxv_info) <length>: Remove.
11201         <data>: Change type to gdb::optional<byte_vector>.
11202         (auxv_inferior_data_cleanup): Free auxv_info with delete.
11203         (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
11204         (target_auxv_search): Adjust.
11205         (fprint_target_auxv): Adjust.
11206         * avr-tdep.c (avr_io_reg_read_command): Adjust.
11207         * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
11208         (linux_make_corefile_notes): Adjust.
11209         * osdata.c (get_osdata): Adjust.
11210         * remote.c (remote_get_threads_with_qxfer): Adjust.
11211         (remote_memory_map): Adjust.
11212         (remote_traceframe_info): Adjust.
11213         (btrace_read_config): Adjust.
11214         (remote_read_btrace): Adjust.
11215         (remote_pid_to_exec_file): Adjust.
11216         * solib-aix.c (solib_aix_get_library_list): Adjust.
11217         * solib-dsbt.c (decode_loadmap): Don't free buf.
11218         (dsbt_get_initial_loadmaps): Adjust.
11219         * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
11220         * solib-target.c (solib_target_current_sos): Adjust.
11221         * tracepoint.c (sdata_make_value): Adjust.
11222         * xml-support.c (xinclude_start_include): Adjust.
11223         (xml_fetch_content_from_file): Adjust.
11224         * xml-support.h (xml_fetch_another): Change return type.
11225         (xml_fetch_content_from_file): Change return type.
11226         * xml-syscall.c (xml_init_syscalls_info): Adjust.
11227         * xml-tdesc.c (file_read_description_xml): Adjust.
11228         (fetch_available_features_from_target): Change return type.
11229         (target_fetch_description_xml): Adjust.
11230         (target_read_description_xml): Adjust.
11231
11232 2018-04-06  Tom Tromey  <tom@tromey.com>
11233
11234         * value.c (~value): Update.
11235         (struct value) <contents>: Now unique_xmalloc_ptr.
11236         (value_contents_bits_eq, allocate_value_contents)
11237         (value_contents_raw, value_contents_all_raw)
11238         (value_contents_for_printing, value_contents_for_printing_const)
11239         (set_value_enclosing_type): Update.
11240
11241 2018-04-06  Tom Tromey  <tom@tromey.com>
11242
11243         * value.c (range_s): Remove typedef, VEC.
11244         (struct range): Add operator<.
11245         (range_lessthan): Remove.
11246         (ranges_contain): Change type.
11247         (~value): Update.
11248         (struct value) <unavailable, optimized_out>: Now std::vector.
11249         (value_entirely_available)
11250         (value_entirely_covered_by_range_vector)
11251         (value_entirely_unavailable, value_entirely_optimized_out):
11252         Update.
11253         (insert_into_bit_range_vector): Change argument type.
11254         (find_first_range_overlap): Likewise.
11255         (struct ranges_and_idx, value_contents_bits_eq)
11256         (require_not_optimized_out, require_available): Update.
11257         (ranges_copy_adjusted): Change argument types.
11258         (value_optimized_out, value_copy, value_fetch_lazy): Update.
11259
11260 2018-04-06  Tom Tromey  <tom@tromey.com>
11261
11262         * value.c (~value): Update.
11263         (struct value) <parent>: Now a value_ref_ptr.
11264         (value_parent, set_value_parent, value_address, value_copy):
11265         Update.
11266
11267 2018-04-06  Tom Tromey  <tom@tromey.com>
11268
11269         * value.c (struct value): Add constructor, destructor, and member
11270         initializers.
11271         (allocate_value_lazy, value_decref): Update.
11272
11273 2018-04-06  Tom Tromey  <tom@tromey.com>
11274
11275         * value.c (struct value) <released, next>: Remove.
11276         (all_values): Now a std::vector.
11277         (allocate_value_lazy): Update.
11278         (value_next): Remove.
11279         (value_mark, value_free_to_mark, release_value)
11280         (value_release_to_mark): Update.
11281
11282 2018-04-06  Tom Tromey  <tom@tromey.com>
11283
11284         * value.h (fetch_subexp_value, value_release_to_mark): Update.
11285         (free_value_chain): Remove.
11286         * value.c (free_value_chain): Remove.
11287         (value_release_to_mark): Return a std::vector.
11288         * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
11289         std::vector.
11290         (check_condition): Update.
11291         * eval.c (fetch_subexp_value): Change "val_chain" to a
11292         std::vector.
11293         * breakpoint.c (update_watchpoint): Update.
11294         (can_use_hardware_watchpoint): Change "vals" to a std::vector.
11295
11296 2018-04-06  Tom Tromey  <tom@tromey.com>
11297
11298         * value.h (free_all_values): Remove.
11299         * value.c (free_all_values): Remove.
11300
11301 2018-04-06  Tom Tromey  <tom@tromey.com>
11302
11303         * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
11304         (value_history_chain, value_history_count): Remove.
11305         (value_history): New global.
11306         (record_latest_value, access_value_history, show_values)
11307         (preserve_values): Update.
11308
11309 2018-04-06  Tom Tromey  <tom@tromey.com>
11310
11311         * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
11312         * varobj.c (varobj_set_display_format, varobj_set_value)
11313         (install_default_visualizer, construct_visualizer)
11314         (install_new_value, ~varobj, varobj_get_value_type)
11315         (my_value_of_variable, varobj_editable_p): Update.
11316         * c-varobj.c (c_describe_child, c_value_of_variable)
11317         (cplus_number_of_children, cplus_describe_child): Update.
11318         * ada-varobj.c (ada_number_of_children, ada_name_of_child)
11319         (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
11320         (ada_value_of_variable, ada_value_is_changeable_p): Update.
11321
11322 2018-04-06  Tom Tromey  <tom@tromey.com>
11323
11324         * printcmd.c (last_examine_address): Change type to
11325         value_ref_ptr.
11326         (do_examine, x_command): Update.
11327
11328 2018-04-06  Tom Tromey  <tom@tromey.com>
11329
11330         * value.c (release_value): Update.
11331         * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
11332         (struct bpstats) <val>: Now a value_ref_ptr.
11333         * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
11334         (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
11335         (~watchpoint, print_it_watchpoint, watch_command_1)
11336         (invalidate_bp_value_on_memory_change): Update.
11337
11338 2018-04-06  Tom Tromey  <tom@tromey.com>
11339
11340         * varobj.c (varobj_clear_saved_item)
11341         (update_dynamic_varobj_children, install_new_value, ~varobj):
11342         Update.
11343         * value.h (value_incref): Move declaration earlier.
11344         (value_decref): Rename from value_free.
11345         (struct value_ref_policy): New.
11346         (value_ref_ptr): New typedef.
11347         (struct value_deleter): Remove.
11348         (gdb_value_up): Remove typedef.
11349         (release_value): Change return type.
11350         (release_value_or_incref): Remove.
11351         * value.c (set_value_parent): Update.
11352         (value_incref): Change return type.
11353         (value_decref): Rename from value_free.
11354         (value_free_to_mark, free_all_values, free_value_chain): Update.
11355         (release_value): Return value_ref_ptr.
11356         (release_value_or_incref): Remove.
11357         (record_latest_value, set_internalvar, clear_internalvar):
11358         Update.
11359         * stack.c (info_frame_command): Don't call value_free.
11360         * python/py-value.c (valpy_dealloc, valpy_new)
11361         (value_to_value_object): Update.
11362         * printcmd.c (do_examine): Update.
11363         * opencl-lang.c (lval_func_free_closure): Update.
11364         * mi/mi-main.c (register_changed_p): Don't call value_free.
11365         * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
11366         * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
11367         * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
11368         value_free.
11369         * guile/scm-value.c (vlscm_free_value_smob)
11370         (vlscm_scm_from_value): Update.
11371         * frame.c (frame_register_unwind, frame_unwind_register_signed)
11372         (frame_unwind_register_unsigned, get_frame_register_bytes)
11373         (put_frame_register_bytes): Don't call value_free.
11374         * findvar.c (address_from_register): Don't call value_free.
11375         * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
11376         * dwarf2loc.c (entry_data_value_free_closure)
11377         (value_of_dwarf_reg_entry, free_pieced_value_closure)
11378         (dwarf2_evaluate_loc_desc_full): Update.
11379         * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
11380         (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
11381         (~watchpoint, watch_command_1)
11382         (invalidate_bp_value_on_memory_change): Update.
11383         * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
11384
11385 2018-04-06  Simon Marchi  <simon.marchi@polymtl.ca>
11386
11387         PR gdb/23022
11388         * warning.m4: Add -Wno-error=deprecated-register.
11389         * configure: Re-generate.
11390
11391 2018-04-05  Tom Tromey  <tom@tromey.com>
11392
11393         * linespec.h: Remove include of "vec.h".
11394
11395 2018-04-05  Tom Tromey  <tom@tromey.com>
11396
11397         * linespec.c (typep): Remove typedef.
11398         (find_methods, find_superclass_methods): Take a std::vector.
11399         (find_method): Use std::vector.
11400
11401 2018-04-05  Tom Tromey  <tom@tromey.com>
11402
11403         * utils.c (compare_strings): Remove.
11404         * utils.h (compare_strings): Remove.
11405         * objc-lang.h (find_imps): Update.
11406         * objc-lang.c (find_methods): Take a std::vector.
11407         (uniquify_strings, find_imps): Likewise.
11408         * linespec.c (find_methods): Take a std::vector.
11409         (decode_objc): Use std::vector.
11410         (add_all_symbol_names_from_pspace, find_superclass_methods): Take
11411         a std::vector.
11412         (find_method, find_function_symbols): Use std::vector.
11413
11414 2018-04-05  Tom Tromey  <tom@tromey.com>
11415
11416         * completer.c (completion_tracker::completion_tracker): Remove
11417         cast.
11418         (completion_tracker::discard_completions): Likewise.
11419         * breakpoint.c (ambiguous_names_p): Remove cast.
11420         * ada-lang.c (_initialize_ada_language): Remove cast.
11421         * utils.h (streq): Update.
11422         (streq_hash): Add new declaration.
11423         * utils.c (streq): Return bool.
11424         (streq_hash): New function.
11425
11426 2018-04-05  Tom Tromey  <tom@tromey.com>
11427
11428         * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
11429         Remove a string copy.
11430
11431 2018-04-05  Tom Tromey  <tom@tromey.com>
11432
11433         * linespec.c (filter_results): Use std::vector.
11434         (decode_line_2, decode_line_full): Update.
11435
11436 2018-04-05  Tom Tromey  <tom@tromey.com>
11437
11438         * linespec.c (canonical_to_fullform): Return std::string.
11439         (filter_results): Update.
11440         (struct decode_line_2_item): Add constructor.
11441         <fullform, displayform>: Now std::string.
11442         (decode_line_2_compare_items): Now a std::sort comparator.
11443         (decode_line_2): Update.
11444
11445 2018-04-05  Tom Tromey  <tom@tromey.com>
11446
11447         * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
11448         (unexpected_linespec_error): Update.
11449         (linespec_parse_basic, parse_linespec): Update.
11450
11451 2018-04-05  Tom Tromey  <tom@tromey.com>
11452
11453         * linespec.c (linespec_parse_basic): Reindent.
11454
11455 2018-04-05  Tom Tromey  <tom@tromey.com>
11456
11457         * minsyms.h (iterate_over_minimal_symbols): Update.
11458         * minsyms.c (iterate_over_minimal_symbols): Take a
11459         gdb::function_view.
11460         * linespec.c (struct collect_minsyms): Remove.
11461         (compare_msyms): Now a std::sort comparator.
11462         (add_minsym): Add parameters.
11463         (search_minsyms_for_name): Update.  Use std::vector.
11464
11465 2018-04-03  Tom Tromey  <tom@tromey.com>
11466
11467         * mipsread.c (read_alphacoff_dynamic_symtab): Use
11468         gdb::byte_vector.
11469
11470 2018-04-02  Weimin Pan  <weimin.pan@oracle.com>
11471
11472         * MAINTAINERS (Write After Approval): Add Weimin Pan.
11473
11474 2018-04-02  Weimin Pan  <weimin.pan@oracle.com>
11475
11476         PR gdb/16959
11477         * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when 
11478         printing static type.
11479
11480 2018-04-01  Tom Tromey  <tom@tromey.com>
11481
11482         * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
11483         (rs6000_xfer_shared_libraries): Update.
11484
11485 2018-04-01  Simon Marchi  <simon.marchi@polymtl.ca>
11486
11487         * common/gdb_vecs.h (char_ptr): Remove.
11488         * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
11489
11490 2018-03-30  Simon Marchi  <simon.marchi@polymtl.ca>
11491
11492         * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
11493         with std::vector.
11494         * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
11495
11496 2018-03-30  Simon Marchi  <simon.marchi@polymtl.ca>
11497
11498         * tracepoint.h (struct uploaded_tp): Initialize fields.
11499         <actions, step_actions, cmd_strings>: Change type to
11500         std::vector<char *>.
11501         * tracepoint.c (get_uploaded_tp): Allocate with new.
11502         (free_uploaded_tps): Free with delete.
11503         (parse_tracepoint_definition): Adjust to std::vector change.
11504         * breakpoint.c (read_uploaded_action): Likewise.
11505         (create_tracepoint_from_upload): Likewise.
11506         * ctf.c (ctf_write_uploaded_tp): Likewise.
11507         (SET_ARRAY_FIELD): Likewise.
11508         * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
11509
11510 2018-03-30  Tom Tromey  <tom@tromey.com>
11511
11512         * solib-svr4.c (lm_info_read): Use gdb::byte_vector.  Return
11513         std::unique_ptr.
11514         (svr4_keep_data_in_core): Update.
11515         (svr4_read_so_list): Update.
11516
11517 2018-03-30  Tom Tromey  <tom@tromey.com>
11518
11519         * windows-nat.c (handle_output_debug_string, handle_exception):
11520         Update.
11521         * target.h (target_read_string): Update.
11522         * target.c (target_read_string): Change "string" to
11523         unique_xmalloc_ptr.
11524         * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
11525         Update.
11526         * solib-frv.c (frv_current_sos): Update.
11527         * solib-dsbt.c (dsbt_current_sos): Update.
11528         * solib-darwin.c (darwin_current_sos): Update.
11529         * linux-thread-db.c (inferior_has_bug): Update.
11530         * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
11531         Update.  Remove alloca.
11532         * ada-lang.c (ada_main_name): Update.
11533
11534 2018-03-30  Tom Tromey  <tom@tromey.com>
11535
11536         * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
11537         (struct dwo_file_deleter): New.
11538         (dwo_file_up): New typedef.
11539         (open_and_init_dwo_file): Use dwo_file_up.
11540         (free_dwo_file_cleanup): Remove.
11541
11542 2018-03-30  Tom Tromey  <tom@tromey.com>
11543
11544         * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
11545         (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
11546
11547 2018-03-30  Tom Tromey  <tom@tromey.com>
11548
11549         * dwarf2read.c (class free_cached_comp_units): New class.
11550         (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
11551         (free_cached_comp_units): Remove function.
11552
11553 2018-03-30  Tom Tromey  <tom@tromey.com>
11554
11555         * utils.h (make_cleanup_unpush_target): Remove.
11556         * inf-ptrace.c (struct target_unpusher): New.
11557         (target_unpush_up) New typedef.
11558         (inf_ptrace_create_inferior, inf_ptrace_attach): Use
11559         target_unpush_up.
11560         * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
11561
11562 2018-03-27  Tom Tromey  <tom@tromey.com>
11563
11564         * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
11565
11566 2018-03-27  Pedro Alves  <palves@redhat.com>
11567             Tom Tromey  <tom@tromey.com>
11568
11569         * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
11570         destructor.  Now a class.
11571         (gdb_readline_wrapper_cleanup): Remove function.
11572         (gdb_readline_wrapper): Remove cleanups.
11573
11574 2018-03-27  Tom Tromey  <tom@tromey.com>
11575
11576         * typeprint.h (struct type_print_options) <local_typedefs,
11577         global_typedefs>: Remove "struct" keyword.
11578         (class typedef_hash_table): New class.
11579         (recursively_update_typedef_hash, add_template_parameters)
11580         (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
11581         (find_typedef_in_hash): Don't declare.
11582         * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
11583         (typedef_hash_table::recursively_update): Rename from
11584         recursively_update_typedef_hash.  Now a member.
11585         (typedef_hash_table::add_template_parameters): Rename from
11586         add_template_parameters.  Now a member.
11587         (typedef_hash_table::typedef_hash_table): Now a constructor;
11588         rename from create_typedef_hash.
11589         (typedef_hash_table::~typedef_hash_table): Now a destructor;
11590         rename from free_typedef_hash.
11591         (do_free_typedef_hash, make_cleanup_free_typedef_hash)
11592         (do_free_global_table): Remove.
11593         (typedef_hash_table::typedef_hash_table): New constructor; renamed
11594         from copy_type_recursive.
11595         (create_global_typedef_table): Remove.
11596         (typedef_hash_table::find_global_typedef): Now a member of
11597         typedef_hash_table.
11598         (typedef_hash_table::find_typedef): Rename from
11599         find_typedef_in_hash; now a member.
11600         (whatis_exp): Update.
11601         * extension.h (struct ext_lang_type_printers): Add constructor and
11602         destructor.
11603         (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
11604         declare.
11605         * extension.c (ext_lang_type_printers::ext_lang_type_printers):
11606         Now a constructor; rename from start_ext_lang_type_printers.
11607         (ext_lang_type_printers): Now a destructor; rename from
11608         free_ext_lang_type_printers.
11609         * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
11610         Update.
11611         (c_type_print_base_struct_union): Update.  Remove cleanups.
11612
11613 2018-03-27  Tom Tromey  <tom@tromey.com>
11614
11615         * dwarf-index-write.c: Include <cmath>.
11616
11617 2018-03-27  Joel Brobecker  <brobecker@adacore.com>
11618
11619         * NEWS: Add entry describing new "set|show varsize-limit" command.
11620         * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
11621         command.
11622         * printcmd.c (_initialize_printcmd): Add "set var" alias of
11623         "set variable".
11624
11625 2018-03-27  Simon Marchi  <simon.marchi@ericsson.com>
11626
11627         * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
11628         dwarf-index-write.c
11629         (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
11630         * dwarf-index-common.c: New file.
11631         * dwarf-index-common.h: New file.
11632         * dwarf-index-write.c: New file.
11633         * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
11634         (struct dwarf2_section_info): Move from here.
11635         (dwarf2_section_info_def): Likewise.
11636         (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
11637         (offset_type): Likewise.
11638         (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
11639         (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
11640         (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
11641         (byte_swap): Likewise.
11642         (MAYBE_SWAP): Likewise.
11643         (dwarf2_per_cu_ptr): Likewise.
11644         (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
11645         (struct tu_stats): Likewise.
11646         (struct dwarf2_per_objfile): Likewise.
11647         (struct dwarf2_per_cu_data): Likewise.
11648         (struct signatured_type): Likewise.
11649         (sig_type_ptr): Likewise.
11650         (DEF_VEC_P (sig_type_ptr)): Likewise.
11651         (INDEX4_SUFFIX): Likewise.
11652         (INDEX5_SUFFIX): Likewise.
11653         (DEBUG_STR_SUFFIX): Likewise.
11654         (dwarf2_read_section): Make non-static.
11655         (mapped_index_string_hash): Move from here.
11656         (dwarf5_djb_hash): Likewise.
11657         (file_write): Likewise.
11658         (class data_buf): Likewise.
11659         (struct symtab_index_entry): Likewise.
11660         (struct mapped_symtab): Likewise.
11661         (find_slot): Likewise.
11662         (hash_expand): Likewise.
11663         (add_index_entry): Likewise.
11664         (uniquify_cu_indices): Likewise.
11665         (class c_str_view): Likewise.
11666         (class c_str_view_hasher): Likewise.
11667         (class vector_hasher): Likewise.
11668         (write_hash_table): Likewise.
11669         (psym_index_map): Likewise.
11670         (struct addrmap_index_data): Likewise.
11671         (add_address_entry): Likewise.
11672         (add_address_entry_worker): Likewise.
11673         (write_address_map): Likewise.
11674         (symbol_kind): Likewise.
11675         (write_psymbols): Likewise.
11676         (struct signatured_type_index_data): Likewise.
11677         (write_one_signatured_type): Likewise.
11678         (recursively_count_psymbols): Likewise.
11679         (recursively_write_psymbols): Likewise.
11680         (class debug_names): Likewise.
11681         (check_dwarf64_offsets): Likewise.
11682         (psyms_seen_size): Likewise.
11683         (write_gdbindex): Likewise.
11684         (write_debug_names): Likewise.
11685         (assert_file_size): Likewise.
11686         (write_psymtabs_to_index): Likewise.
11687         (save_gdb_index_command): Likewise.
11688         (_initialize_dwarf2_read): Don't register the "save gdb-index"
11689         command.
11690         * dwarf2read.h: New file.
11691
11692 2018-03-27  Joel Brobecker  <brobecker@adacore.com>
11693
11694         PR gdb/22670
11695         * dwarf2read.c (dwarf2_physname): Do not return the demangled
11696         symbol name if the CU's language stores symbol names in linkage
11697         format.
11698         * language.h (struct language_defn)
11699         <la_store_sym_names_in_linkage_form_p>: New field.  Adjust
11700         all instances of this struct.
11701
11702 2018-03-26  Tom Tromey  <tom@tromey.com>
11703
11704         * stack.c (backtrace_command_1): Remove verbose code.
11705
11706 2018-03-26  Tom Tromey  <tom@tromey.com>
11707
11708         * python/py-framefilter.c (py_print_type): Don't catch
11709         exceptions.  Return void.
11710         (py_print_value): Likewise.
11711         (py_print_single_arg): Likewise.
11712         (enumerate_args): Don't catch exceptions.
11713         (py_print_args): Likewise.
11714         (py_print_frame): Likewise.
11715         (gdbpy_apply_frame_filter): Catch exceptions here.
11716
11717 2018-03-26  Tom Tromey  <tom@tromey.com>
11718
11719         * stack.c (_initialize_stack): Remove trailing newlines from help
11720         text.  Add "Usage" line to "backtrace" help.
11721
11722 2018-03-26  Tom Tromey  <tom@tromey.com>
11723
11724         PR python/16486:
11725         * python/py-framefilter.c (py_print_args): Call wrap_hint.
11726
11727 2018-03-26  Tom Tromey  <tom@tromey.com>
11728
11729         * python/py-framefilter.c (py_print_single_arg): Return
11730         EXT_LANG_BT_ERROR from catch.
11731
11732 2018-03-26  Tom Tromey  <tom@tromey.com>
11733
11734         PR backtrace/15584:
11735         * stack.c (backtrace_command_1): Move some code into no-filters
11736         "if".
11737
11738 2018-03-26  Tom Tromey  <tom@tromey.com>
11739
11740         * python/py-framefilter.c (throw_quit_or_print_exception): New
11741         function.
11742         (gdbpy_apply_frame_filter): Use it.
11743
11744 2018-03-26  Tom Tromey  <tom@tromey.com>
11745
11746         PR cli/17716:
11747         * python/py-framefilter.c (py_print_type, py_print_value)
11748         (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
11749         RETURN_MASK_ERROR.
11750
11751 2018-03-26  Tom Tromey  <tom@tromey.com>
11752
11753         * python/py-framefilter.c (enumerate_args): Use
11754         gdb::unique_xmalloc_ptr.
11755
11756 2018-03-26  Tom Tromey  <tom@tromey.com>
11757
11758         * python/py-framefilter.c (py_print_frame): Return
11759         EXT_LANG_BT_OK.
11760         (gdbpy_apply_frame_filter): Update comment.
11761         * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
11762         Remove.
11763         <EXT_LANG_BT_NO_FILTERS>: Change value.
11764
11765 2018-03-26  Tom Tromey  <tom@tromey.com>
11766
11767         PR backtrace/15582:
11768         * stack.c (backtrace_command): Parse "hide" argument.
11769         * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
11770         * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
11771         constant.
11772
11773 2018-03-26  Tom Tromey  <tom@tromey.com>
11774
11775         * stack.c (backtrace_command_1): Remove "show_locals" parameter,
11776         add "flags".
11777         (backtrace_command): Remove "fulltrace", add "flags".
11778
11779 2018-03-26  Tom Tromey  <tom@tromey.com>
11780
11781         * stack.c (backtrace_command): Rewrite command line parsing.
11782
11783 2018-03-26  Simon Marchi  <simon.marchi@ericsson.com>
11784
11785         * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
11786
11787 2018-03-26  Simon Marchi  <simon.marchi@ericsson.com>
11788
11789         * filename-seen-cache.h: Add include guard.
11790
11791 2018-03-26  Keith Seitz  <keiths@redhat.com>
11792
11793         * symfile.c (place_section): Remove "struct" from section_addr_info
11794         in comment.
11795         * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
11796         "struct" keyword from section_addr_info.
11797
11798 2018-03-26  Alan Hayward  <alan.hayward@arm.com>
11799
11800         * regformats/regdef.h (reg): Add constructors.
11801
11802 2018-03-25  Pedro Alves  <palves@redhat.com>
11803
11804         * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
11805         if then/else bodies in var_func_name extraction.
11806
11807 2018-03-23  Weimin Pan  <weimin.pan@oracle.com>
11808
11809         * minsyms.c (lookup_minimal_symbol_and_objfile): Use
11810         lookup_minimal_symbol() to find symbol entry.
11811         * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
11812
11813 2018-03-23  Keith Seitz  <keiths@redhat.com>
11814
11815         PR c++/22968
11816         * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
11817         nested type definitions for C++, too.
11818
11819 2018-03-23  Tom Tromey  <tom@tromey.com>
11820
11821         * machoread.c (struct oso_el): Add a constructor.  Don't define as
11822         a typedef.
11823         (macho_register_oso): Remove.
11824         (macho_symtab_read): Take a std::vector.
11825         (oso_el_compare_name): Now a std::sort comparator.
11826         (macho_symfile_read_all_oso): Take a std::vector.
11827         (macho_symfile_read): Use std::vector.  Remove cleanups.
11828
11829 2018-03-22  Tom Tromey  <tom@tromey.com>
11830
11831         * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
11832         (record_full_goto_bookmark): Use std::string.
11833
11834 2018-03-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
11835
11836         PR tdep/18295
11837         * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
11838         a single mask.
11839
11840 2018-03-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
11841
11842         * rs6000-tdep.c (store_insn_p): New function.
11843         (skip_prologue): New variable alloca_reg_offset. Set lr_reg
11844         and cr_reg to their unshifted values. Use store_insn_p to
11845         match LR saves using either R1 or fdata->alloca_reg. Use
11846         store_insn_p to match CR saves. Set alloca_reg_offset
11847         when alloca_reg and framep are set. Remove lr_reg shift
11848         when assigning to fdata->lr_register.
11849
11850 2018-03-22  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11851
11852         * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
11853         command line args instead of emitting a warning.
11854
11855 2018-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
11856
11857         * tracepoint.h (struct static_tracepoint_marker): Initialize
11858         fields, define default constructor, move constructor and move
11859         assignment, disable the rest.
11860         <str_id, extra>: Make std::string.
11861         (release_static_tracepoint_marker): Remove.
11862         (free_current_marker): Remove.
11863         * tracepoint.c (free_current_marker): Remove.
11864         (parse_static_tracepoint_marker_definition): Adjust to
11865         std::string, use new hex2str overload.
11866         (release_static_tracepoint_marker): Remove.
11867         (print_one_static_tracepoint_marker): Get marker by reference
11868         and adjust to std::string.
11869         (info_static_tracepoint_markers_command): Adjust to std::vector
11870         changes
11871         * target.h (static_tracepoint_marker_p): Remove typedef.
11872         (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
11873         (struct target_ops) <to_static_tracepoint_marker_at>: Return
11874         bool.
11875         <to_static_tracepoint_markers_by_strid>: Return std::vector.
11876         * target-debug.h
11877         (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
11878         (target_debug_print_std_vector_static_tracepoint_marker): New.
11879         (target_debug_print_struct_static_tracepoint_marker_p): Rename
11880         to...
11881         (target_debug_print_static_tracepoint_marker_p): ... this.
11882         * target-delegates.c: Re-generate.
11883         * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
11884         Make std::string.
11885         * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
11886         (decode_static_tracepoint_spec): Adjust to std::vector.
11887         (tracepoint_print_one_detail): Adjust to std::string.
11888         (strace_marker_decode_location): Adjust to std::string.
11889         (update_static_tracepoint): Adjust to std::string, remove call
11890         to release_static_tracepoint_marker.
11891         * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
11892         Adjust to std::vector.
11893         * remote.c (remote_static_tracepoint_marker_at): Return bool.
11894         (remote_static_tracepoint_markers_by_strid): Adjust to
11895         std::vector.
11896         * common/rsp-low.h (hex2str): New overload with explicit count
11897         of bytes.
11898         * common/rsp-low.c (hex2str): New overload with explicit count
11899         of bytes.
11900         * unittests/rsp-low-selftests.c (test_hex2str): New function.
11901         (_initialize_rsp_low_selftests): Add test_hex2str test.
11902         * unittests/tracepoint-selftests.c
11903         (test_parse_static_tracepoint_marker_definition): Adjust to
11904         std::string.
11905
11906 2018-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
11907
11908         * tracepoint.c (parse_static_tracepoint_marker_definition):
11909         Consider case where the definition is followed by more
11910         definitions.
11911         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11912         tracepoint-selftests.c.
11913         * unittests/tracepoint-selftests.c: New.
11914
11915 2018-03-21  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
11916
11917         * MAINTAINERS (Write After Approval): Add Pedro Franco de
11918         Carvalho.
11919
11920 2018-03-20  Stephen Roberts  <stephen.roberts@arm.com>
11921
11922         * symtab.c (find_pc_sect_line): fixed indentation.
11923
11924 2018-03-20  Stephen Roberts  <stephen.roberts@arm.com>
11925
11926         * symtab.c (find_pc_sect_line): now uses binary search.
11927
11928 2018-03-19  Tom Tromey  <tom@tromey.com>
11929
11930         * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
11931         "IDENT" production.
11932
11933 2018-03-19  Pedro Alves  <palves@redhat.com>
11934             Tom Tromey  <tom@tromey.com>
11935
11936         * unittests/observable-selftests.c: New file.
11937         * common/observable.h: New file.
11938         * observable.h: New file.
11939         * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
11940         arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
11941         breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
11942         corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
11943         extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
11944         infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
11945         linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
11946         mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
11947         ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
11948         python/py-breakpoint.c, python/py-finishbreakpoint.c,
11949         python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
11950         record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
11951         riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
11952         spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
11953         symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
11954         tui/tui-interp.c, valops.c: Update all users.
11955         * tui/tui-hooks.c (tui_bp_created_observer)
11956         (tui_bp_deleted_observer, tui_bp_modified_observer)
11957         (tui_inferior_exit_observer, tui_before_prompt_observer)
11958         (tui_normal_stop_observer, tui_register_changed_observer):
11959         Remove.
11960         (tui_observers_token): New global.
11961         (attach_or_detach, tui_attach_detach_observers): New functions.
11962         (tui_install_hooks, tui_remove_hooks): Use
11963         tui_attach_detach_observers.
11964         * record-btrace.c (record_btrace_thread_observer): Remove.
11965         (record_btrace_thread_observer_token): New global.
11966         * observer.sh: Remove.
11967         * observer.c: Rename to observable.c.
11968         * observable.c (namespace gdb_observers): Define new objects.
11969         (observer_debug): Move into gdb_observers namespace.
11970         (struct observer, struct observer_list, xalloc_observer_list_node)
11971         (xfree_observer_list_node, generic_observer_attach)
11972         (generic_observer_detach, generic_observer_notify): Remove.
11973         (_initialize_observer): Update.
11974         Don't include observer.inc.
11975         * Makefile.in (generated_files): Remove observer.h, observer.inc.
11976         (clean mostlyclean): Likewise.
11977         (observer.h, observer.inc): Remove targets.
11978         (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
11979         (COMMON_SFILES): Use observable.c, not observer.c.
11980         * .gitignore: Remove observer.h.
11981
11982 2018-03-18  Tom Tromey  <tom@tromey.com>
11983
11984         * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
11985         gdb::def_vector.
11986         (bfd_lookup_symbol_from_dyn_symtab): Likewise.
11987
11988 2018-03-17  Tom Tromey  <tom@tromey.com>
11989
11990         * auto-load.c (auto_load_objfile_script_1): Use std::string.
11991
11992 2018-03-17  Tom Tromey  <tom@tromey.com>
11993
11994         * target.c (class scoped_target_fd): New.
11995         (target_fileio_close_cleanup): Remove.
11996         (target_fileio_read_alloc_1): Use scoped_target_fd.
11997
11998 2018-03-16  Simon Marchi  <simon.marchi@polymtl.ca>
11999
12000         * silent-rules.mk: New.
12001         * Makefile.in: Include silent-rules.mk
12002         (srcdir, VPATH, top_srcdir): Move up.
12003         (COMPILE): Add ECHO_CXX.
12004         (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
12005         (init.c): Add ECHO_INIT_C.
12006         (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
12007         (version.c): Add ECHO_GEN.
12008         (printcmd.o): Add ECHO_CXX.
12009         (target-float.o): Add ECHO_CXX.
12010         (ada-exp.o): Add ECHO_CXX.
12011         (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
12012         (insight$(EXEEXT)): Add ECHO_CXXLD.
12013         * gnulib/configure.ac: Add AM_SILENT_RULES.
12014         * gnulib/aclocal.m4: Re-generate.
12015         * gnulib/configure: Re-generate.
12016         * gnulib/import/Makefile.in: Re-generate.
12017
12018 2018-03-16  Tom Tromey  <tom@tromey.com>
12019
12020         * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
12021         * utils.h (make_cleanup_free_section_addr_info): Don't declare.
12022         * utils.c (do_free_section_addr_info)
12023         (make_cleanup_free_section_addr_info): Remove.
12024         * symfile.h (struct other_sections): Add constructor.
12025         (struct section_addr_info): Remove.
12026         (section_addr_info): New typedef.
12027         (struct sym_fns) <sym_offsets>: Change type of parameter.
12028         (build_section_addr_info_from_objfile)
12029         (relative_addr_info_to_section_offsets, addr_info_make_relative)
12030         (default_symfile_offsets, symbol_file_add)
12031         (symbol_file_add_from_bfd)
12032         (build_section_addr_info_from_section_table): Update.
12033         (alloc_section_addr_info, free_section_addr_info): Don't declare.
12034         * symfile.c (alloc_section_addr_info): Remove.
12035         (build_section_addr_info_from_section_table): Change return type.
12036         Update.
12037         (build_section_addr_info_from_bfd)
12038         (build_section_addr_info_from_objfile): Likewise.
12039         (free_section_addr_info): Remove.
12040         (relative_addr_info_to_section_offsets): Change type of "addrs".
12041         (addrs_section_compar): Now a std::sort comparator.
12042         (addrs_section_sort): Change return type.
12043         (addr_info_make_relative): Change type of "addrs".  Update.
12044         (default_symfile_offsets, syms_from_objfile_1)
12045         (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
12046         (symbol_file_add_separate): Update.
12047         (symbol_file_add): Change type of "addrs".  Update.
12048         (add_symbol_file_command): Update.  Remove cleanups.
12049         * symfile-mem.c (symbol_file_add_from_memory): Update.  Remove
12050         cleanups.
12051         * symfile-debug.c (debug_sym_offsets): Change type of "info".
12052         * solib.c (solib_read_symbols): Update.
12053         * objfiles.c (objfile_relocate): Update.  Remove cleanups.
12054         * machoread.c (macho_symfile_offsets): Update.
12055         * jit.c (jit_bfd_try_read_symtab): Update.
12056
12057 2018-03-15  Simon Marchi  <simon.marchi@polymtl.ca>
12058
12059         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12060         unittests/utils-selftests.c.
12061         * unittests/utils-selftests.c: New file.
12062
12063 2018-03-14  Tom Tromey  <tom@tromey.com>
12064
12065         PR cli/14977:
12066         * printcmd.c (printf_c_string, printf_wide_c_string): Special case
12067         for NULL.
12068
12069 2018-03-14  Tom Tromey  <tom@tromey.com>
12070
12071         PR cli/19918:
12072         * printcmd.c (printf_pointer): Allow "-" in format.
12073
12074 2018-03-14  Tom Tromey  <tom@tromey.com>
12075
12076         * printcmd.c (_initialize_printcmd): Add usage to printf.
12077
12078 2018-03-14  Yao Qi  <qiyao@sourceware.org>
12079
12080         * MAINTAINERS: Update my email address.
12081
12082 2018-03-13  Tom Tromey  <tom@tromey.com>
12083
12084         * machoread.c (macho_check_dsym): Change filenamep to a
12085         std::string*.
12086         (macho_symfile_read): Update.
12087         * symfile.c (load_command): Use std::string.
12088
12089 2018-03-12  Andrew Burgess  <andrew.burgess@embecosm.com>
12090
12091         * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
12092         to error message string.
12093         (riscv_register_name): Use xsnprintf instead of sprintf.
12094         (riscv_insn::fetch_instruction): Use gdb_assert instead of
12095         internal_error.
12096         (riscv_print_arg_location): Use gdb_assert_not_reached instead of
12097         error.
12098         (riscv_push_dummy_call): Likewise.
12099
12100 2018-03-12  Tom Tromey  <tom@tromey.com>
12101
12102         * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
12103         Use gdb::byte_vector.
12104         * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
12105
12106 2018-03-12  Yao Qi  <yao.qi@linaro.org>
12107
12108         * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
12109         parameter type to readable_regcache.
12110         * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
12111         the declaration.
12112
12113 2018-03-11  Tom Tromey  <tom@tromey.com>
12114
12115         * dwarf2read.c (struct nextfield): Add initializers.
12116         (struct nextfnfield): Remove.
12117         (struct fnfieldlist): Add initializers.  Remove "length" and
12118         "head", use std::vector.
12119         (struct decl_field_list): Remove.
12120         (struct field_info): Add initializers.
12121         <fields, baseclasses>: Now std::vector.
12122         <nbaseclasses, nfnfields, typedef_field_list_count,
12123         nested_types_list_count>: Remove.
12124         (dwarf2_add_field, dwarf2_add_type_defn)
12125         (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
12126         (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
12127         (process_structure_scope): Update.
12128
12129 2018-03-11  Tom Tromey  <tom@tromey.com>
12130
12131         * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
12132         for use by std::sort.
12133         (build_type_psymtabs_1): Use std::vector.
12134
12135 2018-03-09  Eli Zaretskii  <eliz@gnu.org>
12136
12137         * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
12138         and LIBMPFR in the printed configuration.
12139
12140 2018-03-08  Tom Tromey  <tom@tromey.com>
12141
12142         * source.c (get_filename_and_charpos): Use scoped_fd.
12143         * nto-procfs.c (procfs_open_1): Use scoped_fd.
12144         (procfs_pidlist): Likewise.
12145         * procfs.c (proc_get_LDT_entry): Use scoped_fd.
12146         (iterate_over_mappings): Likewise.
12147
12148 2018-03-08  Tom Tromey  <tom@tromey.com>
12149
12150         * infcall.c (struct call_return_meta_info)
12151         <stack_temporaries_enabled>: Remove.
12152         (get_call_return_value, call_function_by_hand_dummy): Update.
12153         * thread.c (disable_thread_stack_temporaries): Remove.
12154         (enable_thread_stack_temporaries): Remove.
12155         (thread_stack_temporaries_enabled_p): Return bool.
12156         (push_thread_stack_temporary, value_in_thread_stack_temporaries)
12157         (get_last_thread_stack_temporary): Update.
12158         * eval.c (evaluate_subexp): Update.
12159         * gdbthread.h (class enable_thread_stack_temporaries): Now a
12160         class, not a function.
12161         (value_ptr, value_vec): Remove typedefs.
12162         (class thread_info) <stack_temporaries_enabled>: Now bool.
12163         <stack_temporaries>: Now a std::vector.
12164         (thread_stack_temporaries_enabled_p)
12165         (value_in_thread_stack_temporaries): Return bool.
12166
12167 2018-03-08  Simon Marchi  <simon.marchi@ericsson.com>
12168
12169         * remote.c (putpkt_binary): Fix omitted bytes reporting.
12170         (getpkt_or_notif_sane_1): Likewise.
12171
12172 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
12173
12174         * build-id.c (build_id_to_debug_bfd): Use std::string.
12175
12176 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
12177
12178         * build-id.c (find_separate_debug_file_by_buildid): Return
12179         std::string.
12180         * build-id.h (find_separate_debug_file_by_buildid): Return
12181         std::string.
12182         * coffread.c (coff_symfile_read): Adjust to std::string.
12183         * elfread.c (elf_symfile_read): Adjust to std::string.
12184         * symfile.c (separate_debug_file_exists): Change parameter to
12185         std::string.
12186         (find_separate_debug_file): Return std::string.
12187         (find_separate_debug_file_by_debuglink): Return std::string.
12188         * symfile.h (find_separate_debug_file_by_debuglink): Return
12189         std::string.
12190
12191 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
12192
12193         * common/xml-utils.c (xml_escape_text): Move code to...
12194         (xml_escape_text_append): ... this new function.
12195         * common/xml-utils.h (xml_escape_text_append): New declaration.
12196         * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
12197         New function.
12198         (_initialize_xml_utils): register test_xml_escape_text_append as
12199         a selftest.
12200
12201 2018-03-07  Alan Hayward  <alan.hayward@arm.com>
12202
12203         * defs.h: Remove MAX_REGISTER_SIZE.
12204         * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
12205         asserts.
12206         * python/py-unwind.c (pyuw_sniffer): Likewise.
12207
12208 2018-03-07  Tom Tromey  <tom@tromey.com>
12209
12210         * linux-tdep.c (linux_info_proc): Update.
12211         * target.h (struct target_ops) <to_fileio_readlink>: Return
12212         optional<string>.
12213         (target_fileio_readlink): Return optional<string>.
12214         * remote.c (remote_hostio_readlink): Return optional<string>.
12215         * inf-child.c (inf_child_fileio_readlink): Return
12216         optional<string>.
12217         * target.c (target_fileio_readlink): Return optional<string>.
12218
12219 2018-03-07  Andrew Burgess  <andrew.burgess@embecosm.com>
12220
12221         * regcache.c (cooked_read_test): Add riscv to the list of
12222         architectures that have a save_reggroup.
12223
12224 2018-03-07  Andreas Arnez  <arnez@linux.vnet.ibm.com>
12225
12226         * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
12227         value is not a dynamic class object.
12228
12229 2018-03-06  Tom Tromey  <tom@tromey.com>
12230
12231         * rust-exp.y: Formatting fixes.
12232
12233 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
12234
12235         * riscv-tdep.c (riscv_register_name): Remove target description
12236         support.
12237         (riscv_gdbarch_init): Remove target description check.
12238
12239 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
12240
12241         * riscv-tdep.c: Remove 'Contributed by ...' lines from header
12242         comment.
12243         * riscv-tdep.h: Likewise.
12244
12245 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
12246
12247         * riscv-tdep.c (riscv_pseudo_register_read): Delete.
12248         (riscv_pseudo_register_write): Delete.
12249         (riscv_gdbarch_init): Remove all use of pseudo registers.
12250
12251 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
12252
12253         * record-btrace.c (btrace_print_lines): Replace cleanup
12254         parameter with RAII equivalents.
12255         (btrace_insn_history): Replace cleanup with RAII equivalents.
12256         * ui-out.h (make_cleanup_ui_out_list_begin_end,
12257         make_cleanup_ui_out_tuple_begin_end): Remove.
12258         * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
12259         make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
12260         make_cleanup_ui_out_list_begin_end): Remove.
12261
12262 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
12263
12264         * record-btrace.c (record_btrace_maybe_mark_async_event): Change
12265         parameter types to std::vector.  Use bool.
12266         (record_btrace_wait): Replace VEC(tp_t) with
12267         std::vector<thread_info *>.
12268         * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
12269
12270 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
12271
12272         * record-btrace.c (record_btrace_disable_callback): Remove.
12273         (struct scoped_btrace_disable): New.
12274         (record_btrace_open): Use scoped_btrace_disable.
12275
12276 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
12277
12278         * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
12279         reading values from registers.
12280
12281 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
12282
12283         * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
12284         where appropriate.
12285
12286 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
12287
12288         * riscv-tdep.c (riscv_print_arg_location): Add header comment,
12289         change parameter type.  Use GDB's print functions, and use
12290         core_addr_to_string where appropriate.
12291         (riscv_push_dummy_call): Use core_addr_to_string where
12292         appropriate, update call to riscv_print_arg_location, and reindent
12293         a few lines.
12294         (riscv_return_value): Update call to riscv_print_arg_location.
12295
12296 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
12297             Tim Newsome <tim@sifive.com>
12298             Albert Ou <a0u@eecs.berkeley.edu>
12299             Darius Rad <darius@bluespec.com>
12300
12301         * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
12302         (HFILES_NO_SRCDIR): Add riscv-tdep.h.
12303         (ALLDEPFILES): Add riscv-tdep.c
12304         * configure.tgt: Add riscv support.
12305         * riscv-tdep.c: New file.
12306         * riscv-tdep.h: New file.
12307         * NEWS: Mention new target.
12308         * MAINTAINERS: Add entry for riscv.
12309
12310 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
12311
12312         * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
12313         fields within aggregates.
12314
12315 2018-03-04  Simon Marchi  <simon.marchi@polymtl.ca>
12316
12317         * record-btrace.c (btrace_print_lines): Change type of flags to
12318         gdb_disassembly_flags.
12319
12320 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
12321
12322         * fbsd-nat.c: Include "inf-ptrace.h".
12323         (USE_SIGTRAP_SIGINFO): Conditionally define.
12324         [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
12325         (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
12326         [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
12327         function.
12328         [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
12329         Likewise.
12330         [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
12331         Likewise.
12332         (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
12333         "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
12334         "supports_stopped_by_hw_breakpoint" target methods.
12335
12336 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
12337
12338         * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
12339         * fbsd-nat.c (debug_fbsd_nat): New variable.
12340         (show_fbsd_nat_debug): New function.
12341         (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
12342         (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
12343
12344 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
12345
12346         * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
12347         * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
12348         prototype.
12349         * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
12350         (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
12351         method.
12352
12353 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
12354
12355         * common/gdb_vecs.c (free_char_ptr_vec): Remove.
12356         * common/gdb_vecs.h (free_char_ptr_vec): Remove.
12357
12358 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
12359
12360         * charset.c (struct charset_vector): New.
12361         (charsets): Change type to charset_vector.
12362         (find_charset_names): Adjust.
12363         (add_one): Adjust.
12364         (_initialize_charset): Adjust.
12365
12366 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
12367
12368         * progspace.h (struct program_space) <deleted_solibs>: Change
12369         type to std::vector<std::string>.
12370         * progspace.c (clear_program_space_solib_cache): Adjust.
12371         * breakpoint.c (print_solib_event): Adjust.
12372         (check_status_catch_solib): Adjust.
12373         * solib.c (update_solib_list): Adjust.
12374         * ui-out.h (class ui_out) <field_string>: New overload.
12375         * ui-out.c (ui_out::field_string): New overload.
12376
12377 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
12378
12379         * progspace.h (struct program_space): Add constructor and
12380         destructor, initialize fields.
12381         (add_program_space): Remove.
12382         * progspace.c (add_program_space): Rename to...
12383         (program_space::program_space): ... this.
12384         (release_program_space): Rename to...
12385         (program_space::~program_space): ... this.
12386         (delete_program_space): Use delete to delete program_space.
12387         (initialize_progspace): Use new to allocate program_space.
12388         * inferior.c (add_inferior_with_spaces): Likewise.
12389         (clone_inferior_command): Likewise.
12390         * infrun.c (follow_fork_inferior): Likewise.
12391         (handle_vfork_child_exec_or_exit): Likewise.
12392
12393 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
12394
12395         * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
12396         (delim_string_to_char_ptr_vec): Return std::vector of
12397         gdb::unique_xmalloc_ptr.
12398         (dirnames_to_char_ptr_vec_append): Take std::vector of
12399         gdb::unique_xmalloc_ptr.
12400         (dirnames_to_char_ptr_vec): Return std::vector of
12401         gdb::unique_xmalloc_ptr.
12402         * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
12403         Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
12404         (delim_string_to_char_ptr_vec): Return an std::vector of
12405         gdb::unique_xmalloc_ptr, adjust the code.
12406         (dirnames_to_char_ptr_vec_append): Take an std::vector of
12407         gdb::unique_xmalloc_ptr, adjust the code.
12408         (dirnames_to_char_ptr_vec): Return an std::vector of
12409         gdb::unique_xmalloc_ptr, adjust the code.
12410         * auto-load.c (auto_load_safe_path_vec): Change type to
12411         std::vector of gdb::unique_xmalloc_ptr.
12412         (auto_load_expand_dir_vars): Return an std::vector of
12413         gdb::unique_xmalloc_ptr, adjust the code.
12414         (auto_load_safe_path_vec_update): Adjust.
12415         (filename_is_in_auto_load_safe_path_vec): Adjust.
12416         (auto_load_objfile_script_1): Adjust.
12417         * build-id.c (build_id_to_debug_bfd): Adjust.
12418         * linux-thread-db.c (thread_db_load_search): Adjust.
12419         * source.c (add_path): Adjust.
12420         (openp): Adjust.
12421         * symfile.c (find_separate_debug_file): Adjust.
12422         * utils.c (do_free_char_ptr_vec): Remove.
12423         (make_cleanup_free_char_ptr_vec): Remove.
12424
12425 2018-03-01  Sergio Durigan Junior  <sergiodj@redhat.com>
12426
12427         PR gdb/22907
12428         * common/pathstuff.c: Conditionally include "<windows.h>".
12429
12430 2018-03-01  Georg Sauthoff  <mail@georg.so>
12431
12432         PR gdb/22888
12433         * gcore.in: Quote variables and switch interpreter to bash.
12434
12435 2018-03-01  Tom Tromey  <tom@tromey.com>
12436
12437         * dwarf2read.c (alloc_discriminant_info): Fix default_index
12438         assertion.  Add assertion for discriminant_index.
12439         (quirk_rust_enum): Use correct base type name in univariant case.
12440
12441 2018-03-01  Simon Marchi  <simon.marchi@ericsson.com>
12442
12443         * record.c (get_call_history_modifiers): Return a
12444         record_print_flags.
12445         (cmd_record_call_history): Adjust.
12446         * record-btrace.c (record_btrace_call_history): Adjust.
12447         (record_btrace_call_history_range): Adjust.
12448         (record_btrace_call_history_from): Adjust.
12449         * target-debug.h (target_debug_print_record_print_flags): New.
12450         * target-delegates.c: Re-generate.
12451         * target.c (target_call_history): Change flags type.
12452         (target_call_history_from): Likewise.
12453         (target_call_history_range): Likewise.
12454         * target.h (struct target_ops) <target_call_history>: Likewise.
12455         (target_call_history_from): Likewise.
12456         (target_call_history_range): Likewise.
12457
12458 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
12459             Simon Marchi  <simon.marchi@polymtl.ca>
12460
12461         * common/common-utils.c: Include "sys/stat.h".
12462         (is_regular_file): Move here from "source.c"; change return
12463         type to "bool".
12464         * common/common-utils.h (is_regular_file): New prototype.
12465         * common/pathstuff.c (contains_dir_separator): New function.
12466         * common/pathstuff.h (contains_dir_separator): New prototype.
12467         * source.c: Don't include "sys/stat.h".
12468         (is_regular_file): Move to "common/common-utils.c".
12469
12470 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
12471
12472         * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
12473         (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
12474         * auto-load.c: Include "common/pathstuff.h".
12475         * common/common-def.h (current_directory): Move here.
12476         * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
12477         function.
12478         * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
12479         prototype.
12480         * common/pathstuff.c: New file.
12481         * common/pathstuff.h: New file.
12482         * compile/compile.c: Include "common/pathstuff.h".
12483         * defs.h (current_directory): Move to "common/common-defs.h".
12484         * dwarf2read.c: Include "common/pathstuff.h".
12485         * exec.c: Likewise.
12486         * guile/scm-safe-call.c: Likewise.
12487         * linux-thread-db.c: Likewise.
12488         * main.c: Likewise.
12489         * nto-tdep.c: Likewise.
12490         * objfiles.c: Likewise.
12491         * source.c: Likewise.
12492         * symtab.c: Likewise.
12493         * utils.c: Include "common/pathstuff.h".
12494         (gdb_realpath): Move to "common/pathstuff.c".
12495         (gdb_realpath_keepfile): Likewise.
12496         (gdb_abspath): Likewise.
12497         * utils.h (gdb_realpath): Move to "common/pathstuff.h".
12498         (gdb_realpath_keepfile): Likewise.
12499         (gdb_abspath): Likewise.
12500
12501 2018-02-28  John Baldwin  <jhb@FreeBSD.org>
12502
12503         * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
12504         wildcard process pid for super_resume for kernels with a
12505         specific bug.
12506
12507 2018-02-27  Phil Muldoon  <pmuldoon@redhat.com>
12508
12509         * compile/compile.c (get_args): Add additional comments
12510         explaining function.
12511
12512 2018-02-27  Simon Marchi  <simon.marchi@polymtl.ca>
12513             Tom Tromey  <tom@tromey.com>
12514
12515         * target.h (memory_write_request_s): Remove typedef.  Don't define
12516         VEC.
12517         (target_write_memory_blocks): Change argument to std::vector.
12518         (struct memory_write_request): Add constructor.
12519         * target-memory.c (compare_block_starting_address): Return bool.
12520         Change argument types.
12521         (claim_memory): Change arguments to use std::vector.
12522         (split_regular_and_flash_blocks, blocks_to_erase)
12523         (compute_garbled_blocks): Likewise.
12524         (cleanup_request_data, cleanup_write_requests_vector): Remove.
12525         (target_write_memory_blocks): Change argument to std::vector.
12526         * symfile.c (struct load_section_data): Add constructor and
12527         destructor.  Use std::vector for "requests".
12528         (struct load_progress_data): Add initializers.
12529         (load_section_callback): Update.  Use "new".
12530         (clear_memory_write_data): Remove.
12531         (generic_load): Update.
12532
12533 2018-02-27  Alan Hayward  <alan.hayward@arm.com>
12534
12535         * arch/aarch64.h: Use common/tdesc.h.
12536
12537 2018-02-26  Maciej W. Rozycki  <macro@mips.com>
12538
12539         * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
12540         architecture with a 64-bit ABI.
12541
12542 2018-02-26  Maciej W. Rozycki  <macro@mips.com>
12543
12544         * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
12545         ahead of target description loading.
12546
12547 2018-02-26  Tom Tromey  <tom@tromey.com>
12548
12549         * stack.c (backtrace_command_1): Update.
12550         * python/python-internal.h (gdbpy_apply_frame_filter): Change type
12551         of "flags".
12552         * python/py-framefilter.c (py_print_frame)
12553         (gdbpy_apply_frame_filter): Change type of "flags".
12554         * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
12555         of "flags".
12556         (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
12557         (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
12558         * extension.h (enum frame_filter_flag): Rename from
12559         frame_filter_flags.
12560         (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
12561         (apply_ext_lang_frame_filter): Change type of "flags".
12562         * extension.c (apply_ext_lang_frame_filter): Change type of
12563         "flags".
12564         * extension-priv.h (struct extension_language_ops)
12565         <apply_frame_filter>: Change type of "flags".
12566
12567 2018-02-26  Tom Tromey  <tom@tromey.com>
12568
12569         PR python/16497:
12570         * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag.  Fix
12571         off-by-one in py_end computation.
12572         * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
12573         PRINT_MORE_FRAMES.
12574         * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
12575         constant.
12576
12577 2018-02-26  Tom Tromey  <tom@tromey.com>
12578
12579         * dwarf2read.c (struct variant_field): New.
12580         (struct nextfield) <variant>: New field.
12581         (dwarf2_add_field): Handle DW_TAG_variant_part.
12582         (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
12583         discriminated union.
12584         (read_structure_type): Handle DW_TAG_variant_part.
12585         (handle_struct_member_die): New function, extracted from
12586         process_structure_scope.  Handle DW_TAG_variant.
12587         (process_structure_scope): Handle discriminated unions.  Call
12588         handle_struct_member_die.
12589
12590 2018-02-26  Tom Tromey  <tom@tromey.com>
12591
12592         * rust-lang.h (rust_last_path_segment): Declare.
12593         * rust-lang.c (rust_last_path_segment): Now public.  Change
12594         contract.
12595         (struct disr_info): Remove.
12596         (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
12597         (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
12598         (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
12599         (rust_enum_p, rust_enum_variant): New function.
12600         (rust_underscore_fields): Remove "offset" parameter.
12601         (rust_print_enum): New function.
12602         (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
12603         <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
12604         (rust_print_struct_def): Add "for_rust_enum" parameter.  Handle
12605         enums.
12606         (rust_internal_print_type): New function, from rust_print_type.
12607         Remove enum code.
12608         (rust_print_type): Call rust_internal_print_type.
12609         (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
12610         Update enum handling.
12611         * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
12612         (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
12613         (rust_union_quirks): New functions.
12614         (process_full_comp_unit, process_full_type_unit): Call
12615         rust_union_quirks.
12616         (process_structure_scope): Update rust_unions if necessary.
12617
12618 2018-02-26  Tom Tromey  <tom@tromey.com>
12619
12620         * value.h (value_union_variant): Declare.
12621         * valops.c (value_union_variant): New function.
12622         * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
12623         (struct discriminant_info): New.
12624         (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
12625         enumerator.
12626         (struct main_type) <flag_discriminated_union>: New field.
12627
12628 2018-02-26  Tom Tromey  <tom@tromey.com>
12629
12630         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12631         unittests/unpack-selftests.c.
12632         * unittests/unpack-selftests.c: New file.
12633         * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
12634
12635 2018-02-26  Yao Qi  <yao.qi@linaro.org>
12636
12637         * dwarf2read.c (struct partial_die_info) <read>: New method.
12638         (read_partial_die): Remove the declaration.
12639         (load_partial_dies): Update.
12640         (partial_die_info::partial_die_info):
12641         (read_partial_die): Change it to partial_die_info::read.
12642
12643 2018-02-26  Yao Qi  <yao.qi@linaro.org>
12644
12645         * dwarf2read.c (struct partial_die_info) <fixup>: New method.
12646         (fixup_partial_die): Remove declaration.
12647         (scan_partial_symbols): Update.
12648         (partial_die_parent_scope): Likewise.
12649         (partial_die_full_name): Likewise.
12650         (fixup_partial_die): Change it to partial_die_info::fixup.
12651
12652 2018-02-26  Yao Qi  <yao.qi@linaro.org>
12653
12654         * dwarf2read.c (read_partial_die): Update the declaration.
12655         (load_partial_dies): Caller update.
12656         (read_partial_die): Remove one argument abbrev_len.
12657
12658 2018-02-26  Yao Qi  <yao.qi@linaro.org>
12659
12660         * dwarf2read.c (struct partial_die_info): Add ctor, delete
12661         assignment operator.
12662         (load_partial_dies): Use ctor and copy ctor.
12663         (read_partial_die): Update.
12664         (dwarf2_cu::find_partial_die): Use ctor.
12665
12666 2018-02-26  Yao Qi  <yao.qi@linaro.org>
12667
12668         * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
12669         (find_partial_die_in_comp_unit): Change it to
12670         dwarf2_cu::find_partial_die.
12671         (find_partial_die): Update.
12672
12673 2018-02-26  Yao Qi  <yao.qi@linaro.org>
12674
12675         * dwarf2read.c (read_partial_die): Remove the code checking abbrev
12676         is NULL.
12677
12678 2018-02-26  Yao Qi  <yao.qi@linaro.org>
12679
12680         * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
12681
12682 2018-02-26  Alan Hayward  <alan.hayward@arm.com>
12683
12684         * arch/amd64.h: Use common/tdesc.h.
12685         * arch/i386.c: Likewise.
12686         * arch/i386.h: Likewise.
12687         * arch/tic6x.c: Likewise.
12688         * arch/tdesc.h: Move file from here...
12689         * common/tdesc.h: ...to here.
12690         * features/aarch64-core.c: Regenerate.
12691         * features/aarch64-fpu.c: Regenerate.
12692         * features/i386/32bit-avx.c: Regenerate.
12693         * features/i386/32bit-avx512.c: Regenerate.
12694         * features/i386/32bit-core.c: Regenerate.
12695         * features/i386/32bit-linux.c: Regenerate.
12696         * features/i386/32bit-mpx.c: Regenerate.
12697         * features/i386/32bit-pkeys.c: Regenerate.
12698         * features/i386/32bit-sse.c: Regenerate.
12699         * features/i386/64bit-avx.c: Regenerate.
12700         * features/i386/64bit-avx512.c: Regenerate.
12701         * features/i386/64bit-core.c: Regenerate.
12702         * features/i386/64bit-linux.c: Regenerate.
12703         * features/i386/64bit-mpx.c: Regenerate.
12704         * features/i386/64bit-pkeys.c: Regenerate.
12705         * features/i386/64bit-segments.c: Regenerate.
12706         * features/i386/64bit-sse.c: Regenerate.
12707         * features/i386/x32-core.c: Regenerate.
12708         * features/tic6x-c6xp.c: Regenerate.
12709         * features/tic6x-core.c: Regenerate.
12710         * features/tic6x-gp.c: Regenerate.
12711         * target-descriptions.c: Use common/tdesc.h.
12712         * target-descriptions.h: Likewise.
12713
12714 2018-02-24  Tom Tromey  <tom@tromey.com>
12715
12716         * linux-thread-db.c (try_thread_db_load_from_pdir_1)
12717         (try_thread_db_load_from_dir, thread_db_load_search): Use
12718         std::string.
12719         (info_auto_load_libthread_db_compare): Return bool.  Change
12720         argument types.
12721         (info_auto_load_libthread_db): Use std::vector, std::string.
12722         Remove cleanups.
12723
12724 2018-02-24  Tom Tromey  <tom@tromey.com>
12725
12726         * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
12727         std::string.
12728         * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
12729         std::string*.
12730         * gdbarch.c: Rebuild.
12731         * gdbarch.h: Rebuild.
12732         * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
12733         * arch-utils.h (default_fast_tracepoint_valid_at): Update.
12734         * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
12735         std::string*.
12736
12737 2018-02-23  Simon Marchi  <simon.marchi@polymtl.ca>
12738
12739         * gdbtypes.h (sect_offset): Change type to uint64_t.
12740         (sect_offset_str): New function.
12741         * dwarf2read.c (create_addrmap_from_aranges): Use
12742         sect_offset_str.
12743         (error_check_comp_unit_head): Likewise.
12744         (create_debug_type_hash_table): Likewise.
12745         (read_cutu_die_from_dwo): Likewise.
12746         (init_cutu_and_read_dies): Likewise.
12747         (init_cutu_and_read_dies_no_follow): Likewise.
12748         (process_psymtab_comp_unit_reader): Likewise.
12749         (partial_die_parent_scope): Likewise.
12750         (peek_die_abbrev): Likewise.
12751         (process_queue): Likewise.
12752         (dwarf2_physname): Likewise.
12753         (read_namespace_alias): Likewise.
12754         (read_import_statement): Likewise.
12755         (create_dwo_cu_reader): Likewise.
12756         (create_cus_hash_table): Likewise.
12757         (lookup_dwo_cutu): Likewise.
12758         (inherit_abstract_dies): Likewise.
12759         (read_func_scope): Likewise.
12760         (read_call_site_scope): Likewise.
12761         (dwarf2_add_member_fn): Likewise.
12762         (read_common_block): Likewise.
12763         (read_module_type): Likewise.
12764         (read_typedef): Likewise.
12765         (read_subrange_type): Likewise.
12766         (load_partial_dies): Likewise.
12767         (read_partial_die): Likewise.
12768         (find_partial_die): Likewise.
12769         (read_str_index): Likewise.
12770         (dwarf2_string_attr): Likewise.
12771         (build_error_marker_type): Likewise.
12772         (lookup_die_type): Likewise.
12773         (dump_die_shallow): Likewise.
12774         (follow_die_ref): Likewise.
12775         (dwarf2_fetch_die_loc_sect_off): Likewise.
12776         (dwarf2_fetch_constant_bytes): Likewise.
12777         (follow_die_sig): Likewise.
12778         (get_signatured_type): Likewise.
12779         (get_DW_AT_signature_type): Likewise.
12780         (dwarf2_find_containing_comp_unit): Likewise.
12781         (set_die_type): Likewise.
12782
12783 2018-02-21  John Baldwin  <jhb@FreeBSD.org>
12784
12785         * arch/aarch64.c: Include "common-defs.h".
12786         * arch/amd64.c: Likewise.
12787         * arch/i386.c: Likewise.
12788
12789 2018-02-21  Tom Tromey  <tom@tromey.com>
12790
12791         * value.h: (extract_field_op): Update.
12792         * eval.c (extract_field_op): Return a const char *.
12793         * expression.h (parse_expression_for_completion): Update.
12794         * completer.c (complete_expression): Update.
12795         (add_struct_fields): Make fieldname const.
12796         * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
12797         (mark_completion_tag, parse_exp_in_context_1): Update.
12798         (parse_expression_for_completion): Change "name" to
12799         unique_xmalloc_ptr*.
12800
12801 2018-02-21  Tom Tromey  <tom@tromey.com>
12802
12803         * infcall.c (call_function_by_hand_dummy): Use std::vector.
12804
12805 2018-02-21  Yao Qi  <yao.qi@linaro.org>
12806
12807         * avr-tdep.c (avr_read_pc): Change parameter type to
12808         readable_regcache.
12809         * gdbarch.sh (read_pc): Likewise.
12810         * gdbarch.c: Re-generated.
12811         * gdbarch.h: Re-generated.
12812         * hppa-tdep.c (hppa_read_pc): Change parameter type to
12813         readable_regcache.
12814         * ia64-tdep.c (ia64_read_pc): Likewise.
12815         * mips-tdep.c (mips_read_pc): Likewise.
12816         * spu-tdep.c (spu_read_pc): Likewise.
12817
12818 2018-02-21  Yao Qi  <yao.qi@linaro.org>
12819
12820         * Makefile.in (COMMON_SFILES): Add regcache-dump.c
12821         * regcache-dump.c: New file.
12822         * regcache.c: Move register_dump to regcache-dump.c.
12823         (maintenance_print_registers): Likewise.
12824         (maintenance_print_raw_registers): Likewise.
12825         (maintenance_print_cooked_registers): Likewise.
12826         (maintenance_print_register_groups): Likewise.
12827         (maintenance_print_remote_registers): Likewise.
12828         (_initialize_regcache): Likewise.
12829         * regcache.h (register_dump): Moved from regcache.c.
12830
12831 2018-02-21  Yao Qi  <yao.qi@linaro.org>
12832
12833         * regcache.c (regcache::regcache): Update.
12834         (regcache::invalidate): Move it to detached_regcache::invalidate.
12835         (get_thread_arch_aspace_regcache): Update.
12836         (regcache::raw_update): Update.
12837         (regcache::cooked_read): Remove some code.
12838         (regcache::cooked_read_value): Likewise.
12839         (regcache::raw_write): Remove assert on m_readonly_p.
12840         (regcache::raw_supply_integer): Move it to
12841         detached_regcache::raw_supply_integer.
12842         (regcache::raw_supply_zeroed): Likewise.
12843         * regcache.h (detached_regcache) <raw_supply_integer>: New
12844         declaration.
12845         <raw_supply_zeroed, invalidate>: Likewise.
12846         (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
12847         <invalidate>: Likewise.
12848         <m_readonly_p>: Removed.
12849
12850 2018-02-21  Yao Qi  <yao.qi@linaro.org>
12851
12852         * infcmd.c (get_return_value): Let stop_regs point to
12853         get_current_regcache.
12854         * regcache.c (regcache::regcache): Remove.
12855         (register_dump_reg_buffer): New class.
12856         (regcache_print): Adjust.
12857         * regcache.h (regcache): Remove constructors.
12858
12859 2018-02-21  Yao Qi  <yao.qi@linaro.org>
12860
12861         * regcache.c (class register_dump): New class.
12862         (register_dump_regcache, register_dump_none): New class.
12863         (register_dump_remote, register_dump_groups): New class.
12864         (regcache_print): Update.
12865         * regcache.h (regcache_dump_what): Move it to regcache.c.
12866         (regcache) <dump>: Remove.
12867
12868 2018-02-21  Yao Qi  <yao.qi@linaro.org>
12869
12870         * jit.c (struct jit_unwind_private) <regcache>: Change its type to
12871          reg_buffer_rw *.
12872         (jit_unwind_reg_set_impl): Call raw_supply.
12873         (jit_frame_sniffer): Use reg_buffer_rw.
12874         * record-full.c (record_full_core_regbuf): Change its type.
12875         (record_full_core_open_1): Use reg_buffer_rw.
12876         (record_full_close): Likewise.
12877         (record_full_core_fetch_registers): Use regcache->raw_supply.
12878         (record_full_core_store_registers): Likewise.
12879         * regcache.c (regcache::get_register_status): Move it to
12880         reg_buffer.
12881         (regcache_raw_set_cached_value): Remove.
12882         (regcache::raw_set_cached_value): Remove.
12883         (regcache::raw_write): Call raw_supply.
12884         (regcache::raw_supply): Move it to reg_buffer_rw.
12885         * regcache.h (regcache_raw_set_cached_value): Remove.
12886         (reg_buffer_rw): New class.
12887
12888 2018-02-21  Yao Qi  <yao.qi@linaro.org>
12889
12890         * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
12891         readonly_detached_regcache.
12892         (dummy_frame_prev_register): Use regcache->cooked_read.
12893         * frame.c (frame_save_as_regcache): Change return type.
12894         (frame_pop): Update.
12895         * frame.h (frame_save_as_regcache): Update declaration.
12896         * inferior.h (get_infcall_suspend_state_regcache): Update
12897         declaration.
12898         * infrun.c (infcall_suspend_state) <registers>: use
12899         readonly_detached_regcache.
12900         (save_infcall_suspend_state): Don't use regcache_dup.
12901         (get_infcall_suspend_state_regcache): Change return type.
12902         * linux-fork.c (struct fork_info) <savedregs>: Change to
12903         readonly_detached_regcache.
12904         <pc>: New field.
12905         (fork_save_infrun_state): Don't use regcache_dup.
12906         (info_checkpoints_command): Adjust.
12907         * mi/mi-main.c (register_changed_p): Update declaration.
12908         (mi_cmd_data_list_changed_registers): Use
12909         readonly_detached_regcache.
12910         (register_changed_p): Change parameter type to
12911         readonly_detached_regcache.
12912         * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
12913         readonly_detached_regcache.
12914         (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
12915         * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
12916         New.
12917         (regcache::save): Move it to reg_buffer.
12918         (regcache::restore): Change parameter type.
12919         (regcache_dup): Remove.
12920         * regcache.h (reg_buffer) <save>: New method.
12921         (readonly_detached_regcache): New class.
12922         * spu-tdep.c (spu2ppu_cache) <regcache>: Use
12923         readonly_detached_regcache.
12924         (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
12925
12926 2018-02-21  Yao Qi  <yao.qi@linaro.org>
12927
12928         * frame.c (frame_save_as_regcache): Use regcache method save.
12929         (frame_pop): Use regcache method restore.
12930         * infrun.c (restore_infcall_suspend_state): Likewise.
12931         * linux-fork.c (fork_load_infrun_state): Likewise.
12932         * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
12933         save.
12934         * regcache.c (regcache_save): Remove.
12935         (regcache::restore): More asserts.
12936         (regcache_cpy): Remove.
12937         * regcache.h (regcache_save): Remove the declaration.
12938         (regcache::restore): Move from private to public.
12939         Remove the friend declaration of regcache_cpy.
12940         (regcache_cpy): Remove declaration.
12941
12942 2018-02-21  Yao Qi  <yao.qi@linaro.org>
12943
12944         * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
12945         parameter type to 'readable_regcache *'.
12946         * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
12947         * arm-tdep.c (arm_neon_quad_read): Likewise.
12948         (arm_pseudo_read): Likewise.
12949         * avr-tdep.c (avr_pseudo_register_read): Likewise.
12950         * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
12951         * frv-tdep.c (frv_pseudo_register_read): Likewise.
12952         * gdbarch.c: Re-generated.
12953         * gdbarch.h: Re-generated.
12954         * gdbarch.sh (pseudo_register_read): Change parameter type to
12955         'readable_regcache *'.
12956         (pseudo_register_read_value): Likewise.
12957         * h8300-tdep.c (pseudo_from_raw_register): Likewise.
12958         (h8300_pseudo_register_read): Likewise.
12959         * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
12960         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
12961         (i386_pseudo_register_read_into_value): Likewise.
12962         (i386_pseudo_register_read_value): Likewise.
12963         * i386-tdep.h (i386_pseudo_register_read_into_value): Update
12964         declaration.
12965         * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
12966         * m32c-tdep.c (m32c_raw_read): Likewise.
12967         (m32c_read_flg): Likewise.
12968         (m32c_banked_register): Likewise.
12969         (m32c_banked_read): Likewise.
12970         (m32c_sb_read): Likewise.
12971         (m32c_part_read): Likewise.
12972         (m32c_cat_read): Likewise.
12973         (m32c_r3r2r1r0_read): Likewise.
12974         (m32c_pseudo_register_read): Likewise.
12975         * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
12976         * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
12977         (mep_pseudo_cr64_read): Likewise.
12978         (mep_pseudo_register_read): Likewise.
12979         * mips-tdep.c (mips_pseudo_register_read): Likewise.
12980         * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
12981         * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
12982         * regcache.c (regcache::raw_read): Move it to readable_regcache.
12983         (regcache::cooked_read): Likewise.
12984         (regcache::cooked_read_value): Likewise.
12985         (regcache_cooked_read_signed):
12986         (regcache::cooked_read): Likewise.
12987         * regcache.h (readable_regcache): New class.
12988         (regcache): Inherit readable_regcache.  Move some methods to
12989         readable_regcache.
12990         * rl78-tdep.c (rl78_pseudo_register_read): Change
12991         parameter type to 'readable_regcache *'.
12992         * rs6000-tdep.c (do_regcache_raw_read): Remove.
12993         (e500_pseudo_register_read): Change parameter type to
12994         'readable_regcache *'.
12995         (dfp_pseudo_register_read): Likewise.
12996         (vsx_pseudo_register_read): Likewise.
12997         (efpr_pseudo_register_read): Likewise.
12998         * s390-tdep.c (s390_pseudo_register_read): Likewise.
12999         * sh-tdep.c (sh_pseudo_register_read): Likewise.
13000         * sh64-tdep.c (pseudo_register_read_portions): Likewise.
13001         (sh64_pseudo_register_read): Likewise.
13002         * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
13003         * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
13004         * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
13005         (spu_pseudo_register_read): Likewise.
13006         * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
13007         (xtensa_pseudo_register_read): Likewise.
13008
13009 2018-02-21  Yao Qi  <yao.qi@linaro.org>
13010
13011         * regcache.c (regcache::regcache): Call reg_buffer ctor.
13012         (regcache::arch): Move it to reg_buffer::arch.
13013         (regcache::register_buffer): Likewise.
13014         (regcache::assert_regnum): Likewise.
13015         (regcache::num_raw_registers): Likewise.
13016         * regcache.h (reg_buffer): New class.
13017         (regcache): Inherit reg_buffer.
13018
13019 2018-02-20  Simon Marchi  <simon.marchi@ericsson.com>
13020
13021         * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
13022         gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
13023
13024 2018-02-20  Markus Metzger  <markus.t.metzger@intel.com>
13025
13026         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
13027
13028 2018-02-19  Alan Hayward  <alan.hayward@arm.com>
13029
13030         * Makefile.in: (COMMON_SFILES): Add common/*.c files.
13031         (SFILES): Remove common/*.c files.
13032         (COMMON_OBS): Remove some *.o files built from common/*.c files.
13033         * common/common.host: Add common reference.
13034         * configure.ac: Likewise.
13035         * configure: Regenerate.
13036
13037 2018-02-16  Yao Qi  <yao.qi@linaro.org>
13038
13039         * block.c (block_namespace_info): Inherit allocate_on_obstack.
13040         (block_initialize_namespace): Use new.
13041         * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
13042         (dwarf2_free_objfile): Use delete.
13043         * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
13044         (copy_type_recursive): Use new.
13045         * gdb_obstack.h (allocate_on_obstack): New.
13046
13047 2018-02-15  Yao Qi  <yao.qi@linaro.org>
13048
13049         PR gdb/22849
13050         * inferior.c (exit_inferior_1): Reset inf->control.
13051
13052 2018-02-15  Joel Brobecker  <brobecker@adacore.com>
13053
13054         * ada-lang.c (ada_to_fixed_value_create): Delete advance
13055         declaration.
13056
13057 2018-02-14  Pedro Alves  <palves@redhat.com>
13058
13059         * frame-unwind.c (frame_unwind_try_unwinder): Always call
13060         frame_cleanup_after_sniffer on exception.
13061
13062 2018-02-14  Tom Tromey  <tom@tromey.com>
13063
13064         * solist.h (struct target_so_ops) <bfd_open>: Make pathname
13065         const.
13066         (solib_bfd_open): Make pathname const.
13067         * solib.c (solib_bfd_open): Make pathname const.
13068         * solib-spu.c (spu_bfd_fopen): Make name const.
13069         (spu_bfd_open): Make pathname const.
13070         * solib-darwin.c (darwin_bfd_open): Make pathname const.
13071         * solib-aix.c (solib_aix_bfd_open): Make pathname const.
13072
13073 2018-02-14  Tom Tromey  <tom@tromey.com>
13074
13075         * symfile.c (symfile_bfd_open): Update.
13076         * source.h (openp, source_full_path_of, find_and_open_source):
13077         Change argument type to unique_xmalloc_ptr.
13078         * source.c (openp): Take a unique_xmalloc_ptr.
13079         (source_full_path_of, find_and_open_source): Likewise.
13080         (open_source_file, symtab_to_fullname): Update.
13081         * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
13082         unique_xmalloc_ptr.
13083         * solib.c (solib_find_1): Use unique_xmalloc_ptr.
13084         (exec_file_find): Update.
13085         * psymtab.c (psymtab_to_fullname): Update.
13086         * nto-tdep.h (nto_find_and_open_solib): Update.
13087         * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
13088         unique_xmalloc_ptr.
13089         * exec.c (exec_file_attach): Update.
13090         * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
13091         * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
13092
13093 2018-02-14  Tom Tromey  <tom@tromey.com>
13094
13095         * solib.c: Include source.h.
13096         * nto-tdep.c: Include source.h.
13097         * mi/mi-cmd-env.c: Include source.h.
13098         * infcmd.c: Include source.h.
13099         * exec.c: Include source.h.
13100         * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
13101         (add_path, directory_switch, source_path, init_source_path): Move
13102         declarations...
13103         * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
13104         (add_path, directory_switch, source_path, init_source_path):
13105         ...here.
13106
13107 2018-02-14  Tom Tromey  <tom@tromey.com>
13108
13109         * solist.h (exec_file_find, solib_find): Return
13110         unique_xmalloc_ptr.
13111         (solib_bfd_fopen): Take a const char *.
13112         * solib.c (solib_find_1): Return unique_xmalloc_ptr.
13113         (exec_file_find, solib_find): Likewise.
13114         (solib_bfd_fopen): Do not take ownership of "pathname".
13115         (solib_bfd_open): Use unique_xmalloc_ptr.
13116         * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
13117         * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
13118         * infrun.c (follow_exec): Use unique_xmalloc_ptr.
13119         * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
13120
13121 2018-02-14  Joel Brobecker  <brobecker@adacore.com>
13122
13123         * ada-lang.c (name_match_type_from_name): Remove reference to
13124         ada_name_for_lookup in function's documentation.
13125         * ada-lang.h (ada_name_for_lookup): Delete declaration.
13126
13127 2018-02-13  Simon Marchi  <simon.marchi@polymtl.ca>
13128
13129         * defs.h (enum openp_flags): New enum.
13130         (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
13131         Move to enum openp_flags.
13132         (openp_flags): New enum flags.
13133         (openp): Change parameter type to openp_flags.
13134         * source.c (openp): Change parameter type to openp_flags.
13135         * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
13136         * dwarf2read.c (try_open_dwop_file): Use openp_flags.
13137
13138 2018-02-13  Simon Marchi  <simon.marchi@polymtl.ca>
13139
13140         * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
13141         per-command.
13142
13143 2018-02-12  Andrew Burgess  <andrew.burgess@embecosm.com>
13144
13145         * dwarf2read.c (dwarf2_release_queue): Delete function, move body
13146         into...
13147         (class dwarf2_queue_guard): ...the destructor of this new class.
13148         (dw2_do_instantiate_symtab): Create instance of the new class
13149         dwarf2_queue_guard, remove cleanup.
13150
13151 2018-02-09  Tom Tromey  <tom@tromey.com>
13152
13153         * source.c (find_source_lines): Don't reference past the end of
13154         the vector.
13155
13156 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
13157
13158         * remote.c (remote_btrace_maybe_reopen): Change error message.
13159         * btrace.c (btrace_enable): Likewise.
13160         (parse_xml_btrace): Likewise.
13161         (parse_xml_btrace_conf): Likewise.
13162
13163 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
13164
13165         * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
13166         (linux_enable_pt, linux_enable_bts): Call
13167         diagnose_perf_event_open_fail.
13168
13169 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
13170
13171         * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
13172         Remove parameter and change return type.  Update callers.  Move it.
13173         (linux_enable_bts, linux_enable_pt): Improve error message.
13174         (linux_enable_pt): Remove zero buffer size check.
13175         (linux_enable_btrace): Improve error messages.  Remove NULL return
13176         check.
13177
13178 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
13179
13180         * btrace.c (btrace_enable): Remove target_supports_btrace call.
13181         * nat/linux-btrace.c (perf_event_pt_event_type): Move.
13182         (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
13183         (linux_supports_pt, linux_supports_btrace): Remove.
13184         (linux_enable_bts): Call cpu_supports_bts.
13185         * nat/linux-btrace.h (linux_supports_btrace): Remove.
13186         * remote.c (remote_supports_btrace): Remove.
13187         (init_remote_ops): Remove remote_supports_btrace.
13188         * target-delegates.c: Regenerated.
13189         * target.c (target_supports_btrace): Remove.
13190         * target.h (target_ops) <to_supports_btrace>: Remove
13191         (target_supports_btrace): Remove.
13192         * x86-linux-nat.c (x86_linux_create_target): Remove
13193         linux_supports_btrace.
13194
13195 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
13196
13197         * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
13198         btrace failed.
13199         * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
13200         exception and use message in own exception.
13201
13202 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
13203
13204         * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
13205         (perf_event_pt_event_type): Use gdb_file_up.
13206         (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
13207         scoped_fd, and scoped_mmap.
13208
13209 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
13210
13211         * common/scoped_mmap.h: New.
13212         * unittests/scoped_mmap-selftest.c: New.
13213         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
13214         unittests/scoped_mmap-selftest.c.
13215
13216 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
13217
13218         * common/scoped_fd.h: New.
13219         * unittests/scoped_fd-selftest.c: New.
13220         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
13221         unittests/scoped_fd-selftest.c.
13222
13223 2018-02-09  Tom Tromey  <tom@tromey.com>
13224
13225         * auto-load.c (auto_load_section_scripts): Use
13226         gdb::unique_xmalloc_ptr.
13227
13228 2018-02-09  Tom Tromey  <tom@tromey.com>
13229
13230         * auto-load.c (execute_script_contents): Use std::string.
13231
13232 2018-02-09  Joel Brobecker  <brobecker@adacore.com>
13233
13234         * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
13235         Python function, rather than a new command.
13236
13237 2018-02-08  Tom Tromey  <tom@tromey.com>
13238
13239         * solib.c (solib_find_1): Use std::string.
13240         (solib_bfd_fopen): Use unique_xmalloc_ptr.
13241
13242 2018-02-08  Tom Tromey  <tom@tromey.com>
13243
13244         * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
13245
13246 2018-02-08  Tom Tromey  <tom@tromey.com>
13247
13248         * source.c (find_source_lines): Use gdb::def_vector.
13249
13250 2018-02-08  Tom Tromey  <tom@tromey.com>
13251
13252         * macrocmd.c (struct temporary_macro_definition): New.
13253         (macro_define_command): Use temporary_macro_definition.  Remove
13254         cleanups.
13255         (free_macro_definition_ptr): Remove.
13256
13257 2018-02-08  Tom Tromey  <tom@tromey.com>
13258
13259         * macroexp.c (maybe_expand): Use std::string.
13260
13261 2018-02-08  Tom Tromey  <tom@tromey.com>
13262
13263         * macroexp.c (struct macro_buffer): Add initializers for some
13264         members.
13265         (init_buffer, init_shared_buffer, free_buffer)
13266         (free_buffer_return_text): Remove.
13267         (macro_buffer): New constructors.
13268         (~macro_buffer): New destructor.
13269         (macro_buffer::set_shared): New method.
13270         (macro_buffer::resize_buffer, macro_buffer::appendc)
13271         (macro_buffer::appendmem): Now methods, not free functions.
13272         (set_token, append_tokens_without_splicing, stringify)
13273         (macro_stringify): Update.
13274         (gather_arguments): Change return type.  Remove argc_p argument,
13275         add args_ptr argument.  Use std::vector.
13276         (substitute_args): Remove argc argument.  Accept std::vector.
13277         (expand): Update.  Use std::vector.
13278         (scan, macro_expand, macro_expand_next): Update.
13279
13280 2018-02-08  Tom Tromey  <tom@tromey.com>
13281
13282         * symtab.c (default_collect_symbol_completion_matches_break_on):
13283         Use unique_xmalloc_ptr.
13284         * macroscope.h: (sal_macro_scope, user_macro_scope)
13285         (default_macro_scope): Return unique_xmalloc_ptr.
13286         * macroscope.c (sal_macro_scope, user_macro_scope)
13287         (default_macro_scope): Return unique_xmalloc_ptr.
13288         * macroexp.h (macro_expand, macro_expand_once): Return
13289         unique_xmalloc_ptr.
13290         * macroexp.c (macro_expand, macro_expand_once): Return
13291         unique_xmalloc_ptr.
13292         * macrocmd.c (macro_expand_command, macro_expand_once_command)
13293         (info_macro_command, info_macros_command): Use
13294         unique_xmalloc_ptr.
13295         * compile/compile-c-support.c (write_macro_definitions): Use
13296         unique_xmalloc_ptr.
13297         * c-exp.y (c_parse): Use unique_xmalloc_ptr.
13298
13299 2018-02-07  Simon Marchi  <simon.marchi@ericsson.com>
13300
13301         * value.c (value_static_field): Assign field type instead of
13302         containing type when returning an optimized out value.
13303
13304 2018-02-06  Yao Qi  <yao.qi@linaro.org>
13305
13306         * ft32-tdep.c (ft32_read_pc): Remove.
13307         (ft32_write_pc): Remove.
13308         (ft32_gdbarch_init): Update.
13309         * m32r-tdep.c (m32r_read_pc): Remove.
13310         (m32r_gdbarch_init): Update.
13311         * mep-tdep.c (mep_read_pc): Remove.
13312         (mep_gdbarch_init): Update.
13313         * microblaze-tdep.c (microblaze_write_pc): Remove.
13314         (microblaze_gdbarch_init): Update.
13315         * mn10300-tdep.c (mn10300_read_pc): Remove.
13316         (mn10300_write_pc): Remove.
13317         (mn10300_gdbarch_init): Update.
13318         * moxie-tdep.c (moxie_read_pc): Remove.
13319         (moxie_write_pc): Remove.
13320         (moxie_gdbarch_init): Update.
13321
13322 2018-02-06  Yao Qi  <yao.qi@linaro.org>
13323
13324         * expprint.c (print_subexp_standard): Handle
13325         OP_F77_UNDETERMINED_ARGLIST.
13326         (dump_subexp_body_standard): Likewise.
13327
13328 2018-02-05  Alan Hayward  <alan.hayward@arm.com>
13329
13330         * target-descriptions.c (tdesc_element_visitor) Add empty
13331         implementations.
13332         (tdesc_type): Move make_gdb_type from here.
13333         (tdesc_type_builtin): Likewise.
13334         (tdesc_type_vector): Likewise.
13335         (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
13336         (make_gdb_type_struct): Move from tdesc_type_with_fields.
13337         (make_gdb_type_union): Likewise.
13338         (make_gdb_type_flags): Likewise.
13339         (make_gdb_type_enum): Likewise.
13340         (make_gdb_type): New function.
13341         (tdesc_register_type): Use static make_gdb_type.
13342
13343 2018-02-05  Ruslan Kabatsayev <b7.10110111@gmail.com>
13344
13345         * infcmd.c (default_print_one_register_info): Align natural-format
13346         column values consistently one under another.
13347         (pad_to_column): New function.
13348
13349 2018-02-05  Joel Brobecker  <brobecker@adacore.com>
13350
13351         * dwarf2read.c (dwarf2_physname): Move commment.
13352
13353 2018-02-01  Leszek Swirski  <leszeks@google.com>
13354
13355         * varobj.c (varobj_formatted_print_options): Allow recursive
13356         pretty printing if pretty printing is enabled.
13357
13358 2018-02-01  Leszek Swirski  <leszeks@google.com>
13359
13360         * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
13361         names after a structop as a filename.
13362
13363 2018-02-01  Yao Qi  <yao.qi@linaro.org>
13364
13365         * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
13366         (arm_record_coproc_data_proc): Likewise.
13367
13368 2018-02-01  Yao Qi  <yao.qi@linaro.org>
13369
13370         * arm-tdep.c (arm_record_extension_space): Change ret to signed.
13371
13372 2018-01-31  Nikola Prica  <nikola.prica@rt-rk.com>
13373
13374         * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
13375         assign shifted lr_reg to fdata->lr_register when lr_reg is set.
13376
13377 2018-01-31  Pedro Alves  <palves@redhat.com>
13378
13379         * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
13380         * inflow.c (child_terminal_save_inferior): Wrap reference to
13381         tcgetpgrp in HAVE_TERMIOS_H.
13382         (child_interrupt, child_pass_ctrlc): Wrap references to signal in
13383         _WIN32.
13384         * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
13385         always iterate over all inferiors.
13386         (gdbsim_cntrl_c): Adjust.
13387         * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
13388
13389 2018-01-31  Joel Brobecker  <brobecker@adacore.com>
13390
13391         * gdbtypes.c (lookup_array_range_type): Make sure the array's
13392         index type is objfile-owned if the element type is as well.
13393
13394 2018-01-31  Joel Brobecker  <brobecker@adacore.com>
13395
13396         GDB 8.1 released.
13397
13398 2018-01-30  Philipp Rudo  <prudo@linux.vnet.ibm.com>
13399
13400         * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
13401         "features/s390x-linux64.c".
13402         (_initialize_s390_linux_tdep): Remove initialization of tdescs
13403         s390_linux32 and s390x_linux64.
13404         (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
13405         default tdesc.
13406         * s390-tdep.c: Include "features/s390-linux32.c" and
13407         "features/s390x-linux64.c".
13408         (s390_tdesc_valid): Add check for tdesc_has_registers.
13409         (s390_gdbarch_init): Make sure there is always a valid tdesc.
13410         (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
13411         tdesc_s390x_linux64.
13412         * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
13413         tdesc_s390x_linux64 to...
13414         * s390-tdep.h: ...here.
13415
13416 2018-01-30  Pedro Alves  <palves@redhat.com>
13417
13418         PR gdb/13211
13419         * config.in, configure: Regenerate.
13420         * configure.ac: Check for getpgid.
13421         * go32-nat.c (go32_pass_ctrlc): New.
13422         (go32_target): Install it.
13423         * inf-child.c (inf_child_target): Install
13424         child_terminal_save_inferior, child_pass_ctrlc and
13425         child_interrupt.
13426         * inf-ptrace.c (inf_ptrace_interrupt): Delete.
13427         (inf_ptrace_target): No longer install it.
13428         * infcmd.c (interrupt_target_1): Adjust.
13429         * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
13430         (child_interrupt): Declare.
13431         (inferior::terminal_state): New.
13432         * inflow.c (struct terminal_info): Update comments.
13433         (inferior_process_group): Delete.
13434         (terminal_is_ours): Delete.
13435         (gdb_tty_state): New.
13436         (child_terminal_init): Adjust.
13437         (is_gdb_terminal, sharing_input_terminal_1)
13438         (sharing_input_terminal): New functions.
13439         (child_terminal_inferior): Adjust.  Use sharing_input_terminal.
13440         Set the process's actual process group in the foreground if
13441         possible.  Handle is_ours_for_output/is_ours distinction.  Don't
13442         mark terminal as the inferior's if not sharing GDB's terminal.
13443         Don't check attach_flag.
13444         (child_terminal_ours_for_output, child_terminal_ours): Adjust to
13445         pass down a target_terminal_state.
13446         (child_terminal_save_inferior): New, factored out from ...
13447         (child_terminal_ours_1): ... this.  Handle
13448         target_terminal_state::is_ours_for_output.
13449         (child_interrupt, child_pass_ctrlc): New.
13450         (inflow_inferior_exit): Clear the inferior's terminal_state.
13451         (copy_terminal_info): Copy the inferior's terminal state.
13452         (_initialize_inflow): Remove reference to terminal_is_ours.
13453         * inflow.h (inferior_process_group): Delete.
13454         * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
13455         * procfs.c (procfs_target): Don't install procfs_interrupt.
13456         (procfs_interrupt): Delete.
13457         * remote.c (remote_serial_quit_handler): Adjust.
13458         (remote_interrupt): Remove ptid parameter.  Adjust.
13459         * target-delegates.c: Regenerate.
13460         * target.c: Include "terminal.h".
13461         (target_terminal::terminal_state): Rename to ...
13462         (target_terminal::m_terminal_state): ... this.
13463         (target_terminal::init): Adjust.
13464         (target_terminal::inferior): Adjust to per-inferior
13465         terminal_state.
13466         (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
13467         (target_terminal::ours, target_terminal::ours_for_output): Use
13468         target_terminal_is_ours_kind.
13469         (target_interrupt): Remove ptid parameter.  Adjust.
13470         (default_target_pass_ctrlc): Adjust.
13471         * target.h (target_ops::to_terminal_save_inferior): New field.
13472         (target_ops::to_interrupt): Remove ptid_t parameter.
13473         (target_interrupt): Remove ptid_t parameter.  Update comment.
13474         (target_pass_ctrlc): Update comment.
13475         * target/target.h (target_terminal_state): New scoped enum,
13476         factored out of ...
13477         (target_terminal::terminal_state): ... here.
13478         (target_terminal::inferior): Update comments.
13479         (target_terminal::restore_inferior): New.
13480         (target_terminal::is_inferior, target_terminal::is_ours)
13481         (target_terminal::is_ours_for_output): Adjust.
13482         (target_terminal::scoped_restore_terminal_state): Adjust to
13483         rename, and call restore_inferior() instead of inferior().
13484         (target_terminal::scoped_restore_terminal_state::m_state): Change
13485         type.
13486         (target_terminal::terminal_state): Rename to ...
13487         (target_terminal::m_terminal_state): ... this and change type.
13488
13489 2018-01-30  Pedro Alves  <palves@redhat.com>
13490
13491         * linux-nat.c (wait_for_signal): New function.
13492         (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
13493         directly.
13494         (async_terminal_is_ours)
13495         (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
13496         (linux_nat_add_target): Don't override
13497         to_terminal_inferior/to_terminal_ours.
13498
13499 2018-01-29  Sergio Durigan Junior  <sergiodj@redhat.com>
13500
13501         * remote.c (remote_follow_fork): Don't call "detach_inferior".
13502
13503 2018-01-28  Simon Marchi  <simon.marchi@ericsson.com>
13504
13505         * dwarf2read.c (free_dwo_files): Add forward-declaration.
13506         (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
13507         dwarf2_per_objfile_free here.
13508         (dwarf2_per_objfile_free): Remove.
13509         (_initialize_dwarf2_read): Don't register
13510         dwarf2_per_objfile_free as a registry cleanup.
13511
13512 2018-01-27  Eli Zaretskii  <eliz@gnu.org>
13513
13514         Avoid compilation errors in MinGW native builds
13515
13516         The error is triggered by including python-internal.h, and the
13517         error message is:
13518
13519              In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
13520                       from build-gnulib/import/math.h:27,
13521                       from d:/usr/Python26/include/pyport.h:235,
13522                       from d:/usr/Python26/include/Python.h:58,
13523                       from python/python-internal.h:94,
13524                       from python/py-arch.c:24:
13525              d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
13526         using ::hypot;
13527                 ^~~~~
13528
13529         This happens because Python headers define 'hypot' to expand t
13530         '_hypot' in the Windows builds.
13531         * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
13532         'hypoth'.  This avoids a compilation error.
13533
13534 2018-01-26  Alan Hayward  <alan.hayward@arm.com>
13535
13536         * MAINTAINERS (Write After Approval): Fix ordering.
13537
13538 2018-01-26  Alan Hayward  <alan.hayward@arm.com>
13539
13540         * MAINTAINERS (Write After Approval): Add Alan Hayward.
13541
13542 2018-01-26  Alan Modra  <amodra@gmail.com>
13543
13544         * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
13545         (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
13546         Remove nop.  Make const.  Comment.
13547         (powerpc32_plt_stub_so_2): New.
13548         (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
13549         Correct count.  Update uses.
13550         (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
13551         Move common code reading PLT entry word.  Correct
13552         powerpc32_plt_stub PLT address calculation.
13553         * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
13554         (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
13555         (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
13556         (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
13557         (ppc64_standard_linkage8): Likewise.
13558         * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
13559         Correct insns description.
13560         * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
13561
13562 2018-01-24  Pedro Alves  <palves@redhat.com>
13563
13564         GCC PR libstdc++/83906
13565         * gdbtypes.c (operator==(const dynamic_prop &,
13566         const dynamic_prop &)): New.
13567         (operator==(const range_bounds &, const range_bounds &)): New.
13568         (check_types_equal): Use them instead of memcmp.
13569         * gdbtypes.h (operator==(const dynamic_prop &,
13570         const dynamic_prop &)): Declare.
13571         (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
13572         (operator==(const range_bounds &, const range_bounds &)): Declare.
13573         (operator!=(const range_bounds &, const range_bounds &)): Declare.
13574
13575 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
13576
13577         * s390-linux-tdep.c (s390_record_address_mask)
13578         (s390_record_calc_disp_common, s390_record_calc_disp)
13579         (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
13580         (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
13581         (s390_process_record): Move to s390-tdep.c.
13582         (s390_linux_init_abi_any): Adjust.
13583         * s390-tdep.c (s390_record_address_mask)
13584         (s390_record_calc_disp_common, s390_record_calc_disp)
13585         (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
13586         (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
13587         (s390_process_record): Moved from s390-linux-tdep.c
13588         (s390_gdbarch_init): Adjust.
13589
13590 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
13591
13592         * s390-linux-nat.c (s390-tdep.h): New include.
13593         * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
13594         (HFILES_NO_SRCDIR): Add s390-tdep.h.
13595         (ALLDEPFILES): Add s390-tdep.c.
13596         * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
13597         * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
13598         * s390-tdep.h: ...this.  New file.
13599         * s390-linux-tdep.c (s390-tdep.h): New include.
13600         (_initialize_s390_tdep): Rename to...
13601         (_initialize_s390_linux_tdep): ...this and adjust.
13602         (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
13603         (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
13604         s390-tdep.h.
13605         (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
13606         (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
13607         (s390_is_partial_instruction, s390_software_single_step)
13608         (is_non_branch_ril, s390_displaced_step_copy_insn)
13609         (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
13610         (s390_prologue_data, s390_addr, s390_store, s390_load)
13611         (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
13612         (s390_register_call_saved, s390_guess_tracepoint_registers)
13613         (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
13614         (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
13615         (s390_pseudo_register_name, s390_pseudo_register_type)
13616         (s390_pseudo_register_read, s390_pseudo_register_write)
13617         (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
13618         (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
13619         (s390_addr_bits_remove, s390_address_class_type_flags)
13620         (s390_address_class_type_flags_to_name)
13621         (s390_address_class_name_to_type_flags, s390_effective_inner_type)
13622         (s390_function_arg_float, s390_function_arg_vector)
13623         (is_power_of_two, s390_function_arg_integer, s390_arg_state)
13624         (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
13625         (s390_frame_align, s390_register_return_value, s390_return_value)
13626         (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
13627         (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
13628         (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
13629         (s390_trad_frame_prev_register, s390_unwind_cache)
13630         (s390_prologue_frame_unwind_cache)
13631         (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
13632         (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
13633         (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
13634         (s390_stub_frame_this_id, s390_stub_frame_prev_register)
13635         (s390_stub_frame_sniffer, s390_stub_frame_unwind)
13636         (s390_frame_base_address, s390_local_base_address)
13637         (s390_frame_base, s390_gcc_target_options)
13638         (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
13639         (s390_validate_reg_range, s390_tdesc_valid)
13640         (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
13641         * s390-tdep.c: ...this.  New file.
13642
13643 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
13644
13645         * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
13646         (s390_process_record, s390_gdbarch_tdep_alloc)
13647         (s390_linux_init_abi_any): Use/set new hook.
13648
13649 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
13650
13651         * s390-linux-tdep.c (osabi.h): New include.
13652         (s390_linux_init_abi_31, s390_linux_init_abi_64)
13653         (s390_linux_init_abi_any): New functions.
13654         (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
13655
13656 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
13657
13658         * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
13659         tdesc_has_registers check
13660
13661 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
13662
13663         * s390-linux-tdep.c (s390_tdesc_valid): New function.
13664         (s390_validate_reg_range): New macro.
13665         (s390_gdbarch_init): Adjust.
13666
13667 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
13668
13669         * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
13670         (s390_gdbarch_tdep_alloc): Adjust.
13671         (s390_gdbarch_init): Adjust.
13672
13673 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
13674
13675         * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
13676         <have_tdb>: Change type to bool.
13677         (s390_gdbarch_tdep_alloc): Adjust.
13678         (s390_gdbarch_init): Adjust.
13679
13680 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
13681
13682         * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
13683         (gdbarch_tdep) <have_upper, have_vx>: New fields.
13684         (s390_gdbarch_tdep_alloc): New function.
13685         (s390_gdbarch_init): Allocate tdep at start and use its fields
13686         instead of separate variables.
13687
13688 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
13689
13690         * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
13691         when looking for cached gdbarch and add comment for remaining.
13692
13693 2018-01-22  Pedro Alves  <palves@redhat.com>
13694             Sergio Durigan Junior  <sergiodj@redhat.com>
13695
13696         * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
13697         case.
13698
13699 2018-01-22  Maciej W. Rozycki  <macro@mips.com>
13700
13701         * MAINTAINERS: Update my company e-mail address.
13702
13703 2018-01-22  Yao Qi  <yao.qi@linaro.org>
13704
13705         * regcache.c (cooked_write_test): New function.
13706         (_initialize_regcache): Register the test.
13707
13708 2018-01-22  Yao Qi  <yao.qi@linaro.org>
13709
13710         * ia64-tdep.c (ia64_pseudo_register_read): Call
13711         regcache->cooked_read instead of regcache_cooked_read_unsigned.
13712         * m32c-tdep.c (m32c_cat_read): Likewise.
13713         (m32c_r3r2r1r0_read): Likewise.
13714         * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
13715         * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
13716
13717 2018-01-22  Yao Qi  <yao.qi@linaro.org>
13718
13719         * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
13720         method raw_read instead of regcache_raw_read.
13721         * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
13722         * arm-tdep.c (arm_neon_quad_read): Likewise.
13723         * avr-tdep.c (avr_pseudo_register_read): Likewise.
13724         * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
13725         * frv-tdep.c (frv_pseudo_register_read): Likewise.
13726         * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
13727         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
13728         (i386_pseudo_register_read_into_value): Likewise.
13729         * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
13730         * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
13731         * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
13732         * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
13733         * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
13734         * sparc-tdep.c (sparc32_pseudo_register_read):  Likewise.
13735         * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
13736         * spu-tdep.c (spu_pseudo_register_read_spu):  Likewise.
13737         * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
13738
13739 2018-01-22  Yao Qi  <yao.qi@linaro.org>
13740
13741         * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
13742         * configure.tgt: Remove target mt.
13743         * mt-tdep.c: Remove.
13744         * regcache.c (cooked_read_test): Remove the check for mt.
13745
13746 2018-01-22  Yao Qi  <yao.qi@linaro.org>
13747
13748         * jit.c (jit_frame_prev_register): Call regcache::cooked_read
13749         instead of gdbarch_pseudo_register_read_value.
13750
13751 2018-01-22  Joel Brobecker  <brobecker@adacore.com>
13752
13753         * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
13754         language is Ada.
13755
13756 2018-01-22  Joel Brobecker  <brobecker@adacore.com>
13757
13758         * linespec.c (create_sals_line_offset): Remove code that preserved
13759         the symtab_and_line's line number.
13760
13761 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
13762
13763         * varobj.c (varobj_create): Don't set valid_block when creating a
13764         floating varobj.
13765
13766 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
13767
13768         * varobj.c (varobj_create): Remove out of date comment.
13769
13770 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
13771
13772         PR mi/20395
13773         * ada-exp.y (write_var_from_sym): Pass extra parameter when
13774         updating innermost block.
13775         * parse.c (innermost_block_tracker::update): Take extra type
13776         parameter, and check types match before updating innermost block.
13777         (write_dollar_variable): Update innermost block for registers.
13778         * parser-defs.h (enum innermost_block_tracker_type): New enum.
13779         (innermost_block_tracker::innermost_block_tracker): Initialise
13780         m_types member.
13781         (innermost_block_tracker::reset): Take type parameter.
13782         (innermost_block_tracker::update): Take type parameter, and pass
13783         type through as needed.
13784         (innermost_block_tracker::m_types): New member.
13785         * varobj.c (varobj_create): Pass type when reseting innermost
13786         block.
13787
13788 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
13789
13790         * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
13791         * ada-lang.c (resolve_subexp): Likewise.
13792         * breakpoint.c (set_breakpoint_condition) Likewise.
13793         (watch_command_1) Likewise.
13794         * c-exp.y (variable): Likewise.
13795         * d-exp.y (PrimaryExpression): Likewise.
13796         * f-exp.y (variable): Likewise.
13797         * go-exp.y (variable): Likewise.
13798         * m2-exp.y (variable): Likewise.
13799         * objfiles.c (objfile::~objfile): Likewise.
13800         * p-exp.y (variable): Likewise.
13801         * parse.c (innermost_block): Change type.
13802         * parser-defs.h (class innermost_block_tracker): New.
13803         (innermost_block): Change to innermost_block_tracker.
13804         * printcmd.c (display_command): Switch to innermost_block API.
13805         (do_one_display): Likewise.
13806         * rust-exp.y (do_one_display): Likewise.
13807         * symfile.c (clear_symtab_users): Likewise.
13808         * varobj.c (varobj_create): Switch to innermost_block API, replace
13809         use of innermost_block with block stored on varobj object.
13810
13811 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
13812
13813         * expression.h (innermost_block): Remove declaration.
13814         * varobj.c: Add 'parser-defs.h' include.
13815
13816 2018-01-19  Tom Tromey  <tom@tromey.com>
13817
13818         * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
13819         symbols in the static and global blocks.
13820
13821 2018-01-19  James Clarke  <jrtc27@jrtc27.com>
13822
13823         * nat/linux-ptrace.c: Remove unnecessary reinclusion of
13824         gdb_ptrace.h, and move including gdb_wait.h ...
13825         * nat/linux-ptrace.h: ... to here.
13826
13827 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
13828
13829         * inf-ptrace.c (inf_ptrace_detach): Adjust call to
13830         inf_ptrace_detach_success.
13831         (inf_ptrace_detach_success): Add inferior parameter, use it
13832         instead of inferior_ptid, pass it to detach_inferior.
13833         * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
13834         parameter.
13835         * inferior.c (detach_inferior): Add overload that takes an
13836         inferior object.
13837         * inferior.h (detach_inferior): Likewise.
13838         * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
13839         use inferior_ptid, adjust call to inf_ptrace_detach_success.
13840         * linux-thread-db.c (thread_db_detach): Use inf parameter.
13841
13842 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
13843
13844         * target.h (struct target_ops) <to_detach>: Add inferior
13845         parameter.
13846         (target_detach): Likewise.
13847         * target.c (dispose_inferior): Pass inferior down.
13848         (target_detach): Pass inferior down.  Assert that it is equal to
13849         the current inferior.
13850         * aix-thread.c (aix_thread_detach): Pass inferior down.
13851         * corefile.c (core_file_command): Pass current_inferior() down.
13852         * corelow.c (core_detach): Add inferior parameter.
13853         * darwin-nat.c (darwin_detach): Likewise.
13854         * gnu-nat.c (gnu_detach): Likewise.
13855         * inf-ptrace.c (inf_ptrace_detach): Likewise.
13856         * infcmd.c (detach_command): Pass current_inferior() down to
13857         target_detach.
13858         * infrun.c (follow_fork_inferior): Pass parent_inf to
13859         target_detach.
13860         (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
13861         target_detach.
13862         * linux-nat.c (linux_nat_detach): Add inferior parameter.
13863         * linux-thread-db.c (thread_db_detach): Likewise.
13864         * nto-procfs.c (procfs_detach): Likewise.
13865         * procfs.c (procfs_detach): Likewise.
13866         * record.c (record_detach): Likewise.
13867         * record.h (struct inferior): Forward-declare.
13868         (record_detach): Add inferior parameter.
13869         * remote-sim.c (gdbsim_detach): Likewise.
13870         * remote.c (remote_detach_1): Likewise.
13871         (remote_detach): Likewise.
13872         (extended_remote_detach): Likewise.
13873         * sol-thread.c (sol_thread_detach): Likewise.
13874         * target-debug.h (target_debug_print_inferior_p): New macro.
13875         * target-delegates.c: Re-generate.
13876         * top.c (kill_or_detach): Pass inferior down to target_detach.
13877         * windows-nat.c (windows_detach): Add inferior parameter.
13878
13879 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
13880
13881         * target.h (struct target_ops) <to_detach>: Remove args
13882         parameter.
13883         (target_detach): Likewise.
13884         * target.c (dispose_inferior): Adjust.
13885         (target_detach): Remove args parameter, adjust.
13886         * aix-thread.c (aix_thread_detach): Adjust.
13887         * corefile.c (core_file_command): Adjust.
13888         * corelow.c (core_detach): Adjust.
13889         * darwin-nat.c (darwin_detach): Adjust.
13890         * gnu-nat.c (gnu_detach): Adjust.
13891         * inf-ptrace.c (inf_ptrace_detach): Adjust.
13892         * infcmd.c (detach_command): Adjust
13893         * infrun.c (follow_fork_inferior): Adjust.
13894         (handle_vfork_child_exec_or_exit): Adjust.
13895         * linux-fork.c (linux_fork_detach): Remove args parameter.
13896         * linux-fork.h (linux_fork_detach): Likewise.
13897         * linux-nat.c (linux_nat_detach): Likewise, and adjust.
13898         * linux-thread-db.c (thread_db_detach): Likewise.
13899         * nto-procfs.c (procfs_detach): Likewise.
13900         * procfs.c (procfs_detach): Likewise.
13901         (do_detach): Remove signo parameter.
13902         * record.c (record_detach): Remove args parameter.
13903         * record.h (record_detach): Likewise.
13904         * remote-sim.c (gdbsim_detach): Likewise.
13905         * remote.c (remote_detach_1): Likewise.
13906         (remote_detach): Likewise.
13907         (extended_remote_detach): Likewise.
13908         * sol-thread.c (sol_thread_detach): Likewise.
13909         * target-delegates.c: Re-generate.
13910         * top.c (struct qt_args) <args>: Remove field.
13911         (kill_or_detach): Don't pass args.
13912         (quit_force): Don't set args.
13913         * windows-nat.c (windows_detach): Remove args parameter.
13914
13915 2018-01-19  Yao Qi  <yao.qi@linaro.org>
13916
13917         * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
13918         (arm_linux_init_abi): Install it.
13919
13920 2018-01-19  Yao Qi  <yao.qi@linaro.org>
13921
13922         * osabi.c (gdb_osabi_names): Extend the regexp for
13923         arm-linux-gnueabihf.
13924
13925 2018-01-18  Yao Qi  <yao.qi@linaro.org>
13926
13927         * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
13928         m_abbrevs.
13929         (abbrev_table::add_abbrev): Update.
13930         (abbrev_table::lookup_abbrev): Update.
13931
13932 2018-01-18  Yao Qi  <yao.qi@linaro.org>
13933
13934         * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
13935
13936 2018-01-17  Sergio Durigan Junior  <sergiodj@redhat.com>
13937
13938         * compile/compile.c (compile_to_object): Convert "triplet_rx"
13939         to "std::string".
13940
13941 2018-01-17  Tom Tromey  <tom@tromey.com>
13942
13943         * dwarf2read.c (symbolp): Remove typedef.  Don't instantiate VEC.
13944
13945 2018-01-17  Tom Tromey  <tom@tromey.com>
13946
13947         * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
13948         * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
13949         (create_array_type_with_stride): Update.
13950         * dwarf2read.c (set_die_type): Update.
13951
13952 2018-01-17  Tom Tromey  <tom@tromey.com>
13953
13954         * dwarf2read.c (delayed_method_info): Remove typedef.
13955         (dwarf2_cu::method_info): Now a std::vector.
13956         (add_to_method_list): Update.
13957         (free_delayed_list): Remove.
13958         (compute_delayed_physnames): Update.
13959         (process_full_comp_unit, process_full_type_unit): Clear the method
13960         list.  Remove cleanups.
13961         (psymtab_include_file_name): Add name_holder parameter.  Use
13962         unique_xmalloc_ptr.
13963         (dwarf_decode_lines): Update.
13964
13965 2018-01-17  Tom Tromey  <tom@tromey.com>
13966             Simon Marchi  <simon.marchi@ericsson.com>
13967
13968         * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
13969         (dwarf2_per_objfile::free_cached_comp_units)
13970         (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
13971         (init_cutu_and_read_dies_no_follow): Update.
13972         (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
13973         (dwarf2_cu::~dwarf2_cu): New.
13974         (free_heap_comp_unit, free_stack_comp_unit): Remove.
13975         (age_cached_comp_units, free_one_cached_comp_unit): Update.
13976
13977 2018-01-17  Tom Tromey  <tom@tromey.com>
13978             Simon Marchi  <simon.marchi@ericsson.com>
13979
13980         * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
13981         (struct die_reader_specs) <abbrev_table>: New member.
13982         (struct abbrev_table): Add constructor.
13983         <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
13984         <abbrev_obstack>: Now an auto_obstack.
13985         (abbrev_table_up): New typedef.
13986         (init_cu_die_reader): Add abbrev_table parameter.
13987         (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
13988         Add result_dwo_abbrev_table.
13989         (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
13990         (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
13991         Update.
13992         (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
13993         parameter.
13994         (skip_children): Update.
13995         (abbrev_table::alloc_abbrev): Rename from
13996         abbrev_table_alloc_abbrev.
13997         (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
13998         (abbrev_table::lookup_abbrev): Rename from
13999         abbrev_table_lookup_abbrev.
14000         (abbrev_table_read_table): Return abbrev_table_up.
14001         (abbrev_table_free, abbrev_table_free_cleanup)
14002         (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
14003         (load_partial_dies): Update.
14004
14005 2018-01-17  Tom Tromey  <tom@tromey.com>
14006
14007         * dwarf2read.c (dwarf2_compute_name): Update comment.
14008         (read_func_scope, read_variable): Update.
14009         (new_symbol): Remove.
14010         (new_symbol_full): Rename to new_symbol.
14011
14012 2018-01-17  Mike Gulick  <mgulick@mathworks.com>
14013
14014         PR gdb/16577
14015         * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
14016         a warning instead of throwing an error, set section size to 0 and return
14017         NULL.
14018         * gdb_bfd.h (gdb_bfd_map_section): Update description.
14019
14020 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
14021
14022         * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
14023         std::string.
14024         (linux_ptrace_attach_fail_reason_string): Likewise.
14025         * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
14026         Likewise.
14027         (linux_ptrace_attach_fail_reason_string): Likewise.
14028         * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
14029
14030 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
14031
14032         * linux-nat.c (linux_nat_attach): Remove xstrdup.
14033
14034 2018-01-17  Eldar Abusalimov  <eldar.abusalimov@jetbrains.com>
14035
14036         PR gdb/21559
14037         * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
14038         checking for fs_base/gs_base fields in struct user_regs_struct.
14039         * configure: Regenerate.
14040
14041 2018-01-17  Yao Qi  <yao.qi@linaro.org>
14042
14043         * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
14044         function.
14045         (aarch64_linux_init_abi): Install it to gdbarch hook
14046         gcc_target_options.
14047
14048 2018-01-15  Pedro Alves  <palves@redhat.com>
14049
14050         * common/signals-state-save-restore.c
14051         (save_original_signals_state): Fix typos.
14052
14053 2017-01-12  Tom Tromey  <tom@tromey.com>
14054             Sergio Durigan Junior  <sergiodj@redhat.com>
14055
14056         * Makefile.in (install-only): Install gdb-add-index.
14057
14058 2018-01-12  John Baldwin  <jhb@FreeBSD.org>
14059
14060         * fbsd-tdep.c (KVE_PROTECTION): Correct value.
14061
14062 2018-01-12  Andreas Arnez  <arnez@linux.vnet.ibm.com>
14063
14064         * infrun.c (keep_going_pass_signal): Clear step-over info when
14065         insert_breakpoints fails.
14066
14067 2018-01-11  Pedro Alves  <palves@redhat.com>
14068
14069         PR gdb/22583
14070         * infrun.c (resume): Rename to ...
14071         (resume_1): ... this.
14072         (resume): Reimplement as wrapper around resume_1.
14073
14074 2018-01-11  Pedro Alves  <palves@redhat.com>
14075
14076         PR remote/22597
14077         * remote.c (remote_parse_stop_reply): Default to the last-set
14078         general thread instead of to 'magic_null_ptid'.
14079
14080 2018-01-10  Pedro Alves  <palves@redhat.com>
14081
14082         * language.h (language_get_symbol_name_matcher): Rename ...
14083         (get_symbol_name_matcher): ... this.
14084         * language.c (language_get_symbol_name_matcher): Ditto.
14085         * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
14086         callers adjusted.
14087
14088 2018-01-10  Pedro Alves  <palves@redhat.com>
14089
14090         PR gdb/22670
14091         * dwarf2read.c
14092         (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
14093         Adjust to use language_get_symbol_name_matcher instead of
14094         language_defn::la_get_symbol_name_matcher.
14095         * language.c (language_get_symbol_name_matcher): If in Ada mode
14096         and the lookup name is a verbatim match, return Ada's matcher.
14097         * language.h (language_get_symbol_name_matcher): Adjust comment.
14098         (ada_lookup_name_info::verbatim_p):: New method.
14099
14100 2018-01-10  Pedro Alves  <palves@redhat.com>
14101
14102         PR gdb/22670
14103         * ada-lang.c (ada_collect_symbol_completion_matches): If the
14104         minsym's language is language_auto or language_cplus, pass down
14105         language_ada instead.
14106         * symtab.c (compare_symbol_name): Don't frob symbol language here.
14107
14108 2018-01-10  Pedro Alves  <palves@redhat.com>
14109
14110         PR gdb/22670
14111         * minsyms.c (linkage_name_str): New function.
14112         (iterate_over_minimal_symbols): Use it.
14113
14114 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
14115
14116         * NEWS: Document that 'info proc' now works on FreeBSD.
14117
14118 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
14119
14120         * configure.ac: Check for kinfo_getfile in libutil.
14121         * configure: Regenerate.
14122         * config.in: Regenerate.
14123         * fbsd-nat.c: Include "fbsd-tdep.h".
14124         (fbsd_fetch_cmdline): New.
14125         (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
14126         rather than calling error.
14127         (fbsd_info_proc): New.
14128         (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
14129         (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
14130         (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
14131
14132 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
14133
14134         * fbsd-nat.c (struct free_deleter): Remove.
14135         (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
14136
14137 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
14138
14139         * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
14140         NULL for an empty pathname.
14141
14142 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
14143
14144         * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
14145         (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
14146         (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
14147         (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
14148         (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
14149         (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
14150         (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
14151         (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
14152         (kinfo_proc_layout_32, kinfo_proc_layout_i386)
14153         (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
14154         (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
14155         (fbsd_core_fetch_timeval, fbsd_print_sigset)
14156         (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
14157         (fbsd_init_abi):  Install gdbarch "core_info_proc" method.
14158         * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
14159
14160 2018-01-08  Samuel Thibault  <samuel.thibault@ens-lyon.org>
14161
14162         * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
14163         (gnu_xfer_auxv): New function.
14164         (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
14165         TARGET_OBJECT_AUXV.
14166
14167 2018-01-08  Yao Qi  <yao.qi@linaro.org>
14168             Simon Marchi  <simon.marchi@ericsson.com>
14169
14170         * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
14171         common/selftest.c.
14172         (COMMON_OBS): Remove selftest.o.
14173         * configure.ac: Append selftest-arch.c and common/selftest.c to
14174         CONFIG_SRCS.  Append selftest-arch.o and selftest.o to COMMON_OBS.
14175         * configure: Re-generated.
14176         * maint.c (maintenance_selftest): Wrap selftests::run_tests with
14177         GDB_SELF_TEST.
14178         (maintenance_info_selftests): Likewise.
14179
14180 2018-01-08  Xavier Roirand  <roirand@adacore.com>
14181
14182         * ada-valprint.c (val_print_packed_array_elements): Use
14183         proper number of elements when printing an array indexed
14184         by an enumeration type.
14185
14186 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
14187
14188         * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
14189         (dw2_get_file_names_reader): Adjust.
14190         (lookup_dwo_signatured_type): Adjust.
14191         (lookup_dwp_signatured_type): Adjust.
14192         (lookup_signatured_type): Adjust.
14193         (create_type_unit_group): Adjust.
14194         (get_type_unit_group): Adjust.
14195         (process_psymtab_comp_unit_reader): Adjust.
14196         (build_type_psymtabs_reader): Adjust.
14197         (scan_partial_symbols): Adjust.
14198         (add_partial_symbol): Adjust.
14199         (add_partial_subprogram): Adjust.
14200         (peek_die_abbrev): Adjust.
14201         (fixup_go_packaging): Adjust.
14202         (process_imported_unit_die): Adjust.
14203         (dwarf2_compute_name): Adjust.
14204         (dwarf2_physname): Adjust.
14205         (read_import_statement): Adjust.
14206         (handle_DW_AT_stmt_list): Adjust.
14207         (read_file_scope): Adjust.
14208         (read_func_scope): Adjust.
14209         (read_lexical_block_scope): Adjust.
14210         (read_call_site_scope): Adjust.
14211         (read_variable): Adjust.
14212         (dwarf2_rnglists_process): Adjust.
14213         (dwarf2_ranges_process): Adjust.
14214         (dwarf2_ranges_read): Adjust.
14215         (dwarf2_get_pc_bounds): Adjust.
14216         (dwarf2_record_block_ranges): Adjust.
14217         (dwarf2_add_field): Adjust.
14218         (dwarf2_add_member_fn): Adjust.
14219         (read_structure_type): Adjust.
14220         (process_structure_scope): Adjust.
14221         (read_enumeration_type): Adjust.
14222         (read_array_type): Adjust.
14223         (mark_common_block_symbol_computed): Adjust.
14224         (read_common_block): Adjust.
14225         (read_namespace_type): Adjust.
14226         (read_namespace): Adjust.
14227         (read_module_type): Adjust.
14228         (read_tag_pointer_type): Adjust.
14229         (read_tag_ptr_to_member_type): Adjust.
14230         (read_tag_string_type): Adjust.
14231         (read_subroutine_type): Adjust.
14232         (read_typedef): Adjust.
14233         (read_base_type): Adjust.
14234         (attr_to_dynamic_prop): Adjust.
14235         (read_subrange_type): Adjust.
14236         (read_unspecified_type): Adjust.
14237         (dwarf2_read_abbrevs): Adjust.
14238         (load_partial_dies): Adjust.
14239         (read_partial_die): Adjust.
14240         (find_partial_die): Adjust.
14241         (guess_partial_die_structure_name): Adjust.
14242         (fixup_partial_die): Adjust.
14243         (read_attribute_value): Adjust.
14244         (read_addr_index): Adjust.
14245         (read_addr_index_from_leb128): Adjust.
14246         (read_str_index): Adjust.
14247         (dwarf2_string_attr): Adjust.
14248         (get_debug_line_section): Adjust.
14249         (dwarf_decode_line_header): Adjust.
14250         (lnp_state_machine::check_line_address): Adjust.
14251         (dwarf_decode_lines_1): Adjust.
14252         (dwarf_decode_lines): Adjust.
14253         (dwarf2_start_symtab): Adjust.
14254         (var_decode_location): Adjust.
14255         (new_symbol_full): Adjust.
14256         (dwarf2_const_value_data): Adjust.
14257         (dwarf2_const_value_attr): Adjust.
14258         (dwarf2_const_value): Adjust.
14259         (die_type): Adjust.
14260         (die_containing_type): Adjust.
14261         (build_error_marker_type): Adjust.
14262         (lookup_die_type): Adjust.
14263         (guess_full_die_structure_name): Adjust.
14264         (anonymous_struct_prefix): Adjust.
14265         (determine_prefix): Adjust.
14266         (dwarf2_name): Adjust.
14267         (follow_die_ref_or_sig): Adjust.
14268         (follow_die_offset): Adjust.
14269         (follow_die_ref): Adjust.
14270         (follow_die_sig_1): Adjust.
14271         (follow_die_sig): Adjust.
14272         (get_signatured_type): Adjust.
14273         (get_DW_AT_signature_type): Adjust.
14274         (decode_locdesc): Adjust.
14275         (dwarf_decode_macros): Adjust.
14276         (cu_debug_loc_section): Adjust.
14277         (fill_in_loclist_baton): Adjust.
14278         (dwarf2_symbol_mark_computed): Adjust.
14279         (init_one_comp_unit): Don't assign
14280         dwarf2_cu::dwarf2_per_objfile.
14281         (set_die_type): Adjust.
14282
14283 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
14284
14285         * dwarf2read.c (struct mapped_debug_names): Add constructor.
14286         <dwarf2_per_objfile>: New field.
14287         (dwarf2_per_objfile): Remove global.
14288         (get_dwarf2_per_objfile): New function.
14289         (set_dwarf2_per_objfile): New function.
14290         (dwarf2_build_psymtabs_hard): Change objfile parameter to
14291         dwarf2_per_objfile.
14292         (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
14293         (read_abbrev_offset): Likewise.
14294         (read_indirect_string): Likewise.
14295         (read_indirect_line_string): Likewise.
14296         (read_indirect_string_at_offset): Likewise.
14297         (read_indirect_string_from_dwz): Likewise.
14298         (dwarf2_find_containing_comp_unit): Change objfile parameter to
14299         dwarf2_per_objfile.
14300         (age_cached_comp_units): Add dwarf2_per_objfile parameter.
14301         (create_all_comp_units): Change objfile parameter to
14302         dwarf2_per_objfile.
14303         (create_all_type_units): Likewise.
14304         (process_queue): Add dwarf2_per_objfile parameter.
14305         (read_and_check_comp_unit_head): Likewise.
14306         (lookup_dwo_unit_in_dwp): Likewise.
14307         (get_dwp_file): Likewise.
14308         (process_cu_includes): Likewise.
14309         (struct free_dwo_file_cleanup_data): New struct.
14310         (dwarf2_has_info): Use get_dwarf2_per_objfile and
14311         set_dwarf2_per_objfile.
14312         (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
14313         (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
14314         context, adjust calls.
14315         (dw2_instantiate_symtab): Likewise.
14316         (dw2_get_cutu): Add dwarf2_per_objfile parameter.
14317         (dw2_get_cu): Likewise.
14318         (create_cu_from_index_list): Change objfile parameter to
14319         dwarf2_per_objfile.
14320         (create_cus_from_index_list): Get dwarf2_per_objfile from
14321         context, adjust calls.
14322         (create_cus_from_index): Likewise.
14323         (create_signatured_type_table_from_index): Change objfile
14324         parameter to dwarf2_per_objfile.
14325         (create_signatured_type_table_from_debug_names): Change objfile
14326         parameter to dwarf2_per_objfile.
14327         (create_addrmap_from_index): Likewise.
14328         (create_addrmap_from_aranges): Likewise.
14329         (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
14330         (dw2_setup): Remove.
14331         (dw2_get_file_names_reader): Get dwarf2_per_objfile from
14332         context.
14333         (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
14334         get_dwarf2_per_objfile.
14335         (dw2_forget_cached_source_info): Likewise.
14336         (dw2_map_symtabs_matching_filename): Likewise.
14337         (struct dw2_symtab_iterator) <index>: Remove.
14338         <dwarf2_per_objfile>: New field.
14339         (dw2_symtab_iter_init): Replace index parameter with
14340         dwarf2_per_objfile.
14341         (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
14342         (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
14343         (dw2_print_stats): Likewise.
14344         (dw2_dump): Likewise.
14345         (dw2_expand_symtabs_for_function): Likewise.
14346         (dw2_expand_all_symtabs): Likewise.
14347         (dw2_expand_symtabs_with_fullname): Likewise.
14348         (dw2_expand_marked_cus): Replace index and objfile parameters
14349         with dwarf2_per_objfile.
14350         (dw_expand_symtabs_matching_file_matcher): Add
14351         dwarf2_per_objfile parameter and adjust calls.
14352         (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
14353         adjust calls.
14354         (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
14355         (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
14356         adjust calls.
14357         (create_cus_from_debug_names_list): Replace objfile parameter
14358         with dwarf2_per_objfile and adjust calls.
14359         (create_cus_from_debug_names): Likewise.
14360         (dwarf2_read_debug_names): Likewise.
14361         (mapped_debug_names::namei_to_name): Adjust call.
14362         (dw2_debug_names_iterator::next): Likewise.
14363         (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
14364         (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
14365         (dw2_debug_names_dump): Likewise.
14366         (dw2_debug_names_expand_symtabs_for_function): Likewise.
14367         (dw2_debug_names_expand_symtabs_matching): Likewise.
14368         (dwarf2_initialize_objfile): Likewise.
14369         (dwarf2_build_psymtabs): Likewise.
14370         (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
14371         this_cu.
14372         (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
14373         (read_and_check_comp_unit_head): Likewise.
14374         (read_abbrev_offset): Likewise.
14375         (create_debug_type_hash_table): Likewise.
14376         (create_debug_types_hash_table): Likewise.
14377         (create_all_type_units): Replace objfile parameter with
14378         dwarf2_per_objfile.
14379         (add_type_unit): Add dwarf2_per_objfile parameter.
14380         (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
14381         with dwarf2_per_objfile.
14382         (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
14383         (lookup_dwp_signatured_type): Likewise.
14384         (lookup_signatured_type): Likewise.
14385         (read_cutu_die_from_dwo): Likewise.
14386         (init_tu_and_read_dwo_dies): Likewise.
14387         (init_cutu_and_read_dies): Likewise.
14388         (init_cutu_and_read_dies_no_follow): Likewise.
14389         (allocate_type_unit_groups_table): Add objfile parameter.
14390         (create_type_unit_group): Use dwarf2_per_objfile from cu.
14391         (get_type_unit_group): Likewise.
14392         (process_psymtab_comp_unit): Update call.
14393         (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
14394         (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
14395         (print_tu_stats): Likewise.
14396         (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
14397         in void* parameter.
14398         (build_type_psymtabs): Change objfile parameter to
14399         dwarf2_per_objfile.
14400         (process_skeletonless_type_unit): Use dwarf2_per_objfile
14401         passed in void* parameter.
14402         (process_skeletonless_type_units): Change objfile parameter to
14403         dwarf2_per_objfile.
14404         (set_partial_user): Likewise.
14405         (dwarf2_build_psymtabs_hard): Likewise.
14406         (read_comp_units_from_section): Likewise.
14407         (create_all_comp_units): Likewise.
14408         (scan_partial_symbols): Update calls.
14409         (add_partial_symbol): Likewise.
14410         (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
14411         (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
14412         (process_queue): Add dwarf2_per_objfile parameter.
14413         (get_compunit_symtab): Use dwarf2_per_objfile from cu.
14414         (compute_compunit_symtab_includes): Likewise.
14415         (process_cu_includes): Add dwarf2_per_objfile parameter.
14416         (process_full_comp_unit): Use dwarf2_per_objfile from cu.
14417         (process_full_type_unit): Likewise.
14418         (process_imported_unit_die): Update call.
14419         (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
14420         (read_file_scope): Likewise.
14421         (allocate_dwo_file_hash_table): Add objfile parameter.
14422         (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
14423         (create_cus_hash_table): Likewise.
14424         (create_dwp_hash_table): Likewise.
14425         (create_dwo_unit_in_dwp_v1): Likewise.
14426         (create_dwp_v2_section): Likewise.
14427         (create_dwo_unit_in_dwp_v2): Likewise.
14428         (lookup_dwo_unit_in_dwp): Likewise.
14429         (try_open_dwop_file): Likewise.
14430         (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
14431         (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
14432         cleanup to include a reference to dwarf2_per_objfile.
14433         (open_dwp_file): Add dwarf2_per_objfile parameter.
14434         (open_and_init_dwp_file): Likewise.
14435         (get_dwp_file): Likewise.
14436         (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
14437         (queue_and_load_all_dwo_tus): Update call.
14438         (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
14439         data.
14440         (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
14441         (dwarf2_ranges_process): Likewise.
14442         (dwarf2_get_pc_bounds): Likewise.
14443         (mark_common_block_symbol_computed): Likewise.
14444         (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
14445         (dwarf2_read_abbrevs): Update call.
14446         (read_partial_die): Use dwarf2_per_objfile from cu.
14447         (find_partial_die): Likewise.
14448         (fixup_partial_die): Likewise.
14449         (read_attribute_value): Likewise.
14450         (read_indirect_string_at_offset_from): Add objfile parameter.
14451         (read_indirect_string_at_offset): Add dwarf2_per_objfile
14452         parameter.
14453         (read_indirect_string_from_dwz): Add objfile parameter.
14454         (read_indirect_string): Add objfile parameter.
14455         (read_addr_index_1): Add dwarf2_per_objfile parameter.
14456         (read_addr_index): Use dwarf2_per_objfile from cu.
14457         (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
14458         call dw2_setup.
14459         (read_str_index): Use dwarf2_per_objfile from cu.
14460         (get_debug_line_section): Likewise.
14461         (read_formatted_entries): Add dwarf2_per_objfile parameter.
14462         (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
14463         (new_symbol_full): Use dwarf2_per_objfile from cu.
14464         (build_error_marker_type): Likewise.
14465         (lookup_die_type): Likewise.
14466         (determine_prefix): Likewise.
14467         (follow_die_offset): Likewise.
14468         (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
14469         (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
14470         (dwarf2_fetch_die_type_sect_off): Likewise.
14471         (dwarf2_get_die_type): Likewise.
14472         (follow_die_sig_1): Use dwarf2_per_objfile from cu.
14473         (get_signatured_type): Likewise.
14474         (get_DW_AT_signature_type): Likewise.
14475         (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
14476         (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
14477         (cu_debug_loc_section): Likewise.
14478         (fill_in_loclist_baton): Likewise.
14479         (dwarf2_symbol_mark_computed): Likewise.
14480         (dwarf2_find_containing_comp_unit): Change objfile parameter to
14481         dwarf2_per_objfile.
14482         (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
14483         parameter.
14484         (age_cached_comp_units): Add dwarf2_per_objfile parameter.
14485         (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
14486         (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
14487         (set_die_type): Use dwarf2_free_objfile from cu.
14488         (get_die_type_at_offset): Likewise.
14489         (dwarf2_per_objfile_free): Don't assign global variable.
14490         (debug_names) <constructor>: Add dwarf2_per_objfile
14491         parameter, update m_debugstrlookup construction.
14492         (debug_names::debug_str_lookup): Add dwarf2_per_objfile
14493         parameter.
14494         <m_dwarf2_per_objfile>: New field.
14495         <lookup>: Use m_dwarf2_per_objfile.
14496         (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
14497         (psyms_seen_size): Likewise.
14498         (write_gdbindex): Replace objfile parameter with
14499         dwarf2_per_objfile.
14500         (write_debug_names): Likewise.
14501         (write_psymtabs_to_index): Likewise.
14502         (save_gdb_index_command): Use get_dwarf2_per_objfile, update
14503         calls.
14504
14505 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
14506
14507         * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
14508         <dwarf2_per_objfile>: New field.
14509         (struct dwarf2_per_cu_data) <objfile>: Remove.
14510         <dwarf2_per_objfile>: New field.
14511         (create_cu_from_index_list): Assign dwarf2_per_objfile instead
14512         of objfile.
14513         (create_signatured_type_table_from_index): Likewise.
14514         (create_debug_type_hash_table): Likewise.
14515         (fill_in_sig_entry_from_dwo_entry): Likewise.
14516         (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
14517         (create_type_unit_group): Assign dwarf2_per_objfile instead of
14518         objfile.
14519         (create_partial_symtab): Access objfile through
14520         dwarf2_per_objfile.
14521         (process_psymtab_comp_unit_reader): Likewise.
14522         (read_comp_units_from_section): Likewise.
14523         (scan_partial_symbols): Likewise.
14524         (add_partial_symbol): Likewise.
14525         (add_partial_subprogram): Likewise.
14526         (peek_die_abbrev): Likewise.
14527         (fixup_go_packaging): Likewise.
14528         (process_full_comp_unit): Likewise.
14529         (process_full_type_unit): Likewise.
14530         (process_imported_unit_die): Likewise.
14531         (dwarf2_compute_name): Likewise.
14532         (dwarf2_physname): Likewise.
14533         (read_import_statement): Likewise.
14534         (create_cus_hash_table): Assign dwarf2_physname instead of
14535         objfile.
14536         (read_func_scope): Access objfile through dwarf2_per_objfile.
14537         (read_lexical_block_scope): Likewise.
14538         (read_call_site_scope): Likewise.
14539         (read_variable): Likewise.
14540         (dwarf2_rnglists_process): Likewise.
14541         (dwarf2_ranges_process): Likewise.
14542         (dwarf2_ranges_read): Likewise.
14543         (dwarf2_record_block_ranges): Likewise.
14544         (dwarf2_add_field): Likewise.
14545         (dwarf2_add_member_fn): Likewise.
14546         (read_structure_type): Likewise.
14547         (process_structure_scope): Likewise.
14548         (read_enumeration_type): Likewise.
14549         (read_array_type): Likewise.
14550         (read_common_block): Likewise.
14551         (read_namespace_type): Likewise.
14552         (read_namespace): Likewise.
14553         (read_module_type): Likewise.
14554         (read_tag_pointer_type): Likewise.
14555         (read_tag_ptr_to_member_type): Likewise.
14556         (read_tag_string_type): Likewise.
14557         (read_subroutine_type): Likewise.
14558         (read_typedef): Likewise.
14559         (read_base_type): Likewise.
14560         (attr_to_dynamic_prop): Likewise.
14561         (read_subrange_type): Likewise.
14562         (read_unspecified_type): Likewise.
14563         (load_partial_dies): Likewise.
14564         (read_partial_die): Likewise.
14565         (find_partial_die): Likewise.
14566         (guess_partial_die_structure_name): Likewise.
14567         (fixup_partial_die): Likewise.
14568         (read_attribute_value): Likewise.
14569         (read_addr_index_from_leb128): Likewise.
14570         (dwarf2_read_addr_index): Likewise.
14571         (dwarf2_string_attr): Likewise.
14572         (lnp_state_machine::check_line_address): Likewise.
14573         (dwarf_decode_lines_1): Likewise.
14574         (dwarf_decode_lines): Likewise.
14575         (dwarf2_start_symtab): Likewise.
14576         (var_decode_location): Likewise.
14577         (new_symbol_full): Likewise.
14578         (dwarf2_const_value_data): Likewise.
14579         (dwarf2_const_value_attr): Likewise.
14580         (dwarf2_const_value): Likewise.
14581         (die_type): Likewise.
14582         (die_containing_type): Likewise.
14583         (lookup_die_type): Likewise.
14584         (guess_full_die_structure_name): Likewise.
14585         (anonymous_struct_prefix): Likewise.
14586         (dwarf2_name): Likewise.
14587         (follow_die_ref_or_sig): Likewise.
14588         (follow_die_offset): Likewise.
14589         (follow_die_ref): Likewise.
14590         (dwarf2_fetch_die_loc_sect_off): Likewise.
14591         (dwarf2_fetch_constant_bytes): Likewise.
14592         (dwarf2_fetch_die_type_sect_off): Likewise.
14593         (dwarf2_get_die_type): Likewise.
14594         (follow_die_sig): Likewise.
14595         (decode_locdesc): Likewise.
14596         (dwarf2_per_cu_objfile): Likewise.
14597         (dwarf2_per_cu_text_offset): Likewise.
14598         (init_one_comp_unit): Assign dwarf2_per_objfile instead of
14599         objfile.
14600         (set_die_type): Access objfile through
14601         dwarf2_per_objfile.
14602
14603 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
14604
14605         * valprint.c (converted_character_d): Remove typedef.
14606         (DEF_VEC_O (converted_character_d)): Remove.
14607         (count_next_character): Use std::vector.
14608         (print_converted_chars_to_obstack): Likewise.
14609         (generic_printstr): Likewise.
14610
14611 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
14612
14613         * xml-support.h (struct gdb_xml_value): Add constructor.
14614         <value>: Change type to unique_xmalloc_ptr.
14615         (gdb_xml_value_s): Remove typedef.
14616         (DEF_VEC_O (gdb_xml_value_s)): Remove.
14617         (gdb_xml_element_start_handler): Change parameter type to
14618         std::vector.
14619         (xml_find_attribute): Likewise.
14620         * xml-support.c (xml_find_attribute): Change parameter type to
14621         std::vector and adjust.
14622         (gdb_xml_values_cleanup): Remove.
14623         (gdb_xml_parser::start_element): Adjust to std::vector.
14624         (xinclude_start_include): Change paraeter type to std::vector
14625         and adjust.
14626         * btrace.c (check_xml_btrace_version): Likewise.
14627         (parse_xml_btrace_block): Likewise.
14628         (parse_xml_btrace_pt_config_cpu): Likewise.
14629         (parse_xml_btrace_pt): Likewise.
14630         (parse_xml_btrace_conf_bts): Likewise.
14631         (parse_xml_btrace_conf_pt): Likewise.
14632         * memory-map.c (memory_map_start_memory): Likewise.
14633         (memory_map_start_property): Likewise.
14634         * osdata.c (osdata_start_osdata): Likewise.
14635         (osdata_start_item): Likewise.
14636         (osdata_start_column): Likewise.
14637         * remote.c (start_thread): Likewise.
14638         * solib-aix.c (library_list_start_library): Likewise.
14639         (library_list_start_list): Likewise.
14640         * solib-svr4.c (library_list_start_library): Likewise.
14641         (svr4_library_list_start_list): Likewise.
14642         * solib-target.c (library_list_start_segment): Likewise.
14643         (library_list_start_section): Likewise.
14644         (library_list_start_library): Likewise.
14645         (library_list_start_list): Likewise.
14646         * tracepoint.c (traceframe_info_start_memory): Likewise.
14647         (traceframe_info_start_tvar): Likewise.
14648         * xml-syscall.c (syscall_start_syscall): Likewise.
14649         * xml-tdesc.c (tdesc_start_target): Likewise.
14650         (tdesc_start_feature): Likewise.
14651         (tdesc_start_reg): Likewise.
14652         (tdesc_start_union): Likewise.
14653         (tdesc_start_struct): Likewise.
14654         (tdesc_start_flags): Likewise.
14655         (tdesc_start_enum): Likewise.
14656         (tdesc_start_field): Likewise.
14657         (tdesc_start_enum_value): Likewise.
14658         (tdesc_start_vector): Likewise.
14659
14660 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
14661
14662         * extension.h (struct xmethod_worker) <clone>: Remove.
14663         * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
14664         Remove.
14665         (python_xmethod_worker::clone): Remove.
14666         * valops.c (find_overload_match): Use std::move instead of
14667         clone.
14668
14669 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
14670
14671         * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
14672         (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
14673         <free_xmethod_worker_data>: Remove.
14674         <get_matching_xmethod_workers>: Chance VEC to std::vector.
14675         <get_xmethod_arg_types>: Remove.
14676         <get_xmethod_result_type>: Remove.
14677         <invoke_xmethod>: Remove.
14678         * extension.c (new_xmethod_worker): Remove.
14679         (clone_xmethod_worker): Remove.
14680         (get_matching_xmethod_workers): Return void, pass std::vector by
14681         pointer.
14682         (get_xmethod_arg_types): Rename to...
14683         (xmethod_worker::get_arg_types): ... this, and adjust.
14684         (get_xmethod_result_type): Rename to...
14685         (xmethod_worker::get_result_type): ... this, and adjust.
14686         (invoke_xmethod): Remove.
14687         (free_xmethod_worker): Remove.
14688         (free_xmethod_worker_vec): Remove.
14689         * extension.h (enum ext_lang_rc): Move here from
14690         extension-priv.h.
14691         (struct xmethod_worker): Add constructor and destructor.
14692         <data>: Remove.
14693         <value>: Remove.
14694         <invoke, clone, do_get_result_type, do_get_arg_types>: New
14695         virtual pure methods.
14696         <get_arg_types, get_result_type>: New methods.
14697         (xmethod_worker_ptr): Remove typedef.
14698         (DEF_VEC_P (xmethod_worker_ptr)): Remove.
14699         (xmethod_worker_vec): Remove typedef.
14700         (xmethod_worker_up): New typedef.
14701         (invoke_xmethod): Remove.
14702         (clone_xmethod_worker): Remove.
14703         (free_xmethod_worker): Remove.
14704         (free_xmethod_worker_vec): Remove.
14705         (get_xmethod_arg_types): Remove.
14706         (get_xmethod_result_type): Remove.
14707         * valops.c (find_method_list): Use std::vector, don't use
14708         intermediate vector.
14709         (value_find_oload_method_list): Use std::vector.
14710         (find_overload_match): Use std::vector.
14711         (find_oload_champ): Use std::vector.
14712         * value.c (value_free): Use operator delete.
14713         (value_of_xmethod): Rename to...
14714         (value_from_xmethod): ... this.  Don't assign
14715         xmethod_worker::value, take rvalue-reference.
14716         (result_type_of_xmethod): Adjust.
14717         (call_xmethod): Adjust.
14718         * value.h: Include extension.h.
14719         (struct xmethod_worker): Don't forward-declare.
14720         (value_of_xmethod): Rename to...
14721         (value_from_xmethod): ... this, take rvalue-reference.
14722         * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
14723         (struct python_xmethod_worker): ... this, add constructor and
14724         destructor.
14725         <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
14726         (gdbpy_free_xmethod_worker_data): Rename to...
14727         (python_xmethod_worker::~python_xmethod_worker): ... this and
14728         adjust.
14729         (gdbpy_clone_xmethod_worker_data): Rename to...
14730         (python_xmethod_worker::clone): ... this and adjust.
14731         (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
14732         temporary vector.
14733         (gdbpy_get_xmethod_arg_types): Rename to...
14734         (python_xmethod_worker::do_get_arg_types): ... this and adjust.
14735         (gdbpy_get_xmethod_result_type): Rename to...
14736         (python_xmethod_worker::do_get_result_type): ... this and
14737         adjust.
14738         (gdbpy_invoke_xmethod): Rename to...
14739         (python_xmethod_worker::invoke): ... this and adjust.
14740         (new_python_xmethod_worker): Rename to...
14741         (python_xmethod_worker::python_xmethod_worker): ... this and
14742         adjust.
14743         * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
14744         Remove.
14745         (gdbpy_free_xmethod_worker_data): Remove.
14746         (gdbpy_get_matching_xmethod_workers): Use std::vector.
14747         (gdbpy_get_xmethod_arg_types): Remove.
14748         (gdbpy_get_xmethod_result_type): Remove.
14749         (gdbpy_invoke_xmethod): Remove.
14750         * python/python.c (python_extension_ops): Remove obsolete
14751         callbacks.
14752
14753 2018-01-05  Pedro Alves  <palves@redhat.com>
14754
14755         PR gdb/18653
14756         * common/signals-state-save-restore.c
14757         (save_original_signals_state): New parameter 'quiet'.  Warn if we
14758         find a custom handler preinstalled, instead of internal erroring.
14759         But only warn if !quiet.
14760         * common/signals-state-save-restore.h
14761         (save_original_signals_state): New parameter 'quiet'.
14762         * main.c (captured_main_1): Move save_original_signals_state call
14763         after option handling, and pass QUIET.
14764
14765 2018-01-05  Pedro Alves  <palves@redhat.com>
14766
14767         * spu-tdep.c (spu_catch_start): Pass
14768         symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
14769
14770 2018-01-05  Pedro Alves  <palves@redhat.com>
14771
14772         PR gdb/22670
14773         * ada-lang.c (literal_symbol_name_matcher): New function.
14774         (ada_get_symbol_name_matcher): Use it for
14775         symbol_name_match_type::SEARCH_NAME.
14776         * block.c (block_lookup_symbol): New parameter 'match_type'.  Pass
14777         it down instead of assuming symbol_name_match_type::FULL.
14778         * block.h (block_lookup_symbol): New parameter 'match_type'.
14779         * c-valprint.c (print_unpacked_pointer): Use
14780         lookup_symbol_search_name instead of lookup_symbol.
14781         * compile/compile-object-load.c (get_out_value_type): Pass down
14782         symbol_name_match_type::SEARCH_NAME.
14783         * cp-namespace.c (cp_basic_lookup_symbol): Pass down
14784         symbol_name_match_type::FULL.
14785         * cp-support.c (cp_get_symbol_name_matcher): Handle
14786         symbol_name_match_type::SEARCH_NAME.
14787         * infrun.c (insert_exception_resume_breakpoint): Use
14788         lookup_symbol_search_name.
14789         * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
14790         * psymtab.c (maintenance_check_psymtabs): Use
14791         symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
14792         * stack.c (print_frame_args): Use lookup_symbol_search_name and
14793         SYMBOL_SEARCH_NAME.
14794         * symtab.c (lookup_local_symbol): Don't demangle the lookup name
14795         if symbol_name_match_type::SEARCH_NAME.
14796         (lookup_symbol_in_language): Pass down
14797         symbol_name_match_type::FULL.
14798         (lookup_symbol_search_name): New.
14799         (lookup_language_this): Pass down
14800         symbol_name_match_type::SEARCH_NAME.
14801         (lookup_symbol_aux, lookup_local_symbol): New parameter
14802         'match_type'.  Pass it down.
14803         * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
14804         (lookup_symbol_search_name): New declaration.
14805         (lookup_symbol_in_block): New 'match_type' parameter.
14806
14807 2018-01-05  Pedro Alves  <palves@redhat.com>
14808
14809         PR gdb/22670
14810         * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
14811         ada_lookup_symbol.
14812         (ada_lookup_symbol): Reimplement in terms of
14813         ada_lookup_symbol_list, bits factored out from
14814         ada_lookup_encoded_symbol.
14815
14816 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
14817
14818         * ada-exp.y (write_object_renaming): When subscripting an array
14819         using a symbol as the index, pass the block in call to
14820         ada_lookup_encoded_symbol when looking that symbol up.
14821
14822 2018-01-05  Jerome Guitton  <guitton@adacore.com>
14823
14824         * ada-lang.c (ada_array_length): Use ada_index_type instead of
14825         TYPE_INDEX_TYPE.
14826
14827 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
14828
14829         * ada-lang.c (ada_to_fixed_value_create): Add handling of
14830         the case where VALUE_LVAL (val0) is not lval_memory.
14831
14832 2018-01-05  Xavier Roirand  <roirand@adacore.com>
14833
14834         * ada-valprint.c (print_optional_low_bound): Handle
14835         character-indexed array printing like boolean-indexed array
14836         printing.
14837
14838 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
14839
14840         * NEWS: Create a new section for the next release branch.
14841         Rename the section of the current branch, now that it has
14842         been cut.
14843
14844 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
14845
14846         GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
14847         * version.in: Bump version to 8.1.50.DATE-git.
14848
14849 2018-01-03  Xavier Roirand  <roirand@adacore.com>
14850
14851         * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
14852         Add field.
14853         * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
14854         Add field.
14855         (default_exception_support_info) <catch_handlers_sym>: Add field.
14856         (exception_support_info_fallback) <catch_handlers_sym>: Add field.
14857         (ada_exception_name_addr_1): Add "catch handlers" handling.
14858         (ada_exception_catchpoint_cond_string) <ex>: New parameter.
14859         Update all callers.
14860         (create_excep_cond_exprs) <ex>: Add parameter.
14861         (re_set_exception): Update create_excep_cond_exprs call.
14862         (print_it_exception, print_one_exception, print_mention_exception)
14863         (print_recreate_exception): Add "catch handler" handling.
14864         (allocate_location_catch_handlers, re_set_catch_handlers)
14865         (check_status_catch_handlers, print_it_catch_handlers)
14866         (print_one_catch_handlers, print_mention_catch_handlers)
14867         (print_recreate_catch_handlers): New function.
14868         (catch_handlers_breakpoint_ops): New variable.
14869         (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
14870         Add parameter.  Add "catch handler" handling.
14871         (ada_exception_sym_name, ada_exception_breakpoint_ops):
14872         Add "catch handler" handling.
14873         (ada_exception_catchpoint_cond_string): Add "catch handler"
14874         handling.
14875         (create_ada_exception_catchpoint): Update create_excep_cond_exprs
14876         call.
14877         (catch_ada_handlers_command): New function.
14878         (initialize_ada_catchpoint_ops): Initialize "catch handlers"
14879         operations structure.
14880         (_initialize_ada_language): Add "catch handlers" command entry.
14881         * NEWS: Document "catch handlers" feature.
14882
14883 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
14884
14885         * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
14886         account when creating the array type of the slice.
14887         (ada_value_slice): Likewise.
14888
14889 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
14890
14891         * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
14892         New enum value.
14893         (create_array_type_with_stride): Add byte_stride_prop parameter.
14894         * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
14895         New parameter.  Update all callers in this file.
14896         (array_type_has_dynamic_stride): New function.
14897         (is_dynamic_type_internal, resolve_dynamic_array): Add handling
14898         of arrays with dynamic byte strides.
14899         * dwarf2read.c (read_array_type): Add support for dynamic
14900         DW_AT_byte_stride attributes.
14901
14902 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
14903
14904         * dwarf2read.c (read_unspecified_type): Treat
14905         DW_TAG_enumeration_type DIEs from Ada units as stubs.
14906
14907 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
14908
14909         Update copyright year range in all GDB files.
14910
14911 2018-01-01, 18  Joel Brobecker  <brobecker@adacore.com>
14912
14913         * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
14914         and gdb/testsuite/gdb.base/step-line.c.
14915
14916 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
14917
14918         * copyright.py (main): Dump the contents of
14919         MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
14920         even if BY_HAND is empty.
14921
14922 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
14923
14924         * top.c (print_gdb_version): Update Copyright year in version
14925         message.
14926
14927 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
14928
14929         * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
14930
14931 For older changes see ChangeLog-2017.
14932 \f
14933 Local Variables:
14934 mode: change-log
14935 left-margin: 8
14936 fill-column: 74
14937 version-control: never
14938 coding: utf-8
14939 End: