Make init.c depend on source files
[external/binutils.git] / gdb / ChangeLog
1 2018-12-27  Tom Tromey  <tom@tromey.com>
2
3         * Makefile.in (INIT_FILES): Redefine.
4         (stamp-init): Remove sed, tr invocations.  Use for loop.  Don't
5         set LANG or LC_ALL.
6
7 2018-12-27  Tom Tromey  <tom@tromey.com>
8
9         * Makefile.in (stamp-init): Remove gdbtypes special case.
10
11 2018-12-27  John Baldwin  <jhb@FreeBSD.org>
12
13         * config/i386/nm-fbsd.h: Remove file.
14         * Makefile.in (HFILES_NO_SRCDIR): Remove config/i386/nm-fbsd.h.
15         * configure.nat: Remove NAT_FILE for FreeBSD/i386.
16
17 2018-12-27  Tom Tromey  <tom@tromey.com>
18
19         * minsyms.h (class minimal_symbol_reader): Use
20         DISABLE_COPY_AND_ASSIGN.
21
22 2018-12-27  Tom Tromey  <tom@tromey.com>
23
24         * python/python.c (python_interactive_command): Use std::string.
25         (gdbpy_parameter): Likewise.
26         * python/py-utils.c (unicode_to_encoded_string): Update comment.
27         * python/py-symtab.c (salpy_str): Use PyString_FromFormat.
28         * python/py-record-btrace.c (recpy_bt_insn_data): Use
29         byte_vector.
30         * python/py-objfile.c (objfpy_get_build_id): Use
31         unique_xmalloc_ptr.
32         * python/py-inferior.c (infpy_read_memory): Use
33         unique_xmalloc_ptr.
34         * python/py-cmd.c (gdbpy_parse_command_name): Use std::string.
35
36 2018-12-26  Simon Marchi  <simon.marchi@polymtl.ca>
37
38         * target.c (target_terminal::restore_inferior): Remove struct keyword.
39
40 2018-12-26  Simon Marchi  <simon.marchi@ericsson.com>
41
42         * build-id.c (build_id_to_debug_bfd): Enhance debug output.
43         * symfile.c (separate_debug_file_exists): Likewise.
44
45 2018-12-24  Andrew Burgess  <andrew.burgess@embecosm.com>
46
47         * c-exp.y (field_name): Allow DOUBLE_KEYWORD, INT_KEYWORD, LONG,
48         SHORT, SIGNED_KEYWORD, and UNSIGNED tokens to act as a field
49         names.
50         (typename_stoken): New function.
51
52 2018-12-24  Andrew Burgess  <andrew.burgess@embecosm.com>
53
54         * c-exp.y (field_name): New %token, and new rule.
55         (exp): Replace uses of 'name' with 'field_name' where appropriate.
56
57 2018-12-24  Andrew Burgess  <andrew.burgess@embecosm.com>
58
59         PR gdb/13368
60         * c-exp.y (typebase): Extend the comment.
61         (ident_tokens): Likewise.
62
63 2018-12-18  Tom Tromey  <tom@tromey.com>
64
65         * dwarf2read.c (dwarf2_find_containing_comp_unit): Don't take
66         address of sect_off.
67
68 2018-12-23  Joel Brobecker  <brobecker@adacore.com>
69
70         GDB 8.2.1 released.
71
72 2018-12-22  Andrew Burgess  <andrew.burgess@embecosm.com>
73
74         * riscv-tdep.c (riscv_call_arg_struct): Don't adjust size before
75         assigning locations.
76         (riscv_return_value): Take more care not to read/write outside of
77         argument buffer.  Cast return value between the declared type and
78         the abi type.
79
80 2018-12-22  Andrew Burgess  <andrew.burgess@embecosm.com>
81
82         * riscv-tdep.c (riscv_register_reggroup_p): Save and restore fcsr,
83         fflags, and frm registers.
84
85 2018-12-22  Andrew Burgess  <andrew.burgess@embecosm.com>
86
87         * riscv-tdep.c (riscv_dwarf_reg_to_regnum): New function.
88         (riscv_gdbarch_init): Register new function with gdbarch.
89         * riscv-tdep.h: New enum to define RISC-V DWARF register numbers.
90
91 2018-12-21  Simon Marchi  <simon.marchi@ericsson.com>
92
93         * minsyms.c (mst_str): New.
94         (minimal_symbol_reader::record_full): Add debug output.
95
96 2018-12-21  John Baldwin  <jhb@FreeBSD.org>
97
98         * fbsd-nat.c (fbsd_handle_debug_trap): Require pl.pl_flags to
99         equal PL_FLAG_SI.
100         (fbsd_nat_target::stopped_by_sw_breakpoint): Likewise.
101
102 2018-12-21  Paul Marechal  <paul.marechal@ericsson.com>
103
104         PR gdb/23974
105         * target.c (target_read_stralloc): Check for empty vector.
106
107 2018-12-21  Дилян Палаузов  <dilyan.palauzov@aegee.org>
108
109         * top.c (print_gdb_configuration): Print "--without-python"
110         if GDB was configured without Python.
111
112 2018-12-21  Andrew Burgess  <andrew.burgess@embecosm.com>
113
114         * riscv-tdep.c (riscv_scan_prologue): Use plongest to format
115         a signed offset as a string.
116
117 2018-12-21  Dave Murphy  <davem@devkitpro.org>
118
119         * dtrace-probe.c (dtrace_static_probe_ops): Explicit zero
120         initialise.
121         * probe.c (any_static_probe_ops): Ditto.
122         * record-btrace.c (record_btrace_thread_observer_token): Ditto.
123         * stap-probe.c (stap_static_probe_ops): Ditto.
124         * tui/tui-hooks.c (tui_observers_token): Ditto.
125         * unittests/observable-selftests.c (token1, token2, token3): Ditto.
126
127 2018-12-19  Andrew Burgess  <andrew.burgess@embecosm.com>
128
129         * gdb/dummy-frame.c (default_dummy_id): Defined new function.
130         * gdb/dummy-frame.h (default_dummy_id): Declare new function.
131         * gdb/frame-unwind.c (default_unwind_pc): Define new function.
132         (default_unwind_sp): Define new function.
133         * gdb/frame-unwind.h (default_unwind_pc): Declare new function.
134         (default_unwind_sp): Declare new function.
135         * gdb/frame.c (frame_unwind_pc): Assume gdbarch_unwind_pc is
136         available.
137         (get_frame_sp): Assume that gdbarch_unwind_sp is available.
138         * gdb/gdbarch.c: Regenerate.
139         * gdb/gdbarch.h: Regenerate.
140         * gdb/gdbarch.sh: Update definition of dummy_id, unwind_pc, and
141         unwind_sp.  Add additional header files to be included in
142         generated file.
143
144 2018-12-19  Dimitar Dimitrov  <dimitar@dinux.eu>
145
146         * nat/linux-ptrace.c (linux_ptrace_test_ret_to_nx): Remove
147         sp clobbers.
148
149 2018-12-17  Andrew Burgess  <andrew.burgess@embecosm.com>
150
151         * dwarf2read.c (struct dwarf2_cu): Convert the fields 'mark',
152         'has_loclist', 'checked_producer', 'producer_is_gxx_lt_4_6',
153         'producer_is_gcc_lt_4_3', 'producer_is_icc_lt_14',
154         'processing_has_namespace_info' from unsigned int to bool.  Update
155         comments.
156         (producer_is_icc_lt_14): Update return type.
157         (producer_is_gcc_lt_4_3): Likewise.
158         (producer_is_gxx_lt_4_6): Likewise.
159         (process_die): Write true instead of 1 into predicate fields.
160         (dwarf2_start_symtab): Likewise.
161         (var_decode_location): Likewise.
162         (dwarf2_mark_helper): Likewise.
163         (dwarf2_mark): Likewise.
164         (dwarf2_clear_marks): Write false instead of 0 into predicate
165         field.
166         (dwarf2_cu::dwarf2_cu): Initialise predicate fields to false, not
167         0.
168
169 2018-12-17  Szabolcs Nagy  <szabolcs.nagy@arm.com>
170
171         * nat/aarch64-sve-linux-ptrace.h: Include signal.h instead of
172         asm/sigcontext.h.
173
174 2018-12-17  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
175
176         * nat/linux-ptrace.c (kill_child): Fix ARI warning by removing
177         warning trailing new line.
178
179 2018-12-16  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
180
181         * nat/linux-ptrace.c (kill_child): New function.
182         (linux_ptrace_test_ret_to_nx): Use kill_child instead of local code.
183         Add a call to kill_child in case of early return after fork.
184         (linux_check_ptrace_features): Use kill_child instead of local code.
185         (linux_test_for_tracefork): Likewise.
186
187 2018-12-14  Tom Tromey  <tom@tromey.com>
188
189         * Makefile.in: Remove "alloca" comment.
190         (INFOFILES): Remove.
191         (local-maintainer-clean): Don't use INFOFILES.
192
193 2018-12-13  John Baldwin  <jhb@FreeBSD.org>
194
195         * syscalls/update-freebsd.sh: New file.
196         * syscalls/freebsd.xml: Regenerate.
197
198 2018-12-13  John Baldwin  <jhb@FreeBSD.org>
199
200         * NEWS: Add entry documenting system call aliases.
201         * break-catch-syscall.c (catch_syscall_split_args): Pass 'result'
202         to get_syscalls_by_name.
203         * gdbarch.sh (UNKNOWN_SYSCALL): Remove.
204         * gdbarch.h: Regenerate.
205         * syscalls/gdb-syscalls.dtd (syscall): Add alias attribute.
206         * xml-syscall.c [!HAVE_LIBEXPAT] (get_syscalls_by_name): Rename
207         from get_syscall_by_name.  Now accepts a pointer to a vector of
208         integers and returns a bool.
209         [HAVE_LIBEXPAT] (struct syscall_desc): Add alias member.
210         (syscall_create_syscall_desc): Add alias parameter and pass it to
211         syscall_desc constructor.
212         (syscall_start_syscall): Handle alias attribute.
213         (syscall_attr): Add alias attribute.
214         (xml_get_syscalls_by_name): Rename from xml_get_syscall_number.
215         Now accepts a pointer to a vector of integers and returns a
216         bool.  Add syscalls whose alias or name matches the requested
217         name.
218         (get_syscalls_by_name): Rename from get_syscall_by_name.  Now
219         accepts a pointer to a vector of integers and returns a bool.
220         * xml-syscall.h (get_syscalls_by_name): Likewise.
221
222 2018-12-13  John Baldwin  <jhb@FreeBSD.org>
223
224         * break-catch-syscall.c (catch_syscall_split_args): Pass 'result'
225         to get_syscalls_by_group.
226         * xml-syscall.c [!HAVE_LIBEXPAT] (get_syscalls_by_group): Return
227         false.
228         [HAVE_LIBEXPAT] (xml_list_syscalls_by_group): Append syscall
229         numbers to an existing vector of integers and return a bool.
230         (get_syscalls_by_group): Accept pointer to vector of integers
231         and change return type to bool.
232         * xml-syscall.h (get_syscalls_by_group): Likewise.
233
234 2018-12-13  Jim Wilson  <jimw@sifive.com>
235
236         * riscv-tdep.c (riscv_print_one_register_info): For MSTATUS, add
237         comment for SD field, and correct xlen calculation.  For MISA, add
238         comment for MXL field, add call to register_size, and correct base
239         calculation.
240
241 2018-12-13  Stafford Horne  <shorne@gmail.com>
242
243         * NEWS(New targets): Add or1k*-*-linux*.
244
245 2018-12-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
246
247         * nat/linux-osdata.c (linux_xfer_osdata_info_os_types): Forward
248         declare on one line to fix ARI warning.
249
250 2018-12-12  Andrew Burgess  <andrew.burgess@embecosm.com>
251
252         * infrun.c (infcall_suspend_state::infcall_suspend_state): New.
253         (infcall_suspend_state::registers): New.
254         (infcall_suspend_state::restore): New.
255         (infcall_suspend_state::thread_suspend): Rename to...
256         (infcall_suspend_state::m_thread_suspend): ...this.
257         (infcall_suspend_state::registers): Rename to...
258         (infcall_suspend_state::m_registers): ...this.
259         (infcall_suspend_state::siginfo_gdbarch): Rename to...
260         (infcall_suspend_state::m_siginfo_gdbarch): ...this.
261         (infcall_suspend_state::siginfo_data): Rename to...
262         (infcall_suspend_state::m_siginfo_data): ...this.
263         (save_infcall_suspend_state): Rewrite to use infcall_suspend_state
264         constructor.
265         (restore_infcall_suspend_state): Rewrite to use
266         infcall_suspend_state::restore method.
267         (get_infcall_suspend_state_regcache): Use
268         infcall_suspend_state::registers method.
269
270 2018-12-12  Andrew Burgess  <andrew.burgess@embecosm.com>
271
272         * riscv-tdep.c (riscv_call_arg_scalar_float): Unnamed (variadic)
273         arguments are passed in integer registers.
274         (riscv_call_arg_complex_float): Likewise.
275
276 2018-12-11  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
277
278         * nat/linux-osdata.c (common_getter): New function.
279         (struct osdata_type): Change getter to take_snapshot.
280         Add LONGEST len_avail and struct buffer buffer.
281         Change all elements in the initializer.
282         Add an element for the list of types.
283         (linux_xfer_osdata_info_os_types): New function.
284         (linux_common_xfer_osdata): Use common_getter for the list of types.
285         Replace getter call by common_getter.
286         (linux_xfer_osdata_cpus): Remove args READBUF, OFFSET, LEN.
287         Add arg BUFFER.  Only keep the code that adds data in BUFFER.
288         (linux_xfer_osdata_fds): Likewise.
289         (linux_xfer_osdata_modules): Likewise.
290         (linux_xfer_osdata_msg): Likewise.
291         (linux_xfer_osdata_processes): Likewise.
292         (linux_xfer_osdata_processgroups): Likewise.
293         (linux_xfer_osdata_sem): Likewise.
294         (linux_xfer_osdata_shm): Likewise.
295         (linux_xfer_osdata_isockets): Likewise.
296         (linux_xfer_osdata_threads): Likewise.
297
298 2018-12-11  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
299
300         * nat/linux-osdata.c: Removed various trailing spaces.
301
302 2018-12-10  Andrew Burgess  <andrew.burgess@embecosm.com>
303
304         * riscv-tdep.c (riscv_register_name): Fix ARI warning by removing
305         leading whitespace before #include line.
306
307 2018-12-08  Simon Marchi  <simon.marchi@ericsson.com>
308             Дилян Палаузов  <dilyan.palauzov@aegee.org>
309
310         PR gdb/23950
311         * configure.ac: Search for tgetent in libtinfow.
312         * configure: Re-generate.
313
314 2018-12-08  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
315
316         * linux-thread-db.c (struct thread_db_info): Add td_ta_delete_p.
317         (thread_db_err_str): Forward declare.
318         (delete_thread_db_info): Call td_ta_delete_p if available.
319         (try_thread_db_load_1): Acquire td_ta_delete address.
320         * nat/gdb_thread_db.h (td_ta_delete_ftype): Declare.
321
322 2018-12-08  Pedro Alves  <palves@redhat.com>
323
324         * source.c (forward_search_command): Rename to ...
325         (search_command_helper): ... this.  Add 'forward' parameter.
326         Tweak to use a gdb::def_vector<char> instead of a xrealloc'ed
327         buffer.  Handle backward searches too.
328         (forward_search_command, reverse_search_command): Reimplement by
329         calling search_command_helper.
330
331 2018-12-07  Andrew Burgess  <andrew.burgess@embecosm.com>
332
333         * .dir-locals.el: Copy most of the settings from c-mode over to
334         c++-mode.
335
336 2018-12-08  Stafford Horne  <shorne@gmail.com>
337
338         * Makefile.in (ALL_TARGET_OBS): Add or1k-linux-tdep.o.
339         * configure.tgt: Add or1k*-*-linux*.
340         * or1k-linux-tdep.c: New file.
341         * or1k-tdep.c (or1k_gdbarch_init): Call gdbarch_init_osabi.
342
343 2018-12-07  Pedro Alves  <palves@redhat.com>
344
345         * dwarf2read.c (get_gdb_index_contents_from_section): Use
346         gdb::make_array_view.
347
348 2018-12-05  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
349
350         * language.c (_initialize_language): Fix leak by assigning
351         a static string to language.  Same for range and case_sensitive,
352         even if no leak is detected for these variables.
353
354 2018-12-05  John Baldwin  <jhb@FreeBSD.org>
355
356         * configure: Re-generate.
357         * configure.ac: Use separate sed expressions to escape variables
358         in auto-load directories.
359
360 2018-12-05  Andrew Burgess  <andrew.burgess@embecosm.com>
361
362         * riscv-tdep.c (riscv_features_from_gdbarch_info): New function.
363         (riscv_find_default_target_description): Use new function to
364         extract feature from gdbarch_info.
365         (riscv_gdbarch_init): Add error checks for xlen and flen between
366         target description and bfd headers.  Be smarter about when we
367         think the hardware floating point abi should be used.
368
369 2018-12-05  Alan Hayward  <alan.hayward@arm.com>
370
371         * nat/aarch64-linux-hw-point.c
372         (aarch64_linux_any_set_debug_regs_state): New function.
373         * nat/aarch64-linux-hw-point.h
374         (aarch64_linux_any_set_debug_regs_state): New declaration.
375         * nat/aarch64-linux.c (aarch64_linux_new_thread): Check if any
376         BPs or WPs are set.
377
378 2018-11-30  John Baldwin  <jhb@FreeBSD.org>
379
380         * common/filestuff.c [HAVE_KINFO_GETFILE]: Include headers.
381         (fdwalk) [HAVE_KINFO_GETFILE]: Use kinfo_getfile.
382
383 2018-11-30  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
384             Simon Marchi  <simon.marchi@ericsson.com>
385
386         * linespec.c (symtab_vector_up): Remove.
387         (symtabs_from_filename): Change return type to std::vector.
388         (collect_symtabs_from_filename): Likewise.
389         (create_sals_line_offset): Assign return value of
390         collect_symtabs_from_filename to *ls->file_symtabs.
391         (convert_explicit_location_to_linespec): Remove call to release.
392         (parse_linespec): Likewise.
393         (symtab_collector) <symtab_collector>: Remove initialization of
394         m_symtabs.
395         <release_symtabs>: Change return type to std::vector<symtab *>.
396         <operator ()>: Adjust.
397
398 2018-11-30  John Baldwin  <jhb@FreeBSD.org>
399
400         * fbsd-nat.c [__FreeBSD_version >= 700009] (USE_SIGINFO): Macro
401         defined.
402         (union sigval32, struct siginfo32, fbsd_siginfo_size)
403         (fbsd_convert_siginfo): Make conditional on USE_SIGINFO instead
404         of KERN_PROC_AUXV and PT_LWPINFO.
405         (fbsd_nat_target::xfer_partial): Define method unconditionally.
406         Make TARGET_OBJECT_SIGNAL_INFO conditional on USE_SIGINFO.
407         Make TARGET_OBJECT_AUXV conditional on KERN_PROC_AUXV.
408         Make TARGET_OBJECT_FREEBSD_VMMAP and
409         TARGET_OBJECT_FREEBSD_PS_STRINGS conditional on KERN_PROC_VMMAP
410         and KERN_PROC_PS_STRINGS.
411         * fbsd-nat.h: Include <sys/proc.h>.
412         (fbsd_nat_target::xfer_partial): Declare method unconditionally.
413
414 2018-11-30  Andrew Burgess  <andrew.burgess@embecosm.com>
415
416         * riscv-linux-nat.c: Add 'inferior.h' and 'target-descriptions.h'
417         header files.
418         (riscv_linux_nat_target::read_description): New method.
419
420 2018-11-30  Andrew Burgess  <andrew.burgess@embecosm.com>
421
422         * arch/riscv.h (riscv_gdbarch_features::hash): New method.
423         * arch/riscv.c (struct riscv_gdbarch_features_hasher): New.
424         (riscv_tdesc_cache): New global.
425         (riscv_create_target_description): Look in the cache before
426         creating a new target description.
427
428 2018-11-30  Andrew Burgess  <andrew.burgess@embecosm.com>
429
430         * arch/riscv.h (riscv_gdb_features::operator==): New.
431         (riscv_gdb_features::operator!=): New.
432         * riscv-tdep.c (riscv_gdbarch_init): Make use of the inequality
433         operator.
434
435 2018-11-30  Andrew Burgess  <andrew.burgess@embecosm.com>
436
437         * arch/riscv.h (riscv_create_target_description): Make return type
438         const.
439         * arch/riscv.c (riscv_create_target_description): Likewise.
440         * riscv-tdep.c (riscv_find_default_target_description): Likewise.
441
442 2018-11-30  Jan Kratochvil  <jan.kratochvil@redhat.com>
443             Keith Seitz  <keiths@redhat.com>
444             Tom Tromey  <tom@tromey.com>
445             Sergio Durigan Junior  <sergiodj@redhat.com>
446
447         https://bugzilla.redhat.com/show_bug.cgi?id=1613614
448         * dwarf2read.c (dwarf2_find_containing_comp_unit): Add
449         'mid_cu->length' to '*cu_off' when checking if 'sect_off' is
450         inside the CU.
451
452 2018-11-30  Pedro Alves  <palves@redhat.com>
453
454         * aix-thread.c (aix_thread_target) <aix_thread_target>: Delete.
455         <stratum>: New override.
456         * bfd-target.c (aix_thread_target) <aix_thread_target>: Delete.
457         <stratum>: New override.
458         * bsd-uthread.c (bsd_uthread_target) <bsd_uthread_target>: Delete.
459         <stratum>: New override.
460         * exec.c (exec_target) <exec_target>: Delete.
461         <stratum>: New override.
462         * gdbarch-selftests.c (register_to_value_test): Adjust to use the
463         stratum method instead of the to_stratum field.
464         * linux-thread-db.c (thread_db_target) <thread_db_target>: Delete.
465         <stratum>: New override.
466         (thread_db_target::thread_db_target): Delete.
467         * make-target-delegates (print_class): Don't print a ctor
468         declaration.  Print a stratum method override declaration.
469         * process-stratum-target.h (process_stratum_target)
470         <process_stratum_target>: Delete.
471         <stratum>: New override.
472         * ravenscar-thread.c (ravenscar_thread_target)
473         <ravenscar_thread_target>: Delete.
474         <stratum>: New override.
475         * record-btrace.c (record_btrace_target)
476         <record_btrace_target>: Delete.
477         <stratum>: New override.
478         * record-full.c (record_full_base_target)
479         <record_full_base_target>: Delete.
480         <stratum>: New override.
481         * record.c (record_disconnect, record_detach)
482         (record_mourn_inferior, record_kill): Adjust to use the stratum
483         method instead of the to_stratum field.
484         * regcache.c (cooked_read_test, cooked_write_test): Likewise.
485         * sol-thread.c (sol_thread_target)
486         <sol_thread_target>: Delete.
487         <stratum>: New override.
488         * spu-multiarch.c (spu_multiarch_target)
489         <spu_multiarch_target>: Delete.
490         <stratum>: New override.
491         * target-delegates.c: Regenerate.
492         * target.c (target_stack::push, target_stack::unpush)
493         (pop_all_targets_above, pop_all_targets_at_and_above)
494         (info_target_command, target_require_runnable)
495         (target_stack::find_beneath): Adjust to use the stratum method
496         instead of the to_stratum field.
497         (dummy_target::dummy_target): Delete.
498         (dummy_target::stratum): New.
499         (debug_target::debug_target): Delete.
500         (debug_target::stratum): New.
501         (maintenance_print_target_stack): Adjust to use the stratum method
502         instead of the to_stratum field.
503         * target.h (struct target_ops) <stratum>: New method.
504         <to_stratum>: Delete.
505         <is_pushed>: Adjust to use the stratum method
506         instead of the to_stratum field.
507
508 2018-11-30  Pedro Alves  <palves@redhat.com>
509
510         * corelow.c (core_target) <has_all_memory, has_execution>: New
511         overrides.
512         * inf-child.c (inf_child_target::has_all_memory)
513         (inf_child_target::has_memory, inf_child_target::has_stack)
514         (inf_child_target::has_registers)
515         (inf_child_target::has_execution): Delete.
516         * inf-child.h (inf_child_target) <has_all_memory, has_memory,
517         has_stack, has_registers, has_execution>: Delete.
518         * process-stratum-target.c
519         (process_stratum_target::has_all_memory)
520         (process_stratum_target::has_memory)
521         (process_stratum_target::has_stack)
522         (process_stratum_target::has_registers)
523         (process_stratum_target::has_execution): New.
524         * process-stratum-target.h (process_stratum_target)
525         <has_all_memory, has_memory, has_stack, has_registers,
526         has_execution>: New method overrides.
527         * ravenscar-thread.c (ravenscar_thread_target) <has_all_memory,
528         has_memory, has_stack, has_registers, has_execution>: Delete.
529         * remote-sim.c (gdbsim_target) <has_stack, has_registers,
530         has_execution>: Delete.
531         * remote.c (remote_target) <has_all_memory, has_memory, has_stack,
532         has_registers, has_execution>: Delete.
533         * target.c (default_child_has_all_memory)
534         (default_child_has_memory, default_child_has_stack)
535         (default_child_has_registers, default_child_has_execution):
536         Delete.
537         * target.h (default_child_has_all_memory)
538         (default_child_has_memory, default_child_has_stack)
539         (default_child_has_registers, default_child_has_execution):
540         Delete.
541         * tracefile.h (tracefile_target) <has_execution>: New override.
542
543 2018-11-30  Pedro Alves  <palves@redhat.com>
544
545         * Makefile.in (COMMON_SFILES): Add process-stratum-target.c.
546         * bsd-kvm.c: Include "process-stratum-target.h".
547         (bsd_kvm_target): Now inherits from process_stratum_target.
548         (bsd_kvm_target::bsd_kvm_target): Default it.
549         * corelow.c: Include "process-stratum-target.h".
550         (core_target): Now inherits from process_stratum_target.
551         (core_target::core_target): Don't set to_stratum here.
552         * inf-child.c (inf_child_target::inf_child_target): Delete.
553         * inf-child.h: Include "process-stratum-target.h".
554         (inf_child_target): Inherit from process_stratum_target.
555         (inf_child_target) <inf_child_target>: Default it.
556         <can_async_p, supports_non_stop, supports_disable_randomization>:
557         Delete overrides.
558         * process-stratum-target.c: New file.
559         * process-stratum-target.h: New file.
560         * remote-sim.c: Include "process-stratum-target.h".
561         (gdbsim_target): Inherit from process_stratum_target.
562         <gdbsim_target>: Default it.
563         * remote.c: Include "process-stratum-target.h".
564         (remote_target): Inherit from process_stratum_target.
565         <remote_target>: Default it.
566         * target.c (default_thread_address_space)
567         (default_thread_architecture): Delete.
568         * target.h (target_ops) <thread_architecture>: Now returns NULL by
569         default.
570         <thread_address_space>: Ditto.
571         * test-target.h: Include "process-stratum-target.h" instead of
572         "target.h".
573         (test_target_ops): Inherit from process_stratum_target.
574         <test_target_ops>: Default it.
575         * tracefile.c (tracefile_target::tracefile_target): Delete.
576         * tracefile.h: Include "process-stratum-target.h".
577         (tracefile_target): Inherit from process_stratum_target.
578         <tracefile_target>: Default it.
579         * target-delegates.c: Regenerate.
580
581 2018-11-30  Pedro Alves  <palves@redhat.com>
582
583         * Makefile.in (COMMON_SFILES): Add test-target.c.
584         * gdbarch-selftests.c: Include "test-target.h".
585         * regcache.c: Include "test-target.h".
586         * target.c (test_target_info, test_target_ops::info): Move to ...
587         * test-target.c: ... this new file.
588         * target.h (test_target_ops): Move to ...
589         * test-target.h: ... this new file.
590
591 2018-11-29  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
592
593         * source.c (forward_search_command): Fix leak by using
594         xrealloc even for the first allocation in the loop, as buf
595         is static.
596
597 2018-11-29  Rajendra SY  <rajendra.sy@gmail.com>
598
599         PR gdb/23093
600         * gdb/fbsd-tdep.c (fbsd_gdb_signal_from_target)
601         (fbsd_gdb_signal_to_target): New.
602         (fbsd_init_abi): Install gdbarch "signal_from_target" and
603         "signal_to_target" methods.
604
605 2018-11-29  Tom Tromey  <tom@tromey.com>
606
607         * valarith.c (value_x_unop): Don't set argvec[3].
608
609 2018-11-26  Simon Marchi  <simon.marchi@ericsson.com>
610
611         PR gdb/23917
612         * sparc-linux-nat.c (sparc_linux_nat_target): Remove extraneous
613         semicolon.
614
615 2018-11-26  Pedro Alves  <palves@redhat.com>
616
617         * procfs.c (procfs_notice_thread): Replace uses of
618         in_thread_list/is_exited with find_thread_ptid/THREAD_EXITED.
619         * sol-thread.c (sol_thread_target::wait)
620         (sol_update_thread_list_callback): Likewise.
621
622 2018-11-25  Tom Tromey  <tom@tromey.com>
623
624         * ui-out.c (ui_out::field_fmt): Remove comment.
625         * tui/tui-out.c (tui_ui_out::do_field_fmt): Remove comment.
626         * mi/mi-out.c (mi_ui_out::do_field_fmt): Remove comment.
627
628 2018-11-24  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
629
630         * source.c (open_source_file): Leak fixed in '8e6a5953e1d Fix 4K
631         leak in open_source_file' has been partially undone by '2179fbc36d23
632         Return scoped_fd from open_source_file'. Re-add the transfer of
633         current s->fullname to the unique_xmalloc_ptr fullname given
634         to find_and_open_source.
635
636 2018-11-23  Pedro Alves  <palves@redhat.com>
637
638         * gdbthread.h (enum thread_state): Move comments here.
639         (is_running, is_stopped, is_exited): Remove declarations.
640
641 2018-11-22  Pedro Alves  <palves@redhat.com>
642
643         * Makefile.in (COMMON_SFILES): Add thread-iter.c.
644         * breakpoint.c (breakpoints_should_be_inserted_now): Replace
645         ALL_NON_EXITED_THREADS with all_non_exited_threads.
646         (print_one_breakpoint_location): Replace ALL_INFERIORS with
647         all_inferiors.
648         * bsd-kvm.c: Include inferior.h.
649         * btrace.c (btrace_free_objfile): Replace ALL_NON_EXITED_THREADS
650         with all_non_exited_threads.
651         * common/filtered-iterator.h: New.
652         * common/safe-iterator.h: New.
653         * corelow.c (core_target_open): Don't call init_thread_list here.
654         * darwin-nat.c (thread_info_from_private_thread_info): Replace
655         ALL_THREADS with all_threads.
656         * fbsd-nat.c (fbsd_nat_target::resume): Replace
657         ALL_NON_EXITED_THREADS with inf->non_exited_threads.
658         * fbsd-tdep.c (fbsd_make_corefile_notes): Replace
659         ALL_NON_EXITED_THREADS with inf->non_exited_threads.
660         * fork-child.c (postfork_hook): Don't call init_thread_list here.
661         * gdbarch-selftests.c (register_to_value_test): Adjust.
662         * gdbthread.h: Don't include "inferior.h" here.
663         (struct inferior): Forward declare.
664         (enum step_over_calls_kind): Moved here from inferior.h.
665         (thread_info::deletable): Definition moved to thread.c.
666         (find_thread_ptid (inferior *, ptid_t)): Declare.
667         (ALL_THREADS, ALL_THREADS_BY_INFERIOR, ALL_THREADS_SAFE): Delete.
668         Include "thread-iter.h".
669         (all_threads, all_non_exited_threads, all_threads_safe): New.
670         (any_thread_p): Declare.
671         (thread_list): Delete.
672         * infcmd.c (signal_command): Replace ALL_NON_EXITED_THREADS with
673         all_non_exited_threads.
674         (proceed_after_attach_callback): Delete.
675         (proceed_after_attach): Take an inferior pointer instead of an
676         integer PID.  Adjust to use range-for.
677         (attach_post_wait): Pass down inferior pointer instead of pid.
678         Use range-for instead of ALL_NON_EXITED_THREADS.
679         (detach_command): Remove init_thread_list call.
680         * inferior-iter.h: New.
681         * inferior.c (struct delete_thread_of_inferior_arg): Delete.
682         (delete_thread_of_inferior): Delete.
683         (delete_inferior, exit_inferior_1): Use range-for with
684         inf->threads_safe() instead of iterate_over_threads.
685         (inferior_appeared): Call init_thread_list here.
686         (discard_all_inferiors): Use all_non_exited_inferiors.
687         (find_inferior_id, find_inferior_pid): Use all_inferiors.
688         (iterate_over_inferiors): Use all_inferiors_safe.
689         (have_inferiors, number_of_live_inferiors): Use
690         all_non_exited_inferiors.
691         (number_of_inferiors): Use all_inferiors and std::distance.
692         (print_inferior): Use all_inferiors.
693         * inferior.h: Include gdbthread.h.
694         (enum step_over_calls_kind): Moved to gdbthread.h.
695         (struct inferior) <thread_list>: New field.
696         <threads, non_exited_threads, threads_safe>: New methods.
697         (ALL_INFERIORS): Delete.
698         Include "inferior-iter.h".
699         (ALL_NON_EXITED_INFERIORS): Delete.
700         (all_inferiors_safe, all_inferiors, all_non_exited_inferiors): New
701         functions.
702         * inflow.c (child_interrupt, child_pass_ctrlc): Replace
703         ALL_NON_EXITED_THREADS with all_non_exited_threads.
704         * infrun.c (follow_exec): Use all_threads_safe.
705         (clear_proceed_status, proceed): Use all_non_exited_threads.
706         (init_wait_for_inferior): Don't clear inline frame state here.
707         (infrun_thread_stop_requested, for_each_just_stopped_thread): Use
708         all_threads instead of ALL_NON_EXITED_THREADS.
709         (random_pending_event_thread): Use all_non_exited_threads instead
710         of ALL_NON_EXITED_THREADS.  Use a lambda for repeated code.
711         (clean_up_just_stopped_threads_fsms): Use all_non_exited_threads
712         instead of ALL_NON_EXITED_THREADS.
713         (handle_no_resumed): Use all_non_exited_threads instead of
714         ALL_NON_EXITED_THREADS.  Use all_inferiors instead of
715         ALL_INFERIORS.
716         (restart_threads, switch_back_to_stepped_thread): Use
717         all_non_exited_threads instead of ALL_NON_EXITED_THREADS.
718         * linux-nat.c (check_zombie_leaders): Replace ALL_INFERIORS with
719         all_inferiors.
720         (kill_unfollowed_fork_children): Use inf->non_exited_threads
721         instead of ALL_NON_EXITED_THREADS.
722         * linux-tdep.c (linux_make_corefile_notes): Use
723         inf->non_exited_threads instead of ALL_NON_EXITED_THREADS.
724         * linux-thread-db.c (thread_db_target::update_thread_list):
725         Replace ALL_INFERIORS with all_inferiors.
726         (thread_db_target::thread_handle_to_thread_info): Use
727         inf->non_exited_threads instead of ALL_NON_EXITED_THREADS.
728         * mi/mi-interp.c (multiple_inferiors_p): New.
729         (mi_on_resume_1): Simplify using all_non_exited_threads and
730         multiple_inferiors_p.
731         * mi/mi-main.c (mi_cmd_thread_list_ids): Use all_non_exited_threads
732         instead of ALL_NON_EXITED_THREADS.
733         * nto-procfs.c (nto_procfs_target::open): Don't call
734         init_thread_list here.
735         * record-btrace.c (record_btrace_target_open)
736         (record_btrace_target::stop_recording)
737         (record_btrace_target::close)
738         (record_btrace_target::record_is_replaying)
739         (record_btrace_target::resume, record_btrace_target::wait)
740         (record_btrace_target::record_stop_replaying): Use
741         all_non_exited_threads instead of ALL_NON_EXITED_THREADS.
742         * record-full.c (record_full_wait_1): Use all_non_exited_threads
743         instead of ALL_NON_EXITED_THREADS.
744         * regcache.c (cooked_read_test): Remove reference to global
745         thread_list.
746         * remote-sim.c (gdbsim_target::create_inferior): Don't call
747         init_thread_list here.
748         * remote.c (remote_target::update_thread_list): Use
749         all_threads_safe instead of ALL_NON_EXITED_THREADS.
750         (remote_target::process_initial_stop_replies): Replace
751         ALL_INFERIORS with all_non_exited_inferiors and use
752         all_non_exited_threads instead of ALL_NON_EXITED_THREADS.
753         (remote_target::open_1): Don't call init_thread_list here.
754         (remote_target::append_pending_thread_resumptions)
755         (remote_target::remote_resume_with_hc): Use all_non_exited_threads
756         instead of ALL_NON_EXITED_THREADS.
757         (remote_target::commit_resume)
758         (remote_target::remove_new_fork_children): Replace ALL_INFERIORS
759         with all_non_exited_inferiors and use all_non_exited_threads
760         instead of ALL_NON_EXITED_THREADS.
761         (remote_target::kill_new_fork_children): Use
762         all_non_exited_threads instead of ALL_NON_EXITED_THREADS.  Remove
763         init_thread_list and init_wait_for_inferior calls.
764         (remote_target::remote_btrace_maybe_reopen)
765         (remote_target::thread_handle_to_thread_info): Use
766         all_non_exited_threads instead of ALL_NON_EXITED_THREADS.
767         * target.c (target_terminal::restore_inferior)
768         (target_terminal_is_ours_kind): Replace ALL_INFERIORS with
769         all_non_exited_inferiors.
770         * thread-iter.c: New file.
771         * thread-iter.h: New file.
772         * thread.c: Include "inline-frame.h".
773         (thread_list): Delete.
774         (clear_thread_inferior_resources): Call clear_inline_frame_state.
775         (init_thread_list): Use all_threads_safe instead of
776         ALL_THREADS_SAFE.  Adjust to per-inferior thread lists.
777         (new_thread): Adjust to per-inferior thread lists.
778         (add_thread_silent): Pass inferior to find_thread_ptid.
779         (thread_info::deletable): New, moved from the header.
780         (delete_thread_1): Adjust to per-inferior thread lists.
781         (find_thread_global_id): Use inf->threads().
782         (find_thread_ptid): Use find_inferior_ptid and pass inferior to
783         find_thread_ptid.
784         (find_thread_ptid(inferior*, ptid_t)): New overload.
785         (iterate_over_threads): Use all_threads_safe.
786         (any_thread_p): New.
787         (thread_count): Use all_threads and std::distance.
788         (live_threads_count): Use all_non_exited_threads and
789         std::distance.
790         (valid_global_thread_id): Use all_threads.
791         (in_thread_list): Use find_thread_ptid.
792         (first_thread_of_inferior): Adjust to per-inferior thread lists.
793         (any_thread_of_inferior, any_live_thread_of_inferior): Use
794         inf->non_exited_threads().
795         (prune_threads, delete_exited_threads): Use all_threads_safe.
796         (thread_change_ptid): Pass inferior pointer to find_thread_ptid.
797         (set_resumed, set_running): Use all_non_exited_threads.
798         (is_thread_state, is_stopped, is_exited, is_running)
799         (is_executing): Delete.
800         (set_executing, set_stop_requested, finish_thread_state): Use
801         all_non_exited_threads.
802         (print_thread_info_1): Use all_inferiors and all_threads.
803         (thread_apply_all_command): Use all_non_exited_threads.
804         (thread_find_command): Use all_threads.
805         (update_threads_executing): Use all_non_exited_threads.
806         * tid-parse.c (parse_thread_id): Use inf->threads.
807         * x86-bsd-nat.c (x86bsd_dr_set): Use inf->non_exited_threads ().
808
809 2018-11-22  Pedro Alves  <palves@redhat.com>
810
811         * infrun.c (follow_exec) <set follow-exec new>: Add thread and
812         switch to it before calling into try_open_exec_file.
813
814 2018-11-22  Pedro Alves  <palves@redhat.com>
815
816         * cli/cli-interp.c (cli_on_user_selected_context_changed): Use
817         inferior_thread instead of find_thread_ptid, and only when
818         inferior_ptid is not null_ptid.
819         * inferior.c (add_inferior): Don't include target_pid_to_str
820         output when the inferior is not started.
821         * python/py-inferior.c (python_on_normal_stop): Don't use
822         find_thread_ptid.
823         (tui_on_user_selected_context_changed): Use inferior_thread
824         instead of find_thread_ptid, and only when inferior_ptid is not
825         null_ptid.
826
827 2018-11-21  Benno Fünfstück  <benno.fuenfstueck@gmail.com>
828
829         PR python/23714
830         * gdb/python/python.c (execute_gdb_command): Call
831         prevent_dont_repeat earlier to avoid affecting dont_repeat.
832
833 2018-11-21  Andrew Burgess  <andrew.burgess@embecosm.com>
834
835         * Makefile.in (ALL_TARGET_OBS): Add arch/riscv.o.
836         (HFILES_NO_SRCDIR): Add arch/riscv.h.
837         * arch/riscv.c: New file.
838         * arch/riscv.h: New file.
839         * configure.tgt: Add cpu_obs list of riscv, move riscv-tdep.o into
840         this list, and add arch/riscv.o.
841         * features/Makefile: Add riscv features.
842         * features/riscv/32bit-cpu.c: New file.
843         * features/riscv/32bit-cpu.xml: New file.
844         * features/riscv/32bit-csr.c: New file.
845         * features/riscv/32bit-csr.xml: New file.
846         * features/riscv/32bit-fpu.c: New file.
847         * features/riscv/32bit-fpu.xml: New file.
848         * features/riscv/64bit-cpu.c: New file.
849         * features/riscv/64bit-cpu.xml: New file.
850         * features/riscv/64bit-csr.c: New file.
851         * features/riscv/64bit-csr.xml: New file.
852         * features/riscv/64bit-fpu.c: New file.
853         * features/riscv/64bit-fpu.xml: New file.
854         * features/riscv/rebuild-csr-xml.sh: New file.
855         * riscv-tdep.c: Add 'arch/riscv.h' include.
856         (riscv_gdb_reg_names): Delete.
857         (csr_reggroup): New global.
858         (struct riscv_register_alias): Delete.
859         (struct riscv_register_feature): New structure.
860         (riscv_register_aliases): Delete.
861         (riscv_xreg_feature): New global.
862         (riscv_freg_feature): New global.
863         (riscv_virtual_feature): New global.
864         (riscv_csr_feature): New global.
865         (riscv_create_csr_aliases): New function.
866         (riscv_read_misa_reg): Delete.
867         (riscv_has_feature): Delete.
868         (riscv_isa_xlen): Simplify, just return cached xlen.
869         (riscv_isa_flen): Simplify, just return cached flen.
870         (riscv_has_fp_abi): Update for changes in struct gdbarch_tdep.
871         (riscv_register_name): Update to make use of tdesc_register_name.
872         Look up xreg and freg names in the new globals riscv_xreg_feature
873         and riscv_freg_feature.  Don't supply csr aliases here.
874         (riscv_fpreg_q_type): Delete.
875         (riscv_register_type): Use tdesc_register_type in almost all
876         cases, override the returned type in a few specific cases only.
877         (riscv_print_one_register_info): Handle errors reading registers.
878         (riscv_register_reggroup_p): Use tdesc_register_in_reggroup_p for
879         registers that are otherwise unknown to GDB.  Also check the
880         csr_reggroup.
881         (riscv_print_registers_info): Remove assert about upper register
882         number, and use gdbarch_register_reggroup_p instead of
883         short-cutting.
884         (riscv_find_default_target_description): New function.
885         (riscv_check_tdesc_feature): New function.
886         (riscv_add_reggroups): New function.
887         (riscv_setup_register_aliases): New function.
888         (riscv_init_reggroups): New function.
889         (_initialize_riscv_tdep): Add calls to setup CSR aliases, and
890         setup register groups.  Register new riscv debug variable.
891         * riscv-tdep.h: Add 'arch/riscv.h' include.
892         (struct gdbarch_tdep): Remove abi union, and add
893         riscv_gdbarch_features field.  Remove cached quad floating point
894         type, and provide initialisation for double type field.
895         * target-descriptions.c (maint_print_c_tdesc_cmd): Add riscv to
896         the list of targets using the feature based target descriptions.
897         * NEWS: Mention target description support.
898
899 2018-11-21  Pedro Alves  <palves@redhat.com>
900
901         * valops.c (find_method_list, value_find_oload_method_list)
902         (find_overload_match, find_oload_champ): Rename parameters and
903         locals.
904
905 2018-11-21  Pedro Alves  <palves@redhat.com>
906
907         * valops.c (find_method_list): Replace pointer and length
908         parameters with an gdb::array_view.  Adjust.
909         (value_find_oload_method_list): Likewise.
910         (find_overload_match): Use gdb::array_view for methods list.
911         Adjust to find_oload_champ interface change.
912         (find_oload_champ): 'xm_worker_vec' parameter now a pointer/array.
913         'num_fns' parameter now a size_t.  Eliminate 'fn_count' local.
914
915 2018-11-21  Pedro Alves  <palves@redhat.com>
916
917         * gdbtypes.c (compare_badness): Change type of parameters to const
918         reference.  Adjust to badness_vector being a std::vector now.
919         (rank_function): Adjust to badness_vector being a std::vector now.
920         * gdbtypes.h (badness_vector): Now a typedef to std::vector.
921         (LENGTH_MATCH): Delete.
922         (compare_badness): Change type of parameters to const reference.
923         (rank_function): Return a badness_vector by value now.
924         (find_overload_match): Adjust to badness_vector being a
925         std::vector now.  Remove cleanups.
926         (find_oload_champ_namespace): 'oload_champ_bv' parameter now a
927         badness_vector pointer.
928         (find_oload_champ_namespace_loop): 'oload_champ_bv' parameter now
929         a badness_vector pointer.  Adjust to badness_vector being a
930         std::vector now.  Remove cleanups.
931         (find_oload_champ): 'oload_champ_bv' parameter now
932         a badness_vector pointer.  Adjust to badness_vector being a
933         std::vector now.  Remove cleanups.
934
935 2018-11-21  Pedro Alves  <palves@redhat.com>
936
937         * cp-support.c (sym_return_val_size, sym_return_val_index)
938         (sym_return_val): Delete.
939         (overload_list_add_symbol): Add std::vector parameter.  Adjust to
940         add to the vector.
941         (make_symbol_overload_list): Adjust to return a std::vector
942         instead of maintaining a global open coded vector.
943         (make_symbol_overload_list_block): Add std::vector parameter.
944         (make_symbol_overload_list_block): Rename to ...
945         (add_symbol_overload_list_block): ... this and add std::vector
946         parameter.
947         (make_symbol_overload_list_namespace): Rename to ...
948         (add_symbol_overload_list_namespace): ... this and add std::vector
949         parameter.
950         (make_symbol_overload_list_adl_namespace): Rename to ...
951         (add_symbol_overload_list_adl_namespace): ... this and add
952         std::vector parameter.
953         (make_symbol_overload_list_adl): Delete.
954         (add_symbol_overload_list_adl): New.
955         (make_symbol_overload_list_using): Rename to ...
956         (add_symbol_overload_list_using): ... this and add std::vector
957         parameter.
958         (make_symbol_overload_list_qualified): Rename to ...
959         (add_symbol_overload_list_qualified): ... this and add std::vector
960         parameter.
961         * cp-support.h: Include "common/array-view.h" and <vector>.
962         (make_symbol_overload_list): Change return type to std::vector.
963         (make_symbol_overload_list_adl): Delete declaration.
964         (add_symbol_overload_list_adl): New declaration.
965         * valops.c (find_overload_match): Local 'oload_syms' now a
966         std::vector.
967         (find_oload_champ_namespace): 'oload_syms' parameter now a
968         std::vector pointer.
969         (find_oload_champ_namespace_loop): 'oload_syms' parameter now a
970         std::vector pointer.  Adjust to new make_symbol_overload_list
971         interface.
972
973 2018-11-21  Pedro Alves  <palves@redhat.com>
974
975         * common/array-view.h (array_view::splice(size_type, size_t)): New.
976         (array_view::splice(size_type)): New.
977         * eval.c (eval_call, evaluate_funcall): Adjust to use array_view.
978         * extension.c (xmethod_worker::get_arg_types): Adjust to return an
979         std::vector.
980         (xmethod_worker::get_result_type): Adjust to use gdb::array_view.
981         * extension.h: Include "common/array-view.h".
982         (xmethod_worker::invoke): Adjust to use gdb::array_view.
983         (xmethod_worker::get_arg_types): Adjust to return an std::vector.
984         (xmethod_worker::get_result_type): Adjust to use gdb::array_view.
985         (xmethod_worker::do_get_arg_types): Adjust to use std::vector.
986         (xmethod_worker::do_get_result_type): Adjust to use
987         gdb::array_view.
988         * gdbtypes.c (rank_function): Adjust to use gdb::array_view.
989         * gdbtypes.h: Include "common/array-view.h".
990         (rank_function): Adjust to use gdb::array_view.
991         * python/py-xmethods.c (python_xmethod_worker::invoke)
992         (python_xmethod_worker::do_get_arg_types)
993         (python_xmethod_worker::do_get_result_type)
994         (python_xmethod_worker::invoke): Adjust to new interfaces.
995         * valarith.c (value_user_defined_cpp_op, value_user_defined_op)
996         (value_x_binop, value_x_unop): Adjust to use gdb::array_view.
997         * valops.c (find_overload_match, find_oload_champ_namespace)
998         (find_oload_champ_namespace_loop, find_oload_champ): Adjust to use
999         gdb:array_view and the new xmethod_worker interfaces.
1000         * value.c (result_type_of_xmethod, call_xmethod): Adjust to use
1001         gdb::array_view.
1002         * value.h (find_overload_match, result_type_of_xmethod)
1003         (call_xmethod): Adjust to use gdb::array_view.
1004         * unittests/array-view-selftests.c: Add slicing tests.
1005
1006 2018-11-21  Pedro Alves  <palves@redhat.com>
1007
1008         * ada-lang.c (ada_evaluate_subexp): Adjust to pass an array_view.
1009         * common/array-view.h (make_array_view): New.
1010         * compile/compile-object-run.c (compile_object_run): Adjust to
1011         pass an array_view.
1012         * elfread.c (elf_gnu_ifunc_resolve_addr): Adjust.
1013         * eval.c (eval_call): Adjust to pass an array_view.
1014         (evaluate_subexp_standard): Adjust to pass an array_view.
1015         * gcore.c (call_target_sbrk): Adjust to pass an array_view.
1016         * guile/scm-value.c (gdbscm_value_call): Likewise.
1017         * infcall.c (push_dummy_code): Replace pointer + size parameters
1018         with an array_view parameter.
1019         (call_function_by_hand, call_function_by_hand_dummy): Likewise and
1020         adjust.
1021         * infcall.h: Include "common/array-view.h".
1022         (call_function_by_hand, call_function_by_hand_dummy): Replace
1023         pointer + size parameters with an array_view parameter.
1024         * linux-fork.c (inferior_call_waitpid): Adjust to use array_view.
1025         * linux-tdep.c (linux_infcall_mmap): Likewise.
1026         * objc-lang.c (lookup_objc_class, lookup_child_selector)
1027         (value_nsstring, print_object_command): Likewise.
1028         * python/py-value.c (valpy_call): Likewise.
1029         * rust-lang.c (rust_evaluate_funcall): Likewise.
1030         * spu-tdep.c (flush_ea_cache): Likewise.
1031         * valarith.c (value_x_binop, value_x_unop): Likewise.
1032         * valops.c (value_allocate_space_in_inferior): Likewise.
1033         * unittests/array-view-selftests.c (run_tests): Add
1034         gdb::make_array_view test.
1035
1036 2018-11-20  Andrew Burgess  <andrew.burgess@embecosm.com>
1037
1038         * cli-out.c (cli_ui_out::do_field_int): Use string_printf rather
1039         than a fixed size buffer.
1040
1041 2018-11-20  Andrew Burgess  <andrew.burgess@embecosm.com>
1042
1043         * breakpoint.c (print_one_breakpoint_location): Reduce whitespace,
1044         and remove insertion of extra spaces in GDB's output.
1045         * cli-out.c (cli_ui_out::do_field_fmt): Update header comment.
1046         Layout field into a temporary buffer, and then output it as a
1047         string field.
1048
1049 2018-11-20  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1050
1051         * NEWS: Document the language choice done by
1052         'info [types|functions|variables]|rbreak'.
1053
1054 2018-11-20  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1055
1056         * symtab.c (treg_matches_sym_type_name): Use
1057         scoped_switch_to_sym_language_if_auto instead of local logic.
1058         (print_symbol_info): Use scoped_switch_to_sym_language_if_auto
1059         to switch to SYM language when language mode is auto.
1060
1061 2018-11-20  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1062
1063         * language.h (scoped_switch_to_sym_language_if_auto): New class.
1064
1065 2018-11-20  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1066
1067         * symtab.c (search_symbols): Properly check absence of type regexp
1068         before entering the loop scanning the minimal symbols.
1069
1070 2018-11-20  John Darrington  <john@darrington.wattle.id.au>
1071
1072         * s12z-tdep.c (s12z_extract_return_value): New function.
1073         (inv_reg_perm) New array.
1074         (s12z_return_value): Populate readbuf if non-null.
1075
1076 2018-11-20  Eli Zaretskii  <eliz@gnu.org>
1077
1078         * common/filestuff.c (gdb_fopen_cloexec): Disable use of "e" mode
1079         with 'fopen' also if O_CLOEXEC is equal to O_NOINHERIT, to cater
1080         to MinGW fixed by Gnulib.
1081         (O_NOINHERIT): Define if not defined.
1082
1083 2018-11-19  John Darrington  <john@darrington.wattle.id.au>
1084
1085         * s12z-tdep.c (s12z_frame_cache): Add an assertion.
1086
1087 2018-11-19  Simon Marchi  <simon.marchi@polymtl.ca>
1088
1089         * infrun.c (displaced_step_inferior_state) <next>: Remove.
1090
1091 2018-11-19  Tom Tromey  <tom@tromey.com>
1092
1093         * source.c (get_filename_and_charpos): Return void.
1094
1095 2018-11-19  Simon Marchi  <simon.marchi@polymtl.ca>
1096
1097         * skip.c (_initialize_step_skip): Fix "info skip" help.
1098
1099 2018-11-16  Tom Tromey  <tom@tromey.com>
1100
1101         PR rust/23625:
1102         * rust-lang.c (rust_internal_print_type): Handle TYPE_CODE_PTR.
1103
1104 2018-11-19  Simon Marchi  <simon.marchi@ericsson.com>
1105
1106         * infrun.c (displaced_step_inferior_states): Change type to
1107         std::forward_list.
1108         (get_displaced_stepping_state): Adjust.
1109         (displaced_step_in_progress_any_inferior): Adjust.
1110         (add_displaced_stepping_state): Adjust.
1111         (remove_displaced_stepping_state): Adjust.
1112
1113 2018-11-18  Tom Tromey  <tom@tromey.com>
1114
1115         PR build/23814:
1116         * target-delegates.c: Rebuild.
1117         * ia64-linux-nat.c (class ia64_linux_nat_target)
1118         <have_steppable_watchpoint>: Use override.  Return true, not 1.
1119         (ia64_linux_nat_target::can_use_hw_breakpoint): Rename.  Remove
1120         "self" argument.
1121         (ia64_linux_nat_target::low_new_thread): Rename.
1122         (class ia64_linux_nat_target) <read_description>: Don't declare.
1123         * target.h (struct target_ops) <have_steppable_watchpoint>: Return
1124         bool.
1125
1126 2018-11-16  Alan Hayward  <alan.hayward@arm.com>
1127
1128         PR gdb/22736:
1129         * aarch64-tdep.c (aarch64_push_dummy_call): Remove
1130         lang_struct_return code.
1131
1132 2018-11-16  Alan Hayward  <alan.hayward@arm.com>
1133
1134         * aarch64-tdep.c (aarch64_push_dummy_call): Replace arg with
1135         return_method.
1136         * alpha-tdep.c (alpha_push_dummy_call): Likewise.
1137         * amd64-tdep.c (amd64_push_arguments): Likewise.
1138         (amd64_push_dummy_call): Likewise.
1139         * amd64-windows-tdep.c (amd64_windows_push_arguments): Likewise.
1140         * arc-tdep.c (arc_push_dummy_call): Likewise.
1141         * arm-tdep.c (arm_push_dummy_call): Likewise.
1142         * avr-tdep.c (avr_push_dummy_call): Likewise.
1143         * bfin-tdep.c (bfin_push_dummy_call): Likewise.
1144         * cris-tdep.c (cris_push_dummy_call): Likewise.
1145         * csky-tdep.c (csky_push_dummy_call): Likewise.
1146         * frv-tdep.c (frv_push_dummy_call): Likewise.
1147         * gdbarch.c: Regenerate.
1148         * gdbarch.h: Regenerate.
1149         * gdbarch.sh (gdbarch_push_dummy_call): Replace arg with
1150         return_method.
1151         * h8300-tdep.c (h8300_push_dummy_call): Likewise.
1152         * hppa-tdep.c (hppa32_push_dummy_call): Likewise.
1153         (hppa64_push_dummy_call): Likewise.
1154         * i386-darwin-tdep.c (i386_darwin_push_dummy_call): Likewise.
1155         * i386-tdep.c (i386_push_dummy_call): Likewise.
1156         * ia64-tdep.c (ia64_push_dummy_call): Likewise.
1157         * infcall.c (call_function_by_hand_dummy): Likewise.
1158         * iq2000-tdep.c (iq2000_push_dummy_call): Likewise.
1159         * lm32-tdep.c (lm32_push_dummy_call): Likewise.
1160         * m32c-tdep.c (m32c_push_dummy_call): Likewise.
1161         * m32r-tdep.c (m32r_push_dummy_call): Likewise.
1162         * m68hc11-tdep.c (m68hc11_push_dummy_call): Likewise.
1163         * m68k-tdep.c (m68k_push_dummy_call): Likewise.
1164         * mep-tdep.c (mep_push_dummy_call): Likewise.
1165         * mips-tdep.c (mips_eabi_push_dummy_call): Likewise.
1166         (mips_n32n64_push_dummy_call): Likewise.
1167         (mips_o32_push_dummy_call): Likewise.
1168         (mips_o64_push_dummy_call): Likewise.
1169         * mn10300-tdep.c (mn10300_push_dummy_call): Likewise.
1170         * msp430-tdep.c (msp430_push_dummy_call): Likewise.
1171         * nds32-tdep.c (nds32_push_dummy_call): Likewise.
1172         * nios2-tdep.c (nios2_push_dummy_call): Likewise.
1173         * or1k-tdep.c (or1k_push_dummy_call): Likewise.
1174         * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
1175         (ppc64_sysv_abi_push_dummy_call): Likewise.
1176         * ppc-tdep.h (ppc_sysv_abi_push_dummy_call): Likewise.
1177         (ppc64_sysv_abi_push_dummy_call): Likewise.
1178         * riscv-tdep.c (riscv_push_dummy_call): Likewise.
1179         * rl78-tdep.c (rl78_push_dummy_call): Likewise.
1180         * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
1181         * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
1182         * rx-tdep.c (rx_push_dummy_call): Likewise.
1183         * s390-tdep.c (s390_push_dummy_call): Likewise.
1184         * score-tdep.c (score_push_dummy_call): Likewise.
1185         * sh-tdep.c (sh_push_dummy_call_fpu): Likewise.
1186         (sh_push_dummy_call_nofpu): Likewise.
1187         * sparc-tdep.c (sparc32_store_arguments): Likewise.
1188         (sparc32_push_dummy_call): Likewise.
1189         * sparc64-tdep.c (sparc64_store_arguments): Likewise.
1190         (sparc64_push_dummy_call): Likewise.
1191         * spu-tdep.c (spu_push_dummy_call): Likewise.
1192         * tic6x-tdep.c (tic6x_push_dummy_call): Likewise.
1193         * tilegx-tdep.c (tilegx_push_dummy_call): Likewise.
1194         * v850-tdep.c (v850_push_dummy_call): Likewise.
1195         * vax-tdep.c (vax_push_dummy_call): Likewise.
1196         * xstormy16-tdep.c (xstormy16_push_dummy_call): Likewise.
1197         * xtensa-tdep.c (xtensa_push_dummy_call): Likewise.
1198
1199 2018-11-16  Alan Hayward  <alan.hayward@arm.com>
1200
1201         * gdbarch.sh (enum function_call_return_method): Add enum.
1202         * gdbarch.h: Regenerate.
1203         * infcall.c (call_function_by_hand_dummy): Replace vars with enum.
1204
1205 2018-11-15  Joel Brobecker  <brobecker@adacore.com>
1206
1207         * unittests/copy_bitwise-selftests.c: New file.
1208         * utils.c (selftests::bits_to_str, selftests::check_copy_bitwise)
1209         (selftests::copy_bitwise_tests): Delete, moving this code to
1210         unittests/copy_bitwise-selftests.c instead.
1211         (_initialize_utils): Do not register copy_bitwise tests.
1212         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1213         unittests/copy_bitwise-selftests.c.
1214
1215 2018-11-14  Joel Brobecker  <brobecker@adacore.com>
1216
1217         * ada-lang.c (move_bits): Delete. Update all callers to use
1218         copy_bitwise instead.
1219         * dwarf2loc.c (copy_bitwise, bits_to_str::bits_to_str)
1220         (selftests::check_copy_bitwise, selftests::copy_bitwise_tests):
1221         Move from here to utils.c.
1222         (_initialize_dwarf2loc): Remove call to register copy_bitwise
1223         selftests.
1224         * utils.h (copy_bitwise): Add declaration.
1225         * utils.c (copy_bitwise, bits_to_str::bits_to_str)
1226         (selftests::check_copy_bitwise, selftests::copy_bitwise_tests):
1227         Moved here from dwarf2loc.c.
1228         (_initialize_utils): Register copy_bitwise selftests.
1229
1230 2018-11-14  Jim Wilson  <jimw@sifive.com>
1231
1232         * riscv-tdep.c (struct riscv_arg_info): New field is_unnamed.
1233         (riscv_call_arg_scalar_int): If unnamed arg with twice xlen alignment,
1234         then increment next_regnum if odd.
1235         (riscv_arg_location): New arg is_unnamed.  Set ainfo->is_unnamed.
1236         (riscv_push_dummy_call): New local ftype.  Call check_typedef to set
1237         function type.  Pass new arg to riscv_arg_location based on function
1238         type.
1239         (riscv_return_value): Pass new arg to riscv_arg_location.
1240
1241         * riscv-tdep.c (BIGGEST_ALIGNMENT): New.
1242         (riscv_type_alignment) <TYPE_CODE_ARRAY>: If TYPE_VECTOR, return min
1243         of TYPE_LENGTH and BIGGEST_ALIGNMENT.
1244
1245         * riscv-tdep.c (riscv_call_arg_scalar_int): Use std::min when
1246         setting len.  New local align, set to max of arg align and xlen,
1247         and pass to first riscv_assign_stack_location call.
1248
1249 2018-11-12  Simon Marchi  <simon.marchi@polymtl.ca>
1250
1251         * skip.c (complete_skip_number): New function.
1252         (_initialize_step_skip): Add completers to some skip commands.
1253
1254 2018-11-09  Tom Tromey  <tom@tromey.com>
1255
1256         * remote.c (remote_g_packet_guess_s): Remove typedef and DEF_VEC.
1257         (struct remote_g_packet_data): Derive from allocate_on_obstack.
1258         <guesses>: Now a std::vector.
1259         (remote_g_packet_data_init, register_remote_g_packet_guess):
1260         Update.
1261         (remote_read_description_p): Update.  Return bool.
1262         (remote_target::read_description): Update.
1263         (struct remote_g_packet_guess): Add constructor.
1264
1265 2018-11-09  Tom Tromey  <tom@tromey.com>
1266
1267         * common/scoped_fd.h (class scoped_fd): Add move constructor and
1268         move assignment operator.
1269         * psymtab.c (psymtab_to_fullname): Update.
1270         * source.h (open_source_file): Return scoped_fd.
1271         (find_and_open_source): Likewise.
1272         * source.c (open_source_file): Return scoped_fd.
1273         (get_filename_and_charpos): Update.
1274         (print_source_lines_base): Update.  Use scoped_fd::to_file.
1275         (forward_search_command): Likewise.
1276         (reverse_search_command): Likewise.
1277         (find_and_open_source): Return scoped_fd.
1278         * tui/tui-source.c (tui_set_source_content): Update.  Use
1279         gdb_file_up.
1280
1281 2018-11-09  John Baldwin  <jhb@FreeBSD.org>
1282
1283         * minsyms.c (minimal_symbol_reader::install): Fix unsigned
1284         overflow.
1285
1286 2018-11-09  Hafiz Abid Qadeer  <abidh@codesourcery.com>
1287
1288         * configure: Regenerate.
1289
1290 2018-11-09  Tom de Vries  <tdevries@suse.de>
1291
1292         * symtab.c (symbol_set_names): Call symbol_find_demangled_name
1293         unconditionally, to set the language of the symbol.  Manage freeing
1294         returned pointer using gdb::unique_xmalloc_ptr.
1295
1296 2018-11-08  Tom Tromey  <tom@tromey.com>
1297
1298         * record.c (require_record_target): Upper-case "<TAB>".
1299
1300 2018-11-08  Tom Tromey  <tom@tromey.com>
1301
1302         * python/lib/gdb/command/pretty_printers.py
1303         (InfoPrettyPrinter.invoke): Don't indent "objfile" heading.
1304
1305 2018-11-08  Tom Tromey  <tom@tromey.com>
1306
1307         PR gdb/23555:
1308         PR gdb/23838:
1309         * target.h (target_supports_terminal_ours): Return bool.
1310         * target.c (target_supports_terminal_ours): Handle case where
1311         current_top_target returns nullptr.  Return bool.
1312
1313 2018-11-08  Joel Brobecker  <brobecker@adacore.com>
1314
1315         * aarch64-tdep.c (aapcs_is_vfp_call_or_return_candidate_1):
1316         return the correct count for potential HFAs.
1317
1318 2018-11-08  Jan Beulich  <jbeulich@suse.com>
1319
1320         * i387-tdep.c (i387_supply_xsave): Split handling of
1321         X86_XSTATE_ZMM_H and X86_XSTATE_ZMM.
1322         (i387_collect_xsave): Likewise.
1323
1324 2018-11-08  Andrew Burgess  <andrew.burgess@embecosm.com>
1325
1326         * riscv-tdep.c (riscv_insn::decode): Update header comment.
1327         (riscv_frame_this_id): Catch errors thrown while building the
1328         frame cache, leave the frame id as the default, which is the outer
1329         frame id.
1330
1331 2018-11-07  Joel Brobecker  <brobecker@adacore.com>
1332
1333         * ada-lang.c (read_atcb): Only set task_info->called_task if
1334         task_info->state == Entry_Caller_Sleep.
1335         (print_ada_task_info): Do not check task_info->state before
1336         checking task_info->called_task.
1337         (info_task): Likewise.
1338
1339 2018-11-07  Joel Brobecker  <brobecker@adacore.com>
1340
1341         * ada-tasks.c (read_atcb): Clear task_info before computing
1342         the value of each of its fields.
1343
1344 2018-11-07  Andrew Burgess  <andrew.burgess@embecosm.com>
1345
1346         * dwarf2read.c (dwarf2_init_integer_type): Check for name being
1347         NULL before dereferencing it.
1348
1349 2018-11-06  Tom de Vries  <tdevries@suse.de>
1350
1351         * linux-tdep.c (linux_vsyscall_range_raw): Use xmalloc to allocate
1352         program headers.
1353
1354 2018-11-06  Max Filippov  <jcmvbkbc@gmail.com>
1355
1356         * configure.tgt (xtensa*-*-linux*): Change to xtensa*-*-*linux*
1357         so that it applies to uclinux as well.
1358
1359 2018-11-06  Marius Muench  <marius.muench@eurecom.fr>
1360
1361         * arm-tdep.c (arm_scan_prologue): Don't dereference FP reg
1362         when on AAPCS.
1363
1364 2018-11-06  John Baldwin  <jhb@FreeBSD.org>
1365
1366         * riscv-fbsd-nat.c (getregs_supplies): Return true for
1367         RISCV_CSR_SSTATUS_REGNUM.
1368
1369 2018-11-04  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1370
1371         * source.c (open_source_file): Fix leak by transferring the
1372         current s->fullname to the unique_xmalloc_ptr fullname given
1373         to find_and_open_source.
1374
1375 2018-11-04  Tom Tromey  <tom@tromey.com>
1376
1377         * varobj.c (install_default_visualizer): Update.
1378         * python/python-internal.h (gdbpy_get_varobj_pretty_printer):
1379         Return gdbpy_ref.
1380         * python/py-prettyprint.c (search_pp_list): Return gdbpy_ref.
1381         (find_pretty_printer_from_progspace)
1382         (find_pretty_printer_from_gdb, find_pretty_printer)
1383         (gdbpy_get_varobj_pretty_printer): Return gdbpy_ref.
1384         (gdbpy_get_varobj_pretty_printer, gdbpy_default_visualizer):
1385         Update.
1386
1387 2018-11-04  Tom Tromey  <tom@tromey.com>
1388
1389         * python/python.c (gdbpy_parameter_value): Update.
1390         * python/python-internal.h (python_string_to_unicode)
1391         (python_string_to_target_python_string)
1392         (host_string_to_python_string): Return gdbpy_ref.
1393         * python/py-utils.c (python_string_to_unicode)
1394         (unicode_to_encoded_python_string)
1395         (unicode_to_target_python_string)
1396         (python_string_to_target_string)
1397         (python_string_to_target_python_string): Return gdbpy_ref.
1398         (python_string_to_host_string): Update.
1399         (host_string_to_python_string): Return gdbpy_ref.
1400         * python/py-symtab.c (stpy_get_filename, stpy_get_producer)
1401         (stpy_fullname): Update.
1402         * python/py-progspace.c (pspy_get_filename, pspy_solib_name):
1403         Update.
1404         * python/py-prettyprint.c (print_string_repr): Update.
1405         * python/py-objfile.c (objfpy_get_filename, objfpy_get_username)
1406         (objfpy_get_build_id): Update.
1407         * python/py-breakpoint.c (bppy_get_location)
1408         (bppy_get_expression, bppy_get_condition, bppy_get_commands):
1409         Update.
1410
1411 2018-11-04  Tom Tromey  <tom@tromey.com>
1412
1413         * python/python-internal.h (gdb_py_object_from_longest)
1414         (gdb_py_object_from_ulongest): Return gdbpy_ref.
1415         * python/py-value.c (valpy_int): Update.
1416         * python/py-utils.c (gdb_py_object_from_longest): Return
1417         gdbpy_ref.
1418         (gdb_py_object_from_ulongest): Likewise.
1419         * python/py-type.c (typy_get_alignof): Update.
1420         * python/py-linetable.c (ltpy_get_all_source_lines)
1421         (ltpy_entry_get_line, ltpy_entry_get_pc): Update.
1422         * python/py-block.c (blpy_get_start, blpy_get_end): Update.
1423
1424 2018-11-03  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1425
1426         * ada-lang.c (_initialize_ada_language): Fix typo.
1427
1428 2018-11-03  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1429
1430         * language.c (type): Remove.
1431         (_initialize_language): Remove assignment to type.
1432
1433 2018-11-02  Joel Brobecker  <brobecker@adacore.com>
1434
1435         * aarch64-ravenscar-thread.h, aarch64-ravenscar-thread.c: New files.
1436         * aarch64-tdep.c: #include "aarch64-ravenscar-thread.h".
1437         (aarch64_gdbarch_init): Add call to register_aarch64_ravenscar_ops.
1438         * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-ravenscar-thread.o.
1439         (HFILES_NO_SRCDIR): Add aarch64-ravenscar-thread.h.
1440         (ALLDEPFILES): Add aarch64-ravenscar-thread.c.
1441         * configure.tgt (cpu_obs) [aarch64*-*-*]: Add ravenscar-thread.o
1442         and aarch64-ravenscar-thread.o.
1443         * NEWS: Add entry documenting Ravenscar tasking support
1444         on AArch64 ELF.
1445
1446 2018-11-02  Matthew Malcomson  <matthew.malcomson@arm.com>
1447
1448         * symtab.c (info_functions_command): Initialize quiet flag.
1449         * stack.c (info_args_command): Likewise.
1450
1451 2018-11-01  Jim Wilson  <jimw@sifive.com>
1452
1453         * riscv-tdep.c (riscv_breakpoint_kind_from_pc): New local unaligned_p.
1454         Set if pcptr if unaligned.  Return 2 if unaligned_p true.  Update
1455         debugging messages.
1456
1457 2018-11-01  Joel Brobecker  <brobecker@adacore.com>
1458
1459         * ada-lang.c (ada_watch_location_expression): New function.
1460         (ada_language_defn): Set la_watch_location_expression to
1461         ada_watch_location_expression.
1462
1463 2018-11-01  Joel Brobecker  <brobecker@adacore.com>
1464
1465         * print-utils.c (int_string): Remove unnecessary trailing spaces.
1466
1467 2018-11-01  Joel Brobecker  <brobecker@adacore.com>
1468
1469         * rs6000-tdep.c (skip_prologue): Fix potential negative left
1470         shifting.
1471
1472 2018-11-01  Jerome Guitton  <guitton@adacore.com>
1473             Joel Brobecker  <brobecker@adacore.com>
1474
1475         * defs.h (enum gdb_osabi): Add GDB_OSABI_PIKEOS.
1476         * osabi.c (gdb_osabi_names): Add name for GDB_OSABI_PIKEOS.
1477         * arm-pikeos-tdep.c: New file.
1478         * configure.tgt: Add arm-pikeos-tdep.o to the case of ARM
1479         embedded system.
1480         * Makefile.in (ALL_TARGET_OBS): Add arm-pikeos-tdep.o.
1481
1482 2018-11-01  Simon Marchi  <simon.marchi@ericsson.com>
1483
1484         * common/pathstuff.c (get_standard_temp_dir): New.
1485         * common/pathstuff.h (get_standard_temp_dir): New.
1486         * config.in: Re-generate.
1487         * configure: Re-generate.
1488         * configure.ac: Don't check for mkdtemp.
1489         * gnulib/aclocal-m4-deps.mk: Re-generate.
1490         * gnulib/aclocal.m4: Re-generate.
1491         * gnulib/config.in: Re-generate.
1492         * gnulib/configure: Re-generate.
1493         * gnulib/import/Makefile.am: Re-generate.
1494         * gnulib/import/Makefile.in: Re-generate.
1495         * gnulib/import/m4/gnulib-cache.m4: Re-generate.
1496         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
1497         * gnulib/import/m4/mkdtemp.m4: New file.
1498         * gnulib/import/mkdtemp.c: New file.
1499         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES):
1500         Add mkdtemp module.
1501         * unittests/mkdir-recursive-selftests.c (test): Use
1502         get_standard_temp_dir.
1503         (_initialize_mkdir_recursive_selftests): Remove HAVE_MKDTEMP
1504         ifdef.
1505         * compile/compile.c (get_compile_file_tempdir): Likewise.
1506
1507 2018-11-01  Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
1508
1509         * rs6000-aix-tdep.c: Include "trad-frame.h" and "frame-unwind.h".
1510         (SIG_FRAME_LR_OFFSET64): New define.
1511         (SIG_FRAME_FP_OFFSET64): New define.
1512         (aix_sighandle_frame_cache): New Function.
1513         (aix_sighandle_frame_this_id): New Function.
1514         (aix_sighandle_frame_prev_register): New Function.
1515         (aix_sighandle_frame_sniffer): New Function.
1516         (aix_sighandle_frame_unwind): New global variable.
1517         (rs6000_aix_init_osabi): Install new frame unwinder.
1518
1519 2018-10-31  Sergio Durigan Junior  <sergiodj@redhat.com>
1520
1521         PR gdb/23835
1522         * common/common-defs.h: Don't redefine _FORTIFY_SOURCE if it's
1523         already defined.
1524
1525 2018-10-31  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1526
1527         * ppc-linux-nat.c: Include nat/linux-ptrace.h.
1528
1529 2018-10-31  Andrew Burgess  <andrew.burgess@embecosm.com>
1530
1531         * dwarf2read.c (struct dwarf2_cu): Add producer_is_icc field.
1532         (producer_is_icc): New function.
1533         (check_producer): Set producer_is_icc field on dwarf2_cu.
1534         (dwarf2_init_integer_type): New function.
1535         (read_base_type): Call dwarf2_init_integer_type instead of
1536         init_integer_type in all cases.
1537         (dwarf2_cu::dwarf2_cu): Initialise producer_is_icc field.
1538         * valprint.c (maybe_negate_by_bytes): Add an assertion that the
1539         LEN is greater than 0.
1540
1541 2018-10-30  Tom Tromey  <tom@tromey.com>
1542
1543         * main.c (captured_main_1): Check return value of bfd_init.
1544
1545 2018-10-29  Sergio Durigan Junior  <sergiodj@redhat.com>
1546
1547         * common/offset-type.h (DEFINE_OFFSET_REL_OP): Delete.
1548         Adjust comments.
1549
1550 2018-10-29  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1551
1552         * procfs.c: Include common/pathstuff.h.
1553
1554 2018-10-28  Andrew Burgess  <andrew.burgess@embecosm.com>
1555
1556         * riscv-linux-nat.c (riscv_linux_nat_target::fetch_registers):
1557         Add missing braces.  No functional change.
1558
1559 2018-10-27  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1560
1561         * macrocmd.c (info_macro_command): Use report_unrecognized_option_error
1562         to report a bad option and fix indentation.
1563         * demangle.c (demangle_command): Use report_unrecognized_option_error
1564         to report a bad option and correctly report the bad option.
1565
1566 2018-10-27  Tom Tromey  <tom@tromey.com>
1567
1568         PR cli/23364:
1569         * darwin-nat.c (copied_shell): New global.
1570         (may_have_sip): Rename from should_disable_startup_with_shell.
1571         (copy_shell_to_cache, maybe_cache_shell): New functions.
1572         (darwin_nat_target::create_inferior): Update.  Use
1573         copied_shell.
1574
1575 2018-10-27  Tom Tromey  <tom@tromey.com>
1576
1577         * unittests/scoped_fd-selftests.c (test_to_file): New function.
1578         (run_tests): Call test_to_file.
1579         * dwarf-index-write.c (write_psymtabs_to_index): Do not reopen
1580         temporary files.
1581         * common/scoped_fd.h (scoped_fd::to_file): New method.
1582
1583 2018-10-27  Tom Tromey  <tom@tromey.com>
1584
1585         * unittests/scoped_mmap-selftests.c (test_normal): Use
1586         gdb_mkostemp_cloexec.
1587         * unittests/scoped_fd-selftests.c (test_destroy, test_release):
1588         Use gdb_mkostemp_cloexec.
1589         * gnulib/aclocal-m4-deps.mk, gnulib/aclocal.m4,
1590         gnulib/config.in, gnulib/configure,
1591         gnulib/import/Makefile.am, gnulib/import/Makefile.in,
1592         gnulib/import/m4/gnulib-cache.m4,
1593         gnulib/import/m4/gnulib-comp.m4: Update.
1594         * gnulib/import/m4/mkostemp.m4: New file.
1595         * gnulib/import/m4/mkstemp.m4: Remove.
1596         * gnulib/import/mkostemp.c: New file.
1597         * gnulib/import/mkstemp.m4: Remove.
1598         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Remove
1599         mkstemp, add mkostemp.  Apply new patch.
1600         * gnulib/import/stdlib.in.h: Apply patch.
1601         * gnulib/patches/0002-mkostemp-mkostemps-Fix-compilation-error-in-C-mode-o.patch:
1602         New file.
1603         * dwarf-index-write.c (write_psymtabs_to_index): Use
1604         gdb_mkostemp_cloexec.
1605         * common/filestuff.h (gdb_mkostemp_cloexec): New function.
1606
1607 2018-10-27  Tom Tromey  <tom@tromey.com>
1608
1609         * unittests/mkdir-recursive-selftests.c: New file.
1610         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1611         unittests/mkdir-recursive-selftests.c.
1612         * dwarf-index-cache.c (mkdir_recursive): Move to
1613         common/filestuff.c.
1614         (index_cache::store): Check return value of mkdir_recursive.
1615         (create_dir_and_check, test_mkdir_recursive): Move to new file.
1616         (_initialize_index_cache): Don't register test.
1617         * common/filestuff.h (mkdir_recursive): Declare.
1618         * common/filestuff.c (mkdir_recursive): Move from
1619         dwarf-index-cache.c.  Return bool.
1620
1621 2018-10-27  Tom Tromey  <tom@tromey.com>
1622
1623         * dwarf-index-write.c (write_psymtabs_to_index): Move
1624         make_temp_filename to common/pathstuff.c.
1625         * common/pathstuff.h (make_temp_filename): Declare.
1626         * common/pathstuff.c (make_temp_filename): New function, moved
1627         from dwarf-index-write.c.
1628
1629 2018-10-27  Tom Tromey  <tom@tromey.com>
1630
1631         * procfs.c (procfs_target::create_inferior): Use get_shell.
1632         * cli/cli-cmds.c (shell_escape): Use get_shell.
1633         * windows-nat.c (windows_nat_target::create_inferior): Use
1634         get_shell.
1635         * common/pathstuff.c (get_shell): New function.
1636         * nat/fork-inferior.c (SHELL_FILE, get_startup_shell): Remove.
1637         (fork_inferior): Use get_shell.
1638         * common/pathstuff.h (get_shell): Declare.
1639
1640 2018-10-27  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1641
1642         * NEWS: Mention changes to 'info [args|functions|locals|variables]'
1643
1644 2018-10-27  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1645
1646         * stack.c (print_variable_and_value_data): Add preg and treg.
1647         (print_frame_local_vars): Add quiet, regexp and t_regexp arguments,
1648         and update callers.
1649         (print_frame_arg_vars): Likewise.
1650         (prepare_reg): New function.
1651         (info_locals_command): Extract info print args and use them.
1652         (info_args_command): Likewise.
1653         (_initialize_stack): Modify on-line help.
1654         * symtab.c (treg_matches_sym_type_name): New function.
1655         (search_symbols): New arg t_regexp.
1656         (symtab_symbol_info): New args quiet, regexp, t_regexp.
1657         (info_variables_command): Extract info print args and use them.
1658         (info_functions_command): Likewise.
1659         (info_types_command): Update call to symtab_symbol_info.
1660         (_initialize_symtab): Modify on-line help.
1661         * symtab.h (treg_matches_sym_type_name): New function.
1662         (search_symbols): New t_regexp arg.
1663
1664 2018-10-27  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1665
1666         * cli-utils.c (extract_arg_maybe_quoted): New function.
1667         (extract_info_print_args): New function.
1668         (info_print_args_help): New function.
1669         (report_unrecognized_option_error): New function.
1670         * cli-utils.h (extract_arg_maybe_quoted): New function.
1671         (extract_info_print_args): New function.
1672         (info_print_args_help): New function.
1673         (report_unrecognized_option_error): New function.
1674
1675 2018-10-26  Tom Tromey  <tom@tromey.com>
1676
1677         * dwarf2read.c (recursively_compute_inclusions): Use std::vector.
1678         (compute_compunit_symtab_includes): Update.
1679         * symtab.h: (symtab_ptr): Remove typedef.  Don't define a VEC.
1680         (compunit_symtab_ptr): Likewise.
1681
1682 2018-10-26  John Baldwin  <jhb@FreeBSD.org>
1683
1684         * fbsd-tdep.c (fbsd_print_auxv_entry): Only use
1685         default_print_auxv_entry for specific tag values.
1686
1687 2018-10-26  John Baldwin  <jhb@FreeBSD.org>
1688
1689         * fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_FREEBSD_HWCAP2.
1690
1691 2018-10-26  Jim Wilson  <jimw@sifive.com>
1692
1693         * riscv-linux-tdep.c: Include tramp-frame.h and trad-frame.h.
1694         (riscv_linux_sigframe_init): Declare.
1695         (RISCV_INST_LI_A7_SIGRETURN, RISCV_INT_ECALL): New.
1696         (riscv_linux_sigframe): New.
1697         (SIGFRAME_SIGINFO_SIZE, UCONTEXT_MCONTEXT_OFFSET): New.
1698         (riscv_linux_sigframe_init): Define.
1699         (riscv_linux_init_abi): Call tramp_frame_prepend_unwinder.
1700
1701         * riscv-tdep.c (riscv_isa_xlen): Refer to riscv-tdep.h comment.
1702         (riscv_isa_flen): Likewise.  Drop static.
1703         * riscv-tdep.h (riscv_isa_xlen): Move riscv-tdep.c comment to here.
1704         (riscv_isa_flen): Likewise.  Declare.
1705
1706 2018-10-26  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
1707             Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1708
1709         * arch/ppc-linux-tdesc.h (tdesc_powerpc_isa207_htm_vsx32l)
1710         (tdesc_powerpc_isa207_htm_vsx64l): Declare.
1711         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_TM_SPRREGSET)
1712         (PPC32_LINUX_SIZEOF_CGPRREGSET, PPC64_LINUX_SIZEOF_CGPRREGSET)
1713         (PPC_LINUX_SIZEOF_CFPRREGSET, PPC_LINUX_SIZEOF_CVMXREGSET)
1714         (PPC_LINUX_SIZEOF_CVSXREGSET, PPC_LINUX_SIZEOF_CPPRREGSET)
1715         (PPC_LINUX_SIZEOF_CDSCRREGSET, PPC_LINUX_SIZEOF_CTARREGSET):
1716         Define.
1717         (struct ppc_linux_features) <htm>: New field.
1718         (ppc_linux_no_features): Add initializer for htm field.
1719         * arch/ppc-linux-common.c (ppc_linux_match_description): Return
1720         new tdescs.
1721         * nat/ppc-linux.h (PPC_FEATURE2_HTM, NT_PPC_TM_CGPR)
1722         (NT_PPC_TM_CFPR, NT_PPC_TM_CVMX, NT_PPC_TM_CVSX)
1723         (NT_PPC_TM_SPR, NT_PPC_TM_CTAR, NT_PPC_TM_CPPR, NT_PPC_TM_CDSCR):
1724         Define if not already defined.
1725         * features/Makefile (WHICH): Add rs6000/powerpc-isa207-htm-vsx32l
1726         and rs6000/powerpc-isa207-htm-vsx64l.
1727         (XMLTOC): Add rs6000/powerpc-isa207-htm-vsx32l.xml and
1728         rs6000/powerpc-isa207-htm-vsx64l.xml.
1729         * features/rs6000/power-htm-spr.xml: New file.
1730         * features/rs6000/power-htm-core.xml: New file.
1731         * features/rs6000/power64-htm-core.xml: New file.
1732         * features/rs6000/power-htm-fpu.xml: New file.
1733         * features/rs6000/power-htm-altivec.xml: New file.
1734         * features/rs6000/power-htm-vsx.xml: New file.
1735         * features/rs6000/power-htm-ppr.xml: New file.
1736         * features/rs6000/power-htm-dscr.xml: New file.
1737         * features/rs6000/power-htm-tar.xml: New file.
1738         * features/rs6000/powerpc-isa207-htm-vsx32l.xml: New file.
1739         * features/rs6000/powerpc-isa207-htm-vsx64l.xml: New file.
1740         * features/rs6000/powerpc-isa207-htm-vsx32l.c: Generate.
1741         * features/rs6000/powerpc-isa207-htm-vsx64l.c: Generate.
1742         * regformats/rs6000/powerpc-isa207-htm-vsx32l.dat: Generate.
1743         * regformats/rs6000/powerpc-isa207-htm-vsx64l.dat: Generate.
1744         * ppc-linux-nat.c (fetch_register, fetch_ppc_registers): Call
1745         fetch_regset with HTM regsets.
1746         (store_register, store_ppc_registers): Call store_regset with HTM
1747         regsets.
1748         (ppc_linux_nat_target::read_description): Set htm field in the
1749         features struct if needed.
1750         * ppc-linux-tdep.c: Include
1751         features/rs6000/powerpc-isa207-htm-vsx32l.c and
1752         features/rs6000/powerpc-isa207-htm-vsx64l.c.
1753         (ppc32_regmap_tm_spr, ppc32_regmap_cgpr, ppc64_le_regmap_cgpr)
1754         (ppc64_be_regmap_cgpr, ppc32_regmap_cfpr, ppc32_le_regmap_cvmx)
1755         (ppc32_be_regmap_cvmx, ppc32_regmap_cvsx, ppc32_regmap_cppr)
1756         (ppc32_regmap_cdscr, ppc32_regmap_ctar): New globals.
1757         (ppc32_linux_tm_sprregset, ppc32_linux_cgprregset)
1758         (ppc64_be_linux_cgprregset, ppc64_le_linux_cgprregset)
1759         (ppc32_linux_cfprregset, ppc32_le_linux_cvmxregset)
1760         (ppc32_be_linux_cvmxregset, ppc32_linux_cvsxregset)
1761         (ppc32_linux_cpprregset, ppc32_linux_cdscrregset)
1762         (ppc32_linux_ctarregset): New globals.
1763         (ppc_linux_cgprregset, ppc_linux_cvmxregset): New functions.
1764         (ppc_linux_collect_core_cpgrregset): New function.
1765         (ppc_linux_iterate_over_regset_sections): Call back with the htm
1766         regsets.
1767         (ppc_linux_core_read_description): Check if the tm spr section is
1768         present and set htm in the features struct.
1769         (_initialize_ppc_linux_tdep): Call
1770         initialize_tdesc_powerpc_isa207_htm_vsx32l and
1771         initialize_tdesc_powerpc_isa207_htm_vsx64l.
1772         * ppc-linux-tdep.h (ppc_linux_cgprregset, ppc_linux_cvmxregset):
1773         Declare.
1774         (ppc32_linux_tm_sprregset, ppc32_linux_cfprregset)
1775         (ppc32_linux_cvsxregset, ppc32_linux_cpprregset)
1776         (ppc32_linux_cdscrregset, ppc32_linux_ctarregset): Declare.
1777         * ppc-tdep.h (struct gdbarch_tdep) <have_htm_spr, have_htm_core>:
1778         New fields.
1779         <have_htm_fpu, have_htm_altivec, have_htm_vsx>:
1780         Likewise.
1781         <ppc_cppr_regnum, ppc_cdscr_regnum, ppc_ctar_regnum>: Likewise.
1782         <ppc_cdl0_regnum, ppc_cvsr0_regnum, ppc_cefpr0_regnum>: Likewise.
1783         (enum) <PPC_TFHAR_REGNUM, PPC_TEXASR_REGNUM, PPC_TFIAR_REGNUM>:
1784         New enum fields.
1785         <PPC_CR0_REGNUM, PPC_CCR_REGNUM, PPC_CXER_REGNUM>: Likewise.
1786         <PPC_CLR_REGNUM, PPC_CCTR_REGNUM, PPC_CF0_REGNUM>: Likewise.
1787         <PPC_CFPSCR_REGNUM, PPC_CVR0_REGNUM, PPC_CVSCR_REGNUM>: Likewise.
1788         <PPC_CVRSAVE_REGNUM, PPC_CVSR0_UPPER_REGNUM>: Likewise.
1789         <PPC_CPPR_REGNUM, PPC_CDSCR_REGNUM>: Likewise.
1790         <PPC_CTAR_REGNUM>: Likewise.
1791         (PPC_IS_TMSPR_REGNUM, PPC_IS_CKPTGP_REGNUM, PPC_IS_CKPTFP_REGNUM)
1792         (PPC_IS_CKPTVMX_REGNUM, PPC_IS_CKPTVSX_REGNUM): Define.
1793         * rs6000-tdep.c (IS_CDFP_PSEUDOREG, IS_CVSX_PSEUDOREG)
1794         (IS_CEFP_PSEUDOREG): Define.
1795         (rs6000_register_name): Hide the upper halves of checkpointed VSX
1796         registers.  Return names for the checkpointed DFP, VSX, and EFP
1797         pseudo registers.
1798         (rs6000_pseudo_register_type): Remove initial assert and raise an
1799         internal error in the else clause instead.  Return types for the
1800         checkpointed DFP, VSX, and EFP pseudo registers.
1801         (dfp_pseudo_register_read, dfp_pseudo_register_write): Handle
1802         checkpointed DFP pseudo registers.
1803         (vsx_pseudo_register_read, vsx_pseudo_register_write): Handle
1804         checkpointed VSX pseudo registers.
1805         (efp_pseudo_register_read, efp_pseudo_register_write): Rename
1806         from efpr_pseudo_register_read and
1807         efpr_pseudo_register_write.  Handle checkpointed EFP pseudo
1808         registers.
1809         (rs6000_pseudo_register_read, rs6000_pseudo_register_write):
1810         Handle checkpointed DFP, VSX, and EFP registers.
1811         (dfp_ax_pseudo_register_collect, vsx_ax_pseudo_register_collect)
1812         (efp_ax_pseudo_register_collect): New functions.
1813         (rs6000_ax_pseudo_register_collect): Move DFP, VSX and EFP pseudo
1814         register logic to new functions.  Handle checkpointed DFP, VSX,
1815         and EFP pseudo registers.
1816         (rs6000_gdbarch_init): Look for and validate the htm features.
1817         Include checkpointed DFP, VSX and EFP pseudo-registers.
1818         * NEWS: Mention access to PPR, DSCR, TAR, EBB/PMU registers and
1819         HTM registers.
1820
1821 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1822
1823         * rs6000-tdep.c (rs6000_gdbarch_init): Reject tdescs with vsx but
1824         without altivec or fpu.
1825
1826 2018-10-26  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
1827             Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1828
1829         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_EBBREGSET)
1830         (PPC_LINUX_SIZEOF_PMUREGSET): Declare.
1831         * nat/ppc-linux.h (PPC_FEATURE2_EBB, NT_PPC_EBB, NT_PPC_PMU):
1832         Define if not already defined.
1833         * features/rs6000/power-ebb.xml: New file.
1834         * features/rs6000/power-linux-pmu.xml: New file.
1835         * features/rs6000/powerpc-isa207-vsx32l.xml: Include ebb and pmu
1836         features.
1837         * features/rs6000/powerpc-isa207-vsx64l.xml: Likewise.
1838         * features/rs6000/powerpc-isa207-vsx32l.c: Re-generate.
1839         * features/rs6000/powerpc-isa207-vsx64l.c: Re-generate.
1840         * regformats/rs6000/powerpc-isa207-vsx32l.dat: Re-generate.
1841         * regformats/rs6000/powerpc-isa207-vsx64l.dat: Re-generate.
1842         * ppc-linux-nat.c (fetch_register, fetch_ppc_registers): Call
1843         fetch_regset with ebb and pmu regsets.
1844         (store_register, store_ppc_registers): Call store_regset with ebb
1845         and pmu regsets.
1846         (ppc_linux_nat_target::read_description): Set isa207 field in the
1847         features struct if ebb and pmu are avaiable.
1848         * ppc-linux-tdep.c (ppc32_regmap_ebb, ppc32_regmap_pmu)
1849         (ppc32_linux_ebbregset, ppc32_linux_pmuregset): New globals.
1850         (ppc_linux_iterate_over_regset_sections): Call back with the ebb
1851         and pmu regsets.
1852         (ppc_linux_core_read_description): Check if the pmu section is
1853         present and set isa207 in the features struct.
1854         * ppc-linux-tdep.h (ppc32_linux_ebbregset)
1855         (ppc32_linux_pmuregset): Declare.
1856         * ppc-tdep.h (struct gdbarch_tdep) <ppc_mmcr0_regnum>: New field.
1857         <ppc_mmcr2_regnum, ppc_siar_regnum, ppc_sdar_regnum>: New fields.
1858         <ppc_sier_regnum>: New field.
1859         (enum): <PPC_BESCR_REGNUM, PPC_EBBHR_REGNUM, PPC_EBBRR_REGNUM>:
1860         New enum values.
1861         <PPC_MMCR0_REGNUM, PPC_MMCR2_REGNUM, PPC_SIAR_REGNUM>: New enum
1862         values.
1863         <PPC_SDAR_REGNUM, PPC_SIER_REGNUM>: New enum values.
1864         (PPC_IS_EBB_REGNUM, PPC_IS_PMU_REGNUM): Define.
1865         * rs6000-tdep.c (rs6000_gdbarch_init): Look for and validate the
1866         ebb and pmu features.
1867
1868 2018-10-26  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
1869             Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1870
1871         * arch/ppc-linux-tdesc.h (tdesc_powerpc_isa207_vsx32l)
1872         (tdesc_powerpc_isa207_vsx64l): Declare.
1873         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_TARREGSET): Define.
1874         (struct ppc_linux_features) <isa207>: New field.
1875         (ppc_linux_no_features): Add initializer for isa207 field.
1876         * arch/ppc-linux-common.c (ppc_linux_match_description): Return
1877         new tdescs.
1878         * nat/ppc-linux.h (PPC_FEATURE2_ARCH_2_07, PPC_FEATURE2_TAR)
1879         (NT_PPC_TAR): Define if not already defined.
1880         * features/Makefile (WHICH): Add rs6000/powerpc-isa207-vsx32l and
1881         rs6000/powerpc-isa207-vsx64l.
1882         (XMLTOC): Add rs6000/powerpc-isa207-vsx32l.xml and
1883         rs6000/powerpc-isa207-vsx64l.xml.
1884         * features/rs6000/power-tar.xml: New file.
1885         * features/rs6000/powerpc-isa207-vsx32l.xml: New file.
1886         * features/rs6000/powerpc-isa207-vsx64l.xml: New file.
1887         * features/rs6000/powerpc-isa207-vsx32l.c: Generate.
1888         * features/rs6000/powerpc-isa207-vsx64l.c: Generate.
1889         * regformats/rs6000/powerpc-isa207-vsx32l.dat: Generate.
1890         * regformats/rs6000/powerpc-isa207-vsx64l.dat: Generate.
1891         * ppc-linux-nat.c (fetch_register, fetch_ppc_registers): Call
1892         fetch_regset with the TAR regset.
1893         (store_register, store_ppc_registers): Call store_regset with the
1894         TAR regset.
1895         (ppc_linux_nat_target::read_description): Set isa207 field in the
1896         features struct if needed.
1897         * ppc-linux-tdep.c: Include
1898         features/rs6000/powerpc-isa207-vsx32l.c and
1899         features/rs6000/powerpc-isa207-vsx64l.c.
1900         (ppc32_regmap_tar, ppc32_linux_tarregset): New globals.
1901         (ppc_linux_iterate_over_regset_sections): Call back with the tar
1902         regset.
1903         (ppc_linux_core_read_description): Check if the tar section is
1904         present and set isa207 in the features struct.
1905         (_initialize_ppc_linux_tdep): Call
1906         initialize_tdesc_powerpc_isa207_vsx32l and
1907         initialize_tdesc_powerpc_isa207_vsx64l.
1908         * ppc-linux-tdep.h (ppc32_linux_tarregset): Declare.
1909         * ppc-tdep.h (gdbarch_tdep) <ppc_tar_regnum>: New field.
1910         (enum) <PPC_TAR_REGNUM>: New enum value.
1911         * rs6000-tdep.c (rs6000_gdbarch_init): Look for and validate tar
1912         feature.
1913         (ppc_process_record_op31): Record changes to TAR.
1914
1915 2018-10-26  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
1916             Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1917
1918         * arch/ppc-linux-tdesc.h (tdesc_powerpc_isa205_ppr_dscr_vsx32l)
1919         (tdesc_powerpc_isa205_ppr_dscr_vsx64l): Declare.
1920         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_PPRREGSET)
1921         (PPC_LINUX_SIZEOF_DSCRREGSET): Define.
1922         (struct ppc_linux_features) <ppr_dscr>: New field.
1923         (ppc_linux_no_features): Add initializer for ppr_dscr field.
1924         * arch/ppc-linux-common.c (ppc_linux_match_description): Return
1925         new tdescs.
1926         * nat/ppc-linux.h (PPC_FEATURE2_DSCR, NT_PPC_PPR, NT_PPC_DSCR):
1927         Define if not already defined.
1928         * features/Makefile (WHICH): Add
1929         rs6000/powerpc-isa205-ppr-dscr-vsx32l and
1930         rs6000/powerpc-isa205-ppr-dscr-vsx64l.
1931         (XMLTOC): Add rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml and
1932         rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml.
1933         * features/rs6000/power-dscr.xml: New file.
1934         * features/rs6000/power-ppr.xml: New file.
1935         * features/rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml: New file.
1936         * features/rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml: New file.
1937         * features/rs6000/powerpc-isa205-ppr-dscr-vsx32l.c: Generate.
1938         * features/rs6000/powerpc-isa205-ppr-dscr-vsx64l.c: Generate.
1939         * regformats/rs6000/powerpc-isa205-ppr-dscr-vsx32l.dat: Generate.
1940         * regformats/rs6000/powerpc-isa205-ppr-dscr-vsx64l.dat: Generate.
1941         * ppc-linux-nat.c: Include <sys/uio.h>.
1942         (fetch_regset, store_regset, check_regset): New functions.
1943         (fetch_register, fetch_ppc_registers): Call fetch_regset with
1944         DSCR and PPR regsets.
1945         (store_register, store_ppc_registers): Call store_regset with
1946         DSCR and PPR regsets.
1947         (ppc_linux_get_hwcap2): New function.
1948         (ppc_linux_nat_target::read_description): Call
1949         ppc_linux_get_hwcap2 and check_regset, set ppr_dscr field in the
1950         features struct if needed.
1951         * ppc-linux-tdep.c: Include
1952         features/rs6000/powerpc-isa205-ppr-dscr-vsx32l.c and
1953         features/rs6000/powerpc-isa205-ppr-dscr-vsx64l.c.
1954         (ppc32_regmap_ppr, ppc32_regmap_dscr, ppc32_linux_pprregset)
1955         (ppc32_linux_dscrregset): New globals.
1956         (ppc_linux_iterate_over_regset_sections): Call back with the ppr
1957         and dscr regsets.
1958         (ppc_linux_core_read_description): Check if the ppr and dscr
1959         sections are present and set ppr_dscr in the features struct.
1960         (_initialize_ppc_linux_tdep): Call
1961         initialize_tdesc_powerpc_isa205_ppr_dscr_vsx32l and
1962         initialize_tdesc_powerpc_isa205_ppr_dscr_vsx64l.
1963         * ppc-linux-tdep.h (ppc32_linux_pprregset)
1964         (ppc32_linux_dscrregset): Declare.
1965         * ppc-tdep.h (struct gdbarch_tdep) <ppc_ppr_regnum>: New field.
1966         <ppc_dscr_regnum>: New field.
1967         (enum) <PPC_PPR_REGNUM, PPC_DSCR_REGNUM>: New enum values.
1968         * rs6000-tdep.c (rs6000_gdbarch_init): Look for and validate ppr
1969         and dscr features.
1970         (ppc_process_record_op31): Record changes to PPR and DSCR.
1971
1972 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1973
1974         * rs6000-tdep.c (rs6000_gdbarch_init): Replace line wrapping by a
1975         second initializer line for the have_* variables.  Initialize
1976         have_fpu to 0 instead of 1.
1977
1978 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1979
1980         * arch/ppc-linux-common.c (ppc_linux_match_description):
1981         Parenthesize tdesc assignements and indent them properly.
1982
1983 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1984
1985         * ppc-linux-nat.c (fetch_register): Change if statement to else
1986         if.
1987         (store_register): Likewise.
1988
1989 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1990
1991         * rs6000-tdep.c: Remove reggroups.h include.
1992         (rs6000_pseudo_register_reggroup_p): Remove.
1993         (rs6000_gdbarch_init): Remove call to
1994         set_tdesc_pseudo_register_reggroup_p.
1995
1996 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1997
1998         * reggroups.c (default_register_reggroup_p): Return true for
1999         decfloat registers and float_reggroup.
2000
2001 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
2002
2003         * ppc-linux-tdep.c (ppc_linux_collect_vrregset): Remove.
2004         (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): Replace
2005         ppc_linux_collect_vrregset by regcache_collect_regset.
2006
2007 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
2008
2009         * linux-tdep.c (linux_collect_regset_section_cb): Use
2010         std::vector<gdb_byte> instead of char * and malloc for buf.
2011         Remove xfree.
2012
2013 2018-10-26  Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
2014
2015         * xcoffread.c (read_xcoff_symtab): Pass deduced language to
2016         symtab_start instead of always using language_unknown.
2017
2018 2018-10-26  Andrew Burgess  <andrew.burgess@embecosm.com>
2019
2020         * riscv-tdep.c (riscv_read_misa_reg): Update comment, remove
2021         READ_P parameter, catch and ignore register access errors from
2022         either the old or new MISA location.
2023         (riscv_has_feature): Update call to riscv_read_misa_reg.
2024
2025 2018-10-25  Andrew Burgess  <andrew.burgess@embecosm.com>
2026
2027         * python/py-function.c (convert_values_to_python): Return
2028         gdbpy_ref<>.  Add header comment.
2029         (fnpy_call): Adjust.
2030
2031 2018-10-25  Andrew Burgess  <andrew.burgess@embecosm.com>
2032
2033         * python/py-cmd.c (cmdpy_completer_helper): Return gdbpy_ref<>.
2034         (cmdpy_completer_handle_brkchars): Adjust.
2035         (cmdpy_completer): Adjust.
2036
2037 2018-10-25  Andrew Burgess  <andrew.burgess@embecosm.com>
2038
2039         * riscv-linux-nat.c (riscv_linux_nat_target::fetch_registers):
2040         Pass correct regnum to raw_supply_zeroed.
2041
2042 2018-10-23  Hafiz Abid Qadeer  <abidh@codesourcery.com>
2043
2044         * regcache.c (cooked_read_test): Add CSKY to the list of
2045         architectures with a save_reggroup
2046
2047 2018-10-23  Simon Marchi  <simon.marchi@polymtl.ca>
2048
2049         PR gdb/23368
2050         * infrun.c (follow_exec): In the follow_exec_mode_new case,
2051         transfer terminal state from old new new inferior.
2052         * terminal.h (swap_terminal_info): New function.
2053         * inflow.c (swap_terminal_info): New function.
2054
2055 2018-10-23  Tom Tromey  <tom@tromey.com>
2056
2057         * record-btrace.c (get_thread_current_frame_id): Rename from
2058         get_thread_current_frame.  Return a frame_id.
2059         (record_btrace_start_replaying): Update.
2060
2061 2018-10-23  Andrew Burgess  <andrew.burgess@embecosm.com>
2062
2063         * riscv-tdep.c (riscv_register_name): Use the user-friendly names
2064         for CSRs.
2065
2066 2018-10-23  Joel Brobecker  <brobecker@adacore.com>
2067
2068         * riscv-tdep.c (riscv_gdbarch_init): Set the gdbarch's
2069         have_nonsteppable_watchpoint attribute to 1.
2070
2071 2018-10-23  Andrew Burgess  <andrew.burgess@embecosm.com>
2072
2073         * riscv-tdep.c (riscv_gdb_reg_names): Update comment, and all
2074         register names.
2075         (struct register_alias): Rename to...
2076         (struct riscv_register_alias): ...this, and update comment.
2077         (riscv_register_aliases): Update type, and alias names.  Remove
2078         CSR names from this list.
2079         (riscv_register_name): Use riscv_gdb_reg_names for int and float
2080         register names.  Add an extra assertion.
2081         (riscv_is_regnum_a_named_csr): New function.
2082         (riscv_register_reggroup_p): Use riscv_is_regnum_a_named_csr.
2083
2084 2018-10-23  John Darrington  <john@darrington.wattle.id.au>
2085
2086         * configure.tgt: Add configuration for s12z.
2087         * s12z-tdep.c:  New file.
2088         * NEWS: Mention new target.
2089
2090 2018-10-22  Jim Wilson  <jimw@sifive.com>
2091
2092         * riscv-tdep.c (riscv_push_dummy_call) <in_reg>: Check for value in
2093         FP reg smaller than FP reg size, and fill with -1 instead of 0.
2094
2095         * riscv-tdep.c (riscv_fpreg_d_type, riscv_fpreg_q_type): New.
2096         (riscv_register_type): Use them.
2097         (riscv_print_one_register_info): Handle union of floats same as float.
2098         * riscv-tdep.h (struct gdbarch_tdep): Add riscv_fpreg_d_type and
2099         riscv_fpreg_q_type fields.
2100
2101 2018-10-21  Simon Marchi  <simon.marchi@ericsson.com>
2102
2103         * gdbarch.sh (gdbarch_num_cooked_regs): New.
2104         * gdbarch.h: Re-generate.
2105         * ax-gdb.c (gen_expr): Use gdbarch_num_cooked_regs.
2106         * dwarf2-frame.c (dwarf2_frame_cache): Likewise.
2107         * eval.c (evaluate_subexp_standard): Likewise.
2108         * findvar.c (value_of_register): Likewise.
2109         (value_of_register_lazy): Likewise.
2110         (address_from_register): Likewise.
2111         * frame.c (get_frame_register_bytes): Likewise.
2112         * gdbarch-selftests.c (register_to_value_test): Likewise.
2113         * h8300-tdep.c (h8300_register_type): Likewise.
2114         * i386-tdep.c (i386_dbx_reg_to_regnum): Likewise.
2115         (i386_svr4_reg_to_regnum): Likewise.
2116         * infcmd.c (default_print_registers_info): Likewise.
2117         (registers_info): Likewise.
2118         (print_vector_info): Likewise.
2119         (default_print_float_info): Likewise.
2120         * m68hc11-tdep.c (m68hc11_frame_unwind_cache): Likewise.
2121         * mdebugread.c (mdebug_reg_to_regnum): Likewise.
2122         * mi/mi-main.c (mi_cmd_data_list_register_names): Likewise.
2123         (mi_cmd_data_list_changed_registers): Likewise.
2124         (mi_cmd_data_list_register_values): Likewise.
2125         (mi_cmd_data_write_register_values): Likewise.
2126         (mi_cmd_trace_frame_collected): Likewise.
2127         * mips-tdep.c (print_gp_register_row): Likewise.
2128         (mips_print_registers_info): Likewise.
2129         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
2130         * regcache.c (init_regcache_descr): Likewise.
2131         (register_size): Likewise.
2132         (register_dump::dump): Likewise.
2133         (cooked_read_test): Likewise.
2134         (cooked_write_test): Likewise.
2135         * rs6000-tdep.c (rs6000_register_sim_regno): Likewise.
2136         (rs6000_gdbarch_init): Likewise.
2137         * stabsread.c (stab_reg_to_regnum): Likewise.
2138         * stack.c (info_frame_command): Likewise.
2139         * target-descriptions.c (tdesc_register_name): Likewise.
2140         * trad-frame.c (trad_frame_alloc_saved_regs): Likewise.
2141         * tui/tui-regs.c (tui_show_register_group): Likewise.
2142         * user-regs.c (user_reg_map_name_to_regnum): Likewise.
2143         (user_reg_map_regnum_to_name): Likewise.
2144         (value_of_user_reg): Likewise.
2145         (maintenance_print_user_registers): Likewise.
2146         * xtensa-tdep.c (xtensa_find_register_by_name): Likewise.
2147         (xtensa_register_name): Likewise.
2148         (xtensa_register_type): Likewise.
2149         (xtensa_reg_to_regnum): Likewise.
2150         (xtensa_pseudo_register_read): Likewise.
2151         (xtensa_pseudo_register_write): Likewise.
2152
2153 2018-10-21  Simon Marchi  <simon.marchi@polymtl.ca>
2154
2155         * amd64-tdep.c (amd64_pseudo_register_read_value): Use
2156         correctly-sized buffer with raw_read.
2157         (amd64_pseudo_register_write): Use correctly-sized buffer for
2158         raw_read/raw_write.
2159
2160 2018-10-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
2161
2162         * typeprint.c (_initialize_typeprint): Fix wrong prefixname arg
2163         in add_prefix_cmd of set print type.
2164
2165 2018-10-19  Tom Tromey  <tom@tromey.com>
2166
2167         PR tui/18388:
2168         * NEWS: Mention tabset deprecation.
2169         * tui/tui-win.c (tui_tab_width, internal_tab_width): New globals.
2170         (update_tab_width): New function.
2171         (tui_set_tab_width, tui_show_tab_width): New functions.
2172         (tui_set_tab_width_command): Use update_tab_width.
2173         (_initialize_tui_win): Move to end of file.  Deprecate "tabset".
2174         Add new "set tui tab-width" command.
2175         * tui/tui-source.c (tui_set_source_content): Update.
2176         * tui/tui-disasm.c (tui_set_disassem_content): Update.
2177         * tui/tui-data.h (tui_default_tab_len, tui_set_default_tab_len):
2178         Don't declare.
2179         (tui_tab_width): Declare.
2180         * tui/tui-data.c (default_tab_len, tui_default_tab_len)
2181         (tui_set_default_tab_len): Remove.
2182
2183 2018-10-19  Tom Tromey  <tom@tromey.com>
2184
2185         * tui/tui-io.h (key_is_start_sequence, key_is_end_sequence)
2186         (key_is_backspace, tui_getc): Don't declare.
2187         * tui/tui-io.c (key_is_start_sequence): Now static.
2188         (key_is_end_sequence, key_is_backspace): Remove.
2189         (tui_getc): Now static.
2190
2191 2018-10-19  Tom Tromey  <tom@tromey.com>
2192
2193         * symfile.c (reread_symbols): Clear "static_links".
2194
2195 2018-10-19  Alan Hayward  <alan.hayward@arm.com>
2196
2197         * aarch64-linux-tdep.c (AARCH64_SIGCONTEXT_RESERVED_SIZE): New
2198         define.
2199         (aarch64_linux_sigframe_init): Extra boundary checks.
2200
2201 2018-10-19  Andreas Arnez  <arnez@linux.ibm.com>
2202
2203         * s390-tdep.c (s390_pseudo_register_type): For v0-v15 don't yield
2204         the possibly non-existent tdesc type 'vec128', but the type of raw
2205         register v16 instead.
2206
2207 2018-10-19  Gary Benson <gbenson@redhat.com>
2208
2209         * cli/cli-interp.c (cli_interp::~cli_interp): New function.
2210
2211 2018-10-18  Sergio Durigan Junior  <sergiodj@redhat.com>
2212
2213         PR cli/23785
2214         * cli/cli-dump.c (restore_binary_file): Check if "file" is
2215         NULL.
2216
2217 2018-10-17  Paul Koning  <paul_koning@dell.com>
2218
2219         * charset.c (convert_between_encodings): Fix unsigned overflow.
2220
2221 2018-10-17  John Baldwin  <jhb@FreeBSD.org>
2222
2223         * fbsd-nat.c (fbsd_nat_target::info_proc) Use
2224         fbsd_info_proc_mappings_header and fbsd_info_proc_mappings_entry.
2225         * fbsd-tdep.c (fbsd_vm_map_entry_flags): Mark static.
2226         (fbsd_info_proc_mappings_header, fbsd_info_proc_mappings_entry):
2227         New functions.
2228         (fbsd_core_info_proc_mappings): Use fbsd_info_proc_mappings_header
2229         and fbsd_info_proc_mappings_header.
2230         * fbsd-tdep.h (fbsd_vm_map_entry_flags): Remove.
2231         (fbsd_info_proc_mappings_header, fbsd_info_proc_mappings_entry):
2232         New.
2233
2234 2018-10-17  Joel Brobecker  <brobecker@adacore.com>
2235
2236         * MAINTAINERS (Responsible Maintainers): Add Rainer Orth as
2237         Solaris Maintainer.
2238
2239 2018-10-15  Tom Tromey  <tom@tromey.com>
2240
2241         * tui/tui.c (strcat_to_buf): Remove casts.
2242         * tui/tui-winsource.c (tui_show_source_line)
2243         (tui_set_is_exec_point_at, tui_line_is_displayed): Remove casts.
2244         * tui/tui-wingeneral.c (tui_refresh_win, box_win): Remove casts.
2245         * tui/tui-windata.c (tui_first_data_item_displayed)
2246         (tui_delete_data_content_windows, tui_erase_data_content)
2247         (tui_display_all_data, tui_display_data_from)
2248         (tui_refresh_data_win, tui_vertical_data_scroll): Remove casts.
2249         * tui/tui-win.c (tui_set_win_height)
2250         (make_invisible_and_set_new_height, parse_scrolling_args): Remove
2251         casts.
2252         * tui/tui-win.c (tui_resize_all): Remove casts.
2253         (tui_scroll_backward_command, tui_set_focus)
2254         (tui_set_tab_width_command): Likewise.
2255         * tui/tui-source.c (tui_vertical_source_scroll): Remove cast.
2256         * tui/tui-regs.c (tui_show_register_group): Remove cast.
2257         * tui/tui-layout.c (tui_set_layout_by_name): Remove cast.
2258         * tui/tui-disasm.c (tui_vertical_disassem_scroll): Remove cast.
2259         * tui/tui-data.c (tui_partial_win_by_name, tui_free_win_content):
2260         Remove casts.
2261
2262 2018-10-15  Simon Marchi  <simon.marchi@ericsson.com>
2263
2264         * MAINTAINERS (Responsible Maintainers): Add Alan Hayward as
2265         AArch64/ARM maintainer.
2266
2267 2018-10-11  Gary Benson <gbenson@redhat.com>
2268
2269         * interps.h (interp::m_name): Make private and mutable.
2270         * interps.c (interp::~interp): Free m_name.
2271
2272 2018-10-10  Sergio Durigan Junior  <sergiodj@redhat.com>
2273             Simon Marchi <simark@simark.ca>
2274
2275         * README (`configure' options): Add documentation for new
2276         "--enable-unit-tests" option.
2277         * acinclude.m4: Include "selftest.m4".
2278         * configure: Regenerate.
2279         * configure.ac: Use "GDB_AC_SELFTEST".
2280         * maint.c (maintenance_selftest): Update message informing
2281         that selftests have been disabled.
2282         (maintenance_info_selftests): Likewise.
2283         * selftest.m4: New file.
2284
2285 2018-10-10  Gary Benson <gbenson@redhat.com>
2286
2287         * remote.c (remote_target::remote_send_printf): Add
2288         missing va_end found by Coverity.
2289
2290 2018-10-10  Markus Metzger  <markus.t.metzger@intel.com>
2291
2292         * btrace.c (ftrace_update_function): Add indirect jump heuristic.
2293
2294 2018-10-09  Tom Tromey  <tom@tromey.com>
2295
2296         * configure: Rebuild.
2297         * sanitize.m4 (AM_GDB_UBSAN): Default to no.
2298         * NEWS: Update --enable-ubsan documentation.
2299
2300 2018-10-09  Gary Benson <gbenson@redhat.com>
2301
2302         * dwarf2read.c (create_dwp_hash_table): Fix buffer overrun
2303         found by Coverity.
2304
2305 2018-10-08  Tom Tromey  <tom@tromey.com>
2306
2307         * riscv-fbsd-tdep.c (riscv_fbsd_sigframe_init): Remove unused
2308         variable.
2309         (riscv_fbsd_init_abi): Likewise.
2310
2311 2018-10-08  Weimin Pan  <weimin.pan@oracle.com>
2312         * valops.c (value_struct_elt_for_reference): Rename local variable
2313         to work around the shadowing a previous local warning.
2314
2315 2018-10-08  John Baldwin  <jhb@FreeBSD.org>
2316
2317         * Makefile.in (ALLDEPFILES): Add riscv-fbsd-nat.c.
2318         * NEWS: Mention new FreeBSD/riscv native configuration.
2319         * configure.host: Add riscv*-*-freebsd*.
2320         * configure.nat: Likewise.
2321         * riscv-fbsd-nat.c: New file.
2322
2323 2018-10-08  John Baldwin  <jhb@FreeBSD.org>
2324
2325         * Makefile.in (ALL_TARGET_OBS): Add riscv-fbsd-tdep.o.
2326         (HFILES_NO_SRCDIR): Add riscv-fbsd-tdep.h.
2327         (ALLDEPFILES): Add riscv-fbsd-tdep.c.
2328         * NEWS: Mention new FreeBSD/riscv target.
2329         * configure.tgt: Add riscv*-*-freebsd*.
2330         * riscv-fbsd-tdep.c: New file.
2331         * riscv-fbsd-tdep.h: New file.
2332
2333 2018-10-08  John Baldwin  <jhb@FreeBSD.org>
2334
2335         * regcache.h (struct regcache_map_entry): Note that this type can
2336         be used with traditional frame caches.
2337         * trad-frame.c (trad_frame_set_reg_regmap): New.
2338         * trad-frame.h (trad_frame_set_reg_regmap): New.
2339
2340 2018-10-08  Weimin Pan  <weimin.pan@oracle.com>
2341
2342         PR c++/16841
2343         * valops.c (get_virtual_base_offset): New function.
2344         (value_struct_elt_for_reference): Use it to get virtual base offset
2345         and add it in calculating class member address.
2346
2347 2018-10-08  John Darrington  <john@darrington.wattle.id.au>
2348
2349         * dwarf2read.c (dwarf2_cu) <producer_is_codewarrior>: New field.
2350         (check_producer): Check if the producer is codewarrior.
2351         (producer_is_codewarrior): New function.
2352         (lnp_state_machine::record_line): Ignore is_stmt flag for records
2353         produced by codewarrior.
2354         (dwarf2_cu::dwarf2_cu): Initialize producer_is_codewarrior.
2355
2356 2018-10-06  Tom Tromey  <tom@tromey.com>
2357
2358         PR python/19399:
2359         * python/py-inferior.c: Add "architecture" entry.
2360         (infpy_architecture): New function.
2361
2362 2018-10-06  Tom Tromey  <tom@tromey.com>
2363
2364         PR python/21765:
2365         * python/py-symbol.c (gdbpy_initialize_symbols): Redefine
2366         SYMBOL_VARIABLES_DOMAIN, SYMBOL_FUNCTIONS_DOMAIN,
2367         SYMBOL_TYPES_DOMAIN.  Define SYMBOL_MODULE_DOMAIN,
2368         SYMBOL_COMMON_BLOCK_DOMAIN, SYMBOL_LOC_COMMON_BLOCK.
2369
2370 2018-10-06  Tom Tromey  <tom@tromey.com>
2371
2372         PR build/17077:
2373         * Makefile.in (OPCODES_CFLAGS): Remove "-I$(OPCODES_SRC)/..".
2374         * arc-tdep.c, frv-tdep.c, lm32-tdep.c, mep-tdep.c,
2375         microblaze-tdep.c, or1k-tdep.h: Use ../opcodes, not opcodes, in
2376         #include.
2377
2378 2018-10-06  Tom Tromey  <tom@tromey.com>
2379
2380         * python/py-breakpoint.c (bppy_get_location): Handle a
2381         bp_breakpoint without a location.
2382
2383 2018-10-06  Tom Tromey  <tom@tromey.com>
2384
2385         * python/lib/gdb/function/strfns.py (_MemEq, _StrLen, _StrEq)
2386         (_RegEx): Reformat help text.
2387         * python/lib/gdb/function/caller_is.py (CallerIs, CallerMatches)
2388         (AnyCallerIs, AnyCallerMatches): Reformat help text.
2389         * python/lib/gdb/function/as_string.py (_AsString): Reformat help
2390         text.
2391         * python/lib/gdb/command/xmethods.py (InfoXMethod)
2392         (EnableXMethod, DisableXMethod): Remove help indentation.
2393         Capitalize meta-syntactic variables.
2394         * python/lib/gdb/command/unwinders.py (InfoUnwinder)
2395         (EnableUnwinder, DisableUnwinder): Remove help indentation.
2396         Capitalize meta-syntactic variables.
2397         * python/lib/gdb/command/explore.py (ExploreCommand)
2398         (ExploreValueCommand, ExploreTypeCommand): Reformat help text.
2399         * python/lib/gdb/command/type_printers.py (InfoTypePrinter)
2400         (EnableTypePrinter, DisableTypePrinter): Remove help indentation.
2401         * python/lib/gdb/command/pretty_printers.py (InfoPrettyPrinter):
2402         Remove help indentation.
2403         (EnablePrettyPrinter, DisablePrettyPrinter): Likewise.
2404         * python/lib/gdb/command/frame_filters.py (EnableFrameFilter)
2405         (DisableFrameFilter, SetFrameFilterPriority)
2406         (ShowFrameFilterPriority, InfoFrameFilter): Reword help text.
2407
2408 2018-10-06  Tom Tromey  <tom@tromey.com>
2409
2410         PR tui/28819:
2411         * tui/tui-io.c (gdb_wgetch): New function.
2412         (tui_mld_getc, tui_getc): Use it.
2413
2414 2018-10-05  Tom Tromey  <tom@tromey.com>
2415
2416         * sol-thread.c (sol_thread_target::wait): Rename inner
2417         "save_ptid".
2418
2419 2018-10-04  Tom Tromey  <tom@tromey.com>
2420
2421         * configure: Rebuild.
2422         * warning.m4 (AM_GDB_WARNINGS): Add -Wshadow=local.
2423
2424 2018-10-04  Tom Tromey  <tom@tromey.com>
2425
2426         * guile/scm-frame.c (gdbscm_frame_read_var): Remove inner
2427         declaration of "block".
2428
2429 2018-10-04  Tom Tromey  <tom@tromey.com>
2430
2431         * common/filestuff.c (fdwalk): Remove inner declaration of
2432         "result".
2433
2434 2018-10-04  Tom Tromey  <tom@tromey.com>
2435
2436         * msp430-tdep.c (msp430_push_dummy_call): Rename inner
2437         "structs_addr" and hoist declaration.
2438
2439 2018-10-04  Tom Tromey  <tom@tromey.com>
2440
2441         * linux-tdep.c (linux_make_mappings_corefile_notes): Introduce new
2442         variable "size".
2443
2444 2018-10-04  Tom Tromey  <tom@tromey.com>
2445
2446         * mdebugread.c (parse_partial_symbols): Use std::string.
2447
2448 2018-10-04  Tom Tromey  <tom@tromey.com>
2449
2450         * ctf.c (SET_ARRAY_FIELD): Rename "u32".
2451         * p-valprint.c (pascal_val_print): Split inner "i" variable.
2452         * xtensa-tdep.c (xtensa_push_dummy_call): Declare "i" in loop
2453         header.
2454         * xstormy16-tdep.c (xstormy16_push_dummy_call): Declare "val" in
2455         more inner scope.
2456         * xcoffread.c (read_xcoff_symtab): Rename inner "symbol".
2457         * varobj.c (varobj_update): Rename inner "newobj",
2458         "type_changed".
2459         * valprint.c (generic_emit_char): Rename inner "buf".
2460         * valops.c (find_overload_match): Rename inner "temp".
2461         (value_struct_elt_for_reference): Declare "v" in more inner
2462         scope.
2463         * v850-tdep.c (v850_push_dummy_call): Rename "len".
2464         * unittests/array-view-selftests.c (run_tests): Rename inner
2465         "vec".
2466         * tui/tui-stack.c (tui_show_frame_info): Declare "i" in loop
2467         header.
2468         * tracepoint.c (merge_uploaded_trace_state_variables): Declare
2469         "tsv" in more inner scope.
2470         (print_one_static_tracepoint_marker): Rename inner
2471         "tuple_emitter".
2472         * tic6x-tdep.c (tic6x_analyze_prologue): Declare "inst" lower.
2473         (tic6x_push_dummy_call): Don't redeclare "addr".
2474         * target-float.c: Declare "dto" lower.
2475         * symtab.c (lookup_local_symbol): Rename inner "sym".
2476         (find_pc_sect_line): Rename inner "pc".
2477         * stack.c (print_frame): Don't redeclare "gdbarch".
2478         (return_command): Rename inner "gdbarch".
2479         * s390-tdep.c (s390_prologue_frame_unwind_cache): Renam inner
2480         "sp".
2481         * rust-lang.c (rust_internal_print_type): Declare "i" in loop
2482         header.
2483         * rs6000-tdep.c (ppc_process_record): Rename inner "addr".
2484         * riscv-tdep.c (riscv_push_dummy_call): Declare "info" in inner
2485         scope.
2486         * remote.c (remote_target::update_thread_list): Don't redeclare
2487         "tp".
2488         (remote_target::process_initial_stop_replies): Rename inner
2489         "thread".
2490         (remote_target::remote_parse_stop_reply): Don't redeclare "p".
2491         (remote_target::wait_as): Don't redeclare "stop_reply".
2492         (remote_target::get_thread_local_address): Rename inner
2493         "result".
2494         (remote_target::get_tib_address): Likewise.
2495
2496         * regcache.c (cooked_read_test): Rename "regnum".
2497         * record-btrace.c (cmd_record_btrace_start): Rename inner
2498         "exception".
2499         * ppc-sysv-tdep.c (ppc64_sysv_abi_return_value): Declare "i" in
2500         loop header.
2501         * ppc-linux-tdep.c (ppc_linux_syscall_record): Declare "i" in loop
2502         header.
2503         (ppu2spu_sniffer): Rename inner "buf".
2504         * parse.c (operator_check_standard): Rename inner "type",
2505         "objfile".
2506         * p-valprint.c (pascal_val_print): Introduce new scope for
2507         "low_bound", "high_bound".
2508         * p-exp.y (yylex): Declare "i" in loop header.
2509         * objfiles.c (objfile_relocate1): Declare "i" in loop header.
2510         Lower declaration of "s".
2511         * nios2-tdep.c (nios2_analyze_prologue): Declare "i" in loop
2512         header.
2513         (nios2_push_dummy_call): Rename "len".
2514         * nat/linux-osdata.c (linux_xfer_osdata_cpus): Rename static
2515         "buf".
2516         (linux_xfer_osdata_fds, linux_xfer_osdata_shm)
2517         (linux_xfer_osdata_sem, linux_xfer_osdata_msg)
2518         (linux_xfer_osdata_modules): Likewise.
2519         * mips-tdep.c (mips_eabi_push_dummy_call): Rename outer "len".
2520         (mips_n32n64_push_dummy_call, mips_o32_push_dummy_call)
2521         (mips_o64_push_dummy_call): Likewise.
2522         * microblaze-tdep.c (microblaze_analyze_prologue): Rename inner
2523         "op".
2524         * mi/mi-main.c (list_available_thread_groups): Rename inner
2525         "tuple_emitter".
2526         (mi_cmd_data_read_memory): Rename inner "opts".
2527         * mi/mi-cmd-var.c (varobj_update_one): Rename inner
2528         "tuple_emitter".
2529         * mep-tdep.c (mep_analyze_prologue): Declare "rn" in loop header.
2530         * mdebugread.c (parse_symbol): Rename inner "b".  Declare "f" in
2531         more inner scope.
2532         (parse_partial_symbols): Rename inner "pst", "p", "name"
2533         * main.c (captured_main_1): Rename inner "i"s.
2534         * machoread.c (macho_symfile_read_all_oso): Don't redeclare
2535         "oso2".
2536         * linux-tdep.c (linux_info_proc): Rename inner "filename".
2537         * linespec.c (linespec_lexer_lex_string): Rename inner "p".
2538         * infrun.c (handle_no_resumed): Don't redeclare "thread".
2539         (handle_signal_stop): Rename inner "gdbarch".
2540         (handle_command): Declare "signum" in loop header.
2541         * ia64-tdep.c (ia64_pseudo_register_read): Don't redeclare
2542         "status".
2543         (examine_prologue): Rename inner "sol" and "sof".
2544         (ia64_extract_return_value): Rename inner "val".  Declare another
2545         "val" in a more inner scope.
2546         * hppa-bsd-tdep.c (hppabsd_find_global_pointer): Declare "buf" in
2547         inner scope.
2548         * guile/scm-symbol.c (gdbscm_lookup_symbol): Rename inner
2549         "except".
2550         * findvar.c (default_read_var_value): Don't redeclare "addr".
2551         * f-exp.y (yylex): Declare "i" in loop header.
2552         * eval.c (evaluate_subexp_standard): Don't redeclare "type".
2553         Rename inner "type", "expect_type".
2554         (evaluate_subexp_for_sizeof): Rename inner "pc".
2555         * elfread.c (elf_symfile_read): Rename inner "abfd".
2556         * dwarf2read.c (read_debug_names_from_section): Don't redeclare
2557         "bytes_read".
2558         (process_psymtab_comp_unit_reader): Don't redeclare "gdbarch".
2559         (add_partial_subprogram): Rename inner "lowpc" and "highpc".
2560         (dwarf_decode_line_header): Rename inner "lh".
2561         * dwarf2loc.c (dwarf2_compile_expr_to_ax): Don't redeclare
2562         "offset".  Declare "i" in loop header.
2563         (disassemble_dwarf_expression): Rename inner "addr_size".
2564         * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Rename
2565         inner "result".
2566         (dwarf_expr_context::execute_stack_op): Rename inner "offset".
2567         * dwarf2-frame.c (decode_frame_entry_1): Rename inner "length"s.
2568         * disasm.c (do_mixed_source_and_assembly_deprecated): Rename inner
2569         "inner_list_emitter".
2570         (do_mixed_source_and_assembly): Rename inner "tuple_emitter".
2571         * disasm-selftests.c (print_one_insn_test): Wrap "bplen"
2572         declaration in a block.
2573         * csky-tdep.c (csky_analyze_prologue): Declare "offset" lower.
2574         * cp-valprint.c (cp_print_value_fields): Don't redeclare
2575         "obstack_final_size".
2576         * cp-support.c (inspect_type): Declare "i" in loop header.
2577         * compile/compile.c (compile_instance::insert_symbol_error):
2578         Rename inner "e".
2579         * common/agent.c (agent_run_command): Remove inner "ret"
2580         declaration.
2581         * coffread.c (coff_symfile_read): Rename inner "name".
2582         (coff_symfile_read): Rename inner "abfd".
2583         * cli/cli-utils.c (get_number_trailer): Rename inner "val".
2584         * cli/cli-cmds.c (print_disassembly): Rename inner "low" and
2585         "high".
2586         * c-exp.y (lex_one_token): Move "len" declaration lower.
2587         * breakpoint.c (create_longjmp_master_breakpoint): Don't redeclare
2588         "gdbarch".
2589         (create_exception_master_breakpoint): Likewise.  Don't redeclare
2590         "b".
2591         (watch_command_1): Declare "mark" later.
2592         (clear_command): Don't shadow "a" or "b".
2593         (delete_command): Rename inner "b".
2594         (delete_trace_command): Likewise.
2595         * arm-tdep.c (thumb_process_displaced_32bit_insn): Rename inner
2596         "op".
2597         (arm_gdbarch_init): Remove inner "e_flags".
2598         * arch/arm-get-next-pcs.c (thumb_get_next_pcs_raw): Declare
2599         "offset" in inner blocks.
2600
2601 2018-10-04  Simon Marchi  <simon.marchi@ericsson.com>
2602
2603         * dwarf-index-write.c (file_write): Don't write if the vector is
2604         empty.
2605
2606 2018-10-05  Tom de Vries  <tdevries@suse.de>
2607
2608         * python/py-progspace.c (pspy_solib_name): Fix type mismatch in
2609         PyArg_ParseTuple call.
2610
2611 2018-10-05  Tom de Vries  <tdevries@suse.de>
2612
2613         * python/py-record-btrace.c (recpy_bt_goto): Fix type mismatch in
2614         PyArg_ParseTuple call.
2615
2616 2018-10-04  Joel Brobecker  <brobecker@adacore.com>
2617
2618         * psymtab.c (recursively_search_psymtabs): Reformat parameters
2619         to avoid exceeding 80 characters per line limit.
2620
2621 2018-10-04  Tom Tromey  <tom@tromey.com>
2622
2623         * symfile.c (syms_from_objfile_1, finish_new_objfile)
2624         (reread_symbols): Update.
2625         * complaints.h (clear_complaints): Remove argument.
2626         * complaints.c (enum complaint_series): Remove.
2627         (series): Remove global.
2628         (complaint_internal): Update.
2629         (clear_complaints): Remove argument.
2630
2631 2018-10-04  Tom Tromey  <tom@tromey.com>
2632
2633         * symfile.c (symbol_file_add_with_addrs): Do not print "no
2634         debugging symbols" message if there is a separate debug objfile.
2635
2636 2018-10-04  Tom Tromey  <tom@tromey.com>
2637
2638         PR cli/19551:
2639         * symfile.c (symbol_file_add_with_addrs): Update output.
2640         * psymtab.c (require_partial_symbols): Update output.
2641
2642 2018-10-04  Tom Tromey  <tom@tromey.com>
2643
2644         PR cli/22234:
2645         * complaints.c: Emit \n.
2646
2647 2018-10-04  Tom Tromey  <tom@tromey.com>
2648
2649         * symfile.c (symbol_file_add_with_addrs, symbol_file_clear)
2650         (separate_debug_file_exists, find_separate_debug_file)
2651         (add_symbol_file_command, reread_symbols, allocate_symtab)
2652         (allocate_compunit_symtab): Use filtered printing, not
2653         unfiltered.
2654         * psymtab.c (require_partial_symbols, dump_psymtab)
2655         (allocate_psymtab): Use filtered printing, not unfiltered.
2656
2657 2018-10-04  Tom Tromey  <tom@tromey.com>
2658
2659         * complaints.c (complaint_internal): Correctly check complaint
2660         count.
2661
2662 2018-10-04  Tom Tromey  <tom@tromey.com>
2663
2664         * complaints.h (struct complaints): Remove declaration.
2665         * complaints.c (clear_complaints): Remove an unused variable.
2666
2667 2018-10-04  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2668
2669         * MAINTAINERS (Write After Approval): Add self.
2670
2671 2018-10-03  Tom Tromey  <tom@tromey.com>
2672
2673         * guile/scm-value.c (gdbscm_value_to_string): Initialize
2674         "buffer_contents".
2675         * coffread.c (coff_symtab_read): Initialize "newobj".
2676
2677 2018-10-03  Simon Marchi  <simon.marchi@polymtl.ca>
2678
2679         * dwarf2read.c (read_func_scope): Remove struct keyword in
2680         range-based for.
2681
2682 2018-10-03  Tom Tromey  <tom@tromey.com>
2683
2684         * README: Mention --enable-ubsan.
2685         * NEWS: Mention --enable-ubsan.
2686         * acinclude.m4: Include sanitize.m4.
2687         * configure: Rebuild.
2688         * configure.ac: Call AM_GDB_UBSAN.
2689         * sanitize.m4: New file.
2690
2691 2018-10-03  Tom Tromey  <tom@tromey.com>
2692
2693         * expression.h (enum exp_opcode): Use uint8_t as base type.
2694         * expprint.c (op_name): Handle invalid opcodes.
2695
2696 2018-10-03  Tom Tromey  <tom@tromey.com>
2697
2698         * parse.c (prefixify_expression): Add assert.
2699         (parse_exp_in_context_1): Throw exception if the expression is
2700         empty.
2701
2702 2018-10-03  Tom Tromey  <tom@tromey.com>
2703
2704         * dwarf2read.c (read_signed_leb128): Work in ULONGEST.
2705
2706 2018-10-03  Tom Tromey  <tom@tromey.com>
2707
2708         * c-exp.y (parse_number): Work in unsigned.  Remove casts.
2709
2710 2018-10-03  Tom Tromey  <tom@tromey.com>
2711
2712         * dwarf2read.c (read_subrange_type): Make "negative_mask"
2713         unsigned.
2714
2715 2018-10-03  Tom Tromey  <tom@tromey.com>
2716
2717         * findvar.c (extract_integer): Do work in an unsigned type.
2718
2719 2018-10-03  Tom Tromey  <tom@tromey.com>
2720
2721         * common/enum-flags.h (enum_flags::operator~): Add static assert.
2722         * symfile-add-flags.h (enum symfile_add_flag): Use unsigned as
2723         base type.
2724         * objfile-flags.h (enum objfile_flag): Use unsigned as base type.
2725         * gdbtypes.h (enum type_instance_flag_value): Use unsigned as base
2726         type.
2727         * c-lang.h (enum c_string_type_values): Use unsigned as base
2728         type.
2729         * btrace.h (enum btrace_thread_flag): Use unsigned as base type.
2730
2731 2018-10-03  Tom Tromey  <tom@tromey.com>
2732
2733         * dwarf2-frame.h (dwarf2_frame_state_reg_info)
2734         <~dwarf2_frame_state_reg_info>: Update.
2735         <dwarf2_frame_state_reg_info>: Update.
2736         <alloc_regs>: Add assertion.  Update.
2737         <reg>: Now a std::vector.
2738         <num_regs>: Remove.
2739         <swap>: Update.
2740         * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
2741         (execute_cfa_program_test, dwarf2_frame_cache): Update.
2742
2743 2018-10-03  Tom Tromey  <tom@tromey.com>
2744
2745         * namespace.c (add_using_directive): Don't pass NULL to memcpy.
2746
2747 2018-10-03  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
2748
2749         * tid-parse.c (tid_is_in_list): Fix wrong 'See' comment.
2750
2751 2018-10-02  Tom Tromey  <tom@tromey.com>
2752
2753         * aarch64-linux-tdep.c (aarch64_linux_sigframe_init): Use pulongest.
2754
2755 2018-10-02  John Darrington  <john@darrington.wattle.id.au>
2756
2757         * NEWS: Mention changed commands.
2758         * ser-uds.c: New file.
2759         * configure.ac (SER_HARDWIRE): Add ser-uds.o.
2760         * configure: Regenerate.
2761         * Makefile.in: Add new file.
2762         * serial.c (serial_open): Check if filename is a socket
2763         and lookup the appropriate interface accordingly.
2764
2765 2018-10-01  Alan Hayward  <alan.hayward@arm.com>
2766
2767         * aarch64-linux-tdep.c (AARCH64_SIGCONTEXT_RESERVED_OFFSET): Add
2768         define.
2769         (AARCH64_EXTRA_MAGIC): Likewise.
2770         (AARCH64_FPSIMD_MAGIC): Likewise.
2771         (AARCH64_SVE_MAGIC): Likewise.
2772         (AARCH64_EXTRA_DATAP_OFFSET): Likewise.
2773         (AARCH64_FPSIMD_FPSR_OFFSET): Likewise.
2774         (AARCH64_FPSIMD_FPCR_OFFSET): Likewise.
2775         (AARCH64_FPSIMD_V0_OFFSET): Likewise.
2776         (AARCH64_FPSIMD_VREG_SIZE): Likewise.
2777         (AARCH64_SVE_CONTEXT_VL_OFFSET): Likewise.
2778         (AARCH64_SVE_CONTEXT_REGS_OFFSET): Likewise.
2779         (AARCH64_SVE_CONTEXT_P_REGS_OFFSET): Likewise.
2780         (AARCH64_SVE_CONTEXT_FFR_OFFSET): Likewise.
2781         (AARCH64_SVE_CONTEXT_SIZE): Likewise.
2782         (read_aarch64_ctx): Add function.
2783         (aarch64_linux_sigframe_init): Detect FP registers.
2784
2785 2018-10-01  Alan Hayward  <alan.hayward@arm.com>
2786
2787         * aarch64-tdep.c (AARCH64_Q0_REGNUM): Move to here.
2788         (AARCH64_D0_REGNUM): Likewise.
2789         (AARCH64_S0_REGNUM): Likewise.
2790         (AARCH64_H0_REGNUM): Likewise.
2791         (AARCH64_B0_REGNUM): Likewise.
2792         (AARCH64_SVE_V0_REGNUM): Likewise.
2793         * arch/aarch64.h (AARCH64_Q0_REGNUM): Move from here.
2794         (AARCH64_D0_REGNUM): Likewise.
2795         (AARCH64_S0_REGNUM): Likewise.
2796         (AARCH64_H0_REGNUM): Likewise.
2797         (AARCH64_B0_REGNUM): Likewise.
2798         (AARCH64_SVE_V0_REGNUM): Likewise.
2799
2800 2018-10-01  Gary Benson <gbenson@redhat.com>
2801
2802         * gdb_proc_service.h (gdb_prfpregset_t): Remove typedef.
2803         * proc-service.c (ps_lgetfpregs, ps_lsetfpregs): Use
2804         prfpregset_t instead of gdb_prfpregset_t.
2805         * configure.ac (PRFPREGSET_T_BROKEN): Remove check.
2806         * configure, config.in: Rebuild.
2807
2808 2018-10-01  Gary Benson <gbenson@redhat.com>
2809
2810         * common/gdb_proc_service.h: New file, factored out from...
2811         * gdb_proc_service.h: Moved common code to the above file.
2812         * Makefile.in (HFILES_NO_SRCDIR): Add the above new file.
2813
2814 2018-10-01  Gary Benson <gbenson@redhat.com>
2815
2816         * gdb_proc_service.h: Use elf_gregset_t if prgregset_t is
2817         undefined.  Use elf_fpregset_t if prfpregset_t is undefined.
2818
2819 2018-10-01  Gary Benson <gbenson@redhat.com>
2820
2821         * configure.ac: Check if sys/procfs.h defines elf_fpregset_t.
2822         (AC_CHECK_HEADERS): Check for linux/elf.h.
2823         * configure, config.in: Rebuild.
2824         * gdb_proc_service.h: Include linux/elf.h if sys/procfs.h
2825         doesn't define elf_fpregset_t.
2826
2827 2018-10-01  Gary Benson <gbenson@redhat.com>
2828
2829         * gdb_proc_service.h: Whitespace change.
2830
2831 2018-10-01  Tom Tromey  <tom@tromey.com>
2832
2833         * unittests/scoped_mmap-selftests.c: Don't check HAVE_UNISTD_H.
2834         * unittests/scoped_fd-selftests.c: Don't check HAVE_UNISTD_H.
2835         * common/scoped_fd.h: Don't check HAVE_UNISTD_H.
2836
2837 2018-10-01  Tom Tromey  <tom@tromey.com>
2838
2839         * README: Minor change.
2840
2841 2018-09-30  Pedro Alves  <palves@redhat.com>
2842
2843         * darwin-nat-info.c (darwin_debug_regions_recurse)
2844         (info_mach_exceptions_command): Remove unused local variables.
2845         * darwin-nat.c (darwin_decode_notify_message)
2846         (darwin_nat_target::resume, darwin_nat_target::mourn_inferior)
2847         (darwin_stop_inferior, darwin_setup_exceptions)
2848         (darwin_nat_target::kill, darwin_attach_pid, darwin_ptrace_him)
2849         (darwin_nat_target::attach, darwin_nat_target::detach)
2850         (darwin_read_write_inferior, darwin_read_dyld_info): Remove unused
2851         local variables.
2852         * i386-darwin-nat.c (i386_darwin_dr_set): Remove unused local
2853         variables.
2854
2855 2018-09-29  Tom Tromey  <tom@tromey.com>
2856
2857         * README: Remove some leftover text.
2858
2859 2018-09-29  Tom Tromey  <tom@tromey.com>
2860
2861         * PROBLEMS: Rewrite.
2862         * README: Update.
2863
2864 2018-09-28  John Baldwin  <jhb@FreeBSD.org>
2865
2866         * disasm-selftests.c (print_one_insn_test): Add bfd_arch_riscv to
2867         case with explicit breakpoint kind.
2868         * riscv-tdep.c (show_use_compressed_breakpoints): Remove
2869         'additional_info' and related logic.
2870         (riscv_debug_breakpoints): New variable.
2871         (riscv_breakpoint_kind_from_pc): Use the length of the existing
2872         instruction to determine the breakpoint kind.
2873         (_initialize_riscv_tdep): Add 'set/show debug riscv breakpoints'
2874         flag.  Update description of 'set/show riscv
2875         use-compressed-breakpoints' flag.
2876
2877 2018-09-28  Andrew Burgess  <andrew.burgess@embecosm.com>
2878
2879         (NEWS): Mention changes to frame related commands.
2880         * cli/cli-decode.c (add_cmd_suppress_notification): New function.
2881         (add_prefix_cmd_suppress_notification): New function.
2882         (add_com_suppress_notification): Call
2883         add_cmd_suppress_notification.
2884         * command.h (add_cmd_suppress_notification): Declare.
2885         (add_prefix_cmd_suppress_notification): Declare.
2886         * mi/mi-cmd-stack.c: Add 'safe-ctype.h' include.
2887         (parse_frame_specification): Moved from stack.c, with
2888         simplification to handle a single argument.
2889         (mi_cmd_stack_select_frame): Use parse_frame_specification, the
2890         switch to the selected frame.  Add a header comment.
2891         * stack.c: Remove 'safe-ctype.h' include.
2892         (find_frame_for_function): Add declaration.
2893         (find_frame_for_address): New function.
2894         (parse_frame_specification): Moved into mi/mi-cmd-stack.c.
2895         (frame_selection_by_function_completer): New function.
2896         (info_frame_command): Rename to...
2897         (info_frame_command_core): ...this, and update parameter types.
2898         (select_frame_command): Rename to...
2899         (select_frame_command_core): ...this, and update parameter types.
2900         (frame_command): Rename to...
2901         (frame_command_core): ...this, and update parameter types.
2902         (class frame_command_helper): New class to wrap implementations of
2903         frame related sub-commands.
2904         (frame_apply_cmd_list): New static global.
2905         (frame_cmd_list): Make static.
2906         (select_frame_cmd_list): New global for sub-commands.
2907         (info_frame_cmd_list): New global for sub-commands.
2908         (_initialize_stack): Register sub-commands for 'frame',
2909         'select-frame', and 'info frame'.  Update 'frame apply' commands
2910         to use frame_apply_cmd_list.  Move function local static
2911         frame_apply_list to file static frame_apply_cmd_list for
2912         consistency.
2913         * stack.h (select_frame_command): Delete declarationn.
2914         (select_frame_for_mi): Declare new function.
2915
2916 2018-09-26  Andrew Burgess  <andrew.burgess@embecosm.com>
2917
2918         * riscv-tdep.c (riscv_insn::decode): Decode c.lui.
2919         (riscv_scan_prologue): Split handling of AUIPC, LUI, ADD, ADDI,
2920         and NOP.
2921
2922 2018-09-26  Simon Marchi  <simon.marchi@ericsson.com>
2923
2924         * elf32-nds32.c (elf32_nds32_allocate_dynrelocs): Remove.
2925
2926 2018-09-26  Tom Tromey  <tom@tromey.com>
2927
2928         * valops.c (auto_abandon): Remove dead code.
2929
2930 2018-09-26  Tom Tromey  <tom@tromey.com>
2931
2932         * tui/tui-win.c (WIN_HEIGHT_USAGE): Remove extra ">"s.
2933
2934 2018-09-24  Tom Tromey  <tom@tromey.com>
2935
2936         * common/pathstuff.c (get_standard_cache_dir): Make
2937         "xdg_cache_home" and "home" const.
2938         * top.c (init_history): Make "tmpenv" const.
2939         * main.c (get_init_files): Make "homedir" const.
2940
2941 2018-09-23  Tom Tromey  <tom@tromey.com>
2942
2943         PR python/18852:
2944         * python/py-param.c (get_set_value): Use gdbpy_handle_exception.
2945
2946 2018-09-23  Tom Tromey  <tom@tromey.com>
2947
2948         * python/py-function.c (fnpy_call): Use gdbpy_handle_exception.
2949         * python/py-cmd.c (cmdpy_function): Use gdbpy_handle_exception.
2950         * python/python-internal.h (gdbpy_handle_exception): Declare.
2951         * python/py-utils.c (gdbpy_handle_exception): New function.
2952
2953 2018-09-23  Tom Tromey  <tom@tromey.com>
2954
2955         PR python/17284:
2956         * python/py-type.c (typy_template_argument): Check for negative
2957         argument number.
2958
2959 2018-09-23  Tom Tromey  <tom@tromey.com>
2960
2961         PR python/14062:
2962         * python/python.c (gdbpy_run_events): Do not ignore exceptions.
2963
2964 2018-09-23  Tom Tromey  <tom@tromey.com>
2965
2966         PR python/18170:
2967         * python/py-value.c (valpy_int): Allow conversion from pointer
2968         type.
2969
2970 2018-09-23  Tom Tromey  <tom@tromey.com>
2971
2972         PR python/20126:
2973         * python/py-value.c (valpy_int): Respect type sign.
2974
2975 2018-09-23  Tom Tromey  <tom@tromey.com>
2976
2977         PR python/18352;
2978         * python/py-value.c (valpy_float): Allow conversions from int or
2979         char.
2980         (valpy_int, valpy_long): Allow conversions from float.
2981
2982 2018-09-23  Tom Tromey  <tom@tromey.com>
2983
2984         * ctf.c (ctf_start): Use gdb_fopen_cloexec.
2985         * common/scoped_mmap.c (mmap_file): Use gdb_open_cloexec.
2986
2987 2018-09-23  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2988
2989         * amd64-sol2-tdep.c (amd64_sol2_sigtramp_p): Also recognize
2990         __sighndlr.
2991         * i386-sol2-tdep.c (i386_sol2_sigtramp_p): Likewise.
2992
2993 2018-08-02  Jon Turney  <jon.turney@dronecode.org.uk>
2994
2995         * windows-nat.c (windows_nat_target::wait): Remove a spurious
2996         target_terminal::ours().
2997
2998 2018-09-23  Simon Marchi  <simon.marchi@ericsson.com>
2999
3000         * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): Change type
3001         of vl to ULONGEST.
3002
3003 2018-09-21  Yacov Simhony  <ysimhony@gmail.com>
3004
3005         * breakpoint.c (update_inserted_breakpoint_locations): Remove
3006         redundant condition.
3007
3008 2018-09-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
3009
3010         * proc-utils.h (PROC_CTL_WORD_TYPE): Remove.
3011
3012         * procfs.c: Don't check for PR_MODEL_NATIVE definition.
3013         * sparc-sol2-nat.c: Likewise.  Remove Linux, __arch64__ references.
3014         * sol-thread.c (ps_pdmodel): Don't guard definition.
3015
3016         * procfs.c: Fix formatting.
3017
3018         * procfs.c (sysset_t_alloc): Remove.
3019         (create_procinfo): Use XNEW instead of sysset_t_alloc.
3020         (procfs_debug_inferior): Likewise.
3021         (procfs_set_exec_trap): Likewise.
3022         (proc_set_traced_sysentry): Don't allocate argp dynamically.
3023         (proc_set_traced_sysexit): Likewise.
3024
3025         * procfs.c (create_procinfo): Use xsnprintf to fix ARI warning.
3026         (dead_procinfo): Likewise.
3027         (proc_warn): Likewise.
3028         (proc_error): Likewise.
3029         (proc_get_LDT_entry): Likewise.
3030         (do_attach): Likewise.
3031         (procfs_target::pid_to_str): Likewise.
3032         (iterate_over_mappings): Likewise.
3033
3034         * procfs.c (create_procinfo): Fix ARI warning.
3035         (proc_get_status): Likewise.
3036         (proc_stop_process): Likewise.
3037         (proc_run_process): Likewise.
3038         (proc_kill): Likewise.
3039         (proc_get_LDT_entry): Likewise.
3040         (procfs_find_LDT_entry): Likewise.
3041         (proc_update_threads): Likewise.
3042         (proc_iterate_over_threads): Likewise.
3043         (do_attach): Likewise.
3044         (procfs_xfer_memory): Likewise.
3045         (invalidate_cache): Likewise.
3046         (procfs_target::resume): Likewise.
3047         (procfs_init_inferior): Likewise.
3048         (procfs_set_exec_trap): Likewise.
3049         (procfs_target::thread_alive): Likewise.
3050         (procfs_target::pid_to_exec_file): Likewise.
3051         (iterate_over_mappings): Likewise.
3052         (procfs_target::make_corefile_notes): Likewise.
3053         * sol-thread.c (sol_thread_target::thread_alive): Likewise.
3054
3055         * procfs.c (procfs_find_LDT_entry): Silence ARI warning.
3056         (procfs_find_LDT_entry): Likewise.
3057         * sol-thread.c (ps_lgetLDT): Likewise.
3058
3059 2018-09-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
3060
3061         PR tdep/17903
3062         * procfs.c (procfs_target): Declare pid_to_exec_file.
3063         (procfs_target::pid_to_exec_file): New.
3064
3065 2018-09-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
3066
3067         * auxv.c (default_print_auxv_entry): Reflect AT_SUN_CAP_HW1
3068         renaming.
3069         Handle AT_SUN_EMULATOR, AT_SUN_BRANDNAME, AT_SUN_BRAND_AUX1,
3070         AT_SUN_BRAND_AUX2, AT_SUN_BRAND_AUX3, AT_SUN_CAP_HW2.
3071
3072 2018-09-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
3073
3074         * i386-v4-nat.c (regmap, supply_gregset, fill_gregset)
3075         (supply_fpregset, fill_fpregset): Move ...
3076         * i386-sol2-nat.c [PR_MODEL_NATIVE != PR_MODEL_LP64]: ... here.
3077         Remove HAVE_GREGSET_T, HAVE_FPREGET_T guards.
3078         Remove references to ioctl-based procfs.
3079         Include <sys/reg.h>.
3080         Remove PR_MODEL_NATIVE guards.
3081         * configure.nat <sol2, i386> (NATDEPFILES): Remove i386-v4-nat.o.
3082         * Makefile.in (ALLDEPFILES): Remove i386-v4-nat.c.
3083
3084 2018-09-19  Xavier Roirand  <roirand@adacore.com>
3085
3086         PR gdb/20981:
3087         * solib-darwin.c (darwin_get_dyld_bfd): New function.
3088         (darwin_solib_get_all_image_info_addr_at_init): Update call.
3089         (darwin_solib_create_inferior_hook): Handle unrelocated dyld.
3090
3091 2018-09-19  John Baldwin  <jhb@FreeBSD.org>
3092
3093         * fbsd-tdep.c (fbsd_print_sockaddr_in): Style fix.
3094         (fbsd_print_sockaddr_in6): Likewise.
3095
3096 2018-09-19  Richard Bunt  <richard.bunt@arm.com>
3097             Chris January  <chris.january@arm.com>
3098
3099         * eval.c (skip_undetermined_arglist): Skip argument list helper.
3100         (evaluate_subexp_standard): Return a dummy type when
3101         honoring EVAL_SKIP in OP_VAR_VALUE and handle skipping in the
3102         OP_F77_UNDETERMINED_ARGLIST case.
3103         * expression.h (enum noside): Update comment.
3104
3105 2018-09-19  George Vasick <george.vasick@oracle.com>
3106
3107         * solib-svr4.c (svr4_same_1): Also handle amd64 ld.so.1.
3108
3109 2018-09-19  Stefan Teleman <stefan.teleman@oracle.com>
3110             April Chin <april.chin@oracle.com>
3111             Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
3112
3113         * procfs.c (MAX_PROC_NAME_SIZE): Allow for 6-digit PID_MAX and
3114         uint_t lwpid_t.
3115         (create_procinfo): Print pids in /proc without leading zeros.
3116
3117 2018-09-18  Sandra Loosemore  <sandra@codesourcery.com>
3118
3119         * nios2-tdep.c (nios2_gcc_target_options): New.
3120         (nios2_gdb_arch_init): Install new hook.
3121
3122 2018-09-18  Simon Marchi  <simon.marchi@ericsson.com>
3123
3124         * patches/0001-Fix-PR-gdb-23558-Use-system-s-getcwd-when-cross-comp.patch:
3125         New file.
3126         * update-gnulib.sh: Apply patch.
3127         * configure: Re-generate.
3128
3129 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
3130
3131         * infcmd.c (_initialize_infcmd): Remove "running" from "info proc"
3132         description.  Make "info proc" command descriptions more
3133         consistent.
3134
3135 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
3136
3137         * NEWS: Mention 'info proc files' command.
3138
3139 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
3140
3141         * fbsd-nat.c (fbsd_nat_target::info_proc): List open file
3142         descriptors for IP_FILES and IP_ALL.
3143
3144 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
3145
3146         * fbsd-tdep.c (KF_FLAGS, KF_OFFSET, KF_VNODE_TYPE, KF_SOCK_DOMAIN)
3147         (KF_SOCK_TYPE, KF_SOCK_PROTOCOL, KF_SA_LOCAL, KF_SA_PEER)
3148         (KINFO_FILE_TYPE_SOCKET, KINFO_FILE_TYPE_PIPE)
3149         (KINFO_FILE_TYPE_FIFO, KINFO_FILE_TYPE_KQUEUE)
3150         (KINFO_FILE_TYPE_CRYPTO, KINFO_FILE_TYPE_MQUEUE)
3151         (KINFO_FILE_TYPE_SHM, KINFO_FILE_TYPE_SEM, KINFO_FILE_TYPE_PTS)
3152         (KINFO_FILE_TYPE_PROCDESC, KINFO_FILE_FD_TYPE_ROOT)
3153         (KINFO_FILE_FD_TYPE_JAIL, KINFO_FILE_FD_TYPE_TRACE)
3154         (KINFO_FILE_FD_TYPE_CTTY, KINFO_FILE_FLAG_READ)
3155         (KINFO_FILE_FLAG_WRITE, KINFO_FILE_FLAG_APPEND)
3156         (KINFO_FILE_FLAG_ASYNC, KINFO_FILE_FLAG_FSYNC)
3157         (KINFO_FILE_FLAG_NONBLOCK, KINFO_FILE_FLAG_DIRECT)
3158         (KINFO_FILE_FLAG_HASLOCK, KINFO_FILE_FLAG_EXEC)
3159         (KINFO_FILE_VTYPE_VREG, KINFO_FILE_VTYPE_VDIR)
3160         (KINFO_FILE_VTYPE_VCHR, KINFO_FILE_VTYPE_VLNK)
3161         (KINFO_FILE_VTYPE_VSOCK, KINFO_FILE_VTYPE_VFIFO, FBSD_AF_UNIX)
3162         (FBSD_AF_INET, FBSD_AF_INET6, FBSD_SOCK_STREAM, FBSD_SOCK_DGRAM)
3163         (FBSD_SOCK_SEQPACKET, FBSD_IPPROTO_ICMP, FBSD_IPPROTO_TCP)
3164         (FBSD_IPPROTO_UDP, FBSD_IPPROTO_SCTP): New defines.
3165         (struct fbsd_sockaddr_in, struct fbsd_sockaddr_in6)
3166         (struct fbsd_sockaddr_un): New types.
3167         (fbsd_file_fd, fbsd_file_type, fbsd_file_flags, fbsd_ipproto)
3168         (fbsd_print_sockaddr_in, fbsd_print_sockaddr_in6)
3169         (fbsd_info_proc_files_header, fbsd_info_proc_files_entry)
3170         (fbsd_core_info_proc_files): New functions.
3171         (fbsd_core_info_proc): List open file descriptors for IP_FILES and
3172         IP_ALL.
3173         * fbsd-tdep.h (fbsd_info_proc_files_header)
3174         (fbsd_info_proc_files_entry): New.
3175
3176 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
3177
3178         * defs.h (enum info_proc_what) [IP_FILES]: New value.
3179         * infcmd.c (info_proc_cmd_files): New function.
3180         (_initialize_infcmd): Register 'info proc files' command.
3181
3182 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
3183
3184         * gnulib/aclocal-m4-deps.mk: Re-generate.
3185         * gnulib/aclocal.m4: Re-generate.
3186         * gnulib/config.in: Re-generate.
3187         * gnulib/configure: Re-generate.
3188         * gnulib/import/Makefile.am: Re-generate.
3189         * gnulib/import/Makefile.in: Re-generate.
3190         * gnulib/import/m4/gnulib-cache.m4: Re-generate.
3191         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
3192         * gnulib/import/arpa_inet.in.h: New file.
3193         * gnulib/import/inet_ntop.c: New file.
3194         * gnulib/import/m4/arpa_inet_h.m4: New file.
3195         * gnulib/import/m4/inet_ntop.m4: New file.
3196         * gnulib/import/m4/netinet_in_h.m4: New file.
3197         * gnulib/import/m4/socklen.m4: New file.
3198         * gnulib/import/m4/sockpfaf.m4: New file.
3199         * gnulib/import/m4/stdalign.m4: New file.
3200         * gnulib/import/m4/sys_uio_h.m4: New file.
3201         * gnulib/import/netinet_in.in.h: New file.
3202         * gnulib/import/stdalign.in.h: New file.
3203         * gnulib/import/sys_socket.c: New file.
3204         * gnulib/import/sys_socket.in.h: New file.
3205         * gnulib/import/sys_uio.in.h: New file.
3206         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add inet_ntop
3207         module.
3208
3209 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
3210
3211         * gnulib/aclocal-m4-deps.mk: New file.
3212         * gnulib/update-gnulib.sh: Generate "aclocal-m4-deps.mk"
3213         deterministically.
3214
3215 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
3216
3217         * fbsd-tdep.c (fbsd_core_vnode_path): Use KF_PATH instead of
3218         KVE_PATH.
3219
3220 2018-09-18  Tom Tromey  <tom@tromey.com>
3221
3222         * compile/compile-object-load.c (struct
3223         link_hash_table_cleanup_data): Add constructor and destructor.
3224         Use DISABLE_COPY_AND_ASSIGN.
3225         (~link_hash_table_cleanup_data): Rename from
3226         link_hash_table_free.  Now a destructor.
3227         (copy_sections): Use gdb::unique_xmalloc_ptr.  Remove cleanups.
3228
3229 2018-09-18  Tom Tromey  <tom@tromey.com>
3230
3231         * compile/compile-object-run.c (do_module_cleanup): Use delete.
3232         * compile/compile-object-load.c (struct munmap_list): Move to
3233         header file.
3234         (munmap_list::add): Rename from munmap_list_add; rewrite.
3235         (munmap_list::~munmap_list): Rename from munmap_list_free.
3236         (munmap_listp_free_cleanup): Remove.
3237         (compile_object_load): Update.
3238         * compile/compile-object-load.h (struct munmap_list): Move from
3239         compile-object-load.c.  Rewrite.
3240
3241 2018-09-18  Alan Hayward  <alan.hayward@arm.com>
3242
3243         * aarch64-tdep.c (pass_in_v): Use register size.
3244         (aarch64_extract_return_value): Likewise.
3245         (aarch64_store_return_value): Likewise.
3246
3247 2018-09-18  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
3248
3249         * utils.c (dump_core) [HAVE_SETRLIMIT]: Cast RLIM_INFINITY to
3250         rlim_t.
3251
3252 2018-09-17  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
3253
3254         * python/lib/gdb/command/frame_filters.py (EnableFrameFilter):
3255         Fix short help line.
3256
3257 2018-09-17  Tom Tromey  <tom@tromey.com>
3258
3259         PR python/20445:
3260         * configure: Rebuild.
3261         * configure.ac: Conditionally use -DNDEBUG for Python.
3262
3263 2018-09-17  Tom Tromey  <tom@tromey.com>
3264
3265         * configure: Rebuild.
3266         * configure.ac: Use gmp as a library dependency when checking for
3267         mpfr.
3268
3269 2018-09-17  Pedro Alves  <palves@redhat.com>
3270
3271         * python/py-inferior.c (find_inferior_object): Delete.
3272
3273 2018-09-17  Simon Marchi  <simon.marchi@ericsson.com>
3274
3275         * compile/compile-cplus-types.c
3276         (compile_cplus_instance::enter_scope): Don't use new_scope after
3277         std::move.
3278
3279 2018-09-17  Tom Tromey  <tom@tromey.com>
3280
3281         * common/pathstuff.c (get_standard_cache_dir): Use
3282         ~/Library/Caches on macOS.
3283         * common/pathstuff.h (get_standard_cache_dir): Update comment.
3284
3285 2018-09-17  Simon Marchi  <simon.marchi@polymtl.ca>
3286
3287         PR python/23669
3288         * breakpoint.c (commands_cmd_element): New.
3289         (_initialize_breakpoint): Assign commands_cmd_element.
3290         * breakpoint.h (commands_cmd_element): New.
3291         * cli/cli-script.c (while_cmd_element, if_command,
3292         define_cmd_element): New.
3293         (command_name_equals): Remove.
3294         (process_next_line): Compare commands by pointer, not by name.
3295         (_initialize_cli_script): Assign the various cmd_list_element
3296         variables.
3297         * compile/compile.c (compile_cmd_element): New.
3298         (_initialize_compile): Assign compile_cmd_element.
3299         * compile/compile.h (compile_cmd_element): New.
3300         * guile/guile.c (guile_cmd_element): New.
3301         (install_gdb_commands): Assign guile_cmd_element.
3302         * guile/guile.h (guile_cmd_element): New.
3303         * python/python.c (python_cmd_element): New.
3304         (_initialize_python): Assign python_cmd_element.
3305         * python/python.h (python_cmd_element): New.
3306         * tracepoint.c (while_stepping_cmd_element): New.
3307         (_initialize_tracepoint): Assign while_stepping_cmd_element.
3308         * tracepoint.h (while_stepping_cmd_element): New.
3309
3310 2018-09-17  Tom Tromey  <tom@tromey.com>
3311
3312         * infrun.c (save_infcall_suspend_state): Return
3313         infcall_suspend_state_up.
3314         (save_infcall_control_state): Return infcall_control_state_up.
3315         * inferior.h (save_infcall_suspend_state)
3316         (save_infcall_control_state): Declare later.  Return unique
3317         pointers.
3318
3319 2018-09-17  Tom Tromey  <tom@tromey.com>
3320
3321         * infrun.c (struct stop_context): Declare constructor,
3322         destructor, "changed" method.
3323         (stop_context::stop_context): Rename from save_stop_context.
3324         (stop_context::~stop_context): Rename from
3325         release_stop_context_cleanup.
3326         (normal_stop): Update.
3327         (stop_context::changed): Rename from stop_context_changed.  Return
3328         bool.
3329
3330 2018-09-17  Tom Tromey  <tom@tromey.com>
3331
3332         * inferior.h (struct infcall_suspend_state_deleter): New.
3333         (infcall_suspend_state_up): New typedef.
3334         (struct infcall_control_state_deleter): New.
3335         (infcall_control_state_up): New typedef.
3336         (make_cleanup_restore_infcall_suspend_state)
3337         (make_cleanup_restore_infcall_control_state): Don't declare.
3338         * infcall.c (call_function_by_hand_dummy): Update.
3339         * infrun.c (do_restore_infcall_suspend_state_cleanup)
3340         (make_cleanup_restore_infcall_suspend_state): Remove.
3341         (do_restore_infcall_control_state_cleanup)
3342         (make_cleanup_restore_infcall_control_state): Remove.
3343
3344 2018-09-17  Tom Tromey  <tom@tromey.com>
3345
3346         * gdbthread.h (struct thread_control_state): Add initializer.
3347         (class thread_info) <control>: Remove initializer.
3348         * inferior.h (struct inferior_control_state): Add initializer.
3349         (class inferior) <control>: Remove initializer.
3350         (exit_inferior_1): Update.
3351         * infrun.c (struct infcall_control_state): Add constructors.
3352         (save_infcall_control_state): Use new.
3353         (restore_infcall_control_state, discard_infcall_control_state):
3354         Use delete.
3355
3356 2018-09-17  Tom Tromey  <tom@tromey.com>
3357
3358         * infrun.c (struct infcall_suspend_state) <registers>: Now a
3359         unique_ptr.
3360         <siginfo_data>: Now a unique_xmalloc_ptr.
3361         (save_infcall_suspend_state, restore_infcall_suspend_state)
3362         (discard_infcall_suspend_state)
3363         (get_infcall_suspend_state_regcache): Update.
3364
3365 2018-09-17  Tom Tromey  <tom@tromey.com>
3366
3367         * gdbthread.h (struct thread_suspend_state): Add initializers.
3368         (class thread_info) <suspend>: Remove initializer.
3369         * infrun.c (struct infcall_suspend_state): Add initializers.
3370         (save_infcall_suspend_state): Use new.
3371         (discard_infcall_suspend_state): Use delete.
3372
3373 2018-09-16  Tom Tromey  <tom@tromey.com>
3374
3375         * python/python-internal.h (CPYCHECKER_STEALS_REFERENCE_TO_ARG):
3376         Remove.
3377         * python/py-varobj.c (py_varobj_iter_ctor): Change pyiter to
3378         rvalue reference.  Remove CPYCHECKER_STEALS_REFERENCE_TO_ARG.
3379         (py_varobj_iter_new): Likewise.
3380         (py_varobj_get_iterator): Use gdbpy_ref.
3381
3382 2018-09-16  Tom Tromey  <tom@tromey.com>
3383
3384         * python/py-threadevent.c (py_get_event_thread): Simplify.
3385         * python/py-inferior.c (infpy_thread_from_thread_handle):
3386         Return immediately after calling thread_to_thread_object.  Use
3387         Py_RETURN_NONE.
3388         (thread_to_thread_object): Set the exception on a NULL return.
3389
3390 2018-09-16  Simon Marchi  <simon.marchi@polymtl.ca>
3391
3392         * Makefile.in (LIBGDB_OBS): Sort COMMON_OBS.
3393
3394 2018-09-16  Tom Tromey  <tom@tromey.com>
3395
3396         * python/python-internal.h (CPYCHECKER_RETURNS_BORROWED_REF):
3397         Remove.
3398
3399 2018-09-16  Tom Tromey  <tom@tromey.com>
3400
3401         * python/python-internal.h (thread_to_thread_object): Change
3402         return type.
3403         * python/py-inferior.c (thread_to_thread_object): Return a new
3404         reference.
3405         (infpy_thread_from_thread_handle): Update.
3406         * python/py-infthread.c (gdbpy_selected_thread): Update.
3407         * python/py-stopevent.c (create_stop_event_object): Update.
3408         * python/py-threadevent.c (py_get_event_thread): Return a new
3409         reference.
3410         (py_get_event_thread): Update.
3411         * python/py-event.h (py_get_event_thread): Change return type.
3412         * python/py-continueevent.c (create_continue_event_object):
3413         Update.
3414
3415 2018-09-16  Tom Tromey  <tom@tromey.com>
3416
3417         * python/py-progspace.c (pspy_get_objfiles): Update.
3418         * python/python-internal.h (objfile_to_objfile_object): Change
3419         return type.
3420         * python/py-newobjfileevent.c (create_new_objfile_event_object):
3421         Update.
3422         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers):
3423         Update.
3424         * python/python.c (gdbpy_get_current_objfile): Update.
3425         (gdbpy_objfiles): Update.
3426         * python/py-objfile.c (objfpy_get_owner, gdbpy_lookup_objfile):
3427         Update.
3428         (objfile_to_objfile_object): Return a new reference.
3429         * python/py-symtab.c (stpy_get_objfile): Update.
3430         * python/py-prettyprint.c (find_pretty_printer_from_objfiles):
3431         Update.
3432
3433 2018-09-16  Tom Tromey  <tom@tromey.com>
3434
3435         * python/py-inferior.c (infpy_get_progspace): Update.
3436         * python/python-internal.h (pspace_to_pspace_object): Change
3437         return type.
3438         * python/py-newobjfileevent.c
3439         (create_clear_objfiles_event_object): Update.
3440         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers):
3441         Update.
3442         * python/python.c (gdbpy_get_current_progspace): Update.
3443         (gdbpy_progspaces): Update.
3444         * python/py-progspace.c (pspace_to_pspace_object): Return a new
3445         reference.
3446         * python/py-objfile.c (objfpy_get_progspace): Update.
3447         * python/py-prettyprint.c (find_pretty_printer_from_progspace):
3448         Update.
3449
3450 2018-09-16  Tom Tromey  <tom@tromey.com>
3451
3452         * python/lib/gdb/__init__.py (current_progspace, objfiles)
3453         (solib_name, block_for_pc, find_pc_line): New functions.
3454         (execute_unwinders): Update.
3455         * python/py-block.c (gdbpy_block_for_pc): Remove.
3456         * python/py-inferior.c (infpy_get_progspace): New function.
3457         (inferior_object_getset) <progspace>: Add.
3458         * python/py-progspace.c (pspy_objfiles): Rewrite.
3459         (pspy_solib_name, pspy_block_for_pc)
3460         (pspy_find_pc_line, pspy_is_valid): New functions.
3461         (progspace_object_methods): Add entries for solib_name,
3462         block_for_pc, find_pc_line, is_valid.
3463         * python/python-internal.h (gdbpy_block_for_pc)
3464         (build_objfiles_list): Don't declare.
3465         * python/python.c: Don't include solib.h.
3466         (gdbpy_solib_name, gdbpy_find_pc_line)
3467         (gdbpy_get_current_progspace, build_objfiles_list)
3468         (gdbpy_objfiles): Remove.
3469         (GdbMethods) <current_progspace, objfiles, block_for_pc,
3470         solib_name, find_pc_line>: Remove entries.
3471
3472 2018-09-16  Tom Tromey  <tom@tromey.com>
3473
3474         * top.c (new_ui_command): Use GNU style for metasyntactic
3475         variables.
3476         * breakpoint.c (stopat_command): Use GNU style for metasyntactic
3477         variables.
3478         * maint.c (maintenance_translate_address): Remove "<>" around
3479         text.
3480         * interps.c (interpreter_exec_cmd): Use GNU style for
3481         metasyntactic variables.
3482         * nto-procfs.c (nto_procfs_target_info): Use GNU style for
3483         metasyntactic variables.
3484         * tracepoint.c (tfind_range_command): Use GNU style for
3485         metasyntactic variables.
3486         (tfind_outside_command): Likewise.
3487         (_initialize_tracepoint): Likewise.
3488         * remote.c (extended_remote_target::create_inferior): Use GNU
3489         style for metasyntactic variables.
3490         * sparc64-tdep.c (adi_examine_command): Use GNU style for
3491         metasyntactic variables.
3492         (adi_assign_command): Likewise.
3493
3494 2018-09-16  Tom Tromey  <tom@tromey.com>
3495
3496         * disasm.c (show_disassembler_options_sfunc): Use GNU style for
3497         metasyntactic variables.  Print message if no disassembler options
3498         are available.
3499
3500 2018-09-15  Tom Tromey  <tom@tromey.com>
3501
3502         * infcmd.c (get_inferior_args): Return const char *.
3503         * inferior.h (get_inferior_args): Return type now const.
3504         * linux-tdep.c (linux_fill_prpsinfo): Update.
3505         * procfs.c (procfs_target::make_corefile_notes): Update.
3506
3507 2018-09-07  Tom Tromey  <tom@tromey.com>
3508
3509         * python/python.c (execute_gdb_command): Call bpstat_do_actions
3510         inside the TRY.
3511
3512 2018-09-14  Sandra Loosemore  <sandra@codesourcery.com>
3513
3514         * nios2-tdep.c (nios2_type_align): New.
3515         (nios2_gdb_arch_init): Install type_align hook.
3516
3517 2018-09-10  Andrew Burgess  <andrew.burgess@embecosm.com>
3518
3519         * eval.c (fake_method::fake_method): Call xzalloc directly for a
3520         type that is neither object file owned, nor gdbarch owned.
3521         * gdbtypes.c (get_type_gdbarch): Add an assert that returned
3522         gdbarch is non-NULL.
3523         (alloc_type_instance): Allocate non-objfile owned types on the
3524         gdbarch obstack.
3525         (copy_type_recursive): Allocate TYPE_FIELDS and TYPE_RANGE_DATA
3526         using TYPE_ALLOC to ensure memory is allocated on the correct
3527         obstack.
3528         * gdbtypes.h (TYPE_ALLOC): Allocate space on either the objfile
3529         obstack, or the gdbarch obstack.
3530         (TYPE_ZALLOC): Rewrite using TYPE_ALLOC.
3531
3532 2018-09-14  Tom Tromey  <tom@tromey.com>
3533
3534         * infcall.c (call_function_by_hand_dummy): Remove unnecessary
3535         block.
3536
3537 2018-09-14  Tom Tromey  <tom@tromey.com>
3538
3539         * nat/fork-inferior.c (get_startup_shell): Remove "static".
3540
3541 2018-09-13  Tom Tromey  <tom@tromey.com>
3542
3543         * python/py-inferior.c (infpy_thread_from_thread_handle): Now
3544         static.
3545
3546 2018-09-13  Tom Tromey  <tom@tromey.com>
3547
3548         * exec.c (try_open_exec_file): Use std::string.
3549
3550 2018-09-13  Tom Tromey  <tom@tromey.com>
3551
3552         * utils.h (gdb_bfd_errmsg): Return std::string.
3553         * exec.c (exec_file_attach): Update.
3554         * compile/compile-object-load.c (compile_object_load): Update.
3555         * utils.c (gdb_bfd_errmsg): Return std::string.
3556
3557 2018-09-13  Tom Tromey  <tom@tromey.com>
3558
3559         * procfs.c (struct procinfo_deleter): New.
3560         (procinfo_up): New typedef.
3561         (do_destroy_procinfo_cleanup): Remove.
3562         (procfs_target::info_proc): Use procinfo_up.  Remove cleanups.
3563
3564 2018-09-13  Tom Tromey  <tom@tromey.com>
3565
3566         * source.c (add_path): Use gdb::unique_xmalloc_ptr.
3567
3568 2018-09-13  Simon Marchi  <simon.marchi@ericsson.com>
3569 2018-09-13  Tom Tromey  <tom@tromey.com>
3570
3571         * python/py-progspace.c (PSPY_REQUIRE_VALID): New macro.
3572         (pspy_get_objfiles): New function.
3573         (progspace_object_methods): New.
3574         (pspace_object_type): Add tp_methods callback.
3575         * python/python-internal.h (build_objfiles_list): New
3576         declaration.
3577         * python/python.c (build_objfiles_list): New function.
3578         (gdbpy_objfiles): Implement using build_objfiles_list.
3579         * NEWS: Mention the Progspace.objfiles method.
3580
3581 2018-09-13  Simon Marchi  <simon.marchi@ericsson.com>
3582
3583         * python/py-inferior.c (infpy_get_progspace): New function.
3584         (inferior_object_getset): Add progspace property.
3585         * NEWS: Mention the new property.
3586
3587 2018-09-13  Tom Tromey  <tom@tromey.com>
3588
3589         PR rust/23650:
3590         * rust-lang.c (rust_evaluate_subexp): Use field name, not "foo".
3591
3592 2018-09-13  Tom Tromey  <tom@tromey.com>
3593
3594         PR rust/23626:
3595         * rust-lang.c (rust_enum_variant): Now static.
3596         (rust_empty_enum_p): New function.
3597         (rust_print_enum, rust_evaluate_subexp, rust_print_struct_def):
3598         Handle empty enum.
3599
3600 2018-09-13  Simon Marchi  <simon.marchi@ericsson.com>
3601
3602         * python/py-inferior.c (infpy_repr): New.
3603         (inferior_object_type): Register infpy_repr.
3604         * python/py-objfile.c (objfpy_repr): New.
3605         (objfile_object_type): Register objfpy_repr.
3606
3607 2018-09-12  John Baldwin  <jhb@FreeBSD.org>
3608
3609         * fbsd-nat.c (fbsd_nat_target::info_proc): Remove unused variable.
3610
3611 2018-09-12  John Baldwin  <jhb@FreeBSD.org>
3612
3613         * aarch64-fbsd-tdep.h (AARCH64_FBSD_SIZEOF_GREGSET): Fix comment
3614         typo.
3615
3616 2018-09-12  Sergio Durigan Junior  <sergiodj@redhat.com>
3617
3618         * common/common-utils.c: Don't include '<sys/stat.h>'.
3619         (is_regular_file): Move to...
3620         * common/filestuff.c (is_regular_file): ... here.
3621         * common/common-utils.h (is_regular_file): Move to...
3622         * common/filestuff.h (is_regular_file): ... here.
3623
3624 2018-09-12  Simon Marchi  <simon.marchi@ericsson.com>
3625
3626         * skip.c (debug_skip): New variable.
3627         (skiplist_entry::do_skip_file_p): Add debug output.
3628         (skiplist_entry::do_skip_gfile_p): Likewise.
3629         (skiplist_entry::skip_function_p): Likewise.
3630         (_initialize_step_skip): Create debug command.
3631         * NEWS: Mention set/show debug skip.
3632
3633 2018-09-11  Xavier Roirand  <roirand@adacore.com>
3634
3635         * darwin-nat.c (should_disable_startup_with_shell):
3636         New function.
3637         (darwin_nat_target::create_inferior): Add call.
3638
3639 2018-09-11  Xavier Roirand  <roirand@adacore.com>
3640
3641         * darwin-nat.h (struct darwin_thread_info) <gdb_port,
3642         inf_port, msg_state>: Initialize.
3643         (struct darwin_thread_info) <signaled, single_step>: Change
3644         type and initialize.
3645         (struct darwin_thread_info) <event>: Initialize.
3646
3647 2018-09-10  Sergio Durigan Junior  <sergiodj@redhat.com>
3648
3649         PR gdb/23555
3650         PR gdb/23558
3651         * gnulib/import/m4/getcwd-path-max.m4: Add cross-compilation
3652         guesses.
3653
3654 2018-09-10  Sergio Durigan Junior  <sergiodj@redhat.com>
3655
3656         Revert:
3657         2018-08-29  Sergio Durigan Junior  <sergiodj@redhat.com>
3658
3659         PR gdb/23555
3660         PR gdb/23558
3661         * gnulib/aclocal.m4: Regenerate.
3662         * gnulib/config.in: Regenerate.
3663         * gnulib/configure: Regenerate.
3664         * gnulib/import/Makefile.am: Update.
3665         * gnulib/import/Makefile.in: Update.
3666         * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
3667         * gnulib/import/_Noreturn.h: ... this.
3668         * gnulib/import/alloca.in.h: Update.
3669         * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
3670         * gnulib/import/arg-nonnull.h: ... this.
3671         * gnulib/import/assure.h: Update.
3672         * gnulib/import/at-func.c: Update.
3673         * gnulib/import/basename-lgpl.c: Update.
3674         * gnulib/import/extra/snippet/c++defs.h: Rename to...
3675         * gnulib/import/c++defs.h: ... this.
3676         * gnulib/import/canonicalize-lgpl.c: Update.
3677         * gnulib/import/cdefs.h: Update.
3678         * gnulib/import/chdir-long.c: Update.
3679         * gnulib/import/chdir-long.h: Update.
3680         * gnulib/import/cloexec.c: Update.
3681         * gnulib/import/cloexec.h: Update.
3682         * gnulib/import/close.c: Update.
3683         * gnulib/import/closedir.c: Update.
3684         * gnulib/import/config.charset: Update.
3685         * gnulib/import/dirent-private.h: Update.
3686         * gnulib/import/dirent.in.h: Update.
3687         * gnulib/import/dirfd.c: Update.
3688         * gnulib/import/dirname-lgpl.c: Update.
3689         * gnulib/import/dirname.h: Update.
3690         * gnulib/import/dosname.h: Update.
3691         * gnulib/import/dup-safer-flag.c: Update.
3692         * gnulib/import/dup-safer.c: Update.
3693         * gnulib/import/dup.c: Update.
3694         * gnulib/import/dup2.c: Update.
3695         * gnulib/import/errno.in.h: Update.
3696         * gnulib/import/error.c: Update.
3697         * gnulib/import/error.h: Update.
3698         * gnulib/import/exitfail.c: Update.
3699         * gnulib/import/exitfail.h: Update.
3700         * gnulib/import/extra/update-copyright: Update.
3701         * gnulib/import/fchdir.c: Update.
3702         * gnulib/import/fcntl.c: Update.
3703         * gnulib/import/fcntl.in.h: Update.
3704         * gnulib/import/fd-hook.c: Update.
3705         * gnulib/import/fd-hook.h: Update.
3706         * gnulib/import/fd-safer-flag.c: Update.
3707         * gnulib/import/fd-safer.c: Update.
3708         * gnulib/import/fdopendir.c: Update.
3709         * gnulib/import/filename.h: Update.
3710         * gnulib/import/filenamecat-lgpl.c: Update.
3711         * gnulib/import/filenamecat.h: Update.
3712         * gnulib/import/flexmember.h: Update.
3713         * gnulib/import/float+.h: Update.
3714         * gnulib/import/float.c: Update.
3715         * gnulib/import/float.in.h: Update.
3716         * gnulib/import/fnmatch.c: Update.
3717         * gnulib/import/fnmatch.in.h: Update.
3718         * gnulib/import/fnmatch_loop.c: Update.
3719         * gnulib/import/fpucw.h: Update.
3720         * gnulib/import/frexp.c: Update.
3721         * gnulib/import/frexpl.c: Update.
3722         * gnulib/import/fstat.c: Update.
3723         * gnulib/import/fstatat.c: Update.
3724         * gnulib/import/getcwd-lgpl.c: Update.
3725         * gnulib/import/getcwd.c: Update.
3726         * gnulib/import/getdtablesize.c: Update.
3727         * gnulib/import/getlogin_r.c: Update.
3728         * gnulib/import/getprogname.c: Update.
3729         * gnulib/import/getprogname.h: Update.
3730         * gnulib/import/gettext.h: Update.
3731         * gnulib/import/gettimeofday.c: Update.
3732         * gnulib/import/glob-libc.h: Update.
3733         * gnulib/import/glob.c: Update.
3734         * gnulib/import/glob.in.h: Update.
3735         * gnulib/import/glob_internal.h: Update.
3736         * gnulib/import/glob_pattern_p.c: Update.
3737         * gnulib/import/globfree.c: Update.
3738         * gnulib/import/hard-locale.c: Update.
3739         * gnulib/import/hard-locale.h: Update.
3740         * gnulib/import/intprops.h: Update.
3741         * gnulib/import/inttypes.in.h: Update.
3742         * gnulib/import/isnan.c: Update.
3743         * gnulib/import/isnand-nolibm.h: Update.
3744         * gnulib/import/isnand.c: Update.
3745         * gnulib/import/isnanl-nolibm.h: Update.
3746         * gnulib/import/isnanl.c: Update.
3747         * gnulib/import/itold.c: Update.
3748         * gnulib/import/libc-config.h: Update.
3749         * gnulib/import/limits.in.h: Update.
3750         * gnulib/import/localcharset.c: Update.
3751         * gnulib/import/localcharset.h: Update.
3752         * gnulib/import/localtime-buffer.c: Update.
3753         * gnulib/import/localtime-buffer.h: Update.
3754         * gnulib/import/lstat.c: Update.
3755         * gnulib/import/m4/00gnulib.m4: Update.
3756         * gnulib/import/m4/__inline.m4: Update.
3757         * gnulib/import/m4/absolute-header.m4: Update.
3758         * gnulib/import/m4/alloca.m4: Update.
3759         * gnulib/import/m4/builtin-expect.m4: Update.
3760         * gnulib/import/m4/canonicalize.m4: Update.
3761         * gnulib/import/m4/chdir-long.m4: Update.
3762         * gnulib/import/m4/close.m4: Update.
3763         * gnulib/import/m4/closedir.m4: Update.
3764         * gnulib/import/m4/configmake.m4: Update.
3765         * gnulib/import/m4/d-ino.m4: Update.
3766         * gnulib/import/m4/d-type.m4: Update.
3767         * gnulib/import/m4/dirent_h.m4: Update.
3768         * gnulib/import/m4/dirfd.m4: Update.
3769         * gnulib/import/m4/dirname.m4: Update.
3770         * gnulib/import/m4/double-slash-root.m4: Update.
3771         * gnulib/import/m4/dup.m4: Update.
3772         * gnulib/import/m4/dup2.m4: Update.
3773         * gnulib/import/m4/eealloc.m4: Update.
3774         * gnulib/import/m4/environ.m4: Update.
3775         * gnulib/import/m4/errno_h.m4: Update.
3776         * gnulib/import/m4/error.m4: Update.
3777         * gnulib/import/m4/exponentd.m4: Update.
3778         * gnulib/import/m4/exponentl.m4: Update.
3779         * gnulib/import/m4/extensions.m4: Update.
3780         * gnulib/import/m4/extern-inline.m4: Update.
3781         * gnulib/import/m4/fchdir.m4: Update.
3782         * gnulib/import/m4/fcntl-o.m4: Update.
3783         * gnulib/import/m4/fcntl.m4: Update.
3784         * gnulib/import/m4/fcntl_h.m4: Update.
3785         * gnulib/import/m4/fdopendir.m4: Update.
3786         * gnulib/import/m4/filenamecat.m4: Update.
3787         * gnulib/import/m4/flexmember.m4: Update.
3788         * gnulib/import/m4/float_h.m4: Update.
3789         * gnulib/import/m4/fnmatch.m4: Update.
3790         * gnulib/import/m4/fnmatch_h.m4: Update.
3791         * gnulib/import/m4/fpieee.m4: Update.
3792         * gnulib/import/m4/frexp.m4: Update.
3793         * gnulib/import/m4/frexpl.m4: Update.
3794         * gnulib/import/m4/fstat.m4: Update.
3795         * gnulib/import/m4/fstatat.m4: Update.
3796         * gnulib/import/m4/getcwd-abort-bug.m4: Update.
3797         * gnulib/import/m4/getcwd-path-max.m4: Update.
3798         * gnulib/import/m4/getcwd.m4: Update.
3799         * gnulib/import/m4/getdtablesize.m4: Update.
3800         * gnulib/import/m4/getlogin.m4: Update.
3801         * gnulib/import/m4/getlogin_r.m4: Update.
3802         * gnulib/import/m4/getpagesize.m4: Update.
3803         * gnulib/import/m4/getprogname.m4: Update.
3804         * gnulib/import/m4/gettimeofday.m4: Update.
3805         * gnulib/import/m4/glibc21.m4: Update.
3806         * gnulib/import/m4/glob.m4: Update.
3807         * gnulib/import/m4/glob_h.m4: Update.
3808         * gnulib/import/m4/gnulib-cache.m4: Update.
3809         * gnulib/import/m4/gnulib-common.m4: Update.
3810         * gnulib/import/m4/gnulib-comp.m4: Update.
3811         * gnulib/import/m4/gnulib-tool.m4: Update.
3812         * gnulib/import/m4/hard-locale.m4: Update.
3813         * gnulib/import/m4/include_next.m4: Update.
3814         * gnulib/import/m4/inttypes-pri.m4: Update.
3815         * gnulib/import/m4/inttypes.m4: Update.
3816         * gnulib/import/m4/isnand.m4: Update.
3817         * gnulib/import/m4/isnanl.m4: Update.
3818         * gnulib/import/m4/largefile.m4: Update.
3819         * gnulib/import/m4/limits-h.m4: Update.
3820         * gnulib/import/m4/localcharset.m4: Update.
3821         * gnulib/import/m4/locale-fr.m4: Update.
3822         * gnulib/import/m4/locale-ja.m4: Update.
3823         * gnulib/import/m4/locale-zh.m4: Update.
3824         * gnulib/import/m4/localtime-buffer.m4: Update.
3825         * gnulib/import/m4/longlong.m4: Update.
3826         * gnulib/import/m4/lstat.m4: Update.
3827         * gnulib/import/m4/malloc.m4: Update.
3828         * gnulib/import/m4/malloca.m4: Update.
3829         * gnulib/import/m4/math_h.m4: Update.
3830         * gnulib/import/m4/mbrtowc.m4: Update.
3831         * gnulib/import/m4/mbsinit.m4: Update.
3832         * gnulib/import/m4/mbsrtowcs.m4: Update.
3833         * gnulib/import/m4/mbstate_t.m4: Update.
3834         * gnulib/import/m4/memchr.m4: Update.
3835         * gnulib/import/m4/memmem.m4: Update.
3836         * gnulib/import/m4/mempcpy.m4: Update.
3837         * gnulib/import/m4/memrchr.m4: Update.
3838         * gnulib/import/m4/mkdir.m4: Update.
3839         * gnulib/import/m4/mkstemp.m4: Update.
3840         * gnulib/import/m4/mmap-anon.m4: Update.
3841         * gnulib/import/m4/mode_t.m4: Update.
3842         * gnulib/import/m4/msvc-inval.m4: Update.
3843         * gnulib/import/m4/msvc-nothrow.m4: Update.
3844         * gnulib/import/m4/multiarch.m4: Update.
3845         * gnulib/import/m4/nocrash.m4: Update.
3846         * gnulib/import/m4/off_t.m4: Update.
3847         * gnulib/import/m4/onceonly.m4: Update.
3848         * gnulib/import/m4/open-cloexec.m4: Update.
3849         * gnulib/import/m4/open.m4: Update.
3850         * gnulib/import/m4/openat.m4: Update.
3851         * gnulib/import/m4/opendir.m4: Update.
3852         * gnulib/import/m4/pathmax.m4: Update.
3853         * gnulib/import/m4/rawmemchr.m4: Update.
3854         * gnulib/import/m4/readdir.m4: Update.
3855         * gnulib/import/m4/readlink.m4: Update.
3856         * gnulib/import/m4/realloc.m4: Update.
3857         * gnulib/import/m4/rename.m4: Update.
3858         * gnulib/import/m4/rewinddir.m4: Update.
3859         * gnulib/import/m4/rmdir.m4: Update.
3860         * gnulib/import/m4/save-cwd.m4: Update.
3861         * gnulib/import/m4/secure_getenv.m4: Update.
3862         * gnulib/import/m4/setenv.m4: Update.
3863         * gnulib/import/m4/signal_h.m4: Update.
3864         * gnulib/import/m4/ssize_t.m4: Update.
3865         * gnulib/import/m4/stat-time.m4: Update.
3866         * gnulib/import/m4/stat.m4: Update.
3867         * gnulib/import/m4/std-gnu11.m4: Update.
3868         * gnulib/import/m4/stdbool.m4: Update.
3869         * gnulib/import/m4/stddef_h.m4: Update.
3870         * gnulib/import/m4/stdint.m4: Update.
3871         * gnulib/import/m4/stdio_h.m4: Update.
3872         * gnulib/import/m4/stdlib_h.m4: Update.
3873         * gnulib/import/m4/strchrnul.m4: Update.
3874         * gnulib/import/m4/strdup.m4: Update.
3875         * gnulib/import/m4/strerror.m4: Update.
3876         * gnulib/import/m4/string_h.m4: Update.
3877         * gnulib/import/m4/strstr.m4: Update.
3878         * gnulib/import/m4/strtok_r.m4: Update.
3879         * gnulib/import/m4/sys_socket_h.m4: Update.
3880         * gnulib/import/m4/sys_stat_h.m4: Update.
3881         * gnulib/import/m4/sys_time_h.m4: Update.
3882         * gnulib/import/m4/sys_types_h.m4: Update.
3883         * gnulib/import/m4/tempname.m4: Update.
3884         * gnulib/import/m4/time_h.m4: Update.
3885         * gnulib/import/m4/unistd-safer.m4: Update.
3886         * gnulib/import/m4/unistd_h.m4: Update.
3887         * gnulib/import/m4/warn-on-use.m4: Update.
3888         * gnulib/import/m4/wchar_h.m4: Update.
3889         * gnulib/import/m4/wchar_t.m4: Update.
3890         * gnulib/import/m4/wctype_h.m4: Update.
3891         * gnulib/import/m4/wint_t.m4: Update.
3892         * gnulib/import/malloc.c: Update.
3893         * gnulib/import/malloc/scratch_buffer.h: Update.
3894         * gnulib/import/malloc/scratch_buffer_grow.c: Update.
3895         * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
3896         * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
3897         * gnulib/import/malloca.c: Update.
3898         * gnulib/import/malloca.h: Update.
3899         * gnulib/import/malloca.valgrind: Update.
3900         * gnulib/import/math.in.h: Update.
3901         * gnulib/import/mbrtowc.c: Update.
3902         * gnulib/import/mbsinit.c: Update.
3903         * gnulib/import/mbsrtowcs-impl.h: Update.
3904         * gnulib/import/mbsrtowcs-state.c: Update.
3905         * gnulib/import/mbsrtowcs.c: Update.
3906         * gnulib/import/memchr.c: Update.
3907         * gnulib/import/memmem.c: Update.
3908         * gnulib/import/mempcpy.c: Update.
3909         * gnulib/import/memrchr.c: Update.
3910         * gnulib/import/mkdir.c: Update.
3911         * gnulib/import/mkstemp.c: Update.
3912         * gnulib/import/msvc-inval.c: Update.
3913         * gnulib/import/msvc-inval.h: Update.
3914         * gnulib/import/msvc-nothrow.c: Update.
3915         * gnulib/import/msvc-nothrow.h: Update.
3916         * gnulib/import/open.c: Update.
3917         * gnulib/import/openat-die.c: Update.
3918         * gnulib/import/openat-priv.h: Update.
3919         * gnulib/import/openat-proc.c: Update.
3920         * gnulib/import/openat.c: Update.
3921         * gnulib/import/openat.h: Update.
3922         * gnulib/import/opendir.c: Update.
3923         * gnulib/import/pathmax.h: Update.
3924         * gnulib/import/pipe-safer.c: Update.
3925         * gnulib/import/rawmemchr.c: Update.
3926         * gnulib/import/readdir.c: Update.
3927         * gnulib/import/readlink.c: Update.
3928         * gnulib/import/realloc.c: Update.
3929         * gnulib/import/ref-add.sin: Update.
3930         * gnulib/import/ref-del.sin: Update.
3931         * gnulib/import/rename.c: Update.
3932         * gnulib/import/rewinddir.c: Update.
3933         * gnulib/import/rmdir.c: Update.
3934         * gnulib/import/same-inode.h: Update.
3935         * gnulib/import/save-cwd.c: Update.
3936         * gnulib/import/save-cwd.h: Update.
3937         * gnulib/import/scratch_buffer.h: Update.
3938         * gnulib/import/secure_getenv.c: Update.
3939         * gnulib/import/setenv.c: Update.
3940         * gnulib/import/signal.in.h: Update.
3941         * gnulib/import/stat-time.c: Update.
3942         * gnulib/import/stat-time.h: Update.
3943         * gnulib/import/stat-w32.c: Update.
3944         * gnulib/import/stat-w32.h: Update.
3945         * gnulib/import/stat.c: Update.
3946         * gnulib/import/stdbool.in.h: Update.
3947         * gnulib/import/stddef.in.h: Update.
3948         * gnulib/import/stdint.in.h: Update.
3949         * gnulib/import/stdio.in.h: Update.
3950         * gnulib/import/stdlib.in.h: Update.
3951         * gnulib/import/str-two-way.h: Update.
3952         * gnulib/import/strchrnul.c: Update.
3953         * gnulib/import/strdup.c: Update.
3954         * gnulib/import/streq.h: Update.
3955         * gnulib/import/strerror-override.c: Update.
3956         * gnulib/import/strerror-override.h: Update.
3957         * gnulib/import/strerror.c: Update.
3958         * gnulib/import/string.in.h: Update.
3959         * gnulib/import/stripslash.c: Update.
3960         * gnulib/import/strnlen1.c: Update.
3961         * gnulib/import/strnlen1.h: Update.
3962         * gnulib/import/strstr.c: Update.
3963         * gnulib/import/strtok_r.c: Update.
3964         * gnulib/import/sys_stat.in.h: Update.
3965         * gnulib/import/sys_time.in.h: Update.
3966         * gnulib/import/sys_types.in.h: Update.
3967         * gnulib/import/tempname.c: Update.
3968         * gnulib/import/tempname.h: Update.
3969         * gnulib/import/time.in.h: Update.
3970         * gnulib/import/unistd--.h: Update.
3971         * gnulib/import/unistd-safer.h: Update.
3972         * gnulib/import/unistd.in.h: Update.
3973         * gnulib/import/unsetenv.c: Update.
3974         * gnulib/import/verify.h: Update.
3975         * gnulib/import/extra/snippet/warn-on-use.h: Update.
3976         * gnulib/import/wchar.in.h: Update.
3977         * gnulib/import/wctype.in.h: Update.
3978         * gnulib/import/xalloc-oversized.h: Update.
3979         * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
3980         "53e2c179f26a890fa6685af4b6c1397ee370433b".
3981
3982 2018-09-10  Simon Marchi  <simon.marchi@ericsson.com>
3983
3984         * record-btrace.c (get_thread_current_frame): Remove
3985         old_inferior_ptid.
3986
3987 2018-09-10  Jerome Guitton  <guitton@adacore.com>
3988
3989         * ada-lang.c (ada_value_struct_elt): Call ada_to_fixed_type
3990         with check_tag to 1 if and only if the type is tagged and the
3991         component being searched cannot been found in the current
3992         view. Otherwise, always call ada_to_fixed_type with
3993         check_tag to 0.
3994
3995 2018-09-10  Xavier Roirand  <roirand@adacore.com>
3996
3997         * ada-lang.c (ada_is_access_to_unconstrained_array): Remove static
3998         declaration.
3999         * ada-lang.h: add ada_is_access_to_unconstrained_array prototype.
4000         * ada-varobj.c (ada_varobj_get_number_of_children,
4001         ada_varobj_describe_child, ada_value_is_changeable_p): Cleanup code.
4002
4003 2018-09-10  Xavier Roirand  <roirand@adacore.com>
4004
4005         * ada-valprint.c (ada_value_print): Use type instead of
4006         enclosing type.
4007
4008 2018-09-10  Xavier Roirand  <roirand@adacore.com>
4009
4010         * ada-lang.c (ada_value_subscript): Handle case when parameter is
4011         an array of access to unconstrained array.
4012
4013 2018-09-10  Xavier Roirand  <roirand@adacore.com>
4014
4015         * ada-lang.c (ada_is_access_to_unconstrained_array): New function.
4016         (ada_check_typedef): Use it.
4017
4018 2018-09-10  Xavier Roirand  <roirand@adacore.com>
4019
4020         * ada-varobj.c (ada_varobj_describe_struct_child)
4021         (ada_varobj_describe_child): Handle union case like struct one.
4022
4023 2018-09-10  Tom Tromey  <tom@tromey.com>
4024
4025         PR python/18380:
4026         * python/python.c (_initialize_python): Make example in "python"
4027         help work in Python 3.
4028
4029 2018-09-10  Eli Zaretskii  <eliz@gnu.org>
4030
4031         * Makefile.in (transformed_name): Use INSTALL_SCRIPT instead of
4032         INSTALL_PROGRAM to install gdb-add-index.sh.  Don't append
4033         $(EXEEXT) to the script, as it is not a program.
4034
4035 2018-09-09  Simon Marchi  <simon.marchi@ericsson.com>
4036
4037         * python/py-prettyprint.c (pretty_print_one_value): Return
4038         gdbpy_ref<>.
4039         (print_string_repr): Adjust.
4040         (apply_varobj_pretty_printer): Return gdbpy_ref<>.
4041         * python/python-internal.h (apply_varobj_pretty_printer): Return
4042         gdbpy_ref<>.
4043         * varobj.c (varobj_value_get_print_value): Adjust.
4044
4045 2018-09-08  Tom Tromey  <tom@tromey.com>
4046
4047         PR python/16047:
4048         * python/py-prettyprint.c (pretty_print_one_value): Check for
4049         to_string method.
4050
4051 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
4052
4053         * ada-lang.c (resolve_subexp): Pass correct OPLEN in call to
4054         replace_operator_with_call.
4055
4056 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
4057
4058         * ada-lang.c (ada_value_cast): Remove unnecessary parentheses.
4059
4060 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
4061
4062         * ada-typeprint.c (print_range): Print the bounds using TYPE
4063         rather than its TYPE_TARGET_TYPE.
4064
4065 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
4066
4067         * ada-lang.c (ada_to_fixed_value): Minor reformatting in
4068         call to ada_to_fixed_value_create.
4069
4070 2018-09-08  Jerome Guitton  <guitton@adacore.com>
4071
4072         * ada-lang.c (ada_decode): strip dot prefix in symbol name.
4073
4074 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
4075
4076         * ada-lang.c (ada_exception_sal): Replace gdb_assert calls
4077         by calls to error.
4078
4079 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
4080
4081         * ada-lang.c (ada_unhandled_exception_name_addr_from_raise):
4082         Move update of loop variable "fi".
4083
4084 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
4085
4086         * ada-lang.c (value_assign_to_component): In the case of
4087         big-endian targets, extract the bits of the given VAL
4088         using an src_offset of zero if container is not a scalar.
4089
4090 2018-09-06  Simon Ser  <contact@emersion.fr>
4091
4092         PR gdb/23105
4093         * fbsd-nat.c (fbsd_nat_target::xfer_partial): Add support for
4094         TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
4095         * fbsd-tdep.c (fbsd_make_note_desc): New.
4096         (fbsd_make_corefile_notes): Write NT_PROCSTAT_AUXV,
4097         NT_PROCSTAT_VMMAP and NT_PROCSTAT_PS_STRINGS notes.
4098         * target.h (enum target_object) Add FreeBSD-specific
4099         TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
4100
4101 2018-09-06  Simon Marchi  <simon.marchi@ericsson.com>
4102
4103         * compile/compile-c.h (generate_c_for_variable_locations):
4104         Change reference to pointer.
4105         * compile/compile-c-support.c (compile_program) <compute>:
4106         Likewise.
4107         * compile/compile-c-symbols.c (generate_vla_size): Likewise.
4108         (generate_c_for_for_one_variable): Likewise
4109         (generate_c_for_variable_locations): Likewise
4110         * compile/compile-c-types.c (compile_c_instance::convert_type):
4111         Likewise
4112         * compile/compile-cplus-symbols.c (convert_one_symbol):
4113         std::move the scope passed to enter_scope.
4114         * compile/compile-cplus-types.c
4115         (compile_cplus_instance::enter_scope): Make parameter
4116         rvalue-reference.
4117         (compile_cplus_instance::new_scope): Change reference to
4118         pointer.
4119         (compile_cplus_instance::convert_type): Likewise
4120         (compile_cplus_convert_typedef): std::move the scope passed to
4121         enter_scope.
4122         (compile_cplus_convert_struct_or_union): Likewise.
4123         (compile_cplus_convert_enum): Likewise.
4124         (compile_cplus_convert_namespace): Likewise.
4125         * compile/compile-cplus.h (compile_cplus_instance)
4126         <enter_scope>: Make parameter rvalue-reference.
4127         * compile/compile-internal.h (compile_instance)
4128         <get_cached_type>: Likewise
4129         * compile/compile-loc2c.c (push): Likewise
4130         (pushf): Likewise
4131         (unary): Likewise
4132         (binary): Likewise
4133         (print_label): Likewise
4134         (pushf_register_address): Likewise
4135         (pushf_register): Likewise
4136         (do_compile_dwarf_expr_to_c): Likewise
4137         (compile_dwarf_expr_to_c): Likewise
4138         (compile_dwarf_bounds_to_c): Likewise
4139         * compile/compile.c (compile_instance::get_cached_type):
4140         Likewise
4141         * compile/compile.h (compile_dwarf_expr_to_c): Likewise.
4142         (compile_dwarf_bounds_to_c): Likewise
4143         * dwarf2loc.c (locexpr_generate_c_location): Likewise.
4144         (dwarf2_compile_property_to_c): Likewise
4145         * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise
4146         * symtab.h (struct symbol_computed_ops) <generate_c_location>:
4147         Likewise
4148
4149 2018-09-06  Simon Marchi  <simon.marchi@ericsson.com>
4150
4151         * tui/tui-data.h (struct tui_win_element) <highlight>: Remove.
4152         * tui/tui-data.c (init_content_element): Don't initialize it.
4153
4154 2018-09-06  Simon Marchi  <simon.marchi@ericsson.com>
4155
4156         * tui/tui-data.h (struct tui_win_info)
4157         <detail::opaque>: Remove.
4158         * tui/tui-data.c (init_win_info): Remove assignment.
4159
4160 2018-09-05  Tom Tromey  <tom@tromey.com>
4161
4162         * warning.m4 (AM_GDB_WARNINGS): Add -Wformat when testing
4163         -Wformat-nonliteral.
4164         * target-float.c (host_float_ops<T>::to_string)
4165         (host_float_ops<T>::from_string): Use
4166         DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
4167         * configure: Rebuild.
4168
4169 2018-09-05  Simon Marchi  <simon.marchi@ericsson.com>
4170
4171         * printcmd.c (printf_c_string): Use
4172         DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
4173         (printf_wide_c_string, printf_pointer, ui_printf): Likewise.
4174
4175 2018-09-05  Tom Tromey  <tom@tromey.com>
4176
4177         * cli/cli-cmds.c (shell_escape, edit_command): Remove cast.
4178
4179 2018-09-05  Tom de Vries  <tdevries@suse.de>
4180
4181         * dwarf2loc.c (sect_variable_value): Call indirect_synthetic_pointer
4182         with resolve_abstract_p == true.
4183         (indirect_synthetic_pointer): Add resolve_abstract_p parameter,
4184         defaulting to false. Propagate resolve_abstract_p to
4185         dwarf2_fetch_die_loc_sect_off.
4186         * dwarf2loc.h (dwarf2_fetch_die_loc_sect_off): Add resolve_abstract_p
4187         parameter, defaulting to false.
4188         * dwarf2read.c (read_variable): Add variable to abstract_to_concrete.
4189         (dwarf2_fetch_die_loc_sect_off): Add and handle resolve_abstract_p
4190         parameter.
4191         * dwarf2read.h (struct die_info): Forward-declare.
4192         (die_info_ptr): New typedef.
4193         (struct dwarf2_per_objfile): Add abstract_to_concrete field.
4194
4195 2018-09-05  Joel Brobecker  <brobecker@adacore.com>
4196
4197         GDB 8.2 released.
4198
4199 2018-09-04  Sergio Durigan Junior  <sergiodj@redhat.com>
4200             Pedro Alves  <palves@redhat.com>
4201
4202         * gnulib/Makefile.in (aclocal_m4_deps): Move to
4203         "aclocal-m4-deps.mk".  Include file here.
4204         $(srcdir)/aclocal.m4: Add "configure.ac".
4205         * gnulib/aclocal-m4-deps.mk: New file.
4206         * gnulib/update-gnulib.sh: Automatically update
4207         "aclocal-m4-deps.mk".
4208
4209 2018-09-04  Tom Tromey  <tom@tromey.com>
4210
4211         * configure: Rebuild.
4212         * configure.ac: Remove multi-ice code.
4213
4214 2018-09-04  Tom Tromey  <tom@tromey.com>
4215
4216         * Makefile.in (GDB_WARN_CFLAGS_NO_DEFS): Remove.
4217         (ada-exp.o): Update.
4218
4219 2018-09-04  Tom Tromey  <tom@tromey.com>
4220
4221         * Makefile.in (printcmd.o, target-float.o): Remove.
4222         (GDB_WARN_CFLAGS_NO_FORMAT): Remove.
4223
4224 2018-09-04  Tom Tromey  <tom@tromey.com>
4225
4226         * gnulib/Makefile.in: Remove obsolete comment.
4227         * Makefile.in: Remove obsolete comment.
4228
4229 2018-09-04  Andrew Burgess  <andrew.burgess@embecosm.com>
4230
4231         * riscv-tdep.c (riscv_frame_cache): Fix ARI warning, don't end a
4232         line with '+'.
4233
4234 2018-09-03  Andrew Burgess  <andrew.burgess@embecosm.com>
4235
4236         * riscv-tdep.c: Add 'prologue-value.h' include.
4237         (struct riscv_unwind_cache): New struct.
4238         (riscv_debug_unwinder): New global.
4239         (riscv_scan_prologue): Update arguments, capture register details
4240         from prologue scan.
4241         (riscv_skip_prologue): Reformat arguments line, move end of
4242         prologue calculation into riscv_scan_prologue.
4243         (riscv_frame_cache): Update return type, create
4244         riscv_unwind_cache, scan the prologue, and fill in remaining cache
4245         details.
4246         (riscv_frame_this_id): Use frame id computed in riscv_frame_cache.
4247         (riscv_frame_prev_register): Use the trad_frame within the
4248         riscv_unwind_cache.
4249         (_initialize_riscv_tdep): Add 'set/show debug riscv unwinder'
4250         flag.
4251
4252 2018-09-03  Andrew Burgess  <andrew.burgess@embecosm.com>
4253
4254         * trad-frame.h (trad_frame_set_realreg): Declare.
4255         (trad_frame_set_addr): Declare.
4256         * trad-frame.c (trad_frame_set_realreg): Define new function.
4257         (trad_frame_set_addr): Define new function.
4258         (trad_frame_set_reg_realreg): Use new function.
4259         (trad_frame_set_reg_addr): Use new function.
4260
4261 2018-09-01  Keith Seitz  <keiths@redhat.com>
4262
4263         * compile/compile-cplus-types.c (compile_cplus_debug_output_1): Use
4264         pulongest instead of "%lld".
4265         * compile/compile-cplus-symbols.c (gcc_cplus_convert_symbol): Remove
4266         ATTRIBUTE_UNUSED.
4267
4268 2018-08-31  Tom Tromey  <tom@tromey.com>
4269
4270         * dwarf2read.c (dwarf2_add_field): Set the TYPE_LENGTH of the
4271         variant part type.
4272
4273 2018-08-31  Pedro Alves  <palves@redhat.com>
4274
4275         * gdbarch.h: Regenerate.
4276
4277 2018-08-31  Pedro Alves  <palves@redhat.com>
4278
4279         * gdbarch.sh (have_nonsteppable_watchpoint): Add comment.
4280         * target.h (Hardware watchpoint interfaces): Describe
4281         continuable/steppable/non-steppable watchpoints.
4282         * gdbarch.h, gdbarch.c: Regenerate.
4283
4284 2018-08-31  Pedro Alves  <palves@redhat.com>
4285
4286         * nto-procfs.c (nto_procfs_target::have_continuable_watchpoint):
4287         Delete.
4288         * s390-linux-nat.c
4289         (s390_linux_nat_target::have_continuable_watchpoint): Delete.
4290         * target.h (target_ops::have_continuable_watchpoint): Delete.
4291         (target_have_continuable_watchpoint): Delete.
4292         * x86-nat.h (x86_nat_target::have_continuable_watchpoint): Delete.
4293         * target-delegates.c: Regenerate.
4294
4295 2018-08-31  Sergio Durigan Junior  <sergiodj@redhat.com>
4296
4297         * gnulib/Makefile.in (aclocal_m4_deps): Update according to
4298         the files present in "gnulib/import/m4/".
4299
4300 2018-08-30  Andrew Burgess  <andrew.burgess@embecosm.com>
4301
4302         * riscv-tdep.c (riscv_insn::decode): Decode c.addi4spn, c.sd,
4303         c.sw, c.swsp, and c.sdsp.
4304
4305 2018-08-30  Andrew Burgess  <andrew.burgess@embecosm.com>
4306
4307         * riscv-tdep.c (struct riscv_inferior_data): Delete.
4308         (riscv_read_misa_reg): Don't cache value read into inferior data.
4309         (riscv_new_inferior_data): Delete.
4310         (riscv_inferior_data_cleanup): Delete.
4311         (riscv_inferior_data): Delete.
4312         (riscv_invalidate_inferior_data): Delete.
4313         (_initialize_riscv_tdep): Remove initialisation of inferior data.
4314
4315 2018-08-30  Simon Marchi  <simon.marchi@ericsson.com>
4316
4317         * compile/compile-cplus-types.c
4318         (compile_cplus_instance::leave_scope): Take the address of scope
4319         object.
4320         (compile_cplus_instance::convert_qualified_base): Compare quals
4321         to 0.
4322
4323 2018-08-30  Keith Seitz  <keiths@redhat.com>
4324
4325         * compile/compile-cplus-types.c (compile_cplus_instance::enter_scope):
4326         Use "%s" and host_address_to_string instead of "%p" in printf.
4327
4328 2018-08-29  Keith Seitz  <keiths@redhat.com>
4329
4330         * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Add compile-cplus-symbols.c
4331         and compile-cplus-types.c.
4332         (HFILES_NO_SRCDIR): Add gcc-cp-plugin.h.
4333         * c-lang.c (cplus_language_defn): Set C++ compile functions.
4334         * c-lang.h (cplus_get_compile_context, cplus_compute_program):
4335         Declare.
4336         * compile/compile-c-support.c: Include compile-cplus.h.
4337         (load_libcompile): Templatize.
4338         (get_compile_context): "New" function.
4339         (c_get_compile_context): Use get_compile_context.
4340         (cplus_get_compile_context): New function.
4341         (cplus_push_user_expression, cplus_pop_user_expression)
4342         (cplus_add_code_header, cplus_add_input, cplus_compile_program)
4343         (cplus_compute_program): Define new structs/functions.
4344         * compile/compile-cplus-symmbols.c: New file.
4345         * compile/compile-cplus-types.c: New file.
4346         * compile/compile-cplus.h: New file.
4347         * compile/compile-internal.h (debug_compile_oracle, GCC_TYPE_NONE):
4348         Declare.
4349         * compile/compile-object-load.c (get_out_value_type): Use
4350         strncmp_iw when comparing symbol names.
4351         (compile_object_load): Add mst_bss and mst_data.
4352         * compile/compile.c (_initialize_compile): Remove
4353         -Wno-implicit-function-declaration from `compile_args'.
4354         * compile/gcc-cp-plugin.h: New file.
4355         * NEWS: Mention C++ compile support and new debug options.
4356
4357 2018-08-29  Keith Seitz  <keiths@redhat.com>
4358
4359         * linespec.c (collect_info::add_symbol): Make virtual.
4360         (struct symbol_searcher_collect_info): New struct.
4361         (symbol_searcher::find_all_symbols): New method.
4362         * symtab.h (class symbol_searcher): New class.
4363
4364 2018-08-29  Keith Seitz  <keiths@redhat.com>
4365
4366         * linespec.c (struct linespec) <function_symbols, label_symbols>:
4367         Change to vector of block_symbol.  Update all users.
4368         (struct collect_info) <symbols>: Likewise.
4369         (collect_info::add_symbol): Take block_symbol as argument.
4370         Update all callers.
4371         (decode_compound_collector) <m_symbols>: Change type to vector
4372         of block_symbol.  Update all users.
4373         (decode_compound_collector::operator ()): Change parameter type
4374         to block_symbol.
4375         (find_method, find_function_symbols, find_linespec_symbols)
4376         (find_label_symbols_in_block, find_label_symbols): Change symbol
4377         vectors to block_symbol vectors.
4378         * symtab.h (symbol_found_callback_ftype): Change parameter type to
4379         block_symbol.
4380
4381 2018-08-29  Keith Seitz  <keiths@redhat.com>
4382
4383         * linespec.c (symbolp): Remove typedef and VEC definitions.
4384         (bound_minimal_symbol_d): Likewise.
4385
4386 2018-08-29  Keith Seitz  <keiths@redhat.com>
4387
4388         * linespec.c (decode_compound_collector::decode_compound_collector):
4389         Remove initialization for `m_symtabs'.
4390         (decode_compound_collector::release_symbols): Change return type
4391         to std::vector.  Update all callers.
4392         (class decode_compound_collector) <m_symbols>: Change type to
4393         std::vector.
4394         (lookup_prefix_sym): Change return type to std::vector.  Update all
4395         callers.
4396         (compare_symbols): Remove.
4397         (std_compare_symbols): Rename to `compare_symbols'.
4398         (find_method): Change `sym_classes' parameter to std::vector.
4399         Update all callers.  Use std::sort to sort sym_classes.
4400         (find_linespec_symbols): Remove cleanup.
4401
4402 2018-08-29  Keith Seitz  <keiths@redhat.com>
4403
4404         * linespec.c (struct linespec) <minimal_symbols>: Change type to
4405         std::vector.  Update all users.
4406         (convert_linespec_to_sals): Use std::sort to sort minimal symbols.
4407         (struct collect_info) <minimal_symbols>: Likewise.
4408         (compare_msymbols): Return bool.  Change parameters to const
4409         bound_minimal_symbol references.
4410         (find_method, find_function_symbols, find_linespec_symbols): Change
4411         `minsyms' parameter to std::vector.  Update all callers.
4412
4413 2018-08-29  Keith Seitz  <keiths@redhat.com>
4414
4415         * linespec.c (struct linespec) <label_symbols>: Change type to
4416         std::vector.  Update all users.
4417         (find_label_symbols_in_block): Change `result' parameter to
4418         std::vector.  Update all callers.
4419         (find_label_symbols): Return std::vector.  Update all callers.
4420
4421 2018-08-29  Keith Seitz  <keiths@redhat.com>
4422
4423         * linespec.c (struct linespec) <function_symbols>: Change type to
4424         std::vector.  Update all users.
4425         (struct collect_info) <function_symbols>: Likewise.
4426         (convert_linespec_to_sals): Use std::sort to sort function_symbols.
4427         (std_compare_symbols): New function.
4428         (find_method, find_function_symbols, find_linespec_symbols)
4429         (find_label_symbols_in_block): Change `symbols' parameter to
4430         std::vector.  Update all callers.
4431         (find_label_symbols): Likewise for `function_symbols' and
4432         `label_funcs_ret'.
4433
4434 2018-08-29  Keith Seitz  <keiths@redhat.com>
4435
4436         * linespec.c (symtab_vector_up): Define.
4437         (struct linespec) <file_symtabs>: Change type to std::vector *.
4438         Update all uses.
4439         (struct collect_info) <file_symtabs>: Likewise.
4440         (collect_symtabs_from_filename): Return symtab_vector_up.
4441         Update all callers.
4442         (decode_objc): Remove cleanup.
4443         (symtab_collector::symtab_collector): Initialize `m_symtabs'.
4444         (symtab_collector::release_symtabs): Return symtab_vector_up.
4445         Update all callers.
4446         (class symtab_collector) <m_symtabs>: Change type to symtab_vector_up.
4447         Update all users.
4448         (collect_symtabs_from_filename, symtabs_from_filename): Return
4449         symtab_vector_up.  Update all callers.
4450
4451 2018-08-29  Tom Tromey  <tom@tromey.com>
4452
4453         * csky-tdep.c (csky_analyze_prologue): Use
4454         core_addr_to_string_nz.
4455
4456 2018-08-29  Tom Tromey  <tom@tromey.com>
4457
4458         * windows-nat.c (struct xlate_exception) <them>: Change type to
4459         DWORD.
4460         (xlate): Fix formatting.  Remove last entry.
4461         (struct xlate_exception, xlate): Comment out.
4462         (windows_nat_target::resume): Use ranged for.
4463
4464 2018-08-29  Jim Wilson  <jimw@sifive.com>
4465
4466         * riscv-linux-nat.c: Include elf/common.h instead of elf.h.
4467         (riscv_linux_nat_target::fetch_registers): Use NT_FPREGSET instead
4468         of NT_PRFPREG.
4469         (riscv_linux_nat_target::store_registers): Likewise.
4470
4471 2018-08-29  Sergio Durigan Junior  <sergiodj@redhat.com>
4472
4473         PR gdb/23555
4474         PR gdb/23558
4475         * gnulib/aclocal.m4: Regenerate.
4476         * gnulib/config.in: Regenerate.
4477         * gnulib/configure: Regenerate.
4478         * gnulib/import/Makefile.am: Update.
4479         * gnulib/import/Makefile.in: Update.
4480         * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
4481         * gnulib/import/_Noreturn.h: ... this.
4482         * gnulib/import/alloca.in.h: Update.
4483         * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
4484         * gnulib/import/arg-nonnull.h: ... this.
4485         * gnulib/import/assure.h: Update.
4486         * gnulib/import/at-func.c: Update.
4487         * gnulib/import/basename-lgpl.c: Update.
4488         * gnulib/import/extra/snippet/c++defs.h: Rename to...
4489         * gnulib/import/c++defs.h: ... this.
4490         * gnulib/import/canonicalize-lgpl.c: Update.
4491         * gnulib/import/cdefs.h: Update.
4492         * gnulib/import/chdir-long.c: Update.
4493         * gnulib/import/chdir-long.h: Update.
4494         * gnulib/import/cloexec.c: Update.
4495         * gnulib/import/cloexec.h: Update.
4496         * gnulib/import/close.c: Update.
4497         * gnulib/import/closedir.c: Update.
4498         * gnulib/import/config.charset: Update.
4499         * gnulib/import/dirent-private.h: Update.
4500         * gnulib/import/dirent.in.h: Update.
4501         * gnulib/import/dirfd.c: Update.
4502         * gnulib/import/dirname-lgpl.c: Update.
4503         * gnulib/import/dirname.h: Update.
4504         * gnulib/import/dosname.h: Update.
4505         * gnulib/import/dup-safer-flag.c: Update.
4506         * gnulib/import/dup-safer.c: Update.
4507         * gnulib/import/dup.c: Update.
4508         * gnulib/import/dup2.c: Update.
4509         * gnulib/import/errno.in.h: Update.
4510         * gnulib/import/error.c: Update.
4511         * gnulib/import/error.h: Update.
4512         * gnulib/import/exitfail.c: Update.
4513         * gnulib/import/exitfail.h: Update.
4514         * gnulib/import/extra/update-copyright: Update.
4515         * gnulib/import/fchdir.c: Update.
4516         * gnulib/import/fcntl.c: Update.
4517         * gnulib/import/fcntl.in.h: Update.
4518         * gnulib/import/fd-hook.c: Update.
4519         * gnulib/import/fd-hook.h: Update.
4520         * gnulib/import/fd-safer-flag.c: Update.
4521         * gnulib/import/fd-safer.c: Update.
4522         * gnulib/import/fdopendir.c: Update.
4523         * gnulib/import/filename.h: Update.
4524         * gnulib/import/filenamecat-lgpl.c: Update.
4525         * gnulib/import/filenamecat.h: Update.
4526         * gnulib/import/flexmember.h: Update.
4527         * gnulib/import/float+.h: Update.
4528         * gnulib/import/float.c: Update.
4529         * gnulib/import/float.in.h: Update.
4530         * gnulib/import/fnmatch.c: Update.
4531         * gnulib/import/fnmatch.in.h: Update.
4532         * gnulib/import/fnmatch_loop.c: Update.
4533         * gnulib/import/fpucw.h: Update.
4534         * gnulib/import/frexp.c: Update.
4535         * gnulib/import/frexpl.c: Update.
4536         * gnulib/import/fstat.c: Update.
4537         * gnulib/import/fstatat.c: Update.
4538         * gnulib/import/getcwd-lgpl.c: Update.
4539         * gnulib/import/getcwd.c: Update.
4540         * gnulib/import/getdtablesize.c: Update.
4541         * gnulib/import/getlogin_r.c: Update.
4542         * gnulib/import/getprogname.c: Update.
4543         * gnulib/import/getprogname.h: Update.
4544         * gnulib/import/gettext.h: Update.
4545         * gnulib/import/gettimeofday.c: Update.
4546         * gnulib/import/glob-libc.h: Update.
4547         * gnulib/import/glob.c: Update.
4548         * gnulib/import/glob.in.h: Update.
4549         * gnulib/import/glob_internal.h: Update.
4550         * gnulib/import/glob_pattern_p.c: Update.
4551         * gnulib/import/globfree.c: Update.
4552         * gnulib/import/hard-locale.c: Update.
4553         * gnulib/import/hard-locale.h: Update.
4554         * gnulib/import/intprops.h: Update.
4555         * gnulib/import/inttypes.in.h: Update.
4556         * gnulib/import/isnan.c: Update.
4557         * gnulib/import/isnand-nolibm.h: Update.
4558         * gnulib/import/isnand.c: Update.
4559         * gnulib/import/isnanl-nolibm.h: Update.
4560         * gnulib/import/isnanl.c: Update.
4561         * gnulib/import/itold.c: Update.
4562         * gnulib/import/libc-config.h: Update.
4563         * gnulib/import/limits.in.h: Update.
4564         * gnulib/import/localcharset.c: Update.
4565         * gnulib/import/localcharset.h: Update.
4566         * gnulib/import/localtime-buffer.c: Update.
4567         * gnulib/import/localtime-buffer.h: Update.
4568         * gnulib/import/lstat.c: Update.
4569         * gnulib/import/m4/00gnulib.m4: Update.
4570         * gnulib/import/m4/__inline.m4: Update.
4571         * gnulib/import/m4/absolute-header.m4: Update.
4572         * gnulib/import/m4/alloca.m4: Update.
4573         * gnulib/import/m4/builtin-expect.m4: Update.
4574         * gnulib/import/m4/canonicalize.m4: Update.
4575         * gnulib/import/m4/chdir-long.m4: Update.
4576         * gnulib/import/m4/close.m4: Update.
4577         * gnulib/import/m4/closedir.m4: Update.
4578         * gnulib/import/m4/configmake.m4: Update.
4579         * gnulib/import/m4/d-ino.m4: Update.
4580         * gnulib/import/m4/d-type.m4: Update.
4581         * gnulib/import/m4/dirent_h.m4: Update.
4582         * gnulib/import/m4/dirfd.m4: Update.
4583         * gnulib/import/m4/dirname.m4: Update.
4584         * gnulib/import/m4/double-slash-root.m4: Update.
4585         * gnulib/import/m4/dup.m4: Update.
4586         * gnulib/import/m4/dup2.m4: Update.
4587         * gnulib/import/m4/eealloc.m4: Update.
4588         * gnulib/import/m4/environ.m4: Update.
4589         * gnulib/import/m4/errno_h.m4: Update.
4590         * gnulib/import/m4/error.m4: Update.
4591         * gnulib/import/m4/exponentd.m4: Update.
4592         * gnulib/import/m4/exponentl.m4: Update.
4593         * gnulib/import/m4/extensions.m4: Update.
4594         * gnulib/import/m4/extern-inline.m4: Update.
4595         * gnulib/import/m4/fchdir.m4: Update.
4596         * gnulib/import/m4/fcntl-o.m4: Update.
4597         * gnulib/import/m4/fcntl.m4: Update.
4598         * gnulib/import/m4/fcntl_h.m4: Update.
4599         * gnulib/import/m4/fdopendir.m4: Update.
4600         * gnulib/import/m4/filenamecat.m4: Update.
4601         * gnulib/import/m4/flexmember.m4: Update.
4602         * gnulib/import/m4/float_h.m4: Update.
4603         * gnulib/import/m4/fnmatch.m4: Update.
4604         * gnulib/import/m4/fnmatch_h.m4: Update.
4605         * gnulib/import/m4/fpieee.m4: Update.
4606         * gnulib/import/m4/frexp.m4: Update.
4607         * gnulib/import/m4/frexpl.m4: Update.
4608         * gnulib/import/m4/fstat.m4: Update.
4609         * gnulib/import/m4/fstatat.m4: Update.
4610         * gnulib/import/m4/getcwd-abort-bug.m4: Update.
4611         * gnulib/import/m4/getcwd-path-max.m4: Update.
4612         * gnulib/import/m4/getcwd.m4: Update.
4613         * gnulib/import/m4/getdtablesize.m4: Update.
4614         * gnulib/import/m4/getlogin.m4: Update.
4615         * gnulib/import/m4/getlogin_r.m4: Update.
4616         * gnulib/import/m4/getpagesize.m4: Update.
4617         * gnulib/import/m4/getprogname.m4: Update.
4618         * gnulib/import/m4/gettimeofday.m4: Update.
4619         * gnulib/import/m4/glibc21.m4: Update.
4620         * gnulib/import/m4/glob.m4: Update.
4621         * gnulib/import/m4/glob_h.m4: Update.
4622         * gnulib/import/m4/gnulib-cache.m4: Update.
4623         * gnulib/import/m4/gnulib-common.m4: Update.
4624         * gnulib/import/m4/gnulib-comp.m4: Update.
4625         * gnulib/import/m4/gnulib-tool.m4: Update.
4626         * gnulib/import/m4/hard-locale.m4: Update.
4627         * gnulib/import/m4/include_next.m4: Update.
4628         * gnulib/import/m4/inttypes-pri.m4: Update.
4629         * gnulib/import/m4/inttypes.m4: Update.
4630         * gnulib/import/m4/isnand.m4: Update.
4631         * gnulib/import/m4/isnanl.m4: Update.
4632         * gnulib/import/m4/largefile.m4: Update.
4633         * gnulib/import/m4/limits-h.m4: Update.
4634         * gnulib/import/m4/localcharset.m4: Update.
4635         * gnulib/import/m4/locale-fr.m4: Update.
4636         * gnulib/import/m4/locale-ja.m4: Update.
4637         * gnulib/import/m4/locale-zh.m4: Update.
4638         * gnulib/import/m4/localtime-buffer.m4: Update.
4639         * gnulib/import/m4/longlong.m4: Update.
4640         * gnulib/import/m4/lstat.m4: Update.
4641         * gnulib/import/m4/malloc.m4: Update.
4642         * gnulib/import/m4/malloca.m4: Update.
4643         * gnulib/import/m4/math_h.m4: Update.
4644         * gnulib/import/m4/mbrtowc.m4: Update.
4645         * gnulib/import/m4/mbsinit.m4: Update.
4646         * gnulib/import/m4/mbsrtowcs.m4: Update.
4647         * gnulib/import/m4/mbstate_t.m4: Update.
4648         * gnulib/import/m4/memchr.m4: Update.
4649         * gnulib/import/m4/memmem.m4: Update.
4650         * gnulib/import/m4/mempcpy.m4: Update.
4651         * gnulib/import/m4/memrchr.m4: Update.
4652         * gnulib/import/m4/mkdir.m4: Update.
4653         * gnulib/import/m4/mkstemp.m4: Update.
4654         * gnulib/import/m4/mmap-anon.m4: Update.
4655         * gnulib/import/m4/mode_t.m4: Update.
4656         * gnulib/import/m4/msvc-inval.m4: Update.
4657         * gnulib/import/m4/msvc-nothrow.m4: Update.
4658         * gnulib/import/m4/multiarch.m4: Update.
4659         * gnulib/import/m4/nocrash.m4: Update.
4660         * gnulib/import/m4/off_t.m4: Update.
4661         * gnulib/import/m4/onceonly.m4: Update.
4662         * gnulib/import/m4/open-cloexec.m4: Update.
4663         * gnulib/import/m4/open.m4: Update.
4664         * gnulib/import/m4/openat.m4: Update.
4665         * gnulib/import/m4/opendir.m4: Update.
4666         * gnulib/import/m4/pathmax.m4: Update.
4667         * gnulib/import/m4/rawmemchr.m4: Update.
4668         * gnulib/import/m4/readdir.m4: Update.
4669         * gnulib/import/m4/readlink.m4: Update.
4670         * gnulib/import/m4/realloc.m4: Update.
4671         * gnulib/import/m4/rename.m4: Update.
4672         * gnulib/import/m4/rewinddir.m4: Update.
4673         * gnulib/import/m4/rmdir.m4: Update.
4674         * gnulib/import/m4/save-cwd.m4: Update.
4675         * gnulib/import/m4/secure_getenv.m4: Update.
4676         * gnulib/import/m4/setenv.m4: Update.
4677         * gnulib/import/m4/signal_h.m4: Update.
4678         * gnulib/import/m4/ssize_t.m4: Update.
4679         * gnulib/import/m4/stat-time.m4: Update.
4680         * gnulib/import/m4/stat.m4: Update.
4681         * gnulib/import/m4/std-gnu11.m4: Update.
4682         * gnulib/import/m4/stdbool.m4: Update.
4683         * gnulib/import/m4/stddef_h.m4: Update.
4684         * gnulib/import/m4/stdint.m4: Update.
4685         * gnulib/import/m4/stdio_h.m4: Update.
4686         * gnulib/import/m4/stdlib_h.m4: Update.
4687         * gnulib/import/m4/strchrnul.m4: Update.
4688         * gnulib/import/m4/strdup.m4: Update.
4689         * gnulib/import/m4/strerror.m4: Update.
4690         * gnulib/import/m4/string_h.m4: Update.
4691         * gnulib/import/m4/strstr.m4: Update.
4692         * gnulib/import/m4/strtok_r.m4: Update.
4693         * gnulib/import/m4/sys_socket_h.m4: Update.
4694         * gnulib/import/m4/sys_stat_h.m4: Update.
4695         * gnulib/import/m4/sys_time_h.m4: Update.
4696         * gnulib/import/m4/sys_types_h.m4: Update.
4697         * gnulib/import/m4/tempname.m4: Update.
4698         * gnulib/import/m4/time_h.m4: Update.
4699         * gnulib/import/m4/unistd-safer.m4: Update.
4700         * gnulib/import/m4/unistd_h.m4: Update.
4701         * gnulib/import/m4/warn-on-use.m4: Update.
4702         * gnulib/import/m4/wchar_h.m4: Update.
4703         * gnulib/import/m4/wchar_t.m4: Update.
4704         * gnulib/import/m4/wctype_h.m4: Update.
4705         * gnulib/import/m4/wint_t.m4: Update.
4706         * gnulib/import/malloc.c: Update.
4707         * gnulib/import/malloc/scratch_buffer.h: Update.
4708         * gnulib/import/malloc/scratch_buffer_grow.c: Update.
4709         * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
4710         * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
4711         * gnulib/import/malloca.c: Update.
4712         * gnulib/import/malloca.h: Update.
4713         * gnulib/import/malloca.valgrind: Update.
4714         * gnulib/import/math.in.h: Update.
4715         * gnulib/import/mbrtowc.c: Update.
4716         * gnulib/import/mbsinit.c: Update.
4717         * gnulib/import/mbsrtowcs-impl.h: Update.
4718         * gnulib/import/mbsrtowcs-state.c: Update.
4719         * gnulib/import/mbsrtowcs.c: Update.
4720         * gnulib/import/memchr.c: Update.
4721         * gnulib/import/memmem.c: Update.
4722         * gnulib/import/mempcpy.c: Update.
4723         * gnulib/import/memrchr.c: Update.
4724         * gnulib/import/mkdir.c: Update.
4725         * gnulib/import/mkstemp.c: Update.
4726         * gnulib/import/msvc-inval.c: Update.
4727         * gnulib/import/msvc-inval.h: Update.
4728         * gnulib/import/msvc-nothrow.c: Update.
4729         * gnulib/import/msvc-nothrow.h: Update.
4730         * gnulib/import/open.c: Update.
4731         * gnulib/import/openat-die.c: Update.
4732         * gnulib/import/openat-priv.h: Update.
4733         * gnulib/import/openat-proc.c: Update.
4734         * gnulib/import/openat.c: Update.
4735         * gnulib/import/openat.h: Update.
4736         * gnulib/import/opendir.c: Update.
4737         * gnulib/import/pathmax.h: Update.
4738         * gnulib/import/pipe-safer.c: Update.
4739         * gnulib/import/rawmemchr.c: Update.
4740         * gnulib/import/readdir.c: Update.
4741         * gnulib/import/readlink.c: Update.
4742         * gnulib/import/realloc.c: Update.
4743         * gnulib/import/ref-add.sin: Update.
4744         * gnulib/import/ref-del.sin: Update.
4745         * gnulib/import/rename.c: Update.
4746         * gnulib/import/rewinddir.c: Update.
4747         * gnulib/import/rmdir.c: Update.
4748         * gnulib/import/same-inode.h: Update.
4749         * gnulib/import/save-cwd.c: Update.
4750         * gnulib/import/save-cwd.h: Update.
4751         * gnulib/import/scratch_buffer.h: Update.
4752         * gnulib/import/secure_getenv.c: Update.
4753         * gnulib/import/setenv.c: Update.
4754         * gnulib/import/signal.in.h: Update.
4755         * gnulib/import/stat-time.c: Update.
4756         * gnulib/import/stat-time.h: Update.
4757         * gnulib/import/stat-w32.c: Update.
4758         * gnulib/import/stat-w32.h: Update.
4759         * gnulib/import/stat.c: Update.
4760         * gnulib/import/stdbool.in.h: Update.
4761         * gnulib/import/stddef.in.h: Update.
4762         * gnulib/import/stdint.in.h: Update.
4763         * gnulib/import/stdio.in.h: Update.
4764         * gnulib/import/stdlib.in.h: Update.
4765         * gnulib/import/str-two-way.h: Update.
4766         * gnulib/import/strchrnul.c: Update.
4767         * gnulib/import/strdup.c: Update.
4768         * gnulib/import/streq.h: Update.
4769         * gnulib/import/strerror-override.c: Update.
4770         * gnulib/import/strerror-override.h: Update.
4771         * gnulib/import/strerror.c: Update.
4772         * gnulib/import/string.in.h: Update.
4773         * gnulib/import/stripslash.c: Update.
4774         * gnulib/import/strnlen1.c: Update.
4775         * gnulib/import/strnlen1.h: Update.
4776         * gnulib/import/strstr.c: Update.
4777         * gnulib/import/strtok_r.c: Update.
4778         * gnulib/import/sys_stat.in.h: Update.
4779         * gnulib/import/sys_time.in.h: Update.
4780         * gnulib/import/sys_types.in.h: Update.
4781         * gnulib/import/tempname.c: Update.
4782         * gnulib/import/tempname.h: Update.
4783         * gnulib/import/time.in.h: Update.
4784         * gnulib/import/unistd--.h: Update.
4785         * gnulib/import/unistd-safer.h: Update.
4786         * gnulib/import/unistd.in.h: Update.
4787         * gnulib/import/unsetenv.c: Update.
4788         * gnulib/import/verify.h: Update.
4789         * gnulib/import/extra/snippet/warn-on-use.h: Update.
4790         * gnulib/import/wchar.in.h: Update.
4791         * gnulib/import/wctype.in.h: Update.
4792         * gnulib/import/xalloc-oversized.h: Update.
4793         * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
4794         "53e2c179f26a890fa6685af4b6c1397ee370433b".
4795
4796 2018-08-16  Gary Benson <gbenson@redhat.com>
4797
4798         PR gdb/13000:
4799         * gdb/main.c (captured_main_1): Exit with nonzero status
4800         in batch mode if the last command to be executed failed.
4801         * NEWS: Mention the above.
4802
4803 2018-08-29  Simon Marchi  <simon.marchi@ericsson.com>
4804
4805         * csky-tdep.c (csky_memory_insert_breakpoint): Remove newline at
4806         end of warning message.
4807
4808 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
4809
4810         PR gdb/22943:
4811         * aarch64-tdep.c (is_hfa_or_hva): Remove function.
4812         (aarch64_extract_return_value): Use
4813         aapcs_is_vfp_call_or_return_candidate.
4814         (aarch64_return_in_memory): Likewise.
4815         (aarch64_store_return_value): Likewise.
4816
4817 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
4818
4819         * aarch64-tdep.c
4820         (aapcs_is_vfp_call_or_return_candidate): Make static
4821         (pass_in_v_or_stack): Remove function.
4822         (pass_in_v_vfp_candidate): New function.
4823         (aarch64_push_dummy_call): Check for float register candidates.
4824
4825 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
4826
4827         * aarch64-tdep.c (HA_MAX_NUM_FLDS): New macro.
4828         (aapcs_is_vfp_call_or_return_candidate_1): New function.
4829         (aapcs_is_vfp_call_or_return_candidate): Likewise.
4830
4831 2018-08-28  Simon Marchi  <simon.marchi@polymtl.ca>
4832
4833         PR build/23399
4834         * common/agent.c (IPA_SYM_STRUCT_NAME): Define.
4835         (struct ipa_sym_addresses): Rename to...
4836         (struct ipa_sym_addresses_common): ... this.
4837         * common/agent.h (IPA_SYM): Use IPA_SYM_STRUCT_NAME.
4838
4839 2018-08-28  Tom Tromey  <tom@tromey.com>
4840
4841         * c-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
4842         (token_fifo): Now a std::vector.
4843         (yylex, c_parse): Update.
4844         * d-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
4845         (token_fifo): Now a std::vector.
4846         (yylex, d_parse): Update.
4847         * go-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
4848         (token_fifo): Now a std::vector.
4849         (yylex, go_parse): Update.
4850
4851 2018-08-28  Simon Marchi  <simon.marchi@ericsson.com>
4852
4853         * parser-defs.h (struct type_stack) <elements>: Change type to
4854         std::vector<union type_stack_elt>.
4855         <depth, size>: Remove.
4856         * parse.c (parse_exp_in_context_1): Adjust.
4857         (type_stack_reserve): Remove.
4858         (check_type_stack_depth): Remove.
4859         (insert_into_type_stack): Adjust to std::vector.
4860         (insert_type): Likewise.
4861         (push_type): Likewise.
4862         (push_type_int): Likewise.
4863         (insert_type_address_space): Likewise.
4864         (pop_type): Likewise.
4865         (pop_type_int): Likewise.
4866         (pop_typelist): Likewise.
4867         (pop_type_stack): Likewise.
4868         (append_type_stack): Likewise.
4869         (push_type_stack): Likewise.
4870         (get_type_stack): Likewise.
4871         (type_stack_cleanup): Likewise.
4872         (push_typelist): Likewise.
4873         (follow_types): Likewise.
4874         (_initialize_parse): Likewise.
4875
4876 2018-08-28  Hafiz Abid Qadeer  <abidh@codesourcery.com>
4877
4878         * NEWS: Mention csky target.
4879
4880 2018-08-28  Jiangshuai Li  <jiangshuai_li@c-sky.com>
4881             Hafiz Abid Qadeer  <abidh@codesourcery.com>
4882             Don Breazeal  <donb@codesourcery.com>
4883
4884         * csky-linux-tdep.c: New file.
4885         * csky-tdep.c: Likewise.
4886         * csky-tdep.h: Likewise.
4887         * Makefile.in (ALL_TARGET_OBS): Add csky-linux-tdep.o and
4888         csky-tdep.o.
4889         (HFILES_NO_SRCDIR): Add csky-tdep.h.
4890         (ALLDEPFILES): Add csky-linux-tdep.c and csky-tdep.c
4891         * configure.tgt: Add csky support.
4892
4893 2018-08-27  Jan Vrany  <jan.vrany@fit.cvut.cz>
4894
4895         * python/py-framefilter.c (py_print_frame): Print frame architecture
4896         when printing on an MI output.
4897
4898 2018-08-27  Tom Tromey  <tom@tromey.com>
4899
4900         PR build/23087:
4901         * configure: Rebuild.
4902         * warning.m4 (AM_GDB_WARNINGS): Remove -Wno-narrowing.
4903
4904 2018-08-27  Tom Tromey  <tom@tromey.com>
4905
4906         * aarch64-linux-tdep.c
4907         (aarch64_linux_iterate_over_regset_sections) <sve_regmap>: Add
4908         casts to int.
4909
4910 2018-08-27  Tom Tromey  <tom@tromey.com>
4911
4912         * ppc64-tdep.c (insn_d, insn_ds, insn_xfx): Add casts to
4913         unsigned.
4914         (ppc64_standard_linkage1, ppc64_standard_linkage2)
4915         (ppc64_standard_linkage3, ppc64_standard_linkage4)
4916         (ppc64_standard_linkage5, ppc64_standard_linkage6)
4917         (ppc64_standard_linkage7, ppc64_standard_linkage8): Add casts to
4918         unsigned.
4919
4920 2018-08-27  Tom Tromey  <tom@tromey.com>
4921
4922         * xtensa-tdep.h (XTREG_END): Add cast to unsigned.
4923         (XTENSA_GDBARCH_TDEP_INSTANTIATE): Likewise.
4924
4925 2018-08-27  Tom Tromey  <tom@tromey.com>
4926
4927         * tramp-frame.h (TRAMP_SENTINEL_INSN): Redefine.
4928         * tilegx-linux-tdep.c (tilegx_linux_rt_sigframe): Use
4929         ULONGEST_MAX.
4930         * tic6x-linux-tdep.c (tic6x_linux_rt_sigreturn_tramp_frame): Use
4931         ULONGEST_MAX.
4932         * sparc64-linux-tdep.c (sparc64_linux_rt_sigframe): Use
4933         ULONGEST_MAX.
4934         * sparc-linux-tdep.c (sparc32_linux_sigframe)
4935         (sparc32_linux_rt_sigframe): Use ULONGEST_MAX.
4936         * ppc-nbsd-tdep.c (ppcnbsd_sigtramp, ppcnbsd2_sigtramp): Use
4937         ULONGEST_MAX.
4938         * ppc-linux-tdep.c (ppc32_linux_sigaction_tramp_frame)
4939         (ppc64_linux_sigaction_tramp_frame)
4940         (ppc32_linux_sighandler_tramp_frame)
4941         (ppc64_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
4942         * nios2-linux-tdep.c (nios2_r1_linux_rt_sigreturn_tramp_frame)
4943         (nios2_r2_linux_rt_sigreturn_tramp_frame): Use ULONGEST_MAX.
4944         * mn10300-linux-tdep.c (am33_linux_sigframe)
4945         (am33_linux_rt_sigframe): Use ULONGEST_MAX.
4946         * mips64-obsd-tdep.c (mips64obsd_sigframe): Use ULONGEST_MAX.
4947         * mips-linux-tdep.c (mips_linux_o32_sigframe)
4948         (mips_linux_o32_rt_sigframe, mips_linux_n32_rt_sigframe)
4949         (mips_linux_n64_rt_sigframe, micromips_linux_o32_sigframe)
4950         (micromips_linux_o32_rt_sigframe, micromips_linux_n32_rt_sigframe)
4951         (micromips_linux_n64_rt_sigframe): Use ULONGEST_MAX.
4952         * mips-fbsd-tdep.c (mips_fbsd_sigframe, mipsn32_fbsd_sigframe)
4953         (mips64_fbsd_sigframe): Use ULONGEST_MAX.
4954         * microblaze-linux-tdep.c
4955         (microblaze_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
4956         * i386-nbsd-tdep.c (i386nbsd_sigtramp_sc16, i386nbsd_sigtramp_sc2)
4957         (i386nbsd_sigtramp_si2, i386nbsd_sigtramp_si31)
4958         (i386nbsd_sigtramp_si4): Use ULONGEST_MAX.
4959         * hppa-nbsd-tdep.c (hppanbsd_sigtramp_si4): Use ULONGEST_MAX.
4960         * common/common-types.h (ULONGEST_MAX): New define.
4961         (CORE_ADDR_MAX): Fix formatting.
4962         * bfin-linux-tdep.c (bfin_linux_sigframe): Use ULONGEST_MAX.
4963         * arm-obsd-tdep.c (armobsd_sigframe): Use ULONGEST_MAX.
4964         * arm-linux-tdep.c (arm_linux_sigreturn_tramp_frame)
4965         (arm_linux_rt_sigreturn_tramp_frame)
4966         (arm_eabi_linux_sigreturn_tramp_frame)
4967         (arm_eabi_linux_rt_sigreturn_tramp_frame)
4968         (thumb2_eabi_linux_sigreturn_tramp_frame)
4969         (thumb2_eabi_linux_rt_sigreturn_tramp_frame)
4970         (arm_linux_restart_syscall_tramp_frame)
4971         (arm_kernel_linux_restart_syscall_tramp_frame): Use ULONGEST_MAX.
4972         * arm-fbsd-tdep.c (arm_fbsd_sigframe): Use ULONGEST_MAX.
4973         * aarch64-linux-tdep.c (aarch64_linux_rt_sigframe): Use
4974         ULONGEST_MAX.
4975         * aarch64-fbsd-tdep.c (aarch64_fbsd_sigframe): Use ULONGEST_MAX.
4976
4977 2018-08-27  Tom Tromey  <tom@tromey.com>
4978
4979         * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Use
4980         CORE_ADDR_MAX.
4981         * mips-tdep.c (mips_deal_with_atomic_sequence)
4982         (micromips_deal_with_atomic_sequence): Use CORE_ADDR_MAX.
4983         * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw)
4984         (arm_deal_with_atomic_sequence_raw): Use CORE_ADDR_MAX.
4985         * alpha-tdep.c (alpha_deal_with_atomic_sequence): Use
4986         CORE_ADDR_MAX.
4987         * aarch64-tdep.c (aarch64_software_single_step): Use
4988         CORE_ADDR_MAX.
4989
4990 2018-08-27  Tom Tromey  <tom@tromey.com>
4991
4992         * linespec.c (complete_linespec_component): Add cast to "char".
4993         * completer.c (completion_tracker::build_completion_result): Add
4994         cast to "char".
4995
4996 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
4997
4998         * solist.h (struct solist, struct target_so_ops): Fix
4999         indentation.
5000
5001 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
5002
5003         * ada-tasks.c (ada_task_info_s): Remove typedef.
5004         (DEF_VEC_O(ada_task_info_s)): Remove.
5005         (struct ada_tasks_inferior_data): Initialize fields.
5006         <task_list>: Make an std::vector.
5007         (get_ada_tasks_inferior_data): Allocate with new.
5008         (ada_get_task_number): Adjust.
5009         (get_task_number_from_id): Likewise.
5010         (valid_task_id): Likewise.
5011         (ada_get_task_info_from_ptid): Likewise.
5012         (iterate_over_live_ada_tasks): Likewise.
5013         (add_ada_task): Likewise.
5014         (read_known_tasks): Likewise.
5015         (ada_build_task_list): Likewise.
5016         (print_ada_task_info): Likewise.
5017         (info_task): Likewise.
5018         (task_command_1): Likewise.
5019
5020 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
5021
5022         * ada-lang.c (add_angle_brackets): Return std::string.
5023
5024 2018-08-25  Simon Marchi  <simon.marchi@polymtl.ca>
5025
5026         * python/py-threadevent.c (py_get_event_thread): Initialize
5027         pythread.
5028
5029 2018-08-24  Pedro Alves  <palves@redhat.com>
5030
5031         * python/py-bpevent.c (create_breakpoint_event_object): Use
5032         copy-initialization.
5033         * python/py-continueevent.c (emit_continue_event): Use
5034         copy-initialization.
5035         * python/py-exitedevent.c (create_exited_event_object): Return a
5036         gdbpy_ref<>.
5037         (emit_exited_event): Use copy-initialization.
5038         * python/py-inferior.c (python_new_inferior)
5039         (python_inferior_deleted, add_thread_object): Use
5040         copy-initialization.
5041         * python/py-infevents.c (create_inferior_call_event_object)
5042         (create_register_changed_event_object)
5043         (create_memory_changed_event_object): Return a gdbpy_ref<>.
5044         (emit_inferior_call_event, emit_memory_changed_event)
5045         (emit_register_changed_event): Use copy-initialization.
5046         * python/py-newobjfileevent.c (create_new_objfile_event_object):
5047         Return a gdbpy_ref<>.
5048         (emit_new_objfile_event): Use copy-initialization.
5049         (create_clear_objfiles_event_object): Return a gdbpy_ref<>.
5050         (emit_clear_objfiles_event): Use copy-initialization.
5051         * python/py-signalevent.c (create_signal_event_object): Use
5052         copy-initialization.
5053         * python/py-threadevent.c (create_thread_event_object): Use
5054         copy-initialization.
5055
5056 2018-08-24  Pedro Alves  <palves@redhat.com>
5057             Simon Marchi  <simon.marchi@ericsson.com>
5058
5059         PR gdb/23379
5060         * python/py-continueevent.c: Include "gdbthread.h".
5061         (create_continue_event_object): Add intro comment.  Add 'ptid'
5062         parameter.  Use it to find thread to pass to
5063         create_thread_event_object.
5064         (emit_continue_event): Pass PTID down to
5065         create_continue_event_object.
5066         * python/py-event.h (py_get_event_thread): Declare.
5067         (create_thread_event_object): Remove default from 'thread'
5068         parameter.
5069         * python/py-stopevent.c (create_stop_event_object): Use
5070         py_get_event_thread.
5071         * python/py-threadevent.c (get_event_thread): Rename to ...
5072         (py_get_event_thread): ... this, make extern, add 'ptid' parameter
5073         and use it to find the thread.
5074         (create_thread_event_object): Assert that THREAD isn't null.
5075         Don't find the event thread here.
5076
5077 2018-08-23  Kevin Buettner  <kevinb@redhat.com>
5078
5079         * block.h (blockrange, blockranges): New struct declarations.
5080         (struct block): Add new field named `ranges'.
5081         (BLOCK_RANGES, BLOCK_NRANGES, BLOCK_RANGE, BLOCK_CONTIGUOUS_P)
5082         (BLOCK_RANGE_START, BLOCK_RANGE_END, BLOCK_ENTRY_PC): New
5083         macros for accessing ranges in struct block.
5084         (make_blockranges): New declaration.
5085         block.c (make_blockranges): New function.
5086         * dwarf2read.c (dwarf2_record_block_ranges): Fill in BLOCK_RANGES
5087         for block.
5088         * symtab.h (find_pc_partial_function): Add new parameter `block'.
5089         * blockframe.c (cache_pc_function_block): New static global.
5090         (clear_pc_function_cache): Clear cache_pc_function_block.
5091         (find_pc_partial_function): Move comment to symtab.h.  Add
5092         support for non-contiguous blocks.
5093         * cli/cli-cmds.c (block.h): Include.
5094         (print_disassembly): Handle printing of non-contiguous blocks.
5095         (disassemble_current_function): Likewise.
5096         (disassemble_command): Likewise.
5097
5098         * ax-gdb.c (gen_var_ref): Use BLOCK_ENTRY_PC in place of
5099         BLOCK_START.
5100         * blockframe.c (get_pc_function_start): Likewise.
5101         * compile/compile-c-symbols.c (convert_one_symbol): Likewise.
5102         (gcc_symbol_address): Likewise.
5103         * compile/compile-object-run.c (compile_object_run): Likewise.
5104         * compile/compile.c (get_expr_block_and_pc): Likewise.
5105         * dwarf2loc.c (dwarf2_find_location_expression): Likewise.
5106         (func_addr_to_tail_call_list): Likewise.
5107         * findvar.c (default_read_var_value): Likewise.
5108         * inline-frame.c (inline_frame_this_id): Likewise.
5109         (skip-inline_frames): Likewise.
5110         * infcmd.c (until_next_command): Likewise.
5111         * linespec.c (convert_linespec_to_sals): Likewise.
5112         * parse.c (parse_exp_in_context_1): Likewise.
5113         * printcmd.c (build_address_symbolic): likewise.
5114         (info_address_command): Likewise.
5115         symtab.c (find_function_start_sal): Likewise.
5116         (skip_prologue_sal): Likewise.
5117         (find_function_alias_target): Likewise.
5118         (find_gnu_ifunc): Likewise.
5119         * stack.c (find_frame_funname): Likewise.
5120         * symtab.c (fixup_symbol_section): Likewise.
5121         (find_function_start_sal): Likewise.
5122         (skip_prologue_sal): Likewsie.
5123         (find_function_alias_target): Likewise.
5124         (find_gnu_ifunc): Likewise.
5125         * tracepoint.c (info_scope_command): Likewise.
5126         * value.c (value_fn_field): Likewise.
5127
5128         * infrun.c (fill_in_stop_func): Use find_function_entry_range_from_pc
5129         in place of find_pc_partial_function.
5130         * blockframe.c (find_function_entry_range_from_pc): New function.
5131         * symtab.h (find_function_entry_range_from_pc): Declare and document.
5132         * objfiles.c (objfile_relocate1): Relocate start and end addresses
5133         for each range in a block.
5134
5135
5136 2018-08-23  Xavier Roirand  <roirand@adacore.com>
5137
5138         * machoread.c (macho_symfile_read_all_oso): Remove uneeded
5139         incrementation.
5140
5141 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
5142
5143         * solib-svr4.c (read_program_headers_from_bfd): Return
5144         gdb::optional<gdb::byte_vector>.
5145         (svr4_exec_displacement): Adjust.
5146
5147 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
5148
5149         * solib-svr4.c (read_program_header): Return
5150         gdb::optional<gdb::byte_vector>, remove p_sect_size param.
5151         (find_program_interpreter): Return
5152         gdb::optional<gdb::byte_vector>.
5153         (scan_dyntag_auxv): Adjust.
5154         (enable_break): Adjust.
5155         (svr4_exec_displacement): Adjust.
5156
5157 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
5158
5159         * inf-child.h (inf_child_target) <terminal_save_inferior>: New.
5160         * inf-child.c (inf_child_target::terminal_save_inferior): New.
5161
5162 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
5163
5164         * guile/scm-string.c (gdbscm_scm_from_printf): Use
5165         string_vprintf.
5166         * guile/scm-utils.c (gdbscm_printf): Likewise.
5167         * serial.c (serial_printf): Likewise.
5168         * xml-support.c (gdb_xml_parser::vdebug): Likewise.
5169
5170 2018-08-22  Jan Vrany  <jan.vrany@fit.cvut.cz>
5171
5172         * stack.c (print_frame): Print frame architecture when printing on
5173         an MI output.
5174         * NEWS: Mention new "arch" attribute in frame output.
5175
5176 2018-08-21  Alan Hayward  <alan.hayward@arm.com>
5177
5178         * arch/aarch64.h (aarch64_regnum): Update comment.
5179
5180 2018-08-21  Alan Hayward  <alan.hayward@arm.com>
5181
5182         * NEWS: Add SVE to 8.2 section.
5183
5184 2018-08-21  Pedro Alves  <palves@redhat.com>
5185
5186         * guile/scm-utils.c (gdbscm_parse_function_args_1): New, factored
5187         out from gdbscm_parse_function_args.
5188         (gdbscm_parse_function_args): Rework to use gdbscm_wrap and
5189         gdbscm_parse_function_args_1.
5190
5191 2018-08-21  Simon Marchi  <simon.marchi@ericsson.com>
5192
5193         PR gdb/17816
5194         * m32c-tdep.c (m32c_decode_srcdest4): Remove unnecessary ternary
5195         operator.
5196
5197 2018-08-19  Simon Marchi  <simon.marchi@polymtl.ca>
5198
5199         * solib-svr4.c (svr4_exec_displacement): Fix formatting.
5200
5201 2018-08-19  Michael Spang  <spang@google.com>
5202
5203         PR gdb/11786
5204         * solib-svr4.c (svr4_exec_displacement): Ignore memsz fields
5205         for PT_TLS segments.
5206
5207 2018-08-18  Kevin Buettner  <kevinb@redhat.com>
5208
5209         * dwarf2expr.h (struct dwarf_expr_context): Add virtual method
5210         dwarf_variable_value.
5211         * dwarf2-frame.c (class dwarf_expr_executor):
5212         Add override for dwarf_variable_value.
5213         * dwarf2loc.c (class dwarf_evaluate_loc_desc): Likewise.
5214         (class symbol_needs_eval_context): Likewise.
5215         (indirect_synthetic_pointer): Add forward declaration.
5216         (sect_variable_value): New function.
5217         (dwarf2_compile_expr_to_ax): Add case for DW_OP_GNU_variable_value.
5218         * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Add case
5219         for DW_OP_GNU_variable_value.
5220
5221 2018-08-16  Tom Tromey  <tom@tromey.com>
5222
5223         * top.c (read_command_file): Update.
5224         (command_line_input): Remove "repeat" argument.
5225         * ada-lang.c (get_selections): Update.
5226         * linespec.c (decode_line_2): Update.
5227         * defs.h (command_line_input): Remove argument.
5228         * cli/cli-script.c (read_next_line): Update.
5229         * python/py-gdb-readline.c: Update.
5230
5231 2018-08-17  Tom Tromey  <tom@tromey.com>
5232
5233         * cli/cli-script.c (read_next_line): Pass 0 as repeat argument to
5234         command_line_input.
5235
5236 2018-08-15  Tom Tromey  <tom@tromey.com>
5237
5238         * aarch64-linux-tdep.c (aarch64_linux_core_read_vq): Use pulongest.
5239
5240 2018-08-14  Jan Vrany  <jan.vrany@fit.cvut.cz>
5241
5242         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Add -a option.
5243         If used, use find_pc_partial_function to find address range
5244         to disassemble.
5245         * mi/mi-main.c (mi_cmd_list_features): Report
5246         "data-disassemble-a-option" feature.
5247         * NEWS: Mention new -data-disassemble option -a.
5248
5249 2018-08-13  Tom Tromey  <tom@tromey.com>
5250
5251         * common/common-defs.h (_FORTIFY_SOURCE): Define.
5252
5253 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
5254
5255         * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): New function.
5256         (aarch64_linux_collect_sve_regset): Likewise.
5257         (aarch64_linux_iterate_over_regset_sections): Check for SVE.
5258         * regcache.h (regcache_map_entry_size): New function.
5259
5260 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
5261
5262         * aarch64-linux-tdep.c (SVE_HEADER_SIZE_LENGTH): Add define.
5263         (SVE_HEADER_MAX_SIZE_LENGTH): Likewise.
5264         (SVE_HEADER_VL_LENGTH): Likewise.
5265         (SVE_HEADER_MAX_VL_LENGTH): Likewise.
5266         (SVE_HEADER_FLAGS_LENGTH): Likewise.
5267         (SVE_HEADER_RESERVED_LENGTH): Likewise.
5268         (SVE_HEADER_SIZE_OFFSET): Likewise.
5269         (SVE_HEADER_MAX_SIZE_OFFSET): Likewise.
5270         (SVE_HEADER_VL_OFFSET): Likewise.
5271         (SVE_HEADER_MAX_VL_OFFSET): Likewise.
5272         (SVE_HEADER_FLAGS_OFFSET): Likewise.
5273         (SVE_HEADER_RESERVED_OFFSET): Likewise.
5274         (SVE_HEADER_SIZE): Likewise.
5275         (aarch64_linux_core_read_vq): Add function.
5276         (aarch64_linux_core_read_description): Check for SVE section.
5277
5278 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
5279
5280         * aarch64-fbsd-tdep.c
5281         (aarch64_fbsd_iterate_over_regset_sections): Add supply_size and
5282         collect_size.
5283         * aarch64-linux-tdep.c
5284         (aarch64_linux_iterate_over_regset_sections): Likewise.
5285         * alpha-linux-tdep.c
5286         (alpha_linux_iterate_over_regset_sections):
5287         * alpha-nbsd-tdep.c
5288         (alphanbsd_iterate_over_regset_sections): Likewise.
5289         * amd64-fbsd-tdep.c
5290         (amd64fbsd_iterate_over_regset_sections): Likewise.
5291         * amd64-linux-tdep.c
5292         (amd64_linux_iterate_over_regset_sections): Likewise.
5293         * arm-bsd-tdep.c
5294         (armbsd_iterate_over_regset_sections): Likewise.
5295         * arm-fbsd-tdep.c
5296         (arm_fbsd_iterate_over_regset_sections): Likewise.
5297         * arm-linux-tdep.c
5298         (arm_linux_iterate_over_regset_sections): Likewise.
5299         * corelow.c (get_core_registers_cb): Likewise.
5300         (core_target::fetch_registers): Likewise.
5301         * fbsd-tdep.c (fbsd_collect_regset_section_cb): Likewise.
5302         * frv-linux-tdep.c (frv_linux_iterate_over_regset_sections): Likewise.
5303         * gdbarch.h (void): Regenerate.
5304         * gdbarch.sh: Add supply_size and collect_size.
5305         * hppa-linux-tdep.c (hppa_linux_iterate_over_regset_sections): Likewise.
5306         * hppa-nbsd-tdep.c (hppanbsd_iterate_over_regset_sections): Likewise.
5307         * hppa-obsd-tdep.c (hppaobsd_iterate_over_regset_sections): Likewise.
5308         * i386-fbsd-tdep.c (i386fbsd_iterate_over_regset_sections): Likewise.
5309         * i386-linux-tdep.c (i386_linux_iterate_over_regset_sections): Likewise.
5310         * i386-tdep.c (i386_iterate_over_regset_sections): Likewise.
5311         * ia64-linux-tdep.c (ia64_linux_iterate_over_regset_sections): Likewise.
5312         * linux-tdep.c (linux_collect_regset_section_cb): Likewise.
5313         * m32r-linux-tdep.c (m32r_linux_iterate_over_regset_sections): Likewise.
5314         * m68k-bsd-tdep.c (m68kbsd_iterate_over_regset_sections): Likewise.
5315         * m68k-linux-tdep.c (m68k_linux_iterate_over_regset_sections): Likewise.
5316         * mips-fbsd-tdep.c (mips_fbsd_iterate_over_regset_sections): Likewise.
5317         * mips-linux-tdep.c (mips_linux_iterate_over_regset_sections): Likewise.
5318         * mips-nbsd-tdep.c (mipsnbsd_iterate_over_regset_sections): Likewise.
5319         * mips64-obsd-tdep.c (mips64obsd_iterate_over_regset_sections):
5320         Likewise.
5321         * mn10300-linux-tdep.c (am33_iterate_over_regset_sections): Likewise.
5322         * nios2-linux-tdep.c (nios2_iterate_over_regset_sections): Likewise.
5323         * ppc-fbsd-tdep.c (ppcfbsd_iterate_over_regset_sections): Likewise.
5324         * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections): Likewise.
5325         * ppc-nbsd-tdep.c (ppcnbsd_iterate_over_regset_sections): Likewise.
5326         * ppc-obsd-tdep.c (ppcobsd_iterate_over_regset_sections): Likewise.
5327         * riscv-linux-tdep.c (riscv_linux_iterate_over_regset_sections):
5328         Likewise.
5329         * rs6000-aix-tdep.c (rs6000_aix_iterate_over_regset_sections): Likewise.
5330         * s390-linux-tdep.c (s390_iterate_over_regset_sections): Likewise.
5331         * score-tdep.c (score7_linux_iterate_over_regset_sections): Likewise.
5332         * sh-tdep.c (sh_iterate_over_regset_sections): Likewise.
5333         * sparc-tdep.c (sparc_iterate_over_regset_sections): Likewise.
5334         * tilegx-linux-tdep.c (tilegx_iterate_over_regset_sections): Likewise.
5335         * vax-tdep.c (vax_iterate_over_regset_sections): Likewise.
5336         * xtensa-tdep.c (xtensa_iterate_over_regset_sections): Likewise.
5337
5338 2018-08-10  Simon Marchi  <simon.marchi@ericsson.com>
5339
5340         * nat/linux-osdata.c (commandline_from_pid): Replace xstrprintf
5341         with string_printf.
5342
5343 2018-08-10  Keith Seitz  <keiths@redhat.com>
5344
5345         * compile/compile-c-support.c (add_code_header, add_code_footer):
5346         Move into policy class.
5347         (c_push_user_expression, pop_user_expression_nop)
5348         (c_add_code_header, c_add_code_footer, c_add_input): New policy class.
5349         (compile_program): New host class.
5350         (c_compile_program): New typedef.
5351         (c_compute_porgram): Use c_compile_program.
5352
5353 2018-08-10  Keith Seitz  <keiths@redhat.com>
5354
5355         * compile/compile-internal.h (compile_instance::~compile_instance):
5356         Remove calls to htab_delete.
5357         <m_type_map, m_symbol_err_map>: Switch type to htab_up.
5358         * compile.c (compile_instance::compile_instance): Initialize
5359         htab unique pointers.
5360         (compile_instance::get_cached_type, compile_instance::insert_type)
5361         (compile_instance::error_symbol_once): Update for unique_ptr.
5362
5363 2018-08-10  Keith Seitz  <keiths@redhat.com>
5364
5365         * compile/compile-c-symbols.c (struct symbol_error)
5366         (hash_symbol_error, eq_symbol_error, del_symbol_error)
5367         (compile_instance::insert_symbol_error)
5368         (compile_instance::error_symbol_once): Move to ...
5369         * compile/compile.c: ... here.
5370
5371 2018-08-10  Keith Seitz  <keiths@redhat.com>
5372
5373         * compile/compile-c-support.c (c_get_compile_context): Use `new'
5374         instead of `new_compile_instance'.
5375         * compile/compile-c-symbols.c (compile_instance::insert_symbol_error):
5376         Update description.
5377         If the symbol error map is not initialized, create it.
5378         (generate_c_for_for_one_symbol): Do not check/initialize
5379         the symbol error map.
5380         * compile/compile-c-types.c (compile_c_instance): Make a class.
5381         Update all callers.
5382         (compile_instance::compile_instance): Initialize the type cache.
5383         (get_cached_type): New function.
5384         (insert_type): Update description.
5385         (compile_c_instance::m_default_cflags): Define.
5386         (convert_type): Update description.  Use get_cached_type.
5387         (delete_instance): Moved to destructor.
5388         (new_compile_instance): Moved to constructor.
5389         * compile/compile-c.h (compile_c_instance): Make class inheriting
5390         from compile_instance.
5391         <base>: Remove field.
5392         <type_map, symbol_err_map>: Move to base class.
5393         <c_plugin>: Rename to `m_plugin' and remove pointer type.
5394         * compile/compile-internal.h (compile_instance): Make class.
5395         <type_map_t, symbol_err_map_t>: Define.
5396         <fe>: Rename to `m_gcc_fe'.
5397         <scope, block, gcc_target_options>: Add `m_' prefix.
5398         <m_type_map, m_symbol_err_map>: New fields, moved from
5399         compile_c_instance.
5400         <destroy>: Remove.
5401         (convert_type, new_compile_instance): Remove.
5402         * compile/compile.c (cleanup_compile_instance): Remove.
5403         (compile_to_object): Use unique_ptr to eliminate cleanups.
5404         (compile_instance::set_print_callback, compile_instance::version)
5405         (compile_instance::set_verbose)
5406         (compile_instance::set_driver_filename)
5407         (compile_instance::set_triplet_regexp)
5408         (compile_instance::set_arguments)
5409         (compile_instance::set_source_file)
5410         (compile_instance::compile): Define.
5411
5412 2018-08-10  Keith Seitz  <keiths@redhat.com>
5413
5414         * Makefile.in (HFILES_NO_SRCDIR): Add compile/gcc-c-plugin.h.
5415         * compile/compile-c-types.c: Define GCC_METHODN macros and include
5416         gcc-c-fe.def to define C plugin.
5417         (delete_instance): Delete `c_plugin'.
5418         (new_compile_instance): Initialize `c_plugin'.
5419         * compile/compile-c.h: Include gcc_c_plugin.h.
5420         (struct compile_c_instance) <c_plugin>: New member.
5421         * gcc-c-plugin.h: New file.
5422         Update all callers with API change.
5423
5424 2018-08-10  Keith Seitz  <keiths@redhat.com>
5425
5426         * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Move header files ...
5427         (HFILES_NO_SRCDIR): ... to here.
5428         Add compile-internal.h and compile-c.h.
5429         * compile/compile-c-support.c: Include compile-c.h.
5430         * compile/compile-c-symbols.c: Include compile-c.h.
5431         (generate_c_for_variable_locations): Update comment.
5432         * compile/compile-c-types.c: Include compile-c.h.
5433         * compile/compile-c.h: New file -- moved C language declarations
5434         from other files here.
5435         * compile/compile-internal.h: Do not include hashtab.h or
5436         common/enum-flags.h.
5437         (gcc_qualifiers_flags, struct compile_c_instance, C_CTX)
5438         (gcc_convert_symbol, gcc_symbol_address)
5439         (generate_c_for_variable_locations, c_get_mode_for_size)
5440         (c_get_range_decl_name): Definitions moved to compile-c.h.
5441         * compile/compile-loc2c.c: Include compile-c.h.
5442
5443 2018-08-10  Keith Seitz  <keiths@redhat.com>
5444
5445         * compile/compile-c-symbols.c (symbol_substitution_name): Rename to ...
5446         (c_symbol_substitution_name): ... this.
5447         Update all callers.
5448
5449 2018-08-10  Keith Seitz  <keiths@redhat.com>
5450
5451         * compile/compile-c-support.c (c_compute_program): Use
5452         unique_xmalloc_ptr to eliminate cleanup.
5453         * compile/compile-c-symbols.c (generate_c_for_variable_locations):
5454         Return a unique_xmalloc_ptr and eliminate cleanup.
5455         * compile/compile-internal.h (generate_c_for_variable_locations):
5456         Return unique_xmalloc_ptr and update description.
5457
5458 2018-08-10  Alan Hayward  <alan.hayward@arm.com>
5459
5460         * corelow.c (core_target::get_core_register_section): Rename
5461         min_size to section_min_size.
5462
5463 2018-08-09  Jim Wilson  <jimw@sifive.com>
5464
5465         * Makefile.in (ALL_TARGET_OBS): Add riscv-linux-tdep.c.
5466         (ALLDEPFILES): Add riscv-linux-nat.c, and riscv-linux-tdep.c.
5467         * NEWS: Mention new GNU/Linux RISC-V target.
5468         * configure.host: Add riscv*-*-linux*.
5469         * configure.nat: Add riscv*.
5470         * configure.tgt: Add riscv*-*-linux*.
5471         * riscv-linux-nat.c: New file.
5472         * riscv-linux-tdep.c: New file.
5473
5474 2018-08-09  Andrew Burgess  <andrew.burgess@embecosm.com>
5475
5476         * infrun.c (resume): Make static, add forward declaration.
5477         (proceed): Update header comment.
5478         * infrun.h (resume): Delete declaration.
5479
5480 2018-08-09  Tom Tromey  <tom@tromey.com>
5481
5482         * riscv-tdep.h: Minor formatting fixes.
5483
5484 2018-08-09  Simon Marchi  <simon.marchi@ericsson.com>
5485
5486         * common/scoped_mmap.c (mmap_file): Silence ARI warning.
5487         * dwarf-index-cache.c (create_dir_and_check): Likewise.
5488         (test_mkdir_recursive): Likewise.
5489         * dwarf-index-write.c (write_psymtabs_to_index): Likewise.
5490
5491 2018-08-09  Andrew Burgess  <andrew.burgess@embecosm.com>
5492
5493         * valarith.c (value_subscripted_rvalue): If an array is not in
5494         memory, and we don't know the upper bound, then we can't know that
5495         the requested element exists or not.
5496
5497 2018-08-08  Simon Marchi  <simon.marchi@ericsson.com>
5498
5499         * target.c (str_comma_list_concat_elem): Fix typo in comment.
5500         (target_options_to_string): Add comment.
5501
5502 2018-08-08  Tom Tromey  <tom@tromey.com>
5503
5504         * unittests/scoped_mmap-selftests.c: Check result of "write".
5505
5506 2018-08-08  Jim Wilson  <jimw@sifive.com>
5507
5508         * riscv-tdep.c (enum opcode): Add jump, branch, lr, and sc opcodes.
5509         (decode_register_index_short): New.
5510         (decode_j_type_insn, decode_cj_type_insn): New.
5511         (decode_b_type_insn, decode_cb_type_insn): New.
5512         (riscv_insn::decode): Add support for jumps, branches, lr, and sc.  New
5513         local xlen.  Check xlen when decoding ambiguous compressed insns.  In
5514         compressed decode, use is_c_lui_insn instead of is_lui_insn, and
5515         is_c_sw_insn instead of is_sw_insn.
5516         (riscv_next_pc, riscv_next_pc_atomic_sequence): New.
5517         (riscv_software_single_step): New.
5518         * riscv-tdep.h (riscv_software_single_step): Declare.
5519
5520         * riscv-tdep.c (riscv_isa_xlen): Drop static.
5521         * riscv-tdep.h (riscv_isa_xlen): Add extern declaration.
5522
5523 2018-08-08  Andrew Burgess  <andrew.burgess@embecosm.com>
5524
5525         PR gdb/18050:
5526         * target.c (dispose_inferior): Don't dispose of inferiors that are
5527         already killed.
5528
5529 2018-08-08  Szabolcs Nagy  <szabolcs.nagy@arm.com>
5530
5531         * remote.c (remote_target::download_tracepoint): Change char* to
5532         const char*.
5533
5534 2018-08-07  Simon Marchi  <simon.marchi@polymtl.ca>
5535
5536         * target.h (target_options_to_string): Return an std::string.
5537         * target.c (str_comma_list_concat_elem): Return void, use
5538         std::string.
5539         (do_option): Likewise.
5540         (target_options_to_string): Return an std::string.
5541         * linux-nat.c (linux_nat_target::wait): Adjust.
5542         * target-debug.h (target_debug_print_options): Adjust.
5543
5544 2018-08-07  Tom Tromey  <tom@tromey.com>
5545
5546         * Makefile.in (CPPFLAGS): New variable.
5547         (INTERNAL_CPPFLAGS): Use it.
5548
5549 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
5550
5551         * NEWS: Mention the index cache.
5552
5553 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
5554
5555         * common/pathstuff.h (get_standard_cache_dir): New.
5556         * common/pathstuff.c (get_standard_cache_dir): New.
5557         * build-id.h (build_id_to_string): New.
5558         * dwarf-index-common.h (INDEX4_SUFFIX, INDEX5_SUFFIX,
5559         DEBUG_STR_SUFFIX): Move to here.
5560         * dwarf-index-write.c (INDEX4_SUFFIX, INDEX5_SUFFIX,
5561         DEBUG_STR_SUFFIX): Move from there.
5562         (write_psymtabs_to_index): Make non-static, add basename
5563         parameter.  Write to temporary files, rename when done.
5564         (save_gdb_index_command): Adjust call to
5565         write_psymtabs_to_index.
5566         * dwarf2read.h (dwarf2_per_objfile) <index_cache_res>: New
5567         field.
5568         * dwarf2read.c (dwz_file) <index_cache_res>: New field.
5569         (get_gdb_index_contents_from_cache): New.
5570         (get_gdb_index_contents_from_cache_dwz): New.
5571         (dwarf2_initialize_objfile): Read index from cache.
5572         (dwarf2_build_psymtabs): Save to index.
5573         * dwarf-index-cache.h: New file.
5574         * dwarf-index-cache.c: New file.
5575         * dwarf-index-write.h: New file.
5576
5577 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
5578
5579         * gnulib/aclocal.m4: Re-generate.
5580         * gnulib/config.in: Re-generate.
5581         * gnulib/configure: Re-generate.
5582         * gnulib/import/Makefile.am: Re-generate.
5583         * gnulib/import/Makefile.in: Re-generate.
5584         * gnulib/import/m4/gnulib-cache.m4: Re-generate.
5585         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
5586         * gnulib/import/m4/mkdir.m4: New file.
5587         * gnulib/import/mkdir.c: New file.
5588         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkdir
5589         module.
5590
5591 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
5592
5593         * Makefile.in (COMMON_SFILES): Add common/scoped_mmap.c.
5594         * common/scoped_mmap.c: New file.
5595         * common/scoped_mmap.h (destroy): New method.
5596         (~scoped_mmap, reset): Use destroy.
5597         (scoped_mmap): New move constructor.
5598         (mmap_file): New declaration.
5599         * unittests/scoped_mmap-selftests.c (test_normal,
5600         test_invalid_filename, run_tests): New functions.
5601         (_initialize_scoped_mmap_selftests): Register selftest.
5602
5603 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
5604
5605         * dwarf2read.c (read_gdb_index_from_section): Rename to...
5606         (read_gdb_index_from_buffer): ... this.  Remove section
5607         parameter, add buffer parameter.
5608         (get_gdb_index_contents_ftype,
5609         get_gdb_index_contents_dwz_ftype): New typedefs.
5610         (dwarf2_read_gdb_index): Add callback parameters to get the
5611         index contents.
5612         (get_gdb_index_contents_from_section): New.
5613         (dwarf2_initialize_objfile): Update call to
5614         dwarf2_read_gdb_index.
5615
5616 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
5617
5618         * common/filestuff.h (gdb_fopen_cloexec): New overload.
5619         (gdb_open_cloexec): Likewise.
5620         * nat/linux-osdata.c (command_from_pid): Use string_printf.
5621         (commandline_from_pid): Likewise.
5622         (linux_xfer_osdata_threads): Likewise.
5623         (linux_xfer_osdata_fds): Likewise.
5624         * ada-lang.c (is_package_name): Likewise.
5625         * auxv.c (procfs_xfer_auxv): Likewise.
5626         * breakpoint.c (print_one_breakpoint_location): Use
5627         uiout::field_fmt.
5628         (print_one_catch_solib): Use string_printf.
5629         * coff-pe-read.c (add_pe_exported_sym): Likewise.
5630         (add_pe_forwarded_sym): Likewise.
5631         * dwarf2read.c (create_type_unit_group): Likewise.
5632         (build_error_marker_type): Likewise.
5633         * infcall.c (get_function_name): Likewise.
5634         * valprint.c (print_converted_chars_to_obstack): Likewise.
5635         * xtensa-tdep.c (xtensa_register_type): Likewise.
5636
5637 2018-08-06  Simon Marchi  <simon.marchi@ericsson.com>
5638
5639         * remote.c (remote_target::download_tracepoint): Fix format
5640         string errors.
5641
5642 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
5643
5644         * tracefile.c: Include common/byte-vector.h.
5645         (trace_save): Change type of buf to gdb::byte_vector.  Initialize
5646         with trace_regblock_size if needed.  Update uses of buf.
5647
5648 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
5649
5650         * tracepoint.h (collection_list) <m_regs_mask>: Change type to
5651         std::vector<unsigned char>.
5652         * tracepoint.c (collection_list::collection_list): Remove
5653         m_regs_mask initializer from initializer list.  Resize
5654         m_regs_mask using the largest remote register number.
5655         (collection_list::add_remote_register): Remove size check on
5656         m_regs_mask.  Use at to access element.
5657         (collection_list::stringify): Change type of temp_buf to
5658         gdb::char_vector.  Update uses of temp_buf.  Resize if needed to
5659         stringify the register mask.  Use pack_hex_byte for the register
5660         mask.
5661
5662 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
5663
5664         * tracepoint.h (class collection_list) <add_register>: Remove.
5665         <add_remote_register, add_ax_registers, add_local_register>:
5666         Declare.
5667         <add_memrange>: Add scope parameter.
5668         * tracepoint.c (encode_actions_1): Likewise.
5669         (collection_list::add_register): Rename to ...
5670         (collection_list::add_remote_register): ... this.  Update
5671         comment.
5672         (collection_list::add_ax_registers, add_local_register): New
5673         methods.
5674         (collection_list::add_memrange): Add scope parameter.  Call
5675         add_local_register instead of add_register.
5676         (finalize_tracepoint_aexpr): New function.
5677         (collection_list::collect_symbol): Update calls to add_memrange.
5678         Call add_local_register instead of add_register.  Call
5679         add_ax_registers.  Call finalize_tracepoint_aexpr.
5680         (encode_actions_1): Get remote regnos for $reg action.  Call
5681         add_remote_register, add_ax_registers, and add_local_register.
5682         Update call to add_memrange.  Call finalize_tracepoint_aexpr.
5683         (validate_actionline): Call finalize_tracepoint_aexpr.
5684
5685 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
5686
5687         * remote.c (remote_target::download_tracepoint): Remove BUF_SIZE.
5688         Replace array buf with gdb::char_vector buf, of size
5689         get_remote_packet_size ().  Replace references to buf and
5690         BUF_SIZE to buf.data () and buf.size ().  Replace strcpy, strcat
5691         and xsnprintf with snprintf.  Raise errors if the buffer is too
5692         small.
5693
5694 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
5695
5696         * remote.c (remote_target::download_tracepoint): Fix the has_more
5697         predicate in the QTDP action list iteration.
5698
5699 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
5700
5701         * remote.c (remote_target::download_tracepoint): Fix indentation
5702         in for block.
5703
5704 2018-08-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
5705
5706         * proc-api.c (_initialize_proc_api): Remove c, unused.
5707         * procfs.c (procfs_init_inferior): Remove signals, unused.
5708         (procfs_target::make_corefile_notes): Remove old_chain, fpregs,
5709         unused.
5710
5711 2018-08-06  Sergey Korolev  <s.korolev@ndmsystems.com>
5712             Andrew Burgess  <andrew.burgess@embecosm.com>
5713
5714         * linux-nat.c (linux_nat_target::follow_fork): Avoid using
5715         'W_STOPCODE (0)' as this could be ambiguous.
5716
5717 2018-08-03  Sergio Durigan Junior  <sergiodj@redhat.com>
5718
5719         * ser-tcp.c (net_open): Fix thinko when deciding whether to
5720         disable TCP's Nagle algorithm (use "ai_protocol" instead of
5721         "ai_socktype").
5722
5723 2018-08-02  Tom Tromey  <tom@tromey.com>
5724
5725         PR symtab/16842.
5726         * dwarf2read.c (read_func_scope): Set symtab on template parameter
5727         symbols.
5728         (process_structure_scope): Likewise.
5729
5730 2018-08-02  Xavier Roirand  <roirand@adacore.com>
5731
5732         PR gdb/22629:
5733         * darwin-nat.c (darwin_kill_inferior): Fix handling of
5734         kill inferior.
5735
5736 2018-08-02  Tom Tromey  <tom@tromey.com>
5737
5738         * darwin-nat.c (find_inferior_task_it, darwin_find_thread)
5739         (darwin_suspend_inferior, darwin_resume_inferior)
5740         (darwin_decode_notify_message, darwin_resume_inferior_threads)
5741         (darwin_check_new_threads): Check result of get_darwin_inferior.
5742
5743 2018-07-31  Joel Brobecker  <brobecker@adacore.com>
5744
5745         GDB 8.1.1 released.
5746
5747 2018-07-31  Jan Vrany  <jan.vrany@fit.cvut.cz>
5748
5749         * varobj.c (varobj_get_path_expr_parent): Report an error if
5750         parent is a dynamic varobj.
5751
5752 2018-07-31  Simon Marchi  <simon.marchi@ericsson.com>
5753
5754         * gnulib/aclocal.m4: Re-generate.
5755         * gnulib/config.in: Re-generate.
5756         * gnulib/configure: Re-generate.
5757         * gnulib/import/Makefile.in: Re-generate.
5758         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
5759         * gnulib/import/m4/onceonly.m4: Re-generate.
5760
5761 2018-07-31  Simon Marchi  <simon.marchi@ericsson.com>
5762
5763         * target-descriptions.c (struct xml_test_tdesc): New.
5764         (xml_tdesc): Change type to std::vector<xml_test_tdesc>.
5765         (record_xml_tdesc): Update.
5766         (maintenance_check_xml_descriptions): Update.
5767         * target-descriptions.h (record_xml_tdesc): Update comment.
5768
5769 2018-07-30  Andrew Burgess  <andrew.burgess@embecosm.com>
5770
5771         * eval.c (evaluate_subexp_for_sizeof): Check for array type before
5772         checking array bounds are defined.
5773
5774 2018-07-30  Tom Tromey  <tom@tromey.com>
5775
5776         * nat/linux-osdata.c (pid_pgid_entry::operator<): Fix
5777         irreflexivity violation.
5778
5779 2018-07-30  Tom Tromey  <tom@tromey.com>
5780
5781         * cli/cli-decode.c (lookup_cmd): Remove lint code.
5782         * value.c (unpack_long): Remove lint code.
5783         * valops.c (value_ind): Remove lint code.
5784         * valarith.c (value_x_binop, value_x_unop, value_equal)
5785         (value_pos): Remove lint code.
5786
5787 2018-07-28  Tom de Vries  <tdevries@suse.de>
5788
5789         * eval.c (evaluate_subexp_for_sizeof): Interpret size of dynamic type
5790         with undefined upper bound as <optimized out>.
5791
5792 2018-07-27  Sergio Durigan Junior  <sergiodj@redhat.com>
5793
5794         * gcore.in: Rename variable "name" to "prefix".  Expand
5795         "usage" text.
5796
5797 2018-07-14  Jon Turney  <jon.turney@dronecode.org.uk>
5798
5799         * windows-nat.c (windows_nat_target::create_inferior): Update to
5800         call close() in global namespace.
5801
5802 2018-07-26  Tom Tromey  <tom@tromey.com>
5803
5804         * dwarf-index-write.c (add_address_entry): Don't add objfile
5805         offsets.
5806         * dbxread.c (find_stab_function): Rename from
5807         find_stab_function_addr.  Return a bound_minimal_symbol.
5808         (read_dbx_symtab): Use raw_text_low, raw_text_high.
5809         Don't add objfile offsets.
5810         (end_psymtab): Use raw_text_low, raw_text_high,
5811         MSYMBOL_VALUE_RAW_ADDRESS.
5812         (read_ofile_symtab): Update.
5813         (process_one_symbol): Update.
5814         * dwarf2read.c (create_addrmap_from_index): Don't add objfile
5815         offsets.
5816         (dw2_relocate): Remove.
5817         (dw2_find_pc_sect_symtab): Bias PC by the text offset before
5818         searching addrmap.
5819         (dwarf2_gdb_index_functions, dwarf2_debug_names_functions):
5820         Update.
5821         (process_psymtab_comp_unit_reader, add_partial_symbol)
5822         (add_partial_subprogram, dwarf2_ranges_read): Update.
5823         (load_partial_dies): Update.
5824         (add_address_entry): Don't add objfile offsets.
5825         (dwarf2_build_include_psymtabs): Update.
5826         (create_addrmap_from_aranges): Don't add objfile offsets.
5827         (dw2_find_pc_sect_compunit_symtab): Update.
5828         * mdebugread.c (parse_symbol): Don't add objfile offsets.
5829         (parse_lines): Remove 'pst' parameter, replace with 'textlow'.
5830         Update.
5831         (parse_partial_symbols): Don't add objfile offsets.  Use
5832         raw_text_low, raw_text_high.  Update.
5833         (handle_psymbol_enumerators, psymtab_to_symtab_1): Update.
5834         * objfiles.c (objfile_relocate1): Don't relocate psymtabs_addrmap
5835         or call 'relocate' quick function.  Clear psymbol_map.
5836         * psympriv.h (struct partial_symbol) <address>: Add section
5837         offset.
5838         <set_unrelocated_address>: Rename from set_address.
5839         <raw_text_low, raw_text_high>: New methods.
5840         <text_low, text_high>: Add objfile parameter.
5841         (add_psymbol_to_bcache): Add 'section' parameter.  Call
5842         set_unrelocated_address.
5843         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
5844         (find_pc_psymbol): Update.
5845         (fixup_psymbol_section, relocate_psymtabs): Remove.
5846         (dump_psymtab, psym_functions): Update.
5847         (add_psymbol_to_bcache, add_psymbol_to_list): Add 'section'
5848         parameter.
5849         (maintenance_info_psymtabs, maintenance_check_psymtabs): Update.
5850         (start_psymtab_common): Update.
5851         * symfile-debug.c (debug_qf_relocate): Remove.
5852         (debug_sym_quick_functions): Update.
5853         * symfile.h (struct quick_symbol_functions) <relocate>: Remove.
5854         * xcoffread.c (scan_xcoff_symtab): Don't add objfile offsets.
5855         Update.
5856
5857 2018-07-26  Tom Tromey  <tromey@redhat.com>
5858
5859         * dbxread.c (end_psymtab): Use text_high_valid and
5860         text_low_valid.
5861         * mdebugread.c (parse_partial_symbols): Use text_low_valid.
5862         (psymtab_to_symtab_1): Use text_high_valid and text_low_valid.
5863         * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
5864         Update comment.
5865         <text_low_valid, text_high_valid>: New fields.
5866         <set_text_low, set_text_high>: Update.
5867         * xcoffread.c (scan_xcoff_symtab): Use text_low_valid.
5868
5869 2018-07-26  Tom Tromey  <tom@tromey.com>
5870
5871         * dbxread.c (read_dbx_symtab, end_psymtab, read_ofile_symtab):
5872         Update.
5873         * dwarf2read.c (dwarf2_create_include_psymtab): Don't initialize
5874         textlow and texthigh fields.
5875         (process_psymtab_comp_unit_reader, dwarf2_build_include_psymtabs):
5876         Update.
5877         * mdebugread.c (parse_lines, parse_partial_symbols)
5878         (psymtab_to_symtab_1): Update.
5879         * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
5880         Rename fields.  Update comment.  Now private.
5881         <text_low, text_high, set_text_low, set_text_high>: New methods.
5882         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
5883         (find_pc_sect_psymbol, relocate_psymtabs, dump_psymtab)
5884         (start_psymtab_common, maintenance_info_psymtabs)
5885         (maintenance_check_psymtabs): Update.
5886         * xcoffread.c (xcoff_end_psymtab): Don't initialize textlow and
5887         texthigh fields.
5888         (scan_xcoff_symtab): Update.
5889
5890 2018-07-26  Tom Tromey  <tromey@redhat.com>
5891
5892         * psympriv.h (struct partial_symbol) <unrelocated_address,
5893         address, set_address>: New methods.
5894         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymbol)
5895         (fixup_psymbol_section, relocate_psymtabs): Update.
5896         (print_partial_symbols): Add 'objfile' parameter.  Update.
5897         (dump_psymtab, add_psymbol_to_bcache, psym_fill_psymbol_map):
5898         Update.
5899
5900 2018-07-26  Tom Tromey  <tom@tromey.com>
5901
5902         * dwarf-index-write.c (write_psymbols, debug_names::insert)
5903         (debug_names::write_psymbols): Update.
5904         * psympriv.h (struct partial_symbol): Derive from
5905         general_symbol_info.
5906         <obj_section>: New method.
5907         (PSYMBOL_DOMAIN, PSYMBOL_CLASS): Remove.n
5908         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
5909         (find_pc_sect_psymbol, fixup_psymbol_section)
5910         (match_partial_symbol, lookup_partial_symbol, relocate_psymtabs)
5911         (print_partial_symbols, recursively_search_psymtabs)
5912         (compare_psymbols, psymbol_hash, psymbol_compare)
5913         (add_psymbol_to_bcache, maintenance_check_psymtabs)
5914         (psymbol_name_matches, psym_fill_psymbol_map): Update.
5915
5916 2018-07-26  Tom Tromey  <tromey@redhat.com>
5917
5918         * dbxread.c (end_psymtab): Remove dead code.
5919
5920 2018-07-26  Andrew Burgess  <andrew.burgess@embecosm.com>
5921
5922         * dwarf2-frame-tailcall.c (tailcall_frame_sniffer): Exit early if
5923         DWARF unwinders are disabled.
5924         * dwarf2-frame.c: Add dwarf2read.h include.
5925         (dwarf2_frame_sniffer): Exit early if DWARF unwinders are
5926         disabled.
5927         (dwarf2_frame_unwinders_enabled_p): Define.
5928         (show_dwarf_unwinders_enabled_p): New function.
5929         (_initialize_dwarf2_frame): Register switch to control DWARF
5930         unwinder use.
5931         * dwarf2-frame.h (dwarf2_frame_unwinders_enabled_p): Declare.
5932         * dwarf2read.c (set_dwarf_cmdlist): Remove static keyword.
5933         (show_dwarf_cmdlist): Remove static keyword.
5934         * dwarf2read.h (set_dwarf_cmdlist): Declare.
5935         (show_dwarf_cmdlist): Declare.
5936         * NEWS: Document new feature.
5937
5938 2018-07-26  Tom de Vries  <tdevries@suse.de>
5939
5940         PR breakpoints/23366
5941         * infcmd.c (info_program_command): Handle ptid == minus_one_ptid.
5942
5943 2018-07-26  Tom de Vries  <tdevries@suse.de>
5944
5945         * dwarf2read.c (read_subrange_type): Warn if DW_AT_upper_bound or
5946         DW_AT_count can't be translated to a dynamic prop.
5947
5948 2018-07-25  Tom de Vries  <tdevries@suse.de>
5949
5950         * dwarf2loc.c (dwarf2_locexpr_baton_eval): Wrap ctx.eval call in
5951         try/catch.
5952
5953 2018-07-25  Jan Vrany  <jan.vrany@fit.cvut.cz>
5954
5955         * breakpoint.c (enable_disable_bp_num_loc): Notify observers.
5956
5957 2018-07-25  Joel Brobecker  <brobecker@adacore.com>
5958
5959         * MAINTAINERS (Global Maintainers): Add Tom Tromey.
5960
5961 2018-07-24  Keith Seitz  <keiths@redhat.comt
5962
5963         PR symtab/23010
5964         * dwarf2read.c (dw2_add_symbol_to_list): New function.
5965         (fixup_go_packaging, new_symbol): Use dw2_add_symbol_to_list
5966         instead of add_symbol_to_list.
5967         (read_file_scope): Call prepare_one_comp_unit before reading
5968         any other DIEs.
5969
5970 2018-07-24  Simon Marchi  <simon.marchi@ericsson.com>
5971
5972         * common/scoped_mmap.h (class scoped_mmap): Fix indentation.
5973
5974 2018-07-24  Tom Tromey  <tom@tromey.com>
5975
5976         * utils.c (malloc, realloc, free): Don't declare.
5977         * configure, config.in: Rebuild.
5978         * configure.ac: Don't check for declarations of free, malloc, or
5979         realloc.
5980
5981 2018-07-22  Simon Marchi  <simon.marchi@polymtl.ca>
5982
5983         * aarch64-linux-nat.c
5984         (aarch64_linux_nat_target::stopped_data_address): Remove unused
5985         variable.
5986         * arm-linux-nat.c (fetch_regs): Likewise.
5987         (store_regs): Likewise.
5988         (fetch_vfp_regs): Likewise.
5989         (store_vfp_regs): Likewise.
5990         (arm_linux_nat_target::insert_hw_breakpoint): Likewise.
5991         (arm_linux_nat_target::remove_hw_breakpoint): Likewise.
5992         (arm_linux_nat_target::insert_watchpoint): Likewise.
5993         (arm_linux_nat_target::remove_watchpoint): Likewise.
5994         * mips-linux-nat.c (mips_linux_nat_target::insert_watchpoint):
5995         Likewise.
5996         * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs):
5997         Likewise.
5998         * ppc-linux-nat.c (fetch_register): Likewise.
5999         (fetch_all_gp_regs): Likewise.
6000         (fetch_ppc_registers): Likewise.
6001         (store_all_gp_regs): Likewise.
6002         (store_ppc_registers): Likewise.
6003         (hwdebug_insert_point): Likewise.
6004         (can_use_watchpoint_cond_accel): Likewise.
6005         * remote-sim.c (gdb_os_write_stdout): Likewise.
6006
6007 2018-07-22  Simon Marchi  <simon.marchi@polymtl.ca>
6008             Tom Tromey  <tom@tromey.com>
6009
6010         * warning.m4 (AM_GDB_WARNINGS): Add -Wunused-variable and special
6011         test for it.
6012         * configure: Rebuild.
6013
6014 2018-07-22  Tom Tromey  <tom@tromey.com>
6015
6016         * regformats/regdat.sh: Define xmltarget_${name} inside
6017         #ifndef IN_PROCESS_AGENT.
6018
6019 2018-07-22  Tom Tromey  <tom@tromey.com>
6020
6021         * value.c (value_fetch_lazy_bitfield): Remove unused variable.
6022
6023 2018-07-22  Tom Tromey  <tom@tromey.com>
6024
6025         * symfile.c (reread_symbols): Notify iter, not objfile.
6026
6027 2018-07-22  Tom Tromey  <tom@tromey.com>
6028
6029         * ravenscar-thread.c (ravenscar_thread_target::store_registers):
6030         Use arch_ops.
6031         (ravenscar_thread_target::prepare_to_store): Likewise.
6032
6033 2018-07-22  Tom Tromey  <tom@tromey.com>
6034
6035         * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Remove
6036         unused variable.  Call value_fetch_lazy when needed.
6037         * guile/scm-pretty-print.c (gdbscm_apply_val_pretty_printer):
6038         Remove unused variable.  Call value_fetch_lazy when needed.
6039
6040 2018-07-22  Tom Tromey  <tom@tromey.com>
6041
6042         * m32c-tdep.c (mark_dma): Return void.
6043         (make_regs): Remove unused declarations.
6044
6045 2018-07-22  Tom Tromey  <tom@tromey.com>
6046
6047         * guile/scm-cmd.c (gdbscm_dont_repeat): Call
6048         cmdscm_get_valid_command_smob_arg_unsafe for effect.
6049         * guile/scm-block.c (gdbscm_make_block_syms_iter): Call
6050         bkscm_get_valid_block_smob_arg_unsafe for effect.
6051
6052 2018-07-22  Tom Tromey  <tom@tromey.com>
6053
6054         * bfin-tdep.c (bfin_push_dummy_call): Use arg_type, not
6055         value_type.
6056
6057 2018-07-22  Tom Tromey  <tom@tromey.com>
6058
6059         * windows-nat.c (saved_context): Conditionally define.
6060         * remote.c (remote_target::remote_btrace_maybe_reopen):
6061         Conditionally declare "warned".
6062         * inflow.c (sigquit_ours): Conditionally define.
6063         (new_tty): Move "tty" declaration inside #if.
6064         * guile/guile.c (guile_datadir): Conditionally define.
6065         * charset.c (set_be_le_names): Move some declarations inside #if.
6066         * btrace.c (parse_xml_btrace): Move "errcode" declaration inside
6067         #if.
6068         (parse_xml_btrace_conf): Likewise.
6069
6070 2018-07-22  Tom Tromey  <tom@tromey.com>
6071
6072         * spu-tdep.c (spu_get_overlay_table): Remove unused variable.
6073
6074 2018-07-22  Tom Tromey  <tom@tromey.com>
6075
6076         * guile/scm-value.c (gdbscm_value_call): Remove unused variables.
6077         * guile/scm-math.c (vlscm_unop_gdbthrow, vlscm_binop_gdbthrow)
6078         (vlscm_convert_typed_value_from_scheme): Remove unused variable.
6079         * buildsym-legacy.c (get_macro_table): Remove unused variable.
6080         * stack.c (frame_apply_level_command): Remove unused variable.
6081         * tic6x-tdep.c (tic6x_push_dummy_call): Remove unused variable.
6082         * sparc64-tdep.c (adi_examine_command): Remove unused variable.
6083         * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Remove
6084         unused variable.
6085         * nios2-tdep.c (nios2_push_dummy_call): Remove unused variable.
6086         * mep-tdep.c (mep_push_dummy_call): Remove unused variable.
6087         * ada-lang.c (ada_lookup_symbol_list_worker): Remove unused
6088         variable.
6089         * amd64-tdep.c (amd64_supply_xsave): Remove unused variable.
6090         * arm-tdep.c (arm_record_data_proc_misc_ld_str): Remove unused
6091         variable.
6092         * breakpoint.c (check_no_tracepoint_commands, update_watchpoint):
6093         Remove unused variable.
6094         * cli/cli-script.c (recurse_read_control_structure): Remove unused
6095         variable.
6096         * common/tdesc.c (print_xml_feature::visit): Remove unused
6097         variable.
6098         * compile/compile-object-load.c (store_regs): Remove unused
6099         variables.
6100         * complaints.c (clear_complaints): Remove unused variable.
6101         * corelow.c (core_target_open): Remove unused variable.
6102         * fbsd-tdep.c (fbsd_core_info_proc_status): Remove unused
6103         variable.
6104         * guile/scm-frame.c (gdbscm_frame_read_var): Remove unused
6105         variable.
6106         * guile/scm-symtab.c (stscm_print_sal_smob): Remove unused
6107         variable.
6108         * guile/scm-type.c (gdbscm_field_baseclass_p): Remove unused
6109         variable.
6110         * guile/scm-utils.c (gdbscm_parse_function_args): Remove unused
6111         variable.
6112         * hppa-tdep.c (hppa_stub_frame_unwind_cache): Remove unused
6113         variable.
6114         * ia64-tdep.c (examine_prologue): Remove unused variable.
6115         * infcall.c (run_inferior_call): Remove unused variable.
6116         * inferior.c (exit_inferior): Remove unused variable.
6117         * infrun.c (infrun_thread_ptid_changed): Remove unused variable.
6118         * linespec.c (decode_line_2): Remove unused variable.
6119         * linux-nat.c (super_close): Remove.
6120         * linux-tdep.c (linux_info_proc): Remove unused variable.
6121         * mi/mi-main.c (mi_execute_command): Remove unused variable.
6122         * microblaze-linux-tdep.c (microblaze_linux_sigtramp_cache):
6123         Remove unused variable.
6124         * parse.c (find_minsym_type_and_address): Remove unused variable.
6125         * printcmd.c (info_symbol_command, printf_floating): Remove unused
6126         variable.
6127         * python/py-breakpoint.c (bppy_set_commands): Remove unused
6128         variable.
6129         * python/py-unwind.c (unwind_infopy_dealloc): Remove unused
6130         variables.
6131         * record-btrace.c (record_btrace_target::store_registers): Remove
6132         unused variable.
6133         (cmd_show_record_btrace_cpu): Remove unused variable.
6134         * riscv-tdep.c (riscv_register_reggroup_p)
6135         (riscv_push_dummy_call, riscv_return_value): Remove unused
6136         variable.
6137         * rust-exp.y (literal): Remove unused variable.
6138         * rust-lang.c (rust_evaluate_subexp) <OP_RUST_ARARAY>: Remove
6139         unused variable.
6140         <STRUCTOP_ANONYMOUS>: Likewise.
6141         * s390-linux-tdep.c (s390_linux_init_abi_31)
6142         (s390_linux_init_abi_64): Remove unused variable.
6143         * ser-ming2.c (ser_windows_read_prim, pipe_select_thread)
6144         (file_select_thread, net_windows_open, _initialize_ser_windows):
6145         Remove unused variables.
6146         * symtab.c (find_pc_sect_line): Remove unused variable.
6147         * target-memory.c (compute_garbled_blocks): Remove unused
6148         variable.
6149         (target_write_memory_blocks): Remove unused variable.
6150         * target.c (target_stack::unpush): Remove unused variables.
6151         * tracepoint.c (start_tracing, all_tracepoint_actions)
6152         (merge_uploaded_trace_state_variables)
6153         (print_one_static_tracepoint_marker): Remove unused variable.
6154         * unittests/basic_string_view/element_access/char/1.cc (test01):
6155         Remove unused variable.
6156         * windows-nat.c (windows_continue, windows_add_all_dlls)
6157         (do_initial_windows_stuff, windows_nat_target::create_inferior):
6158         Remove unused variables.
6159
6160 2018-07-21  Simon Marchi  <simon.marchi@polymtl.ca>
6161
6162         * arm-tdep.c (arm_gdbarch_init): Declare attr_arch and
6163         attr_profile in HAVE_ELF.
6164         * rs6000-tdep.c (bfd_uses_spe_extensions): Declare vector_abi in
6165         HAVE_ELF.
6166
6167 2018-07-20  Simon Marchi  <simon.marchi@polymtl.ca>
6168
6169         * frame.c (frame_register_unwind): Change parameter name.
6170         (frame_unwind_register): Likewise.
6171         (frame_unwind_register_value): Likewise.
6172         (frame_unwind_register_signed): Likewise.
6173         (frame_unwind_register_unsigned): Likewise.
6174         * frame.h (frame_register_unwind): Likewise.
6175         (frame_unwind_register): Likewise.
6176         (frame_unwind_register_value): Likewise.
6177         (frame_unwind_register_signed): Likewise.
6178         (frame_unwind_register_unsigned): Likewise.
6179         (frame_unwind_arch): Likewise.
6180
6181 2018-07-20  Maciej W. Rozycki  <macro@mips.com>
6182
6183         * MAINTAINERS: Update my e-mail address, downgrade to MIPS I-IV
6184         ISA maintenance.
6185
6186 2018-07-20  Maciej W. Rozycki  <macro@mips.com>
6187
6188         * mips-linux-nat.c (mips_linux_nat_target::read_description):
6189         Call `get_ptrace_pid' rather than extracting the ptrace PID by
6190         hand.
6191
6192 2018-07-20  Keith Seitz  <keiths@redhat.com>
6193
6194         * buildsym.h (struct buildsym_compunit) <m_objfile, m_subfiles,
6195         m_main_subfile, m_comp_dir, m_producer, m_debugformat,
6196         m_compunit_symtab, m_language>: Add "m_" prefix.
6197         Update all uses.
6198         * buildsym.c: Update all uses.
6199
6200 2018-07-20  Tom Tromey  <tom@tromey.com>
6201
6202         * buildsym-legacy.h (record_line): Don't use record_line_ftype.
6203         * buildsym.h (record_line_ftype): Remove typedef.
6204
6205 2018-07-20  Tom Tromey  <tom@tromey.com>
6206
6207         * buildsym-legacy.h (augment_type_symtab): Don't declare.
6208         (end_expandable_symtab): Likewise.
6209         (end_symtab_get_static_block): Likewise.
6210         (end_symtab_from_static_block): Likewise.
6211         * buildsym-legacy.c (augment_type_symtab): Remove.
6212         (end_expandable_symtab): Remove.
6213         (end_symtab_get_static_block): Remove.
6214         (end_symtab_from_static_block): Remove.
6215
6216 2018-07-20  Tom Tromey  <tom@tromey.com>
6217
6218         * dwarf2read.c: Include buildsym.h.
6219         (struct dwarf2_cu) <builder>: New method.
6220         (fixup_go_packaging): Update.
6221         (process_full_comp_unit, process_full_type_unit): Update.  Don't
6222         use scoped_free_pendings.
6223         (using_directives): Add "cu" parameter, remove "language".
6224         (read_import_statement, setup_type_unit_groups, )
6225         (read_func_scope, read_lexical_block_scope)
6226         (dwarf2_record_block_ranges, read_namespace): Update.
6227         (lnp_state_machine::lnp_state_machine): Add cu parameter.
6228         (lnp_state_machine::handle_end_sequence): Update.
6229         (class lnp_state_machine) <m_cu>: New member.
6230         <m_record_line_callback>: Remove.
6231         <m_currently_recording_lines>: New member.
6232         (lnp_state_machine::handle_set_file): Update.
6233         (noop_record_line): Remove.
6234         (dwarf_record_line_p): Add cu parameter.
6235         (dwarf_record_line_1, dwarf_finish_line): Likewise.
6236         (lnp_state_machine::record_line)
6237         (lnp_state_machine::lnp_state_machine)
6238         (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
6239         (dwarf_decode_lines): Update.
6240         (dwarf2_start_subfile): Add cu parameter.
6241         (dwarf2_start_symtab, new_symbol): Update.
6242         (macro_start_file, dwarf_decode_macro_bytes): Add cu parameter.
6243         Remove dwarf2_per_objfile parameter.
6244         (dwarf_decode_macros): Update.
6245
6246 2018-07-20  Tom Tromey  <tom@tromey.com>
6247
6248         * stabsread.c (define_symbol): Update.
6249         * buildsym-legacy.h (get_buildsym_compunit): Declare.
6250         * dwarf2read.c (new_symbol): Update.
6251         * cp-support.h (cp_scan_for_anonymous_namespaces): Update.
6252         * cp-namespace.c: Include buildsym.h.
6253         (cp_scan_for_anonymous_namespaces): Add "compunit" parameter.
6254         * buildsym-legacy.c (get_buildsym_compunit): New function.
6255
6256 2018-07-20  Tom Tromey  <tom@tromey.com>
6257
6258         * xcoffread.c: Include buildsym-legacy.h.
6259         * windows-nat.c: Include buildsym-legacy.h.
6260         * stabsread.c: Include buildsym-legacy.h.
6261         * mdebugread.c: Include buildsym-legacy.h.
6262         * buildsym-legacy.h: New file.
6263         * buildsym-legacy.c: New file, from buildsym.c.
6264         * go32-nat.c: Include buildsym-legacy.h.
6265         * dwarf2read.c: Include buildsym-legacy.h.
6266         * dbxread.c: Include buildsym-legacy.h.
6267         * cp-namespace.c: Include buildsym-legacy.h.
6268         * coffread.c: Include buildsym-legacy.h.
6269         * buildsym.h: Move some contents to buildsym-legacy.h.
6270         * buildsym.c: Include buildsym-legacy.h.  Move many functions to
6271         buildsym-legacy.c.
6272         * Makefile.in (HFILES_NO_SRCDIR): Add buildsym-legacy.h.
6273
6274 2018-07-20  Tom Tromey  <tom@tromey.com>
6275
6276         * buildsym.h (struct buildsym_compunit): Move from buildsym.c.
6277         * buildsym.c (struct buildsym_compunit): Move to buildsym.h.
6278         (buildsym_compunit::buildsym_compunit)
6279         (buildsym_compunit::~buildsym_compunit)
6280         (buildsym_compunit::get_macro_table): Define.
6281
6282 2018-07-20  Tom Tromey  <tom@tromey.com>
6283
6284         * buildsym.c (reset_symtab_globals): Remove.
6285         (buildsym_compunit::end_symtab_from_static_block): Update.
6286         (buildsym_compunit::augment_type_symtab): Update.
6287         (end_symtab_from_static_block): Call free_buildsym_compunit.
6288         (augment_type_symtab, end_symtab, end_expandable_symtab):
6289         Likewise.
6290
6291 2018-07-20  Tom Tromey  <tom@tromey.com>
6292
6293         * arch-utils.c: Do not include buildsym.h.
6294         * mipsread.c: Do not include buildsym.h.
6295         * machoread.c: Do not include buildsym.h.
6296         * elfread.c: Do not include buildsym.h.
6297
6298 2018-07-20  Tom Tromey  <tom@tromey.com>
6299
6300         * buildsym.c (buildsym_compunit::buildsym_compunit): Do more
6301         initialization.
6302         (buildsym_compunit): Add new constructor.
6303         (struct buildsym_compunit) <get_last_source_file, finish_block,
6304         record_block_range, start_subfile, patch_subfile_names,
6305         push_subfile, pop_subfile, record_line, get_compunit_symtab,
6306         set_last_source_start_addr, get_last_source_start_addr,
6307         get_local_using_directives, set_local_using_directives,
6308         get_global_using_directives, outermost_context_p,
6309         get_current_context_stack, get_context_stack_depth,
6310         get_current_subfile, get_local_symbols, get_file_symbols,
6311         get_global_symbols, record_debugformat, record_producer,
6312         push_context, pop_context, end_symtab_get_static_block,
6313         end_symtab_from_static_block, end_symtab, end_expandable_symtab>:
6314         New public methods.
6315         <record_pending_block, finish_block_internal, make_blockvector,
6316         watch_main_source_file_lossage, end_symtab_with_blockvector>: New
6317         private methods.
6318         Update all users.
6319
6320 2018-05-22  Tom Tromey  <tom@tromey.com>
6321
6322         * buildsym.c (record_pending_block): Move earlier.  Remove objfile
6323         parameter.
6324         (finish_block_internal): Update.
6325
6326 2018-07-20  Tom Tromey  <tom@tromey.com>
6327
6328         * buildsym.c (record_pending_block): Move earlier.  Remove objfile
6329         parameter.
6330         (finish_block_internal): Update.
6331
6332 2018-07-20  Tom Tromey  <tom@tromey.com>
6333
6334         * buildsym.h (EXTERN): Don't define or undef.
6335         * buildsym.c (EXTERN): Don't define.
6336
6337 2018-07-20  Tom Tromey  <tom@tromey.com>
6338
6339         * buildsym.c: Remove TODO comment.
6340
6341 2018-07-20  Tom Tromey  <tom@tromey.com>
6342
6343         * coffread.c (coff_symtab_read): Update.
6344         * xcoffread.c (xcoff_psymtab_to_symtab_1): Update.
6345         (xcoff_new_init): Update.
6346         * mipsread.c (mipscoff_new_init): Update.
6347         * mdebugread.c (mdebug_build_psymtabs): Update.
6348         * elfread.c (elf_new_init): Update.
6349         * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
6350         Update.
6351         * dbxread.c (dbx_new_init, dbx_psymtab_to_symtab_1)
6352         (coffstab_build_psymtabs, elfstab_build_psymtabs)
6353         (stabsect_build_psymtabs): Update.
6354         * buildsym.h (buildsym_init): Don't declare.
6355         * buildsym.c: Update comment.
6356         (prepare_for_building): Remove.
6357         (start_symtab, restart_symtab): Update.
6358         (reset_symtab_globals): Update comment.
6359         (buildsym_init): Remove.
6360
6361 2018-07-20  Tom Tromey  <tom@tromey.com>
6362
6363         * xcoffread.c (read_xcoff_symtab, process_xcoff_symbol): Update.
6364         * stabsread.c (patch_block_stabs, define_symbol, read_type)
6365         (read_enum_type, common_block_start, common_block_end)
6366         (cleanup_undefined_types_1, finish_global_stabs): Update.
6367         * mdebugread.c (psymtab_to_symtab_1): Update.
6368         * dwarf2read.c (fixup_go_packaging, read_func_scope)
6369         (read_lexical_block_scope, new_symbol): Update.
6370         * dbxread.c (process_one_symbol): Update.
6371         * coffread.c (coff_symtab_read, process_coff_symbol)
6372         (coff_read_enum_type): Update.
6373         * buildsym.h (file_symbols, global_symbols, local_symbols): Don't
6374         declare.
6375         (get_local_symbols, get_file_symbols, get_global_symbols): New
6376         functions.
6377         * buildsym.c (~buildsym_compunit): Clean up m_file_symbols and
6378         m_global_symbols.
6379         <m_file_symbols, m_local_symbols, m_global_symbols>: New members.
6380         (~scoped_free_pendings): Update.
6381         (finish_block, prepare_for_building, reset_symtab_globals)
6382         (end_symtab_get_static_block, end_symtab_with_blockvector)
6383         (augment_type_symtab, push_context): Update.
6384         (get_local_symbols, get_file_symbols, get_global_symbols): New
6385         functions.
6386         (buildsym_init): Update.
6387
6388 2018-07-20  Tom Tromey  <tom@tromey.com>
6389
6390         * dwarf2read.c (process_full_comp_unit): Do not set list_in_scope.
6391         (process_full_type_unit): Likewise.
6392         (dwarf2_start_symtab): Set list_in_scope.
6393
6394 2018-07-20  Tom Tromey  <tom@tromey.com>
6395
6396         * dwarf2read.c (process_psymtab_comp_unit_reader)
6397         (build_type_psymtabs_reader): Do not set list_in_scope.
6398
6399 2018-07-20  Tom Tromey  <tom@tromey.com>
6400
6401         * buildsym.c (free_pendings): Remove.
6402         (add_symbol_to_list, scoped_free_pendings)
6403         (finish_block_internal, buildsym_init): Update.
6404
6405 2018-07-20  Tom Tromey  <tom@tromey.com>
6406
6407         * xcoffread.c (read_xcoff_symtab): Update.
6408         * dwarf2read.c (read_func_scope, read_lexical_block_scope):
6409         Update.
6410         * dbxread.c (process_one_symbol): Update.
6411         * coffread.c (coff_symtab_read): Update.
6412         * buildsym.h (finish_block): Update.
6413         * buildsym.c (finish_block): Remove "listhead" argument.
6414         (end_symtab_get_static_block): Update.
6415
6416 2018-07-20  Tom Tromey  <tom@tromey.com>
6417
6418         * buildsym.h (class scoped_free_pendings): Remove constructor.
6419         * buildsym.c (struct buildsym_compunit) <free_pending_blocks>: New
6420         method.
6421         <m_pending_block_obstack, m_pending_blocks>: New members.
6422         (pending_block_obstack, pending_blocks): Remove.
6423         (scoped_free_pendings::scoped_free_pendings): Default.
6424         (~scoped_free_pendings): Update.
6425         (free_pending_blocks): Remove.
6426         (finish_block_internal, record_pending_block, make_blockvector)
6427         (end_symtab_get_static_block, augment_type_symtab, push_context)
6428         (buildsym_init): Update.
6429
6430 2018-07-20  Tom Tromey  <tom@tromey.com>
6431
6432         * buildsym.c (struct buildsym_compunit) <m_pending_addrmap,
6433         m_pending_addrmap_obstack, m_pending_addrmap_interesting>: New
6434         members.
6435         (pending_addrmap, pending_addrmap_obstack)
6436         (pending_addrmap_interesting): Remove.
6437         (scoped_free_pendings, record_block_range, make_blockvector)
6438         (prepare_for_building, reset_symtab_globals, buildsym_init):
6439         Update.
6440
6441 2018-07-20  Tom Tromey  <tom@tromey.com>
6442
6443         * xcoffread.c (process_linenos): Update.
6444         * stabsread.c (define_symbol, read_type, read_enum_type): Update.
6445         * mdebugread.c (psymtab_to_symtab_1): Update.
6446         * dwarf2read.c (setup_type_unit_groups)
6447         (lnp_state_machine::handle_set_file, dwarf_record_line_p)
6448         (lnp_state_machine::record_line, dwarf_decode_lines): Update.
6449         * dbxread.c (process_one_symbol): Update.
6450         * coffread.c (coff_symtab_read, enter_linenos)
6451         (process_coff_symbol): Update.
6452         * buildsym.h (current_subfile): Don't declare.
6453         (get_current_subfile): Declare.
6454         * buildsym.c (struct buildsym_compunit) <m_current_subfile>: New
6455         member.
6456         (start_subfile, free_buildsym_compunit, push_subfile)
6457         (prepare_for_building, start_symtab): Update.
6458         (get_current_subfile): New function.
6459
6460 2018-07-20  Tom Tromey  <tom@tromey.com>
6461
6462         * coffread.c (coff_symtab_read): Update.
6463         * xcoffread.c (read_xcoff_symtab): Update.
6464         * dwarf2read.c (new_symbol): Update.
6465         (read_func_scope, read_lexical_block_scope): Update.
6466         * dbxread.c (process_one_symbol): Update.
6467         * buildsym.h (context_stack, context_stack_depth): Don't declare.
6468         (outermost_context_p): Remove macro.
6469         (outermost_context_p, get_current_context_stack)
6470         (get_context_stack_depth): Declare.
6471         (pop_context): Return struct context_stack.
6472         * buildsym.c (struct buildsym_compunit) <m_context_stack: New
6473         member.
6474         (context_stack_size): Remove.
6475         (INITIAL_CONTEXT_STACK_SIZE): Remove.
6476         (prepare_for_building, end_symtab_get_static_block)
6477         (augment_type_symtab, push_context): Update.
6478         (pop_context): Return struct context_stack.
6479         (outermost_context_p, get_current_context_stack)
6480         (get_context_stack_depth): New functions.
6481         (buildsym_init): Update.
6482
6483 2018-07-20  Tom Tromey  <tom@tromey.com>
6484
6485         * rust-exp.y: Now a pure parser.  Update all rules.
6486         (%union): Move earlier.
6487         (current_parser, work_obstack): Remove globals.
6488         (rust_parser, ~rust_parser): Update.
6489         (class rust_parser) <copy_name, concat3, crate_name, super_name,
6490         lex_character, lex_number, lex_string, lex_identifier,
6491         rust_lookup_type, convert_params_to_types, convert_ast_to_type,
6492         convert_name, convert_params_to_expression,
6493         convert_ast_to_expression, ast_basic_type, ast_operation,
6494         ast_compound_assignment, rust_op, ast_literal, ast_dliteral,
6495         ast_structop, ast_structop_anonymous, ast_unary, ast_cast,
6496         ast_call_ish, ast_path, ast_string, ast_struct, ast_range,
6497         ast_array_type, ast_slice_type, ast_reference_type,
6498         ast_pointer_type, ast_function_type, ast_tuple_type>: New methods.
6499         (rust_parse): Update.
6500         (rustyyerror, rustyylex): Add parser parameter.
6501         (rust_lex_test_one, rust_lex_int_test, rust_lex_exception_test)
6502         (rust_lex_stringish_test, rust_lex_test_sequence)
6503         (rust_lex_test_trailing_dot, rust_lex_test_completion)
6504         (rust_lex_test_push_back, rust_lex_tests): Update.
6505
6506 2018-07-19  Pedro Alves  <palves@redhat.com>
6507
6508         * guile/guile-internal.h (gdbscm_scm_to_c_string): Now returns a
6509         gdb::unique_xmalloc_ptr.
6510         * guile/scm-breakpoint.c (gdbscm_set_breakpoint_condition_x):
6511         Adjust to use dbscm_wrap and gdb::unique_xmalloc_ptr.
6512         * guile/scm-exception.c (gdbscm_exception_message_to_string): Use
6513         copy-initialization.
6514         * guile/scm-pretty-print.c (ppscm_print_children): Use
6515         gdb::unique_xmalloc_ptr instead of cleanups.
6516         (gdbscm_apply_val_pretty_printer): Remove cleanups.
6517         * guile/scm-string.c (gdbscm_scm_to_c_string): Now returns a
6518         gdb::unique_xmalloc_ptr.
6519         * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
6520         Adjust to use gdb::unique_xmalloc_ptr.
6521         * guile/scm-utils.c (extract_arg): Adjust.
6522         * guile/scm-value.c (gdbscm_value_field): Adjust to use
6523         gdb::unique_xmalloc_ptr instead of a cleanup.
6524
6525 2018-07-19  Tom Tromey  <tom@tromey.com>
6526
6527         * utils.c (do_value_free_to_mark)
6528         (make_cleanup_value_free_to_mark): Remove.
6529         * utils.h (make_cleanup_value_free_to_mark): Remove.
6530
6531 2018-07-19  Pedro Alves  <palves@redhat.com>
6532
6533         * guile/guile-internal.h (gdbscm_wrap): Really make 'args' a
6534         forwarding reference.
6535
6536 2018-07-18  Pedro Alves  <palves@redhat.com>
6537
6538         * guile/guile.c (gdbscm_execute_gdb_command): Adjust to use
6539         gdbscm_wrap.  Use gdb::unique_xmalloc_ptr<char> instead of a
6540         cleanup.
6541
6542 2018-07-18  Pedro Alves  <palves@redhat.com>
6543
6544         * guile/guile-internal.h: Add comment about mixing GDB and Scheme
6545         exceptions.
6546         (GDBSCM_HANDLE_GDB_EXCEPTION_WITH_CLEANUPS): Delete.
6547         (gdbscm_wrap): New.
6548         * guile/scm-frame.c (gdbscm_frame_read_register): Use xfree
6549         directly instead of a cleanup.
6550         * guile/scm-math.c (vlscm_unop_gdbthrow): New, factored out from ...
6551         (vlscm_unop): ... this.  Reimplement using gdbscm_wrap.
6552         (vlscm_binop_gdbthrow): New, factored out from ...
6553         (vlscm_binop): ... this.  Reimplement using gdbscm_wrap.
6554         (vlscm_rich_compare): Use gdbscm_wrap.
6555         * guile/scm-symbol.c (gdbscm_lookup_symbol): Use xfree directly
6556         instead of a cleanup.
6557         (gdbscm_lookup_global_symbol): Use xfree directly instead of a
6558         cleanup.
6559         * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
6560         Use xfree directly instead of a cleanup.
6561         * guile/scm-value.c (gdbscm_make_value, gdbscm_make_lazy_value):
6562         Adjust to use gdbscm_wrap and scoped_value_mark.
6563         (gdbscm_value_optimized_out_p): Adjust to use gdbscm_wrap.
6564         (gdbscm_value_address, gdbscm_value_dereference)
6565         (gdbscm_value_referenced_value): Adjust to use gdbscm_wrap and
6566         scoped_value_mark.
6567         (gdbscm_value_dynamic_type): Use scoped_value_mark.
6568         (vlscm_do_cast, gdbscm_value_field): Adjust to use gdbscm_wrap and
6569         scoped_value_mark.
6570         (gdbscm_value_subscript, gdbscm_value_call): Adjust to use
6571         gdbscm_wrap and scoped_value_mark.
6572         (gdbscm_value_to_string): Use xfree directly instead of a
6573         cleanup.  Move 'buffer' unique_ptr to TRY scope.
6574         (gdbscm_value_to_lazy_string): Use xfree directly instead of a
6575         cleanup.  Move 'buffer' unique_ptr to TRY scope.  Use
6576         scoped_value_mark.
6577         (gdbscm_value_fetch_lazy_x): Use gdbscm_wrap.
6578         (gdbscm_parse_and_eval): Adjust to use gdbscm_wrap and
6579         scoped_value_mark.
6580         (gdbscm_history_ref, gdbscm_history_append_x): Adjust to use
6581         gdbscm_wrap.
6582
6583 2018-07-18  Tom de Vries  <tdevries@suse.de>
6584
6585         * findvar.c (default_read_var_value): Also resolve dynamic type for
6586         LOC_OPTIMIZED_OUT vars.
6587
6588 2018-07-18  Maciej W. Rozycki  <macro@mips.com>
6589
6590         * mips-tdep.c (micromips_next_pc): Add SYSCALL instruction
6591         decoding.
6592
6593 2018-07-17  Tom Tromey  <tom@tromey.com>
6594
6595         * guile/scm-param.c (pascm_set_func, pascm_show_func)
6596         (compute_enum_list, pascm_set_param_value_x)
6597         (gdbscm_parameter_value): Update.
6598         * guile/guile-internal.h (gdbscm_scm_to_string): Update.
6599         (gdbscm_scm_to_host_string): Update.
6600         * guile/scm-math.c (vlscm_convert_typed_value_from_scheme):
6601         Update.
6602         * guile/scm-cmd.c (cmdscm_add_completion): Update.
6603         * guile/scm-pretty-print.c (ppscm_print_string_repr): Update.
6604         * guile/scm-string.c (gdbscm_scm_to_string): Return
6605         unique_xmalloc_ptr.
6606         (gdbscm_scm_to_host_string): Likewise.
6607
6608 2018-07-17  Tom Tromey  <tom@tromey.com>
6609
6610         * guile/guile.c (gdbscm_eval_from_control_command): Update.
6611         * guile/guile-internal.h (gdbscm_safe_eval_string): Update.
6612         * guile/scm-objfile.c (gdbscm_execute_objfile_script): Update.
6613         * guile/scm-safe-call.c (gdbscm_safe_eval_string): Return
6614         unique_xmalloc_ptr.
6615
6616 2018-07-17  Tom Tromey  <tom@tromey.com>
6617
6618         * guile/scm-param.c (pascm_signal_setshow_error): Update.
6619         * guile/guile-internal.h (gdbscm_exception_message_to_string):
6620         Update.
6621         * guile/scm-cmd.c (cmdscm_function): Update.
6622         * guile/scm-pretty-print.c
6623         (ppscm_print_exception_unless_memory_error): Update.
6624         * guile/scm-exception.c (gdbscm_exception_message_to_string):
6625         Return unique_xmalloc_ptr.
6626
6627 2018-07-17  Tom Tromey  <tom@tromey.com>
6628
6629         * guile/scm-pretty-print.c (ppscm_make_pp_type_error_exception):
6630         Use string_printf.
6631
6632 2018-07-17  Jim Wilson  <jimw@sifive.com>
6633
6634         * riscv-tdep.c (riscv_has_feature): Delete comment that refers to
6635         set_gdbarch_decr_pc_after_break.  Call riscv_read_misa_reg always.
6636         (riscv_gdbarch_init): Delete local has_compressed_isa.  Delete now
6637         unecessary braces after EF_RISCV_RVC test.  Delete call to
6638         set_gdbarch_decr_pc_after_break.
6639
6640         * riscv-tdep.h (DECLARE_CSR): Use RISCV_FIRST_CSR_REGNUM instead of
6641         RISCV_LAST_FP_REGNUM + 1.
6642         (RSICV_CSR_LEGACY_MISA_REGNUM): Add RISCV_FIRST_CSR_REGNUM.
6643
6644 2018-07-17  Tom Tromey  <tom@tromey.com>
6645
6646         * configure.ac: Remove --disable-gdbcli.
6647         * configure: Rebuild.
6648         * Makefile.in (SUBDIR_CLI_DEPS, SUBDIR_CLI_LDFLAGS)
6649         (SUBDIR_CLI_CFLAGS): Remove.
6650         (SFILES): Use SUBDIR_CLI_SRCS.
6651         (COMMON_OBS): Use SUBDIR_CLI_OBS.
6652
6653 2018-07-17  Tom Tromey  <tom@tromey.com>
6654
6655         PR gdb/18624:
6656         * coffread.c (coff_symtab_read): Use scoped_free_pendings.
6657
6658 2018-07-16  Jim Wilson  <jimw@sifive.com>
6659
6660         * riscv-tdep.c (riscv_gdbarch_init): Call gdbarch_init_osabi.
6661
6662 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
6663
6664         * ia64-libunwind-tdep.c (libunwind_frame_cache): Remove unused
6665         variable.
6666         (libunwind_frame_sniffer): Likewise.
6667         (libunwind_frame_prev_register): Likewise.
6668         (libunwind_sigtramp_frame_sniffer): Likewise.
6669         * ia64-tdep.c (ia64_access_reg): Likewise.
6670         (ia64_access_rse_reg): Likewise.
6671         (ia64_libunwind_sigtramp_frame_this_id): Likewise.
6672         * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Likewise.
6673
6674 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
6675
6676         * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Add cast.
6677
6678 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
6679
6680         * remote-sim.c (gdbsim_target::close,
6681         gdbsim_target::mourn_inferior): Remove unused variables.
6682
6683 2018-07-16  Simon Marchi  <simon.marchi@polymtl.ca>
6684
6685         * ia64-tdep.c (ktab_buf): New global.
6686         (getunwind_table): Return a gdb::optional<gdb::byte_vector>.
6687         (get_kernel_table): Adjust.
6688
6689 2018-07-16  Tom Tromey  <tom@tromey.com>
6690
6691         * xcoffread.c (read_xcoff_symtab): Use outermost_context_p.
6692         * dwarf2read.c (using_directives, new_symbol): Use
6693         outermost_context_p.
6694         * dbxread.c (process_one_symbol): Use outermost_context_p.
6695         * coffread.c (coff_symtab_read): Use outermost_context_p.
6696
6697 2018-07-16  Tom Tromey  <tom@tromey.com>
6698
6699         * dwarf2read.c (using_directives, read_func_scope)
6700         (read_lexical_block_scope): Update.
6701         * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
6702         * buildsym.h (local_using_directives, global_using_directives):
6703         Don't declare.
6704         (get_local_using_directives, set_local_using_directives)
6705         (get_global_using_directives): Declare.
6706         * buildsym.c (struct buildsym_compunit) <m_local_using_directives,
6707         m_global_using_directives>: New members.
6708         (finish_block_internal, prepare_for_building)
6709         (reset_symtab_globals, end_symtab_get_static_block)
6710         (push_context): Update.
6711         (get_local_using_directives, set_local_using_directives)
6712         (get_global_using_directives): New functions.
6713         (buildsym_init): Update.
6714
6715 2018-07-16  Tom Tromey  <tom@tromey.com>
6716
6717         * xcoffread.c (xcoff_initial_scan): Don't call
6718         free_pending_blocks.
6719         * dbxread.c (dbx_symfile_read): Don't call free_pending_blocks.
6720         * buildsym.h (class scoped_free_pendings): Add constructor.
6721         (free_pending_blocks): Don't declare.
6722         * buildsym.c (scoped_free_pendings::scoped_free_pendings): New.
6723         (free_pending_blocks): Now static.
6724
6725 2018-07-16  Tom Tromey  <tom@tromey.com>
6726
6727         * buildsym.h (push_subfile, pop_subfile): Update declarations.
6728         * buildsym.c (struct buildsym_compunit) <m_subfile_stack>: New
6729         member.
6730         (struct subfile_stack): Remove.
6731         (subfile_stack): Remove.
6732         (push_subfile, pop_subfile, buildsym_init): Update.
6733
6734 2018-07-16  Tom Tromey  <tom@tromey.com>
6735
6736         * buildsym.c (push_subfile): Use gdb_assert.
6737         (pop_subfile): Use gdb_assert.
6738
6739 2018-07-16  Tom Tromey  <tom@tromey.com>
6740
6741         * buildsym.h (merge_symbol_lists): Remove.
6742         * buildsym.c (merge_symbol_lists): Remove.
6743
6744 2018-07-16  Tom Tromey  <tom@tromey.com>
6745
6746         * stabsread.c (scan_file_globals): Update comment.
6747         * stabsread.h (scan_file_globals): Move from buildsym.h.
6748         * buildsym.h (scan_file_globals): Move to stabsread.h.
6749
6750 2018-07-16  Tom Tromey  <tom@tromey.com>
6751
6752         * xcoffread.c (xcoff_new_init): Update.
6753         * mipsread.c (mipscoff_new_init): Update.
6754         * mdebugread.c (mdebug_build_psymtabs): Update.
6755         * elfread.c (elf_new_init): Update.
6756         * dbxread.c (dbx_new_init, coffstab_build_psymtabs)
6757         (elfstab_build_psymtabs, stabsect_build_psymtabs): Update.
6758         * buildsym.h (buildsym_new_init): Don't declare.
6759         * buildsym.c (buildsym_new_init): Remove.
6760
6761 2018-07-16  Tom Tromey  <tom@tromey.com>
6762
6763         * stabsread.h (within_function): Move from buildsym.h.
6764         * stabsread.c (start_stabs): Clear within_function.
6765         * coffread.c (coff_start_symtab): Clear within_function.
6766         * buildsym.h (within_function): Move to stabsread.h.
6767         * buildsym.c (prepare_for_building): Update.
6768
6769 2018-07-16  Tom Tromey  <tom@tromey.com>
6770
6771         * stabsread.h (processing_gcc_compilation): Move from buildsym.h.
6772         * dwarf2read.c (dwarf2_start_symtab): Don't set
6773         processing_gcc_compilation.
6774         * buildsym.h (processing_gcc_compilation): Move to stabsread.h.
6775
6776 2018-07-16  Tom Tromey  <tom@tromey.com>
6777
6778         * stabsread.h (HASHSIZE, hashname, symnum, next_symbol_text)
6779         (next_symbol_text_func): Move from buildsym.h.
6780         * stabsread.c (hashname): Move from buildsym.c.
6781         * buildsym.h (HASHSIZE, symnum, next_symbol_text)
6782         (next_symbol_text_func, hashname): Move to stabsread.h.
6783         * buildsym.c: Don't include bcache.h
6784         (hashname): Move to stasbread.c.
6785
6786 2018-07-16  Tom Tromey  <tom@tromey.com>
6787
6788         * buildsym.h (context_stack_size): Don't declare.
6789         * buildsym.c (context_stack_size): New global.
6790
6791 2018-07-16  Tom Tromey  <tom@tromey.com>
6792
6793         * dbxread.c (processing_acc_compilation): New global.
6794         * buildsym.h (processing_acc_compilation): Don't declare.
6795
6796 2018-07-16  Tom Tromey  <tom@tromey.com>
6797
6798         * xcoffread.c (aix_process_linenos, complete_symtab): Update.
6799         * dbxread.c (read_ofile_symtab): Update.
6800         * coffread.c (coff_start_symtab, coff_end_symtab): Update.
6801         * buildsym.h (last_source_start_addr): Remove.
6802         (set_last_source_start_addr, get_last_source_start_addr):
6803         Declare.
6804         * buildsym.c (buildsym_compunit::buildsym_compunit): Add last_addr
6805         parameter.
6806         (struct buildsym_compunit) <m_last_source_start_addr>: New
6807         member.
6808         (prepare_for_building): Remove start_addr parameter.
6809         (start_symtab, restart_symtab, end_symtab_get_static_block)
6810         (end_symtab_with_blockvector): Update.
6811         (set_last_source_start_addr, get_last_source_start_addr): New
6812         functions.
6813
6814 2018-07-16  Tom Tromey  <tom@tromey.com>
6815
6816         * buildsym.c (struct buildsym_compunit) <m_have_line_numbers>: New
6817         member.
6818         (have_line_numbers): Remove.
6819         (record_line, prepare_for_building, end_symtab_get_static_block)
6820         (augment_type_symtab): Update.
6821
6822 2018-07-16  Tom Tromey  <tom@tromey.com>
6823
6824         * buildsym.c (~buildsym_compunit): Free the macro table.
6825         (struct buildsym_compunit) <get_macro_table, release_macros>: New
6826         methods.
6827         <m_pending_macros>: New member.
6828         (pending_macros): Remove.
6829         (~scoped_free_pendings, get_macro_table, prepare_for_building)
6830         (reset_symtab_globals, end_symtab_get_static_block)
6831         (end_symtab_with_blockvector, augment_type_symtab)
6832         (buildsym_init): Update.
6833
6834 2018-07-16  Tom Tromey  <tom@tromey.com>
6835
6836         * buildsym.c (buildsym_compunit::buildsym_compunit): Add name
6837         parameter.
6838         (buildsym_compunit::set_last_source_file): New method.
6839         <m_last_source_file>: New member.
6840         (prepare_for_building): Remove "name" parameter.
6841         (start_symtab, restart_symtab, reset_symtab_globals): Update.
6842         (last_source_file): Remove.
6843         (set_last_source_file, get_last_source_file): Update.
6844
6845 2018-07-16  Tom Tromey  <tom@tromey.com>
6846
6847         * buildsym.c (prepare_for_building): Add assert.
6848
6849 2018-07-16  Tom Tromey  <tom@tromey.com>
6850
6851         * buildsym.c (~buildsym_compunit): Update.
6852         (struct buildsym_compunit) <comp_unit>: Now a unique_xmalloc_ptr.
6853         (start_subfile, patch_subfile_names)
6854         (end_symtab_with_blockvector): Update.
6855
6856 2018-07-16  Tom Tromey  <tom@tromey.com>
6857
6858         * buildsym.c (struct buildsym_compunit): Add constructor,
6859         destructor, initializers.
6860         (start_buildsym_compunit): Remove.
6861         (free_buildsym_compunit): Use "delete".
6862         (start_symtab, restart_symtab): Use "new".
6863
6864 2018-07-13  Simon Marchi  <simon.marchi@polymtl.ca>
6865
6866         * symfile.c (set_objfile_default_section_offset): Remove struct
6867         keyword.
6868
6869 2018-07-14  Stafford Horne  <shorne@gmail.com>
6870
6871         * (Responsible Maintainers): Add myself as or1k maintainer.
6872
6873 2018-07-13  Tom Tromey  <tom@tromey.com>
6874
6875         * symfile.c (set_objfile_default_section_offset): Use extra braces
6876         around initializer.
6877
6878 2018-07-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6879
6880         * s390-tdep.c (s390_displaced_step_fixup): Adjust PC for a
6881         non-branching basr.
6882
6883 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
6884
6885         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6886         unittests/cli-utils-selftests.c
6887         * unittests/cli-utils-selftests.c: New file.
6888
6889 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
6890
6891         * NEWS: Mention new commands. Mention change to 'thread apply'.
6892
6893 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
6894
6895         * thread.c (thr_try_catch_cmd): New function.
6896         (thread_apply_all_command): Handle qcs flags.
6897         (thread_apply_command): Handle qcs flags.
6898         (taas_command): New function.
6899         (tfaas_command): New function.
6900         (_initialize_thread): Update to setup the new commands 'taas
6901         and 'tfaas'. Change doc string for 'thread apply'.
6902
6903 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
6904
6905         * stack.c: (trailing_outermost_frame): New function, mostly
6906         extracted from backtrace_command_1.
6907         (leading_innermost_frame): New function.
6908         (backtrace_command_1): Update to call trailing_outermost_frame.
6909         (frame_apply_command_count): New function.
6910         (frame_apply_level_command): New function.
6911         (frame_apply_all_command): New function.
6912         (frame_apply_command): New function.
6913         (faas_command): New function.
6914         (frame_cmd_list): New variable.
6915         (_initialize_stack): Update to setup the new commands 'frame apply'
6916         and 'faas'.
6917
6918 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
6919
6920         * cli-utils.c (number_or_range_parser::get_number): Only handle
6921         numbers or convenience var as numbers.
6922         (parse_flags): New function.
6923         (parse_flags_qcs): New function.
6924         (number_or_range_parser::finished): Ensure parsing end is detected
6925         before end of string.
6926         * cli-utils.h (parse_flags): New function.
6927         (parse_flags_qcs): New function.
6928         (number_or_range_parser): Remove m_finished bool.
6929         (number_or_range_parser::skip_range): Set m_in_range to false.
6930
6931 2018-07-12  Sergio Durigan Junior  <sergiodj@redhat.com>
6932
6933         * ser-tcp.c (try_connect): Declare 'ioarg' as 'u_long' if building
6934         on Windows.
6935
6936 2018-07-11  Sergio Durigan Junior  <sergiodj@redhat.com>
6937             Jan Kratochvil  <jan.kratochvil@redhat.com>
6938             Paul Fertser  <fercerpav@gmail.com>
6939             Tsutomu Seki  <sekiriki@gmail.com>
6940             Pedro Alves  <palves@redhat.com>
6941
6942         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6943         'unittests/parse-connection-spec-selftests.c'.
6944         (COMMON_SFILES): Add 'common/netstuff.c'.
6945         (HFILES_NO_SRCDIR): Add 'common/netstuff.h'.
6946         * NEWS (Changes since GDB 8.2): Mention IPv6 support.
6947         * common/netstuff.c: New file.
6948         * common/netstuff.h: New file.
6949         * ser-tcp.c: Include 'netstuff.h' and 'wspiapi.h'.
6950         (wait_for_connect): Update comment.  New parameter
6951         'gdb::optional<int> sock' instead of 'struct serial *scb'.
6952         Use 'sock' directly instead of 'scb->fd'.
6953         (try_connect): New function, with code from 'net_open'.
6954         (net_open): Rewrite main loop to deal with multiple
6955         sockets/addresses.  Handle IPv6-style hostnames; implement
6956         support for IPv6 connections.
6957         * unittests/parse-connection-spec-selftests.c: New file.
6958
6959 2018-07-11  Pedro Alves  <palves@redhat.com>
6960
6961         PR gdb/23377
6962         * remote.c (remote_target::remote_detach_pid): Call
6963         set_current_process.
6964
6965 2018-07-11  Pedro Alves  <palves@redhat.com>
6966
6967         * h8300-tdep.c (h8300_gdbarch_init): Remove
6968         set_gdbarch_ecoff_reg_to_regnum calls.
6969
6970 2018-07-11  Sergio Durigan Junior  <sergiodj@redhat.com>
6971
6972         PR c++/23373
6973         * c-typeprint.c (c_type_print_base_struct_union): Don't print
6974         offsets/sizes for static members of a class/struct.
6975
6976 2018-07-11  Alan Hayward  <alan.hayward@arm.com>
6977
6978         * target-descriptions.c (tdesc_register_bitsize): Rename.
6979         * target-descriptions.h (tdesc_register_bitsize): Likewise.
6980         * rs6000-tdep.c (rs6000_gdbarch_init): Use new name.
6981         * aarch64-tdep.c (aarch64_get_tdesc_vq): Convert size.
6982
6983 2018-07-10  Tom Tromey  <tom@tromey.com>
6984
6985         * breakpoint.c (moribund_locations): Now static and a
6986         std::vector.
6987         (breakpoint_init_inferior, moribund_breakpoint_here_p)
6988         (build_bpstat_chain, update_global_location_list)
6989         (breakpoint_retire_moribund): Update.
6990         * breakpoint.h (bp_location_p): Remove typedef.  Don't declare
6991         VEC.
6992
6993 2018-07-10  Andrew Burgess  <andrew.burgess@embecosm.com>
6994
6995         * riscv-tdep.c (riscv_is_fp_regno_p): New function.
6996         (riscv_register_reggroup_p): Use new function, remove unneeded
6997         parenthesis.
6998         (riscv_push_dummy_call): Extend assert to compare against xlen or
6999         flen based on register type.
7000
7001 2018-07-10  Andrew Burgess  <andrew.burgess@embecosm.com>
7002
7003         * riscv-tdep.c (riscv_print_arg_location): Use TYPE_SAFE_NAME.
7004
7005 2018-07-09  Andrew Burgess  <andrew.burgess@embecosm.com>
7006
7007         * remote.c (show_hardware_watchpoint_limit): New function.
7008         (show_hardware_watchpoint_length_limit): New function.
7009         (show_hardware_breakpoint_limit): New function.
7010         (_initialize_remote): Use add_setshow_zuinteger_unlimited_cmd
7011         where appropriate, update help text.
7012
7013 2018-07-09  Tom Tromey  <tom@tromey.com>
7014
7015         * Makefile.in (CDEPS): Don't mention XM_CDEPS.
7016         (CLIBS): Don't mention NAT_CLIBS.
7017
7018 2018-07-09  Tom Tromey  <tom@tromey.com>
7019
7020         * Makefile.in (ADD_FILES, ADD_DEPS): Remove.
7021         (LIBGDB_OBS, clean mostlyclean): Update.
7022         (gdb$(EXEEXT), insight$(EXEEXT)): Update.
7023
7024 2018-07-09  Tom Tromey  <tom@tromey.com>
7025
7026         * Makefile.in (%.c: %.y): Use ECHO_YACC.
7027         (%.c: %.l): Use ECHO_LEX.  Just fail if flex not available.
7028         * silent-rules.mk (ECHO_YACC, ECHO_LEX): New variables.
7029
7030 2018-07-09  Tom Tromey  <tom@tromey.com>
7031
7032         * Makefile.in (ALLDEPFILES): Remove exec.c.
7033         (COMMON_OBS): Remove exec.o.
7034         (COMMON_SFILES): Add exec.c.
7035
7036 2018-07-09  Tom Tromey  <tom@tromey.com>
7037
7038         * Makefile.in (LINT, LINTFLAGS, LINTFILES, lint): Remove.
7039
7040 2018-07-09  Tom Tromey  <tom@tromey.com>
7041
7042         * Makefile.in (clean mostlyclean): Remove stamp-version.
7043         (version.c): Depend on stamp-version.
7044         (stamp-version): New rule, from version.c rule.
7045
7046 2018-07-09  Tom Tromey  <tom@tromey.com>
7047
7048         * Makefile.in (init.c): Depend on stamp-init.
7049         (stamp-init): New rule, from init.c rule.
7050         (clean mostlyclean): Remove stamp-init.
7051
7052 2018-07-09  Tom Tromey  <tom@tromey.com>
7053
7054         * Makefile.in (INIT_FILES): Remove CONFIG_SRCS,
7055         SUBDIR_GCC_COMPILE_SRCS.
7056
7057 2018-07-09  Tom Tromey  <tom@tromey.com>
7058
7059         * Makefile.in (init.c): Remove some unused sed rules.
7060
7061 2018-07-09  Tom Tromey  <tom@tromey.com>
7062
7063         * Makefile.in (TSOBS): Remove.
7064         (INIT_FILES): Update.
7065         (LIBGDB_OBS): Update.
7066         (COMMON_SFILES): Add inflow.c.
7067         (SFILES): Remove inflow.c.
7068
7069 2018-07-07  Jan Kratochvil  <jan.kratochvil@redhat.com>
7070
7071         * contrib/gdb-add-index.sh ($dwarf5): New, use it.
7072
7073 2018-07-07  Simon Marchi  <simon.marchi@polymtl.ca>
7074
7075         * ia64-libunwind-tdep.c (get_reg_name, get_fpreg_name,
7076         get_saveloc_name, is_signal_frame_name, step_name,
7077         init_remote_name, create_addr_space_name,
7078         destroy_addr_space_name, search_unwind_table_name,
7079         find_dyn_list_name): Constify.
7080
7081 2018-07-05  Simon Marchi  <simon.marchi@polymtl.ca>
7082
7083         * darwin-nat.c (darwin_pthread_kill): New function.
7084         (darwin_resume_thread): Use darwin_pthread_kill.
7085
7086 2018-07-05  Tom de Vries  <tdevries@suse.de>
7087
7088         * macroexp.c (macro_buffer) <operator=>: New member function.
7089
7090 2018-07-04  Tom Tromey  <tom@tromey.com>
7091
7092         * darwin-nat.c (darwin_attach_pid): Use exit_inferior.
7093
7094 2018-07-04  Simon Marchi  <simon.marchi@polymtl.ca>
7095
7096         * common/common-defs.h (HAVE_USEFUL_SBRK): Define.
7097         * main.c: Use HAVE_USEFUL_SBRK instead of HAVE_SBRK.
7098         * maint.c: Likewise.
7099         * top.c: Likewise.
7100
7101 2018-07-04  Joel Brobecker  <brobecker@adacore.com>
7102
7103         * NEWS: Create a new section for the next release branch.
7104         Rename the section of the current branch, now that it has
7105         been cut.
7106
7107 2018-07-04  Joel Brobecker  <brobecker@adacore.com>
7108
7109         GDB 8.2 branch created (1b919490e8ba30bf1d6941df0ed112b0e557017e):
7110         * version.in: Bump version to 8.2.50.DATE-git.
7111
7112 2018-07-04  Vyacheslav Barinov  <v.barinov@samsung.com>
7113             Pedro Alves  <palves@redhat.com>
7114
7115         * linux-nat.c (linux_init_ptrace): Rename to ...
7116         (linux_init_ptrace_procfs): ... this.  Call
7117         linux_proc_init_warnings.
7118         (linux_nat_target::post_attach)
7119         (linux_nat_target::post_startup_inferior): Adjust.
7120         * nat/linux-procfs.c (linux_proc_init_warnings): Define function.
7121         * nat/linux-procfs.h (linux_proc_init_warnings): Declare function.
7122
7123 2018-07-04  Tom de Vries  <tdevries@suse.de>
7124
7125         * dwarf2read.c (error_check_comp_unit_head): Move dwarf version
7126         check ...
7127         (read_comp_unit_head): ... here.
7128
7129 2018-07-03  Tom Tromey  <tom@tromey.com>
7130
7131         * tracepoint.c (process_tracepoint_on_disconnect, start_tracing)
7132         (stop_tracing, tstatus_command)
7133         (find_matching_tracepoint_location, merge_uploaded_tracepoints)
7134         (print_one_static_tracepoint_marker): Update.
7135         * breakpoint.c (static_tracepoints_here, all_tracepoints): Return
7136         std::vector.
7137         * breakpoint.h (breakpoint_p): Remove typedef.  Don't declare
7138         VEC.
7139         (all_tracepoints, static_tracepoints_here): Return std::vector.
7140
7141 2018-07-03  Tom Tromey  <tom@tromey.com>
7142
7143         * common/ptid.c (ptid_equal): Remove.
7144         * common/ptid.h (ptid_equal): Don't declare.
7145         * ada-tasks.c: Update.
7146         * breakpoint.c: Update.
7147         * common/agent.c: Update.
7148         * corelow.c: Update.
7149         * darwin-nat-info.c: Update.
7150         * darwin-nat.c: Update.
7151         * dcache.c: Update.
7152         * dtrace-probe.c: Update.
7153         * dummy-frame.c: Update.
7154         * fbsd-nat.c: Update.
7155         * frame.c: Update.
7156         * gdbthread.h: Update.
7157         * gnu-nat.c: Update.
7158         * go32-nat.c: Update.
7159         * inf-loop.c: Update.
7160         * inf-ptrace.c: Update.
7161         * infcall.c: Update.
7162         * infcmd.c: Update.
7163         * inflow.c: Update.
7164         * infrun.c: Update.
7165         * linux-fork.c: Update.
7166         * linux-nat.c: Update.
7167         * linux-thread-db.c: Update.
7168         * mi/mi-cmd-var.c: Update.
7169         * mi/mi-interp.c: Update.
7170         * mi/mi-main.c: Update.
7171         * nto-procfs.c: Update.
7172         * ppc-linux-tdep.c: Update.
7173         * procfs.c: Update.
7174         * python/py-inferior.c: Update.
7175         * python/py-record-btrace.c: Update.
7176         * python/py-record.c: Update.
7177         * ravenscar-thread.c: Update.
7178         * regcache.c: Update.
7179         * remote-sim.c: Update.
7180         * remote.c: Update.
7181         * sol-thread.c: Update.
7182         * solib.c: Update.
7183         * target.c: Update.
7184         * tui/tui-stack.c: Update.
7185         * varobj.c: Update.
7186         * windows-nat.c: Update.
7187         * windows-tdep.c: Update.
7188
7189 2018-07-03  Tom Tromey  <tom@tromey.com>
7190
7191         * common/ptid.c (ptid_match): Remove.
7192         * common/ptid.h (ptid_match): Don't declare.
7193         * fbsd-nat.c: Update.
7194         * infcmd.c: Update.
7195         * infrun.c: Update.
7196         * linux-nat.c: Update.
7197         * record-btrace.c: Update.
7198         * regcache.c: Update.
7199         * remote.c: Update.
7200
7201 2018-07-03  Tom Tromey  <tom@tromey.com>
7202
7203         * common/ptid.c (ptid_tid_p): Remove.
7204         * common/ptid.h (ptid_tid_p): Don't declare.
7205         * sol-thread.c: Update.
7206
7207 2018-07-03  Tom Tromey  <tom@tromey.com>
7208
7209         * common/ptid.c (ptid_lwp_p): Remove.
7210         * common/ptid.h (ptid_lwp_p): Don't declare.
7211         * fbsd-nat.c: Update.
7212         * linux-nat.c: Update.
7213         * nat/linux-procfs.c: Update.
7214         * nat/x86-linux-dregs.c: Update.
7215         * sol-thread.c: Update.
7216
7217 2018-07-03  Tom Tromey  <tom@tromey.com>
7218
7219         * common/ptid.c (ptid_is_pid): Remove.
7220         * common/ptid.h (ptid_is_pid): Don't declare.
7221         * infrun.c: Update.
7222         * linux-nat.c: Update.
7223         * mi/mi-interp.c: Update.
7224         * remote.c: Update.
7225         * thread.c: Update.
7226
7227 2018-07-03  Tom Tromey  <tom@tromey.com>
7228
7229         * common/ptid.c (ptid_get_tid): Remove.
7230         * common/ptid.h (ptid_get_tid): Don't declare.
7231         * ada-tasks.c: Update.
7232         * aix-thread.c: Update.
7233         * bsd-uthread.c: Update.
7234         * darwin-nat.c: Update.
7235         * fbsd-nat.c: Update.
7236         * i386-darwin-nat.c: Update.
7237         * infrun.c: Update.
7238         * linux-tdep.c: Update.
7239         * nto-procfs.c: Update.
7240         * ppc-ravenscar-thread.c: Update.
7241         * python/py-infthread.c: Update.
7242         * ravenscar-thread.c: Update.
7243         * sol-thread.c: Update.
7244         * sparc-ravenscar-thread.c: Update.
7245         * windows-nat.c: Update.
7246
7247 2018-07-03  Tom Tromey  <tom@tromey.com>
7248
7249         * common/ptid.c (ptid_get_lwp): Remove.
7250         * common/ptid.h (ptid_get_lwp): Don't declare.
7251         * aarch64-linux-nat.c: Update.
7252         * ada-tasks.c: Update.
7253         * aix-thread.c: Update.
7254         * amd64-linux-nat.c: Update.
7255         * arm-linux-nat.c: Update.
7256         * corelow.c: Update.
7257         * fbsd-nat.c: Update.
7258         * fbsd-tdep.c: Update.
7259         * gnu-nat.c: Update.
7260         * i386-cygwin-tdep.c: Update.
7261         * i386-gnu-nat.c: Update.
7262         * i386-linux-nat.c: Update.
7263         * ia64-linux-nat.c: Update.
7264         * inf-ptrace.c: Update.
7265         * infrun.c: Update.
7266         * linux-fork.c: Update.
7267         * linux-nat.c: Update.
7268         * linux-tdep.c: Update.
7269         * linux-thread-db.c: Update.
7270         * mips-linux-nat.c: Update.
7271         * nat/aarch64-linux-hw-point.c: Update.
7272         * nat/aarch64-linux.c: Update.
7273         * nat/linux-btrace.c: Update.
7274         * nat/linux-osdata.c: Update.
7275         * nat/linux-procfs.c: Update.
7276         * nat/x86-linux-dregs.c: Update.
7277         * obsd-nat.c: Update.
7278         * ppc-fbsd-nat.c: Update.
7279         * ppc-linux-nat.c: Update.
7280         * procfs.c: Update.
7281         * python/py-infthread.c: Update.
7282         * ravenscar-thread.c: Update.
7283         * remote.c: Update.
7284         * s390-linux-nat.c: Update.
7285         * sol-thread.c: Update.
7286         * sol2-tdep.c: Update.
7287         * spu-linux-nat.c: Update.
7288         * x86-linux-nat.c: Update.
7289         * xtensa-linux-nat.c: Update.
7290
7291 2018-07-03  Tom Tromey  <tom@tromey.com>
7292
7293         * common/ptid.c (ptid_get_pid): Remove.
7294         * common/ptid.h (ptid_get_pid): Don't declare.
7295         * aarch64-linux-nat.c: Update.
7296         * ada-lang.c: Update.
7297         * aix-thread.c: Update.
7298         * alpha-bsd-nat.c: Update.
7299         * amd64-fbsd-nat.c: Update.
7300         * amd64-linux-nat.c: Update.
7301         * arm-linux-nat.c: Update.
7302         * arm-nbsd-nat.c: Update.
7303         * auxv.c: Update.
7304         * break-catch-syscall.c: Update.
7305         * breakpoint.c: Update.
7306         * bsd-uthread.c: Update.
7307         * corelow.c: Update.
7308         * ctf.c: Update.
7309         * darwin-nat.c: Update.
7310         * fbsd-nat.c: Update.
7311         * fbsd-tdep.c: Update.
7312         * gcore.c: Update.
7313         * gnu-nat.c: Update.
7314         * hppa-nbsd-nat.c: Update.
7315         * hppa-obsd-nat.c: Update.
7316         * i386-fbsd-nat.c: Update.
7317         * ia64-linux-nat.c: Update.
7318         * inf-ptrace.c: Update.
7319         * infcmd.c: Update.
7320         * inferior.c: Update.
7321         * inferior.h: Update.
7322         * inflow.c: Update.
7323         * infrun.c: Update.
7324         * linux-fork.c: Update.
7325         * linux-nat.c: Update.
7326         * linux-tdep.c: Update.
7327         * linux-thread-db.c: Update.
7328         * m68k-bsd-nat.c: Update.
7329         * mi/mi-interp.c: Update.
7330         * mi/mi-main.c: Update.
7331         * mips-linux-nat.c: Update.
7332         * mips-nbsd-nat.c: Update.
7333         * mips64-obsd-nat.c: Update.
7334         * nat/aarch64-linux-hw-point.c: Update.
7335         * nat/aarch64-linux.c: Update.
7336         * nat/linux-btrace.c: Update.
7337         * nat/linux-osdata.c: Update.
7338         * nat/linux-procfs.c: Update.
7339         * nat/x86-linux-dregs.c: Update.
7340         * nto-procfs.c: Update.
7341         * obsd-nat.c: Update.
7342         * ppc-linux-nat.c: Update.
7343         * ppc-nbsd-nat.c: Update.
7344         * ppc-obsd-nat.c: Update.
7345         * proc-service.c: Update.
7346         * procfs.c: Update.
7347         * python/py-inferior.c: Update.
7348         * python/py-infthread.c: Update.
7349         * ravenscar-thread.c: Update.
7350         * record.c: Update.
7351         * remote-sim.c: Update.
7352         * remote.c: Update.
7353         * rs6000-nat.c: Update.
7354         * s390-linux-nat.c: Update.
7355         * sh-nbsd-nat.c: Update.
7356         * sol-thread.c: Update.
7357         * sparc-nat.c: Update.
7358         * sparc64-tdep.c: Update.
7359         * spu-linux-nat.c: Update.
7360         * spu-tdep.c: Update.
7361         * target-debug.h: Update.
7362         * target.c: Update.
7363         * thread.c: Update.
7364         * tid-parse.c: Update.
7365         * tracefile-tfile.c: Update.
7366         * vax-bsd-nat.c: Update.
7367         * windows-nat.c: Update.
7368         * x86-linux-nat.c: Update.
7369         * x86-nat.c: Update.
7370
7371 2018-07-03  Tom Tromey  <tom@tromey.com>
7372
7373         * common/ptid.c (pid_to_ptid): Remove.
7374         * common/ptid.h (pid_to_ptid): Don't declare.
7375         * aix-thread.c: Update.
7376         * arm-linux-nat.c: Update.
7377         * common/ptid.c: Update.
7378         * common/ptid.h: Update.
7379         * corelow.c: Update.
7380         * ctf.c: Update.
7381         * darwin-nat.c: Update.
7382         * fbsd-nat.c: Update.
7383         * fork-child.c: Update.
7384         * gnu-nat.c: Update.
7385         * go32-nat.c: Update.
7386         * inf-ptrace.c: Update.
7387         * infcmd.c: Update.
7388         * inferior.c: Update.
7389         * infrun.c: Update.
7390         * linux-fork.c: Update.
7391         * linux-nat.c: Update.
7392         * nat/aarch64-linux-hw-point.c: Update.
7393         * nat/fork-inferior.c: Update.
7394         * nat/x86-linux-dregs.c: Update.
7395         * nto-procfs.c: Update.
7396         * obsd-nat.c: Update.
7397         * procfs.c: Update.
7398         * progspace.c: Update.
7399         * remote.c: Update.
7400         * rs6000-nat.c: Update.
7401         * s390-linux-nat.c: Update.
7402         * sol-thread.c: Update.
7403         * spu-linux-nat.c: Update.
7404         * target.c: Update.
7405         * top.c: Update.
7406         * tracefile-tfile.c: Update.
7407         * windows-nat.c: Update.
7408
7409 2018-07-03  Tom Tromey  <tom@tromey.com>
7410
7411         * common/ptid.h (ptid_build): Don't declare.
7412         * common/ptid.c (ptid_build): Remove.
7413         * aix-thread.c: Update.
7414         * bsd-kvm.c: Update.
7415         * bsd-uthread.c: Update.
7416         * common/agent.c: Update.
7417         * common/ptid.c: Update.
7418         * common/ptid.h: Update.
7419         * corelow.c: Update.
7420         * darwin-nat.c: Update.
7421         * fbsd-nat.c: Update.
7422         * gnu-nat.c: Update.
7423         * linux-fork.c: Update.
7424         * linux-nat.c: Update.
7425         * linux-thread-db.c: Update.
7426         * nat/linux-osdata.c: Update.
7427         * nat/linux-procfs.c: Update.
7428         * nto-procfs.c: Update.
7429         * obsd-nat.c: Update.
7430         * proc-service.c: Update.
7431         * procfs.c: Update.
7432         * ravenscar-thread.c: Update.
7433         * remote-sim.c: Update.
7434         * remote.c: Update.
7435         * sol-thread.c: Update.
7436         * target.c: Update.
7437         * windows-nat.c: Update.
7438
7439 2018-07-03  Tom Tromey  <tom@tromey.com>
7440
7441         * infrun.c (follow_exec): Use exit_inferior_silent.
7442         * inferior.c (exit_inferior_num_silent): Remove.
7443         * inferior.h (exit_inferior_num_silent): Don't declare.
7444
7445 2018-07-03  Tom Tromey  <tom@tromey.com>
7446
7447         PR cli/23340:
7448         * darwin-nat.c (darwin_attach_pid): Reset inferior and
7449         inferior_ptid on error.
7450
7451 2018-07-02  Maciej W. Rozycki  <macro@mips.com>
7452             Simon Marchi  <simon.marchi@polymtl.ca>
7453
7454         PR tdep/8282
7455         * disasm.h (gdb_disassembler): Add
7456         `m_disassembler_options_holder'. member
7457         * disasm.c (get_all_disassembler_options): New function.
7458         (gdb_disassembler::gdb_disassembler): Use it.
7459         (gdb_buffered_insn_length_init_dis): Likewise.
7460         (gdb_buffered_insn_length): Adjust accordingly.
7461         (set_disassembler_options): Handle options with arguments.
7462         (show_disassembler_options_sfunc): Likewise.  Add a leading new
7463         line if showing options with descriptions.
7464         (disassembler_options_completer): Adapt to using the
7465         `disasm_options_and_args_t' structure.
7466         * mips-tdep.c (mips_disassembler_options): New variable.
7467         (mips_disassembler_options_o32): Likewise.
7468         (mips_disassembler_options_n32): Likewise.
7469         (mips_disassembler_options_n64): Likewise.
7470         (gdb_print_insn_mips): Don't set `disassembler_options'.
7471         (gdb_print_insn_mips_n32, gdb_print_insn_mips_n64): Remove
7472         functions.
7473         (mips_gdbarch_init): Always set `gdbarch_print_insn' to
7474         `gdb_print_insn_mips'.  Set `gdbarch_disassembler_options',
7475         `gdbarch_disassembler_options_implicit' and
7476         `gdbarch_valid_disassembler_options'.
7477         * arm-tdep.c (_initialize_arm_tdep): Adapt to using the
7478         `disasm_options_and_args_t' structure.
7479         * gdbarch.sh (disassembler_options_implicit): New `gdbarch'
7480         method.
7481         (valid_disassembler_options): Switch from `disasm_options_t' to
7482         the `disasm_options_and_args_t' structure.
7483         * NEWS: Document `set disassembler-options' support for the MIPS
7484         target.
7485         * gdbarch.h: Regenerate.
7486         * gdbarch.c: Regenerate.
7487
7488 2018-07-02  Sebastian Huber  <sebastian.huber@embedded-brains.de>
7489
7490         * riscv-tdep.c (riscv_register_aliases): Swap "fp" and "s0" entries.
7491
7492 2018-06-29  Joel Brobecker  <brobecker@adacore.com>
7493
7494         * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Add missing
7495         parameter in call to amd64_target_description.
7496         * amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise.
7497         * amd64-fbsd-tdep.c (amd64fbsd_core_read_description)
7498         (amd64fbsd_init_abi): Likewise.
7499         * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
7500         * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
7501         * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
7502         * amd64-fbsd-nat.c (amd64_fbsd_nat_target): Likewise.
7503
7504 2018-06-29  Pedro Alves  <palves@redhat.com>
7505
7506         * gdb/amd64-tdep.h (amd64_create_target_description): Add
7507         "segments" parameter.
7508         * gdb/amd64-tdep.c (amd64_none_init_abi, amd64_x32_none_init_abi)
7509         (_initialize_amd64_tdep): Update call to
7510         amd64_create_target_description.
7511         (amd64_target_description): Add "segments" parameter.  Adjust
7512         the implementation to use it.
7513         * gdb/amd64-linux-tdep.c (amd64_linux_read_description): Update
7514         call to amd64_create_target_description.
7515         * gdb/amd64-windows-tdep.c (amd64_windows_init_abi): Likewise.
7516         * gdb/arch/amd64.h (amd64_create_target_description): Add
7517         "segments" register.
7518         * gdb/arch/amd64.c (amd64_create_target_description): Add
7519         "segments" parameter.  Call create_feature_i386_64bit_segments
7520         only if SEGMENTS is true.
7521         * gdb/gdbserver/win32-i386-low.c (i386_arch_setup): Update
7522         call to amd64_create_target_description.
7523
7524 2018-06-29  Pedro Alves  <palves@redhat.com>
7525
7526         * thread.c (thread_target_id_str): New, factored out from ...
7527         (print_thread_info_1): ... here.  Use it to compute the max
7528         "Target Id" column width.
7529
7530 2018-06-29  Pedro Alves  <palves@redhat.com>
7531
7532         * remote.c (remote_target::extra_thread_info): Delete
7533         'display_buf' and 'n' locals.  from the cache, regardless of
7534         packet mechanims is in use.  Use cache for qThreadExtra and qP
7535         methods too.
7536
7537 2018-06-29  Pedro Alves  <palves@redhat.com>
7538
7539         * blockframe.c (find_pc_sect_containing_function): New function.
7540         * breakpoint.c (print_breakpoint_location): Don't call
7541         find_pc_sect_function.
7542         * linespec.c (create_sals_line_offset): Record the location's
7543         symbol in the sal.
7544         * linespec.c (convert_address_location_to_sals): Fill in sal's
7545         symbol with find_pc_sect_containing_function.
7546         * symtab.c (find_function_start_sal): Rename to ...
7547         (find_function_start_sal_1): ... this.
7548         (find_function_start_sal): Reimplement as wrapper around
7549         find_function_start_sal_1, and use
7550         find_pc_sect_containing_function to fill in the sal's symbol.
7551         (find_function_start_sal(symbol*, bool)): Adjust.
7552         * symtab.h (find_pc_function, find_pc_sect_function): Adjust
7553         comments.
7554         (find_pc_sect_containing_function): Declare.
7555
7556 2018-06-29  Pedro Alves  <palves@redhat.com>
7557
7558         * inline-frame.c (stopped_by_user_bp_inline_frame): Return
7559         true if the the location has no symbol.
7560
7561 2018-06-28  Tom Tromey  <tom@tromey.com>
7562
7563         * NEWS: Mention --enable-codesign.
7564         * silent-rules.mk (ECHO_SIGN): New variable.
7565         * configure.ac: Add --enable-codesign.
7566         * configure: Rebuild.
7567         * Makefile.in (CODESIGN, CODESIGN_CERT): New variables.
7568         (gdb$(EXEEXT)): Optionally invoke codesign.
7569
7570 2018-06-28  Pedro Alves  <palves@redhat.com>
7571
7572         * gdbthread.h (struct thread_suspend_state) <stop_pc>: Extend
7573         comments.
7574         (switch_to_thread_no_regs): Adjust comment.
7575         * infcmd.c (stop_pc): Delete.
7576         (post_create_inferior, info_program_command): Replace references
7577         to stop_pc with references to thread_info->suspend.stop_pc.
7578         * inferior.h (stop_pc): Delete declaration.
7579         * infrun.c (proceed, handle_syscall_event, fill_in_stop_func)
7580         (handle_inferior_event_1, handle_signal_stop)
7581         (process_event_stop_test, keep_going_stepped_thread)
7582         (handle_step_into_function, handle_step_into_function_backward)
7583         (print_stop_location): Replace references to stop_pc with
7584         references to thread_info->suspend.stop_pc.
7585         (struct infcall_suspend_state) <stop_pc>: Delete field.
7586         (save_infcall_suspend_state, restore_infcall_suspend_state):
7587         Remove references to inf_stat->stop_pc.
7588         * linux-fork.c (fork_load_infrun_state): Likewise.
7589         * record-btrace.c (record_btrace_set_replay): Likewise.
7590         * record-full.c (record_full_goto_entry): Likewise.
7591         * remote.c (print_one_stopped_thread): Likewise.
7592         * target.c (target_resume): Extend comment.
7593         * thread.c (set_executing_thread): New.
7594         (set_executing): Use it.
7595         (switch_to_thread_no_regs, switch_to_no_thread, switch_to_thread):
7596         Remove references to stop_pc.
7597
7598 2018-06-28  Pedro Alves  <palves@redhat.com>
7599
7600         * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>:
7601         Moving fetching stop_pc until after ecs->event_thread is refreshed.
7602
7603 2018-06-28  Tom Tromey  <tom@tromey.com>
7604
7605         * coffread.c (coff_symfile_finish): Update.
7606         * xcoffread.c (xcoff_symfile_finish): Update.
7607         * elfread.c (elf_symfile_finish): Update.
7608         * symfile.h (dwarf2_free_objfile): Don't declare.
7609         * dwarf2read.c (_initialize_dwarf2_read): Use
7610         register_objfile_data_with_cleanup.
7611         (dwarf2_free_objfile): Now static.  Change signature.
7612
7613 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
7614
7615         * symfile.c (add_symbol_file_command, _initialize_symfile): Add
7616         option "-o" to add-symbol-file-load to add an offset to each
7617         section's load address.
7618         * symfile.c (set_objfile_default_section_offset): New function.
7619
7620 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
7621
7622         * symfile.c (add_symbol_file_command): Make sure that sections
7623         with the same name are sorted in the same order.
7624
7625 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
7626
7627         * symfile.c (add_symbol_file_command, _initialize_symfile): Do not
7628         require the second argument.  If omitted, load sections at the
7629         addresses specified in the file.
7630
7631 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
7632
7633         * symfile.c (symbol_file_command, symbol_file_add_main_1)
7634         (_initialize_symfile): Add option "-o" to symbol-file to add an
7635         offset to each section of the symbol file.
7636
7637 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
7638
7639         * MAINTAINERS (Write After Approval): Add Petr Tesarik.
7640
7641 2018-06-27  Tom Tromey  <tom@tromey.com>
7642
7643         * stack.c (_initialize_stack): Update "func" help text.
7644
7645 2018-06-27  Tom Tromey  <tom@tromey.com>
7646
7647         * python/py-unwind.c (unwind_info_object) <saved_regs>: Now a
7648         std::vector.
7649         (unwind_infopy_str, pyuw_create_unwind_info)
7650         (unwind_infopy_add_saved_register, pyuw_sniffer)
7651         (unwind_infopy_dealloc, unwind_infopy_add_saved_register):
7652         Update.
7653         (struct saved_reg): Add constructor.
7654         <value>: Now a gdbpy_ref<>.
7655
7656 2018-06-27  Tom Tromey  <tom@tromey.com>
7657
7658         * machoread.c (macho_symfile_read): Define "symbol_table" earlier.
7659
7660 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
7661
7662         * gdb-gdb.py.in: Format using autopep8.
7663
7664 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
7665
7666         * gdb-gdb.py.in (CoreAddrPrettyPrinter): New class.
7667         (type_lookup_function): Recognize CORE_ADDR values.
7668
7669 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
7670
7671         * gdb-gdb.py.in (StructMainTypePrettyPrinter) <to_string>: Don't
7672         print tag_name.
7673
7674 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
7675
7676         * gdb-gdb.py.in (TypeFlag) <__cmp__>: Remove.
7677         <__lt__>: Add.
7678
7679 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
7680
7681         * gdb-gdb.py: Move to...
7682         * gdb-gdb.py.in: ... here.
7683         * configure.ac (AC_CONFIG_FILES): Add gdb-gdb.py.
7684         * Makefile.in (all): Add gdb-gdb.gdb and gdb-gdb.py as
7685         dependencies.
7686         (distclean): Remove gdb-gdb.py when cleaning.
7687         (gdb-gdb.py, gdb-gdb.gdb): New rules.
7688         * configure: Re-generate.
7689
7690 2018-06-27  Pedro Alves  <palves@redhat.com>
7691
7692         * proc-service.c (get_ps_regcache): New.
7693         (ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
7694         (ps_lsetfpregs): Use it.
7695
7696 2018-06-27  Omair Javaid  <omair.javaid@linaro.org>
7697
7698         PR gdb/21695
7699         * dwarf2read.c (lnp_state_machine::check_line_address): Update
7700         declaration.
7701         (dwarf_decode_lines_1): Adjust.
7702
7703 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
7704
7705         * fbsd-nat.h (class fbsd_nat_target) <find_memory_regions>: Add
7706         override.
7707         <info_proc>: Likewise.
7708
7709 2018-06-26  Joel Brobecker  <brobecker@adacore.com>
7710
7711         * windows-nat.c (do_windows_fetch_inferior_registers): Rename
7712         to windows_fetch_one_register, and only handle the case of
7713         fetching one register.  Move the code that reloads the context
7714         and iterates over all registers if R is negative to...
7715         (windows_nat_target::fetch_registers): ... here.
7716         (do_windows_store_inferior_registers): Rename to
7717         windows_store_one_register, and only handle the case of storing
7718         one register.  Move the code that handles the case where r is
7719         negative to...
7720         (windows_nat_target::store_registers) ... here.
7721
7722 2018-06-26  Tom Tromey  <tom@tromey.com>
7723
7724         PR rust/22574:
7725         * typeprint.c (whatis_exp): Allow ptype/o for Rust.
7726         * rust-lang.c (rust_print_struct_def): Add podata parameter.
7727         Update.
7728         (rust_internal_print_type): Add podata parameter.
7729         (rust_print_type): Update.
7730
7731 2018-06-26  Tom Tromey  <tom@tromey.com>
7732
7733         * typeprint.h (struct print_offset_data) <update, finish,
7734         maybe_print_hole>: New methods.
7735         <indentation>: New constant.
7736         * typeprint.c (print_offset_data::indentation): Define.
7737         (print_offset_data::maybe_print_hole, print_offset_data::update)
7738         (print_offset_data::finish): Move from c-typeprint.c and rename.
7739         * c-typeprint.c (OFFSET_SPC_LEN): Remove.
7740         (print_spaces_filtered_with_print_options): Update.
7741         (c_print_type_union_field_offset, maybe_print_hole)
7742         (c_print_type_struct_field_offset): Move to typeprint.c and
7743         rename.
7744         (c_type_print_base_struct_union): Update.
7745
7746 2018-06-25  Pedro Alves  <palves@redhat.com>
7747
7748         * gdbthread.h (thread_info_ref, delete_thread)
7749         (delete_thread_silent, first_thread_of_inferior)
7750         (any_thread_of_inferior, switch_to_thread)
7751         (enable_thread_stack_temporaries)
7752         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
7753         (get_last_thread_stack_temporary)
7754         (value_in_thread_stack_temporaries, can_access_registers_thread):
7755         Spell out "struct thread_info" instead of just "thread_info".
7756         * inferior.h (notice_new_inferior): Likewise.
7757
7758 2018-06-25  Pedro Alves  <palves@redhat.com>
7759
7760         * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
7761         pass thread_info pointer to delete_thread.
7762         (windows_nat_target::detach): Pass inferior pointer to
7763         detach_inferior.
7764         * aix-thread.c (sync_threadlists): Pass thread_info pointer to
7765         delete_thread.
7766         * bsd-kvm.c (bsd_kvm_target::close): Use discard_all_inferiors.
7767         * darwin-nat.c (darwin_check_new_threads): Use find_thread_ptid
7768         and pass a thread_info pointer to delete_thread.
7769         * fbsd-nat.c (fbsd_nat_target::wait): Use find_thread_ptid and
7770         pass thread_info pointer to delete_thread.
7771         * go32-nat.c (go32_nat_target::mourn_inferior): Remove
7772         delete_thread_silent call.
7773         * procfs.c (procfs_target::detach): Pass inferior pointer to
7774         detach_inferior.
7775         (procfs_target::wait): Pass thread_info pointer to delete_thread.
7776         * remote-sim.c (gdbsim_target::mourn_inferior): Remove
7777         delete_thread_silent call.
7778         * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
7779         pass thread_info pointer to delete_thread.
7780         (windows_nat_target::detach): Pass inferior pointer to
7781         delete_inferior.
7782
7783 2018-06-22  Alan Hayward  <alan.hayward@arm.com>
7784
7785         * regcache.c (readable_regcache::read_part): Fix asserts.
7786         (reg_buffer::raw_collect_part): New function.
7787         (regcache::write_part): Fix asserts.
7788         (reg_buffer::raw_supply_part): New function.
7789         (regcache::transfer_regset_register): New helper function.
7790         (regcache::transfer_regset): Call new functions.
7791         (regcache_supply_regset): Use gdb_byte*.
7792         (regcache::supply_regset): Likewise.
7793         (regcache_collect_regset): Likewise.
7794         (regcache::collect_regset): Likewise.
7795         * regcache.h (reg_buffer::raw_collect_part): New declaration.
7796         (reg_buffer::raw_supply_part): Likewise.
7797         (regcache::transfer_regset_register): Likewise.
7798         (regcache::transfer_regset): Use gdb_byte*.
7799
7800 2018-06-22  Alan Hayward  <alan.hayward@arm.com>
7801
7802         * nat/aarch64-sve-linux-ptrace.h (HAS_SVE_STATE): Use &.
7803
7804 2018-06-21  Pedro Alves  <palves@redhat.com>
7805
7806         * ada-lang.h (ada_get_task_number): Take a thread_info pointer
7807         instead of a ptid_t.  All callers adjusted.
7808         * ada-tasks.c (ada_get_task_number): Likewise.  All callers
7809         adjusted.
7810         (print_ada_task_info, display_current_task_id, task_command_1):
7811         Adjust.
7812         * breakpoint.c (watchpoint_in_thread_scope): Adjust to use
7813         inferior_thread.
7814         (breakpoint_kind): Adjust.
7815         (remove_breakpoints_pid): Rename to ...
7816         (remove_breakpoints_inf): ... this.  Adjust to take an inferior
7817         pointer.  All callers adjusted.
7818         (bpstat_clear_actions): Use inferior_thread.
7819         (get_bpstat_thread): New.
7820         (bpstat_do_actions): Use it.
7821         (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust
7822         to take a thread_info pointer.  All callers adjusted.
7823         (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint)
7824         (breakpoint_re_set_thread): Use inferior_thread.
7825         * breakpoint.h (struct inferior): Forward declare.
7826         (bpstat_stop_status): Update.
7827         (remove_breakpoints_pid): Delete.
7828         (remove_breakpoints_inf): New.
7829         * bsd-uthread.c (bsd_uthread_target::wait)
7830         (bsd_uthread_target::update_thread_list): Use find_thread_ptid.
7831         * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch)
7832         (maint_btrace_packet_history_cmd)
7833         (maint_btrace_clear_packet_history_cmd): Adjust.
7834         (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use
7835         inferior_thread.
7836         * cli/cli-interp.c: Include "inferior.h".
7837         * common/refcounted-object.h (struct
7838         refcounted_object_ref_policy): New.
7839         * compile/compile-object-load.c: Include gdbthread.h.
7840         (store_regs): Use inferior_thread.
7841         * corelow.c (core_target::close): Use current_inferior.
7842         (core_target_open): Adjust to use first_thread_of_inferior and use
7843         the current inferior.
7844         * ctf.c (ctf_target::close): Adjust to use current_inferior.
7845         * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ...
7846         <thread>: ... this new field.  All references adjusted.
7847         (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor):
7848         Take a thread_info pointer instead of a ptid_t.
7849         * dummy-frame.h (dummy_frame_push, dummy_frame_pop)
7850         (dummy_frame_discard, register_dummy_frame_dtor): Take a
7851         thread_info pointer instead of a ptid_t.
7852         * elfread.c: Include "inferior.h".
7853         (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop):
7854         Use inferior_thread.
7855         * eval.c (evaluate_subexp): Likewise.
7856         * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use
7857         inferior_thread.
7858         * gdb_proc_service.h (struct thread_info): Forward declare.
7859         (struct ps_prochandle) <ptid>: Delete, replaced by ...
7860         <thread>: ... this new field.  All references adjusted.
7861         * gdbarch.h, gdbarch.c: Regenerate.
7862         * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a
7863         'thread' parameter.  All implementations and callers adjusted.
7864         * gdbthread.h (thread_info) <set_running>: New method.
7865         (delete_thread, delete_thread_silent): Take a thread_info pointer
7866         instead of a ptid.
7867         (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete.
7868         (first_thread_of_process): Delete, replaced by ...
7869         (first_thread_of_inferior): ... this new function.  All callers
7870         adjusted.
7871         (any_live_thread_of_process): Delete, replaced by ...
7872         (any_live_thread_of_inferior): ... this new function.  All callers
7873         adjusted.
7874         (switch_to_thread, switch_to_no_thread): Declare.
7875         (is_executing): Delete.
7876         (enable_thread_stack_temporaries): Update comment.
7877         <enable_thread_stack_temporaries>: Take a thread_info pointer
7878         instead of a ptid_t.  Incref the thread.
7879         <~enable_thread_stack_temporaries>: Decref the thread.
7880         <m_ptid>: Delete
7881         <m_thr>: New.
7882         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
7883         (get_last_thread_stack_temporary)
7884         (value_in_thread_stack_temporaries, can_access_registers_thread):
7885         Take a thread_info pointer instead of a ptid_t.  All callers
7886         adjusted.
7887         * infcall.c (get_call_return_value): Use inferior_thread.
7888         (run_inferior_call): Work with thread pointers instead of ptid_t.
7889         (call_function_by_hand_dummy): Work with thread pointers instead
7890         of ptid_t.  Use thread_info_ref.
7891         * infcmd.c (proceed_thread_callback): Access thread's state
7892         directly.
7893         (ensure_valid_thread, ensure_not_running): Use inferior_thread,
7894         access thread's state directly.
7895         (continue_command): Use inferior_thread.
7896         (info_program_command): Use find_thread_ptid and access thread
7897         state directly.
7898         (proceed_after_attach_callback): Use thread state directly.
7899         (notice_new_inferior): Take a thread_info pointer instead of a
7900         ptid_t.  All callers adjusted.
7901         (exit_inferior): Take an inferior pointer instead of a pid.  All
7902         callers adjusted.
7903         (exit_inferior_silent): New.
7904         (detach_inferior): Delete.
7905         (valid_gdb_inferior_id, pid_to_gdb_inferior_id)
7906         (gdb_inferior_id_to_pid, in_inferior_list): Delete.
7907         (detach_inferior_command, kill_inferior_command): Use
7908         find_inferior_id instead of valid_gdb_inferior_id and
7909         gdb_inferior_id_to_pid.
7910         (inferior_command): Use inferior and thread pointers.
7911         * inferior.h (struct thread_info): Forward declare.
7912         (notice_new_inferior): Take a thread_info pointer instead of a
7913         ptid_t.  All callers adjusted.
7914         (detach_inferior): Delete declaration.
7915         (exit_inferior, exit_inferior_silent): Take an inferior pointer
7916         instead of a pid.  All callers adjusted.
7917         (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
7918         (valid_gdb_inferior_id): Delete.
7919         * infrun.c (follow_fork_inferior, proceed_after_vfork_done)
7920         (handle_vfork_child_exec_or_exit, follow_exec): Adjust.
7921         (struct displaced_step_inferior_state) <pid>: Delete, replaced by
7922         ...
7923         <inf>: ... this new field.
7924         <step_ptid>: Delete, replaced by ...
7925         <step_thread>: ... this new field.
7926         (get_displaced_stepping_state): Take an inferior pointer instead
7927         of a pid.  All callers adjusted.
7928         (displaced_step_in_progress_any_inferior): Adjust.
7929         (displaced_step_in_progress_thread): Take a thread pointer instead
7930         of a ptid_t.  All callers adjusted.
7931         (displaced_step_in_progress, add_displaced_stepping_state): Take
7932         an inferior pointer instead of a pid.  All callers adjusted.
7933         (get_displaced_step_closure_by_addr): Adjust.
7934         (remove_displaced_stepping_state): Take an inferior pointer
7935         instead of a pid.  All callers adjusted.
7936         (displaced_step_prepare_throw, displaced_step_prepare)
7937         (displaced_step_fixup): Take a thread pointer instead of a ptid_t.
7938         All callers adjusted.
7939         (start_step_over): Adjust.
7940         (infrun_thread_ptid_changed): Remove bit updating ptids in the
7941         displaced step queue.
7942         (do_target_resume): Adjust.
7943         (fetch_inferior_event): Use inferior_thread.
7944         (context_switch, get_inferior_stop_soon): Take an
7945         execution_control_state pointer instead of a ptid_t.  All callers
7946         adjusted.
7947         (switch_to_thread_cleanup): Delete.
7948         (stop_all_threads): Use scoped_restore_current_thread.
7949         * inline-frame.c: Include "gdbthread.h".
7950         (inline_state) <inline_state>: Take a thread pointer instead of a
7951         ptid_t.  All callers adjusted.
7952         <ptid>: Delete, replaced by ...
7953         <thread>: ... this new field.
7954         (find_inline_frame_state): Take a thread pointer instead of a
7955         ptid_t.  All callers adjusted.
7956         (skip_inline_frames, step_into_inline_frame)
7957         (inline_skipped_frames, inline_skipped_symbol): Take a thread
7958         pointer instead of a ptid_t.  All callers adjusted.
7959         * inline-frame.h (skip_inline_frames, step_into_inline_frame)
7960         (inline_skipped_frames, inline_skipped_symbol): Likewise.
7961         * linux-fork.c (delete_checkpoint_command): Adjust to use thread
7962         pointers directly.
7963         * linux-nat.c (get_detach_signal): Likewise.
7964         * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter.
7965         (thread_db_notice_clone): Adjust.
7966         (thread_db_find_new_threads_silently)
7967         (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take
7968         a thread pointer instead of a ptid_t.  All callers adjusted.
7969         * mi/mi-cmd-var.c: Include "inferior.h".
7970         (mi_cmd_var_update_iter): Update to use thread pointers.
7971         * mi/mi-interp.c (mi_new_thread): Update to use the thread's
7972         inferior directly.
7973         (mi_output_running_pid, mi_inferior_count): Delete, bits factored
7974         out to ...
7975         (mi_output_running): ... this new function.
7976         (mi_on_resume_1): Adjust to use it.
7977         (mi_user_selected_context_changed): Adjust to use inferior_thread.
7978         * mi/mi-main.c (proceed_thread): Adjust to use thread pointers
7979         directly.
7980         (interrupt_thread_callback): : Adjust to use thread and inferior
7981         pointers.
7982         * proc-service.c: Include "gdbthread.h".
7983         (ps_pglobal_lookup): Adjust to use the thread's inferior directly.
7984         * progspace-and-thread.c: Include "inferior.h".
7985         * progspace.c: Include "inferior.h".
7986         * python/py-exitedevent.c (create_exited_event_object): Adjust to
7987         hold a reference to an inferior_object.
7988         * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use
7989         inferior_thread.
7990         * python/py-inferior.c (struct inferior_object): Give the type a
7991         tag name instead of a typedef.
7992         (python_on_normal_stop): No need to check if the current thread is
7993         listed.
7994         (inferior_to_inferior_object): Change return type to
7995         inferior_object.  All callers adjusted.
7996         (find_thread_object): Delete, bits factored out to ...
7997         (thread_to_thread_object): ... this new function.
7998         * python/py-infthread.c (create_thread_object): Use
7999         inferior_to_inferior_object.
8000         (thpy_is_stopped): Use thread pointer directly.
8001         (gdbpy_selected_thread): Use inferior_thread.
8002         * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete
8003         field, replaced with ...
8004         <thread>: ... this new field.  All users adjusted.
8005         (btpy_insn_or_gap_new): Drop const.
8006         (btpy_list_new): Take a thread pointer instead of a ptid_t.  All
8007         callers adjusted.
8008         * python/py-record.c: Include "gdbthread.h".
8009         (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
8010         a ptid_t.  All callers adjusted.
8011         (gdbpy_current_recording): Use inferior_thread.
8012         * python/py-record.h (recpy_record_object) <ptid>: Delete
8013         field, replaced with ...
8014         <thread>: ... this new field.  All users adjusted.
8015         (recpy_element_object) <ptid>: Delete
8016         field, replaced with ...
8017         <thread>: ... this new field.  All users adjusted.
8018         (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
8019         a ptid_t.  All callers adjusted.
8020         * python/py-threadevent.c: Include "gdbthread.h".
8021         (get_event_thread): Use thread_to_thread_object.
8022         * python/python-internal.h (struct inferior_object): Forward
8023         declare.
8024         (find_thread_object, find_inferior_object): Delete declarations.
8025         (thread_to_thread_object, inferior_to_inferior_object): New
8026         declarations.
8027         * record-btrace.c: Include "inferior.h".
8028         (require_btrace_thread): Use inferior_thread.
8029         (record_btrace_frame_sniffer)
8030         (record_btrace_tailcall_frame_sniffer): Use inferior_thread.
8031         (get_thread_current_frame): Use scoped_restore_current_thread and
8032         switch_to_thread.
8033         (get_thread_current_frame): Use thread pointer directly.
8034         (record_btrace_replay_at_breakpoint): Use thread's inferior
8035         pointer directly.
8036         * record-full.c: Include "inferior.h".
8037         * regcache.c: Include "gdbthread.h".
8038         (get_thread_arch_regcache): Use the inferior's address space
8039         directly.
8040         (get_thread_regcache, registers_changed_thread): New.
8041         * regcache.h (get_thread_regcache(thread_info *thread)): New
8042         overload.
8043         (registers_changed_thread): New.
8044         (remote_target) <remote_detach_1>: Swap order of parameters.
8045         (remote_add_thread): <remote_add_thread>: Return the new thread.
8046         (get_remote_thread_info(ptid_t)): New overload.
8047         (remote_target::remote_notice_new_inferior): Use thread pointers
8048         directly.
8049         (remote_target::process_initial_stop_replies): Use
8050         thread_info::set_running.
8051         (remote_target::remote_detach_1, remote_target::detach)
8052         (extended_remote_target::detach): Adjust.
8053         * stack.c (frame_show_address): Use inferior_thread.
8054         * target-debug.h (target_debug_print_thread_info_pp): New.
8055         * target-delegates.c: Regenerate.
8056         * target.c (default_thread_address_space): Delete.
8057         (memory_xfer_partial_1): Use current_inferior.
8058         (target_detach): Use current_inferior.
8059         (target_thread_address_space): Delete.
8060         (generic_mourn_inferior): Use current_inferior.
8061         * target.h (struct target_ops) <thread_address_space>: Delete.
8062         (target_thread_address_space): Delete.
8063         * thread.c (init_thread_list): Use ALL_THREADS_SAFE.  Use thread
8064         pointers directly.
8065         (delete_thread_1, delete_thread, delete_thread_silent): Take a
8066         thread pointer instead of a ptid_t.  Adjust all callers.
8067         (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete.
8068         (first_thread_of_process): Delete, replaced by ...
8069         (first_thread_of_inferior): ... this new function.  All callers
8070         adjusted.
8071         (any_thread_of_process): Rename to ...
8072         (any_thread_of_inferior): ... this, and take an inferior pointer.
8073         (any_live_thread_of_process): Rename to ...
8074         (any_live_thread_of_inferior): ... this, and take an inferior
8075         pointer.
8076         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
8077         (value_in_thread_stack_temporaries)
8078         (get_last_thread_stack_temporary): Take a thread pointer instead
8079         of a ptid_t.  Adjust all callers.
8080         (thread_info::set_running): New.
8081         (validate_registers_access): Use inferior_thread.
8082         (can_access_registers_ptid): Rename to ...
8083         (can_access_registers_thread): ... this, and take a thread
8084         pointer.
8085         (print_thread_info_1): Adjust to compare thread pointers instead
8086         of ptids.
8087         (switch_to_no_thread, switch_to_thread): Make extern.
8088         (scoped_restore_current_thread::~scoped_restore_current_thread):
8089         Use m_thread pointer directly.
8090         (scoped_restore_current_thread::scoped_restore_current_thread):
8091         Use inferior_thread.
8092         (thread_command): Use thread pointer directly.
8093         (thread_num_make_value_helper): Use inferior_thread.
8094         * top.c (execute_command): Use inferior_thread.
8095         * tui/tui-interp.c: Include "inferior.h".
8096         * varobj.c (varobj_create): Use inferior_thread.
8097         (value_of_root_1): Use find_thread_global_id instead of
8098         global_thread_id_to_ptid.
8099
8100 2018-06-21  Alan Hayward  <alan.hayward@arm.com>
8101
8102         * regcache.c (readable_regcache::read_part): Avoid memcpy when
8103         possible.
8104         (regcache::write_part): Likewise.
8105         (readable_regcache::cooked_read_part): Update comment.
8106         (readable_regcache::cooked_write_part): Likewise.
8107         * regcache.h: (readable_regcache::read_part): Likewise.
8108         (regcache::write_part): Likewise.
8109
8110 2018-06-21  Richard Bunt  <richard.bunt@arm.com>
8111             Dirk Schubert  <dirk.schubert@arm.com>
8112
8113         * aarch64-linux-nat.c (post_attach): New.
8114         (aarch64_linux_nat_target::post_attach): Override post_attach to
8115         record the number of hardware debug registers.
8116
8117 2018-06-20  Tom Tromey  <tom@tromey.com>
8118
8119         * python/py-param.c (add_setshow_generic): Make parameters const.
8120         (parmpy_init): Update.
8121
8122 2018-06-20  Simon Marchi  <simon.marchi@polymtl.ca>
8123
8124         * regcache.h (regcache_cooked_read_ftype): Rename to...
8125         (register_read_ftype): ...this, change type to function_view.
8126         (class reg_buffer) <save>: Remove src parameter.
8127         (readonly_detached_regcache) <readonly_detached_regcache>: Make
8128         parameter non-const in first overload.  Remove src parameter in
8129         second overload.
8130         * regcache.c (do_cooked_read): Remove.
8131         (readonly_detached_regcache::readonly_detached_regcache): Make
8132         parameter non-const, adjust call to other constructor.
8133         (reg_buffer::save): Remove src parameter.
8134         * frame.c (do_frame_register_read): Remove.
8135         (frame_save_as_regcache): Use lambda function.
8136         * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
8137         parameter to ppu2spu_data *.
8138         (ppu2spu_sniffer): Use lambda function.
8139
8140 2018-06-20  Simon Marchi  <simon.marchi@polymtl.ca>
8141
8142         * record-full.c (record_full_target::insert_breakpoint): Remove
8143         "struct" keyword, add const.
8144
8145 2018-06-19  Simon Marchi  <simon.marchi@ericsson.com>
8146
8147         * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
8148         PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
8149         * configure.ac: Remove AC_PREREQ, add missing quoting.
8150         * gnulib/configure.ac: Modernize usage of
8151         AC_INIT/AM_INIT_AUTOMAKE.  Remove AC_PREREQ.
8152         * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
8153         (AUTOMAKE_VERSION): Bump to 1.15.1.
8154         * configure: Re-generate.
8155         * config.in: Re-generate.
8156         * aclocal.m4: Re-generate.
8157         * gnulib/aclocal.m4: Re-generate.
8158         * gnulib/config.in: Re-generate.
8159         * gnulib/configure: Re-generate.
8160         * gnulib/import/Makefile.in: Re-generate.
8161
8162 2018-06-19  Pedro Alves  <palves@redhat.com>
8163
8164         * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
8165         (lookup_minimal_symbol_by_pc_section): ... here with
8166         gdb_assert_not_reached added.
8167
8168 2018-06-19  Pedro Alves  <palves@redhat.com>
8169
8170         * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
8171         parameter with a block parameter.  Compare location's block symbol
8172         with the frame's block instead of addresses.
8173         (skip_inline_frames): Pass the current block instead of the
8174         frame's address.  Break out as soon as we determine the frame
8175         should not be skipped.
8176
8177 2018-06-18  Tom Tromey  <tom@tromey.com>
8178
8179         * solib-aix.c (solib_aix_get_section_offsets): Return
8180         unique_xmalloc_ptr.
8181         (solib_aix_solib_create_inferior_hook): Update.
8182
8183 2018-06-18  Tom Tromey  <tom@tromey.com>
8184
8185         * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
8186
8187 2018-06-18  Tom Tromey  <tom@tromey.com>
8188
8189         * solib-frv.c (frv_relocate_main_executable): Use
8190         unique_xmalloc_ptr.
8191         * solib-dsbt.c (dsbt_relocate_main_executable): Use
8192         unique_xmalloc_ptr.
8193
8194 2018-06-18  Tom Tromey  <tom@tromey.com>
8195
8196         * objfiles.h (inhibit_section_map_updates): Update.
8197         (resume_section_map_updates, resume_section_map_updates_cleanup):
8198         Remove.
8199         * solib-svr4.c (svr4_handle_solib_event): Update.
8200         * objfiles.c (inhibit_section_map_updates): Return
8201         scoped_restore_tmpl<int>.
8202         (resume_section_map_updates, resume_section_map_updates_cleanup):
8203         Remove.
8204
8205 2018-06-18  Tom Tromey  <tom@tromey.com>
8206
8207         * valprint.h (read_string): Update.
8208         * valprint.c (read_string): Change type of "buffer".
8209         (val_print_string): Update.
8210         * python/py-value.c (valpy_string): Update.
8211         * language.h (struct language_defn) <la_get_string>: Change
8212         type of "buffer".
8213         (default_get_string, c_get_string): Update.
8214         * language.c (default_get_string): Change type of "buffer".
8215         * guile/scm-value.c (gdbscm_value_to_string): Update.
8216         * c-lang.c (c_get_string): Change type of "buffer".
8217
8218 2018-06-18  Tom Tromey  <tom@tromey.com>
8219
8220         * ser-mingw.c (struct pipe_state_destroyer): New.
8221         (pipe_state_up): New typedef.
8222         (cleanup_pipe_state): Remove.
8223         (pipe_windows_open): Use pipe_state_up.  Don't release argv.
8224
8225 2018-06-18  Tom Tromey  <tom@tromey.com>
8226
8227         * rust-lang.h (rust_yyerror): Don't declare.
8228         * rust-lang.c (rust_language_defn): Update.
8229         * rust-exp.y (yyerror): Now static.
8230         * parse.c (parse_exp_in_context_1): Update.
8231         * p-lang.h (p_yyerror): Don't declare.
8232         * p-lang.c (p_language_defn): Update.
8233         * p-exp.y (yyerror): Now static.
8234         * opencl-lang.c (opencl_language_defn): Update.
8235         * objc-lang.c (objc_language_defn): Update.
8236         * m2-lang.h (m2_yyerror): Don't declare.
8237         * m2-lang.c (m2_language_defn): Update.
8238         * m2-exp.y (yyerror): Now static.
8239         * language.h (struct language_defn) <la_error>: Remove.
8240         * language.c (unk_lang_error): Remove.
8241         (unknown_language_defn, auto_language_defn): Remove.
8242         * go-lang.h (go_yyerror): Don't declare.
8243         * go-lang.c (go_language_defn): Update.
8244         * go-exp.y (yyerror): Now static.
8245         * f-lang.h (f_yyerror): Don't declare.
8246         * f-lang.c (f_language_defn): Update.
8247         * f-exp.y (yyerror): Now static.
8248         * d-lang.h (d_yyerror): Don't declare.
8249         * d-lang.c (d_language_defn): Update.
8250         * d-exp.y (yyerror): Now static.
8251         * c-lang.h (c_yyerror): Don't declare.
8252         * c-lang.c (c_language_defn, cplus_language_defn)
8253         (asm_language_defn, minimal_language_defn): Update.
8254         * c-exp.y (yyerror): Now static.
8255         * ada-lang.h (ada_yyerror): Don't declare.
8256         * ada-lang.c (ada_language_defn): Update.
8257         * ada-exp.y (yyerror): Now static.
8258
8259 2018-06-18  Alan Hayward  <alan.hayward@arm.com>
8260
8261         * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
8262         (store_sveregs_to_thread): Likewise.
8263         (aarch64_linux_fetch_inferior_registers): Check for SVE.
8264         (aarch64_linux_store_inferior_registers): Likewise.
8265         * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
8266         function.
8267         (aarch64_sve_regs_copy_to_regcache): Likewise.
8268         (aarch64_sve_regs_copy_from_regcache): Likewise.
8269         * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
8270         declaration.
8271         (aarch64_sve_regs_copy_to_regcache): Likewise.
8272         (aarch64_sve_regs_copy_from_regcache): Likewise.
8273         (sve_context): Structure from Linux headers.
8274         (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
8275         (SVE_SIG_ZREG_SIZE): Likewise.
8276         (SVE_SIG_PREG_SIZE): Likewise.
8277         (SVE_SIG_FFR_SIZE): Likewise.
8278         (SVE_SIG_REGS_OFFSET): Likewise.
8279         (SVE_SIG_ZREGS_OFFSET): Likewise.
8280         (SVE_SIG_ZREG_OFFSET): Likewise.
8281         (SVE_SIG_ZREGS_SIZE): Likewise.
8282         (SVE_SIG_PREGS_OFFSET): Likewise.
8283         (SVE_SIG_PREG_OFFSET): Likewise.
8284         (SVE_SIG_PREGS_SIZE): Likewise.
8285         (SVE_SIG_FFR_OFFSET): Likewise.
8286         (SVE_SIG_REGS_SIZE): Likewise.
8287         (SVE_SIG_CONTEXT_SIZE): Likewise.
8288         (SVE_PT_REGS_MASK): Likewise.
8289         (SVE_PT_REGS_FPSIMD): Likewise.
8290         (SVE_PT_REGS_SVE): Likewise.
8291         (SVE_PT_VL_INHERIT): Likewise.
8292         (SVE_PT_VL_ONEXEC): Likewise.
8293         (SVE_PT_REGS_OFFSET): Likewise.
8294         (SVE_PT_FPSIMD_OFFSET): Likewise.
8295         (SVE_PT_FPSIMD_SIZE): Likewise.
8296         (SVE_PT_SVE_ZREG_SIZE): Likewise.
8297         (SVE_PT_SVE_PREG_SIZE): Likewise.
8298         (SVE_PT_SVE_FFR_SIZE): Likewise.
8299         (SVE_PT_SVE_FPSR_SIZE): Likewise.
8300         (SVE_PT_SVE_FPCR_SIZE): Likewise.
8301         (__SVE_SIG_TO_PT): Likewise.
8302         (SVE_PT_SVE_OFFSET): Likewise.
8303         (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
8304         (SVE_PT_SVE_ZREG_OFFSET): Likewise.
8305         (SVE_PT_SVE_ZREGS_SIZE): Likewise.
8306         (SVE_PT_SVE_PREGS_OFFSET): Likewise.
8307         (SVE_PT_SVE_PREG_OFFSET): Likewise.
8308         (SVE_PT_SVE_PREGS_SIZE): Likewise.
8309         (SVE_PT_SVE_FFR_OFFSET): Likewise.
8310         (SVE_PT_SVE_FPSR_OFFSET): Likewise.
8311         (SVE_PT_SVE_FPCR_OFFSET): Likewise.
8312         (SVE_PT_SVE_SIZE): Likewise.
8313         (SVE_PT_SIZE): Likewise.
8314         (HAS_SVE_STATE): New define.
8315
8316 2018-06-18  Alan Hayward  <alan.hayward@arm.com>
8317
8318         * nat/aarch64-sve-linux-sigcontext.h: New file.
8319         * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
8320         new files.
8321         (SVE_VQ_MIN): Likewise.
8322         (SVE_VQ_MAX): Likewise.
8323         (SVE_VL_MIN): Likewise.
8324         (SVE_VL_MAX): Likewise.
8325         (SVE_NUM_ZREGS): Likewise.
8326         (SVE_NUM_PREGS): Likewise.
8327         (sve_vl_valid): Likewise.
8328         (struct user_sve_header): Likewise.
8329
8330 2018-06-16  Andrew Burgess  <andrew.burgess@embecosm.com>
8331             Richard Bunt <Richard.Bunt@arm.com>
8332
8333         * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
8334         was requested by GDB.
8335
8336 2018-06-15  Tom de Vries  <tdevries@suse.de>
8337
8338         * MAINTAINERS (Write After Approval): Add Tom de Vries.
8339
8340 2018-06-14  Simon Marchi  <simon.marchi@polymtl.ca>
8341
8342         * gnulib/update-gnulib.sh: Print expected versions of
8343         autoconf/aclocal.
8344
8345 2018-06-14  Simon Marchi  <simon.marchi@ericsson.com>
8346
8347         * arch-utils.c (default_type_align): Use type_length_units.
8348         * gdbtypes.c (type_align): Use type_length_units.
8349
8350 2018-06-14  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
8351
8352         * cli/cli-script.c (_initialize_cli_script): Fix online documentation
8353         of 'define' command.
8354
8355 2018-06-14  Tom de Vries  <tdevries@suse.de>
8356
8357         PR cli/22573
8358         * infcmd.c (print_return_value_1): Use get_user_print_options instead of
8359         get_no_prettyformat_print_options.
8360
8361 2018-06-13  Simon Marchi  <simon.marchi@ericsson.com>
8362
8363         * sparc-nat.h: Include target.h.
8364         * sparc64-linux-nat.c (class sparc64_linux_nat_target)
8365         <fetch_registers>: Remove this argument in function call.
8366         <store_registers>: Remove this argument in function call, remove
8367         extra semicolon.
8368         <low_forget_process>: Call sparc64_forget_process instead of
8369         sparc_forget_process.
8370
8371 2018-06-13  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
8372
8373         * procfs.c (_initialize_procfs): Use add_inf_child_target.
8374         (procfs_target::make_corefile_notes): Adjust to new
8375         target_read_alloc return type.
8376
8377 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
8378             Stephen Roberts  <stephen.roberts@arm.com>
8379
8380         PR gdb/22882
8381         * infrun.c (fetch_inferior_event): If GDB is not proceeding then
8382         run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
8383         Move should_notify_stop local into more inner scope.
8384
8385 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
8386             Stephen Roberts  <stephen.roberts@arm.com>
8387
8388         PR gdb/22882
8389         * infrun.c (resume_1): Add call to mark_async_event_handler.
8390
8391 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
8392
8393         * infrun.c (do_target_wait): Change old version of $pc printed.
8394
8395 2018-06-11  Simon Marchi  <simon.marchi@ericsson.com>
8396
8397         * dwarf2read.c (read_index_from_section): Rename to...
8398         (read_gdb_index_from_section): ... this, update all callers.
8399         (dwarf2_read_index): Rename to...
8400         (dwarf2_read_gdb_index): ... this, update all callers.
8401
8402 2018-06-11  John David Anglin  <danglin@gcc.gnu.org>
8403
8404         * hppa-linux-nat.c
8405         (hppa_linux_nat_target::fetch_inferior_registers): Rename to
8406         hppa_linux_nat_target::fetch_registers.
8407
8408 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
8409
8410         * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
8411         * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
8412         (AARCH64_DWARF_SVE_FFR): Likewise.
8413         (AARCH64_DWARF_SVE_P0): Likewise.
8414         (AARCH64_DWARF_SVE_Z0): Likewise.
8415
8416 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
8417
8418         * common/common-regcache.h (raw_compare): New function.
8419         * regcache.c (regcache::raw_compare): Likewise.
8420         * regcache.h (regcache::raw_compare): New declaration.
8421
8422 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
8423
8424         * common/common-regcache.h (reg_buffer_common): New structure.
8425         * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
8426         (reg_buffer::raw_supply): Likewise.
8427         (reg_buffer::raw_supply_integer): Likewise.
8428         (reg_buffer::raw_supply_zeroed): Likewise.
8429         (reg_buffer::raw_collect): Likewise.
8430         (reg_buffer::raw_collect_integer): Likewise.
8431         * regcache.h (reg_buffer::invalidate): Move from detached_regcache.
8432         (reg_buffer::raw_supply): Likewise.
8433         (reg_buffer::raw_supply_integer): Likewise.
8434         (reg_buffer::raw_supply_zeroed): Likewise.
8435         (reg_buffer::raw_collect): Likewise.
8436         (reg_buffer::raw_collect_integer): Likewise.
8437
8438 2018-06-10  Tom Tromey  <tom@tromey.com>
8439
8440         * remote.c (stop_reply_p): Remove typedef.  Don't declare queue.
8441         (class remote_state) <stop_reply_queue>: Now std::vector.
8442         (remote_state::~remote_state)
8443         (remote_target::stop_reply_queue_length): Update.
8444         (struct queue_iter_param, remove_child_of_pending_fork)
8445         (struct check_pending_event_prevents_wildcard_vcont_callback_data)
8446         (check_pending_event_prevents_wildcard_vcont_callback)
8447         (remove_stop_reply_for_inferior)
8448         (remove_stop_reply_of_remote_state)
8449         (remote_notif_remove_once_on_match)
8450         (stop_reply_match_ptid_and_ws)
8451         (remote_kill_child_of_pending_fork): Remove.
8452         (remote_target::remove_new_fork_children)
8453         (remote_target::check_pending_events_prevent_wildcard_vcont)
8454         (remote_target::discard_pending_stop_replies)
8455         (remote_target::discard_pending_stop_replies_in_queue)
8456         (remote_target::remote_notif_remove_queued_reply)
8457         (remote_target::queued_stop_reply)
8458         (remote_target::push_stop_reply, remote_target::peek_stop_reply)
8459         (remote_target::wait, remote_target::kill_new_fork_children)
8460         (remote_target::async): Update.
8461
8462 2018-06-10  Tom Tromey  <tom@tromey.com>
8463
8464         * record-full.c (record_full_arch_list_cleanups): Remove.
8465         (record_full_message): Use try/catch.
8466         (record_full_wait_cleanups): Remove.
8467         (record_full_wait_1): Use try/catch.
8468         (record_full_restore): Likewise.
8469
8470 2018-06-10  Tom Tromey  <tom@tromey.com>
8471
8472         * record-full.c (record_full_breakpoint_p): Remove typedef.  Don't
8473         declare VEC.  Add constructor.
8474         <in_target_beneath>: Now bool.
8475         (record_full_breakpoints): Now a std::vector, static.
8476         (record_full_sync_record_breakpoints)
8477         (record_full_init_record_breakpoints)
8478         (record_full_target::insert_breakpoint)
8479         (record_full_target::remove_breakpoint): Update.  Don't use XNEW.
8480
8481 2018-06-10  Simon Marchi  <simon.marchi@polymtl.ca>
8482
8483         * dwarf2read.c (process_cu_includes): Remove struct keyword.
8484         * serial.c (serial_interface_lookup): Remove struct keyword.
8485
8486 2018-06-10  Tom Tromey  <tom@tromey.com>
8487
8488         * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
8489         method.
8490         * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
8491         a method.
8492         * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
8493         method.
8494         * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
8495         "beneath" as a method.
8496         * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
8497         Use "beneath" as a method.
8498
8499 2018-06-10  Tom Tromey  <tom@tromey.com>
8500
8501         * tracefile.c (struct trace_file_writer_deleter): New.
8502         <operator()>: Rename from trace_file_writer_xfree.
8503         (trace_file_writer_up): New typedef.
8504         (tsave_command, trace_save_tfile, trace_save_ctf): Update.
8505
8506 2018-06-09  Simon Marchi  <simon.marchi@ericsson.com>
8507
8508         * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
8509         <m_registers, m_register_status>: Change type to
8510         std::unique_ptr.
8511         * regcache.c (reg_buffer::reg_buffer): Use new instead of
8512         XCNEWVEC.
8513
8514 2018-06-09  Simon Marchi  <simon.marchi@ericsson.com>
8515
8516         * common/common-regcache.h (enum register_status): Add
8517         underlying type "signed char".
8518         * regcache.h (reg_buffer) <m_register_status>: Change type to
8519         register_status *.
8520         * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
8521         register_status instead of signed char.
8522         (reg_buffer::save): Use REG_UNKNOWN instead of 0.
8523         (reg_buffer::get_register_status): Remove cast.
8524         (readable_regcache::raw_read): Remove cast.
8525         (readable_regcache::cooked_read): Remove cast.
8526
8527 2018-06-09  Tom Tromey  <tom@tromey.com>
8528
8529         * source.c (reverse_search_command, forward_search_command): Use
8530         scoped_fd.
8531
8532 2018-06-09  Tom Tromey  <tom@tromey.com>
8533
8534         * serial.c (serial_ops_p): Remove typedef.  Don't declare VEC.
8535         (serial_ops_list): Now static, std::vector.
8536         (serial_interface_lookup, serial_add_interface): Update.
8537
8538 2018-06-09  Tom Tromey  <tom@tromey.com>
8539
8540         * dwarf2read.c (process_cu_includes): Update.
8541         (process_full_comp_unit): Update.
8542         * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
8543         std::vector.
8544
8545 2018-06-08  Paul Koning  <paul_koning@dell.com>
8546
8547         PR gdb/23252
8548
8549         * python/python.c (do_start_initialization):
8550         Avoid call to internal Python API.
8551         (init__gdb_module): New function.
8552
8553 2018-06-08  Gary Benson <gbenson@redhat.com>
8554
8555         * linux-thread-db.c (valprint.h): New include.
8556         (struct check_thread_db_info): New structure.
8557         (check_thread_db_on_load, tdb_testinfo): New static globals.
8558         (check_thread_db, check_thread_db_callback): New functions.
8559         (try_thread_db_load_1): Run integrity checks if requested.
8560         (maintenance_check_libthread_db): New function.
8561         (_initialize_thread_db): Register "maint check libthread-db"
8562         and "maint set/show check-libthread-db".
8563         * NEWS: Mention the above new commands.
8564
8565 2018-06-08  Tom Tromey  <tom@tromey.com>
8566
8567         * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
8568         now a method.
8569
8570 2018-06-08  Tom Tromey  <tom@tromey.com>
8571
8572         * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
8573
8574 2018-06-08  Tom Tromey  <tom@tromey.com>
8575
8576         * common/btrace-common.h (struct btrace_data): Add constructor,
8577         destructor, move assignment operator.
8578         <empty, clear, fini>: New methods.
8579         <format>: Initialize.
8580         (btrace_data_init, btrace_data_fini, btrace_data_clear)
8581         (btrace_data_empty): Don't declare.
8582         * common/btrace-common.c (btrace_data_init): Remove.
8583         (btrace_data::fini): Rename from btrace_data_fini.
8584         (btrace_data::empty): Rename from btrace_data_empty.
8585         (btrace_data::clear): Rename from btrace_data_clear.  Return
8586         bool.
8587         * btrace.h (make_cleanup_btrace_data): Don't declare.
8588         * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
8589         (parse_xml_btrace): Update.
8590         (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
8591         (maint_btrace_clear_packet_history_cmd): Update.
8592
8593 2018-06-07  Pedro Alves  <palves@redhat.com>
8594
8595         * target.h (target_ops) <beneath>: Now a method.  All references
8596         updated.
8597         (class target_stack): New.
8598         * target.c (g_target_stack): New.
8599         (g_current_top_target): Delete.
8600         (current_top_target): Get the top target out of g_target_stack.
8601         (target_stack::push, target_stack::unpush): New.
8602         (push_target, unpush_target): Reimplement.
8603         (target_is_pushed): Reimplement in terms of g_target_stack.
8604         (target_ops::beneath, target_stack::find_beneath): New.
8605
8606 2018-06-07  Pedro Alves  <palves@redhat.com>
8607
8608         * target.h (find_target_beneath): Delete declaration.
8609         * target.c (find_target_beneath): Delete definition.
8610         * aix-thread.c: All callers of find_target_beneath adjusted to
8611         call target_ops::beneath instead.
8612         * bsd-uthread.c: Likewise.
8613         * linux-thread-db.c: Likewise.
8614         * ravenscar-thread.c: Likewise.
8615         * sol-thread.c: Likewise.
8616         * spu-multiarch.c: Likewise.
8617
8618 2018-06-07  Pedro Alves  <palves@redhat.com>
8619
8620         * target.h (target_ops) <beneath>: Now a method.  All references
8621         updated.
8622         (target_ops) <m_beneath>: New.
8623         * target.c (target_ops::beneath): New.
8624         * corelow.c: Adjust all references to target_ops::beneath.
8625         * linux-thread-db.c: Likewise.
8626         * make-target-delegates: Likewise.
8627         * record-btrace.c: Likewise.
8628         * record-full.c: Likewise.
8629         * remote.c: Likewise.
8630         * target.c: Likewise.
8631         * target-delegates.c: Regenerate.
8632
8633 2018-06-07  Pedro Alves  <palves@redhat.com>
8634
8635         * target.h (target_stack): Delete.
8636         (current_top_target): Declare function.
8637         * target.c (target_stack): Delete.
8638         (g_current_top_target): New.
8639         (current_top_target): New function.
8640         * auxv.c: Use current_top_target instead of target_stack
8641         throughout.
8642         * avr-tdep.c: Likewise.
8643         * breakpoint.c: Likewise.
8644         * corefile.c: Likewise.
8645         * elfread.c: Likewise.
8646         * eval.c: Likewise.
8647         * exceptions.c: Likewise.
8648         * frame.c: Likewise.
8649         * gdbarch-selftests.c: Likewise.
8650         * gnu-v3-abi.c: Likewise.
8651         * ia64-tdep.c: Likewise.
8652         * ia64-vms-tdep.c: Likewise.
8653         * infcall.c: Likewise.
8654         * infcmd.c: Likewise.
8655         * infrun.c: Likewise.
8656         * linespec.c: Likewise.
8657         * linux-tdep.c: Likewise.
8658         * minsyms.c: Likewise.
8659         * ppc-linux-nat.c: Likewise.
8660         * ppc-linux-tdep.c: Likewise.
8661         * procfs.c: Likewise.
8662         * regcache.c: Likewise.
8663         * remote.c: Likewise.
8664         * rs6000-tdep.c: Likewise.
8665         * s390-linux-nat.c: Likewise.
8666         * s390-tdep.c: Likewise.
8667         * solib-aix.c: Likewise.
8668         * solib-darwin.c: Likewise.
8669         * solib-dsbt.c: Likewise.
8670         * solib-spu.c: Likewise.
8671         * solib-svr4.c: Likewise.
8672         * solib-target.c: Likewise.
8673         * sparc-tdep.c: Likewise.
8674         * sparc64-tdep.c: Likewise.
8675         * spu-tdep.c: Likewise.
8676         * symfile.c: Likewise.
8677         * symtab.c: Likewise.
8678         * target-descriptions.c: Likewise.
8679         * target-memory.c: Likewise.
8680         * target.c: Likewise.
8681         * target.h: Likewise.
8682         * tracefile-tfile.c: Likewise.
8683         * tracepoint.c: Likewise.
8684         * valops.c: Likewise.
8685         * valprint.c: Likewise.
8686         * value.c: Likewise.
8687         * windows-tdep.c: Likewise.
8688         * mi/mi-main.c: Likewise.
8689
8690 2018-06-07  Tom Tromey  <tom@tromey.com>
8691
8692         * valprint.h (build_address_symbolic): Declare.
8693         * printcmd.c (print_address_symbolic): Update.
8694         (build_address_symbolic): Change "name" and "filename" to
8695         std::string.
8696         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
8697         Update.
8698         * defs.h (build_address_symbolic): Remove declaration.
8699
8700 2018-06-07  Alan Hayward  <alan.hayward@arm.com>
8701
8702         * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
8703         (aarch64_vnv_type): Add function.
8704         (aarch64_pseudo_register_name): Add V regs for SVE.
8705         (aarch64_pseudo_register_type): Likewise.
8706         (aarch64_pseudo_register_reggroup_p): Likewise.
8707         (aarch64_pseudo_read_value_2): Use V0 offset for SVE
8708         (aarch64_pseudo_read_value): Add V regs for SVE.
8709         (aarch64_pseudo_write_2): Use V0 offset for SVE
8710         (aarch64_pseudo_write): Add V regs for SVE.
8711         * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
8712
8713 2018-06-06  Sergio Durigan Junior  <sergiodj@redhat.com>
8714
8715         * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
8716         (sve_vl_from_vq): Likewise.
8717
8718 2018-06-05  Tom Tromey  <tom@tromey.com>
8719
8720         * cli/cli-cmds.c (show_version): Update.
8721         * top.c (print_gdb_version): Add "interactive" parameter.
8722         Update.
8723         * main.c (captured_main_1): Update.
8724         * top.h (print_gdb_version): Add "interactive" parameter and a
8725         comment.
8726
8727 2018-06-05  David Malcolm  <dmalcolm@redhat.com>
8728
8729         * common/enum-flags.h: Add trailing semicolon to example in
8730         comment.
8731
8732 2018-06-05  Tom Tromey  <tom@tromey.com>
8733
8734         PR cli/12326:
8735         * NEWS: Add entry about pager.
8736         * utils.c (pagination_disabled_for_command): New global.
8737         (prompt_for_continue): Allow "c" response to prompt.
8738         (reinitialize_more_filter): Clear
8739         pagination_disabled_for_command.
8740         (fputs_maybe_filtered): Check pagination_disabled_for_command.
8741
8742 2018-06-04  Tom Tromey  <tom@tromey.com>
8743
8744         * ada-lang.h (ada_lookup_symbol_list): Update.
8745         * ada-lang.c (resolve_subexp): Update.
8746         (symbols_are_identical_enums): Change type of syms.  Remove nsyms
8747         parameter.
8748         (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
8749         (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
8750         results parameter to std::vector.
8751         (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
8752         Update.
8753         * ada-exp.y (block_lookup): Update.
8754         (select_possible_type_sym): Change type of syms.  Remove nsyms
8755         parameter.
8756         (write_var_or_type, write_name_assoc): Update.
8757
8758 2018-06-04  Joel Brobecker  <brobecker@adacore.com>
8759
8760         * windows-nat.c (windows_nat_target::xfer_partial): Return
8761         TARGET_XFER_E_IO if we need to delegate to the target beneath
8762         but BENEATH is NULL.
8763
8764 2018-06-04  Simon Marchi  <simon.marchi@ericsson.com>
8765
8766         * Makefile.in (config.status): Add configure.nat as a
8767         dependency.
8768
8769 2018-06-04  Tom Tromey  <tom@tromey.com>
8770
8771         * cp-name-parser.y (cpname_state): Add method declarations.
8772         (HANDLE_QUAL): Update.
8773         (cpname_state::d_grab, cpname_state::fill_comp)
8774         (cpname_state::make_operator, cpname_state::make_dtor)
8775         (cpname_state::make_builtin_type, cpname_state::make_name)
8776         (cpname_state::d_qualify, cpname_state::d_int_type)
8777         (cpname_state::d_unary, cpname_state::d_binary): Now methods.
8778         (%union): Move earlier.
8779
8780 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
8781
8782         * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
8783
8784 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
8785
8786         * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
8787         (aarch64_pseudo_write_1): Likewise.
8788         (aarch64_pseudo_read_value): Use helper.
8789         (aarch64_pseudo_write): Likewise.
8790
8791 2018-06-04  Pedro Alves  <palves@redhat.com>
8792
8793         * darwin-nat.c (darwin_ops): Delete.
8794         (darwin_attach_pid): Use get_native_target.
8795
8796 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
8797
8798         * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
8799         * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
8800
8801 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
8802
8803         * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
8804         * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
8805         (aarch64_gdbarch_init): Check for SVE.
8806         * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
8807
8808 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
8809
8810         * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
8811         * aarch64-tdep.h (aarch64_read_description): Likewise.
8812         * arch/aarch64.c (aarch64_create_target_description): Likewise.
8813         * arch/aarch64.h (aarch64_create_target_description): Likewise.
8814         * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
8815         * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
8816         * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
8817
8818 2018-06-02  Simon Marchi  <simon.marchi@ericsson.com>
8819
8820         * value.c (value_fetch_lazy_bitfield): New.
8821         (value_fetch_lazy_memory): New.
8822         (value_fetch_lazy_register): New.
8823         (value_fetch_lazy): Factor out to smaller functions.
8824
8825 2018-06-01  Tom Tromey  <tom@tromey.com>
8826
8827         * cp-name-parser.y (backslashable, represented): Now const.
8828
8829 2018-06-01  Tom Tromey  <tom@tromey.com>
8830
8831         * cp-name-parser.y: Include parser-defs.h.
8832         (parser_fprintf): Remove declaration.
8833
8834 2018-06-01  Tom Tromey  <tom@tromey.com>
8835
8836         * cp-name-parser.y: Use %pure-parser, %lex-param, and
8837         %parse-param.
8838         (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
8839         (global_result): Remove globals.
8840         (struct cpname_state): New.
8841         (yyparse): Don't declare.
8842         (yylex, yyerror): Move declarations after %union.
8843         (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
8844         (make_name): Add state parameter.
8845         Update all callers.
8846         (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
8847         parameter.
8848         (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
8849         Update.
8850         (yylex): Add lvalp, state parameters.
8851         (yyerror): Add state parameter.
8852         (cp_demangled_name_to_comp): Update.
8853
8854 2018-06-01  Tom Tromey  <tom@tromey.com>
8855
8856         * cp-name-parser.y (parser_fprintf): Declare.
8857         (GDB_YY_REMAP_PREFIX): Define.
8858         Include yy-remap.h.  Don't redefine yy* identifiers.
8859
8860 2018-06-01  Tom Tromey  <tom@tromey.com>
8861
8862         * python/py-type.c (typy_legacy_template_argument): Update.
8863         * cp-support.h (cp_demangled_name_to_comp): Update.
8864         * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
8865         parameter to be a "std::string *".
8866         (main): Update.
8867
8868 2018-06-01  H.J. Lu  <hongjiu.lu@intel.com>
8869
8870         * ada-lex.l: Include "diagnostics.h" instead of
8871         "common/diagnostics.h".
8872         * unittests/environ-selftests.c: Likewise.
8873         * common/diagnostics.h: Moved to ../include.
8874
8875 2018-06-01  Joel Brobecker  <brobecker@adacore.com>
8876
8877         * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
8878         to language_mode_manual while calling breakpoint_re_set_one.
8879
8880 2018-06-01  Tom Tromey  <tom@tromey.com>
8881
8882         * valops.c (value_cast_structs, destructor_name_p): Update.
8883         * symtab.c (gdb_mangle_name): Update.
8884         * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
8885         Update.
8886         * p-valprint.c (pascal_object_is_vtbl_ptr_type)
8887         (pascal_object_print_value_fields, pascal_object_print_value):
8888         Update.
8889         * p-typeprint.c (pascal_type_print_derivation_info): Update.
8890         * linespec.c (find_methods): Update.
8891         * gdbtypes.h (type_name_no_tag): Remove.
8892         (type_name_or_error): Rename from type_name_no_tag_or_error.
8893         * gdbtypes.c (type_name_no_tag): Remove.
8894         (type_name_or_error): Rename from type_name_no_tag_or_error.
8895         (lookup_struct_elt_type, check_typedef): Update.
8896         * expprint.c (print_subexp_standard): Update.
8897         * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
8898         * d-namespace.c (d_lookup_nested_symbol): Update.
8899         * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
8900         (cp_print_class_member): Update.
8901         * cp-namespace.c (cp_lookup_nested_symbol): Update.
8902         * completer.c (add_struct_fields): Update.
8903         * c-typeprint.c (cp_type_print_derivation_info)
8904         (c_type_print_varspec_prefix, c_type_print_base_struct_union):
8905         Update.
8906         * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
8907         (ada_prefer_type, ada_is_exception_sym): Update.
8908
8909 2018-06-01  Tom Tromey  <tom@tromey.com>
8910
8911         * valops.c (enum_constant_from_type, value_namespace_elt)
8912         (value_maybe_namespace_elt): Update.
8913         * valarith.c (find_size_for_pointer_math): Update.
8914         * target-descriptions.c (make_gdb_type): Update.
8915         * symmisc.c (print_symbol): Update.
8916         * stabsread.c (define_symbol, read_type)
8917         (complain_about_struct_wipeout, add_undefined_type)
8918         (cleanup_undefined_types_1): Update.
8919         * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
8920         (rust_range_type_p, val_print_struct, rust_print_struct_def)
8921         (rust_internal_print_type, rust_composite_type)
8922         (rust_evaluate_funcall, rust_evaluate_subexp)
8923         (rust_inclusive_range_type_p): Update.
8924         * python/py-type.c (typy_get_tag): Update.
8925         * p-typeprint.c (pascal_type_print_base): Update.
8926         * mdebugread.c (parse_symbol, parse_type): Update.
8927         * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
8928         Update.
8929         * guile/scm-type.c (gdbscm_type_tag): Update.
8930         * go-lang.c (sixg_string_p): Update.
8931         * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
8932         Update.
8933         * gdbtypes.h (struct main_type) <tag_name>: Remove.
8934         (TYPE_TAG_NAME): Remove.
8935         * gdbtypes.c (type_name_no_tag): Simplify.
8936         (check_typedef, check_types_equal, recursive_dump_type)
8937         (copy_type_recursive, arch_composite_type): Update.
8938         * f-typeprint.c (f_type_print_base): Update.  Print "Type" prefix
8939         in summary mode when needed.
8940         * eval.c (evaluate_funcall): Update.
8941         * dwarf2read.c (fixup_go_packaging, read_structure_type)
8942         (process_structure_scope, read_enumeration_type)
8943         (read_namespace_type, read_module_type, determine_prefix): Update.
8944         * cp-support.c (inspect_type): Update.
8945         * coffread.c (process_coff_symbol, decode_base_type): Update.
8946         * c-varobj.c (c_is_path_expr_parent): Update.
8947         * c-typeprint.c (c_type_print_base_struct_union): Update.
8948         (c_type_print_base_1): Update.  Print struct/class/union/enum in
8949         summary when using C language.
8950         * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
8951         (gen_maybe_namespace_elt): Update.
8952         * ada-lang.c (ada_type_name): Simplify.
8953         (empty_record, ada_template_to_fixed_record_type_1)
8954         (template_to_static_fixed_type)
8955         (to_record_with_fixed_variant_part, ada_check_typedef): Update.
8956
8957 2018-06-01  Tom Tromey  <tom@tromey.com>
8958
8959         * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
8960         c_print_type.
8961         * c-typeprint.c (c_print_type_1): Add "language" parameter.
8962         (c_print_type): Update.
8963         (c_print_type): New overload.
8964         (c_type_print_varspec_prefix, c_type_print_args)
8965         (c_type_print_varspec_suffix, c_print_type_no_offsets)
8966         (c_type_print_base_struct_union, c_type_print_base_1)
8967         (cp_type_print_method_args): Add "language" parameter.
8968         (c_type_print_base): Update.
8969         * c-lang.h (c_print_type): Add new overload.
8970
8971 2018-06-01  Tom Tromey  <tom@tromey.com>
8972
8973         * typeprint.h (c_type_print_varspec_suffix): Don't declare.
8974         * c-typeprint.c (c_type_print_varspec_suffix): Now static.
8975
8976 2018-06-01  Alan Hayward  <alan.hayward@arm.com>
8977
8978         * aarch64-tdep.c (aarch64_sve_register_names): New const
8979         var.
8980         * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
8981         (AARCH64_SVE_Z_REGS_NUM): New define.
8982         (AARCH64_SVE_P_REGS_NUM): Likewise.
8983         (AARCH64_SVE_NUM_REGS): Likewise.
8984
8985 2018-05-31  Uros Bizjak  <ubizjak@gmail.com>
8986
8987         * nat/linux-ptrace.h [__alpha__]
8988         (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
8989         definitions.
8990
8991 2018-05-31  Maciej W. Rozycki  <macro@mips.com>
8992
8993         * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
8994         the endianness selected.
8995         * NEWS: Document `set endian auto' mode operation update.
8996
8997 2018-05-31  Alan Hayward  <alan.hayward@arm.com>
8998
8999         * Makefile.in: Add new header.
9000         * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
9001         (sve_vl_from_vg): Likewise.
9002         (sve_vq_from_vl): Likewise.
9003         (sve_vl_from_vq): Likewise.
9004         (sve_vq_from_vg): Likewise.
9005         (sve_vg_from_vq): Likewise.
9006         * configure.nat: Add new c file.
9007         * nat/aarch64-sve-linux-ptrace.c: New file.
9008         * nat/aarch64-sve-linux-ptrace.h: New file.
9009
9010 2018-05-31  Alan Hayward  <alan.hayward@arm.com>
9011
9012         * aarch64-linux-nat.c (aarch64_linux_read_description):
9013         Add parmeter zero.
9014         * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
9015         Likewise.
9016         * aarch64-tdep.c (tdesc_aarch64_list): Add.
9017         (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
9018         (aarch64_gdbarch_init): Add parmeter zero.
9019         * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
9020         * arch/aarch64.c (aarch64_create_target_description): Check VQ.
9021         * arch/aarch64.h (aarch64_create_target_description): Add VQ.
9022         parmeter.
9023         * doc/gdb.texinfo: Describe SVE feature
9024         * features/aarch64-sve.c: New file.
9025
9026 2018-05-31  Omair Javaid  <omair.javaid@linaro.org>
9027
9028         PR gdb/23210
9029         * gdbarch.sh (significant_addr_bit): Default to zero when
9030         not set by target architecture.
9031         * gdbarch.c: Re-generated.
9032         * utils.c (address_significant): Update.
9033
9034 2018-05-30  Joel Brobecker  <brobecker@adacore.com>
9035
9036         * stack.c (func_command): Remove trailing newline in call to error.
9037
9038 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
9039
9040         * regcache.h (regcache_raw_collect): Remove, update callers to
9041         use regcache::raw_collect.
9042         * regcache.c (regcache_raw_collect): Remove.
9043
9044 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
9045
9046         * regcache.h (regcache_raw_supply): Remove, update callers to
9047         use detached_regcache::raw_supply.
9048         * regcache.c (regcache_raw_supply): Remove.
9049
9050 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
9051
9052         * regcache.h (regcache_cooked_write_part): Remove, update
9053         callers to use regcache::cooked_write_part.
9054         * regcache.c (regcache_cooked_write_part): Remove.
9055
9056 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
9057
9058         * regcache.h (regcache_cooked_read_part): Remove, update callers
9059         to use readable_regcache::cooked_read_part.
9060         * regcache.c (regcache_cooked_read_part): Remove.
9061
9062 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
9063
9064         * regcache.h (regcache_cooked_read_value): Remove, update
9065         callers to use readable_regcache::cooked_read_value.
9066         * regcache.c (regcache_cooked_read_value): Remove.
9067
9068 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
9069
9070         * regcache.h (regcache_cooked_write): Remove, update callers to
9071         use regcache::cooked_write.
9072         * regcache.c (regcache_cooked_write): Remove.
9073
9074 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
9075
9076         * regcache.h (regcache_invalidate): Remove, update callers to
9077         use detached_regcache::invalidate instead.
9078         * regcache.c (regcache_invalidate): Remove.
9079
9080 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
9081
9082         * regcache.h (regcache_raw_write_part): Remove, update callers
9083         to use regcache::raw_write_part instead.
9084         * regcache.c (regcache_raw_write_part): Remove.
9085
9086 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
9087
9088         * regcache.h (regcache_raw_read_part): Remove, update callers to
9089         use readable_regcache::raw_read_part instead.
9090         * regcache.c (regcache_raw_read_part): Remove.
9091
9092 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
9093
9094         * regcache.h (regcache_cooked_read): Remove, update callers to
9095         use readable_regcache::cooked_read instead.
9096         * regcache.c (regcache_cooked_read): Remove.
9097
9098 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
9099
9100         * regcache.h (regcache_raw_write): Remove, update callers to use
9101         regcache::raw_write instead.
9102         * regcache.c (regcache_raw_write): Remove.
9103
9104 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
9105
9106         * regcache.h (regcache_raw_read): Remove, update callers to use
9107         readable_regcache::raw_read instead.
9108         * regcache.c (regcache_raw_read): Remove.
9109
9110 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
9111
9112         * regcache.h (regcache_raw_update): Remove, update callers to
9113         use readable_regcache::raw_update instead.
9114         * regcache.c (regcache_raw_update): Remove.
9115
9116 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
9117
9118         * regcache.h (regcache_register_status): Remove, update callers
9119         to use reg_buffer::get_register_status directly instead.
9120         * regcache.c (regcache_register_status): Remove.
9121
9122 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
9123
9124         * regcache.h (regcache_get_ptid): Remove, update all callers to
9125         call regcache::ptid instead.
9126         * regcache.c (regcache_get_ptid): Remove.
9127
9128 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
9129
9130         * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
9131
9132 2018-05-30  Pedro Alves  <palves@redhat.com>
9133
9134         * common/common-exceptions.h (exception_rethrow): Use
9135         ATTRIBUTE_NORETURN.
9136
9137 2018-05-29  Simon Marchi  <simon.marchi@polymtl.ca>
9138
9139         * breakpoint.c (print_solib_event, check_status_catch_solib):
9140         Remove struct keyword in range-based for loops.
9141         * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
9142         * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
9143         Likewise.
9144         * linespec.c (find_superclass_methods, search_minsyms_for_name):
9145         Likewise.
9146         * symfile.c (addr_info_make_relative): Likewise.
9147         * thread.c (value_in_thread_stack_temporaries): Likewise.
9148
9149 2018-06-12  Weimin Pan  <weimin.pan@oracle.com>
9150
9151         PR gdb/16841
9152         * valops.c (value_struct_elt_for_reference): Call check_typedef on
9153         aggregate type to get its real type before accessing it.
9154
9155 2018-05-29  Weimin Pan  <weimin.pan@oracle.com>
9156
9157         * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
9158         * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
9159         * coff-pe-read.c (add_pe_forwarded_sym): Replace
9160         lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
9161         * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
9162         * jit.c (jit_breakpoint_re_set_internal): Likewise.
9163         * printcmd.c (info_address_command): Likewise.
9164
9165 2018-05-29  Tom Tromey  <tom@tromey.com>
9166
9167         * windows-nat.c (handle_exception): Update fall-through comment.
9168
9169 2018-05-29  Tom Tromey  <tom@tromey.com>
9170
9171         * progspace.h (so_list_ptr): Remove typedef.  Don't declare VEC.
9172         (struct program_space) <added_solibs>: Now a std::vector.
9173         * breakpoint.c (print_solib_event): Update.
9174         (check_status_catch_solib): Update.
9175         * progspace.c (clear_program_space_solib_cache): Update.
9176         * solib.c (update_solib_list): Update.
9177
9178 2018-05-29  Tom Tromey  <tom@tromey.com>
9179
9180         * python/py-type.c (typy_richcompare): Update.
9181         * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
9182         * gdbtypes.h (types_deeply_equal): Return bool.
9183         (types_equal): Likewise.
9184         * gdbtypes.c (type_equality_entry_d): Remove typedef.  Don't
9185         declare VEC.
9186         (check_types_equal): Change worklist to std::vector.  Return
9187         bool.
9188         (struct type_equality_entry): Add constructor.
9189         (compare_maybe_null_strings): Return bool.
9190         (check_types_worklist): Return bool.  Change worklist to
9191         std::vector.
9192         (types_deeply_equal): Use std::vector.
9193         (types_equal): Return bool.
9194         (compare_maybe_null_strings): Simplify.
9195
9196 2018-05-29  Tom Tromey  <tom@tromey.com>
9197
9198         * record-btrace.c (tp_t): Remove typedef.  Don't declare VEC.
9199
9200 2018-05-29  Tom Tromey  <tom@tromey.com>
9201
9202         * objc-lang.h: Don't include cp-support.h.
9203         * common/gdb_vecs.h (const_char_ptr): Remove typedef.  Don't
9204         declare VEC.
9205
9206 2018-05-27  Tom Tromey  <tom@tromey.com>
9207
9208         * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
9209
9210 2018-05-25  Tom Tromey  <tom@tromey.com>
9211
9212         * value.c (value::location): Initialize.
9213
9214 2018-05-25  Tom Tromey  <tom@tromey.com>
9215
9216         * dbxread.c (init_bincl_list): Remove.
9217         (bincl_list): Now a std::vector.
9218         (bincls_allocated, next_bincl): Remove.
9219         (free_bincl_list, do_free_bincl_list_cleanup)
9220         (make_cleanup_free_bincl_list): Remove.
9221         (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
9222         unique_xmalloc_ptr.
9223         (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
9224         (struct header_file_location): Add constructor.
9225         (add_bincl_to_list): Remove.
9226
9227 2018-05-25  Tom Tromey  <tom@tromey.com>
9228
9229         * tui/tui.c (tui_enable): Update.
9230         * mi/mi-interp.c (mi_interp::init): Update.
9231         * interps.h (class interp) <name>: New method.
9232         <m_name>: Rename from name.
9233         (~scoped_restore_interp): Update.
9234         * interps.c (interp::interp): Update.
9235         (interp_add, interp_set, interp_lookup_existing)
9236         (current_interp_named_p): Update.
9237
9238 2018-05-25  Tom Tromey  <tom@tromey.com>
9239
9240         * interps.c (interp_name): Remove.
9241         * mi/mi-interp.c (mi_interp::init): Update.
9242         * interps.h (interp_name): Remove.
9243         (~scoped_restore_interp): Update.
9244         * tui/tui.c (tui_enable): Update.
9245
9246 2018-05-25  Tom Tromey  <tom@tromey.com>
9247
9248         * utils.c (fputs_maybe_filtered): Update.
9249         * linespec.c (decode_line_full): Update.
9250         * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
9251         (mi_print_breakpoint_for_event, mi_solib_loaded)
9252         (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
9253         (mi_user_selected_context_changed): Update.
9254         * mi/mi-main.c (mi_execute_command): Update.
9255         * cli/cli-script.c (execute_control_command): Update.
9256         * python/python.c (execute_gdb_command): Update.
9257         * solib.c (info_sharedlibrary_command): Update.
9258         * interps.c (interp_ui_out): Remove.
9259         * interps.h (interp_ui_out): Remove.
9260
9261 2018-05-25  Tom Tromey  <tom@tromey.com>
9262
9263         * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
9264         * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
9265         * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
9266
9267 2018-05-25  Tom Tromey  <tom@tromey.com>
9268
9269         * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
9270         * interps.c (interp_exec): Use scoped_restore.
9271
9272 2018-05-25  Tom Tromey  <tom@tromey.com>
9273
9274         * remote.c (remote_target::remote_file_get): Use
9275         gdb::byte_vector.
9276         (remote_target::remote_file_put): Likewise.
9277
9278 2018-05-25  Tom Tromey  <tom@tromey.com>
9279
9280         * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
9281         a std::string.
9282         (get_pe_section_index, add_pe_exported_sym): Update.
9283         (read_pe_exported_syms): Use gdb::def_vector.
9284
9285 2018-05-25  Tom Tromey  <tom@tromey.com>
9286
9287         * frame.c (remove_prev_frame): Remove.
9288         (get_prev_frame_if_no_cycle): Use TRY/CATCH.
9289
9290 2018-05-25  Maciej W. Rozycki  <macro@mips.com>
9291
9292         * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
9293         Remove prototypes.
9294         * mips-linux-nat.c (supply_fpregset): Always call
9295         `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
9296         (fill_fpregset): Always call `mips64_fill_fpregset' rather than
9297         `mips_fill_fpregset'.
9298         * mips-linux-tdep.c (mips_supply_fpregset)
9299         (mips_supply_fpregset_wrapper, mips_fill_fpregset)
9300         (mips_fill_fpregset_wrapper): Remove functions.
9301         (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
9302         (mips_linux_fpregset): Remove variable.
9303         (mips_linux_iterate_over_regset_sections): Use
9304         `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
9305         (mips_linux_o32_sigframe_init): Remove comment.
9306
9307 2018-05-25  Pedro Alves  <palves@redhat.com>
9308
9309         * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
9310         (struct readahead_cache, struct packet_reg, struct
9311         remote_arch_state, class remote_state): Move higher up in the
9312         file.
9313         (remote_target::m_remote_state): Now an object instead of a pointer.
9314         (remote_target::get_remote_state): Adjust.
9315
9316 2018-05-24  Andrew Burgess  <andrew.burgess@embecosm.com>
9317
9318         * stack.c (select_and_print_frame): Delete.
9319         (struct function_bounds): Move struct within function.
9320         (func_command): Most content moved into new function
9321         find_frame_for_function, use new function, print result, add
9322         function comment.
9323         (find_frame_for_function): New function, now returns a result.
9324
9325 2018-05-24  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
9326
9327         * stack.c (iterate_over_block_arg_vars): Fix comment.
9328         (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
9329
9330 2018-05-24  Andrew Burgess  <andrew.burgess@embecosm.com>
9331
9332         PR gdb/23203
9333         * frame.c
9334         (scoped_restore_selected_frame::scoped_restore_selected_frame):
9335         Define.
9336         (scoped_restore_selected_frame::~scoped_restore_selected_frame):
9337         Define.
9338         * frame.h (class scoped_restore_selected_frame): New class.
9339         * stack.c (print_frame_local_vars): Remove catching and rethrowing
9340         of any exception, use scoped_restore_selected_frame to restore the
9341         frame instead.
9342
9343 2018-05-24  Pedro Alves  <palves@redhat.com>
9344
9345         * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
9346         override.
9347
9348 2018-05-23  Tom Tromey  <tom@tromey.com>
9349
9350         * complaints.c (struct complaints): Remove.
9351         (symfile_complaint_book): Remove.
9352         (series): New global.
9353         (complaint_internal): Update.
9354         (clear_complaints): Update.
9355
9356 2018-05-23  Tom Tromey  <tom@tromey.com>
9357
9358         * complaints.c (counters): New global.
9359         (struct complain): Remove.
9360         (struct complaints) <root>: Remove.
9361         (complaint_sentinel): Remove.
9362         (symfile_complaint_book): Update.
9363         (find_complaint) Remove.
9364         (complaint_internal, clear_complaints): Update.
9365
9366 2018-05-23  Tom Tromey  <tom@tromey.com>
9367
9368         * complaints.c (struct complain) <file, line>: Remove.
9369         (find_complaint): Remove file, line parameters.
9370         (complaint_internal): Update.
9371
9372 2018-05-23  Tom Tromey  <tom@tromey.com>
9373
9374         * complaints.c (vcomplaint): Remove.
9375         (complaint_internal) Merge in contents of vcomplaint.
9376
9377 2018-05-23  Tom Tromey  <tom@tromey.com>
9378
9379         * complaints.c (struct complaints) <explanation>: Remove.
9380         (symfile_explanations): Remove.
9381         (symfile_complaint_book): Update.
9382         (vcomplaint): Update.
9383         (struct explanation): Remove.
9384
9385 2018-05-23  Tom Tromey  <tom@tromey.com>
9386
9387         * complaints.c (symfile_complaints): Remove.
9388         (complaint_internal): Remove "complaints" parameter.
9389         (clear_complaints, vcomplaint): Remove "c" parameter.
9390         (get_complaints): Remove.
9391         * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
9392         (dwarf2_debug_line_missing_file_complaint)
9393         (dwarf2_debug_line_missing_end_sequence_complaint)
9394         (dwarf2_complex_location_expr_complaint)
9395         (dwarf2_const_value_length_mismatch_complaint)
9396         (dwarf2_section_buffer_overflow_complaint)
9397         (dwarf2_macro_malformed_definition_complaint)
9398         (dwarf2_invalid_attrib_class_complaint)
9399         (create_addrmap_from_index, dw2_symtab_iter_next)
9400         (dw2_expand_marked_cus)
9401         (dw2_debug_names_iterator::find_vec_in_debug_names)
9402         (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
9403         (create_debug_type_hash_table, init_cutu_and_read_dies)
9404         (partial_die_parent_scope, add_partial_enumeration)
9405         (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
9406         (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
9407         (read_import_statement, read_file_scope, create_dwo_cu_reader)
9408         (create_cus_hash_table, create_dwp_hash_table)
9409         (inherit_abstract_dies, read_func_scope, read_call_site_scope)
9410         (dwarf2_rnglists_process, dwarf2_ranges_process)
9411         (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
9412         (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
9413         (handle_struct_member_die, process_structure_scope)
9414         (read_array_type, read_common_block, read_module_type)
9415         (read_tag_pointer_type, read_typedef, read_base_type)
9416         (read_subrange_type, load_partial_dies, partial_die_info::read)
9417         (partial_die_info::read, partial_die_info::read)
9418         (partial_die_info::read, read_checked_initial_length_and_offset)
9419         (dwarf2_string_attr, read_formatted_entries)
9420         (dwarf_decode_line_header)
9421         (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
9422         (new_symbol, dwarf2_const_value_attr, lookup_die_type)
9423         (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
9424         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
9425         (get_signatured_type, get_DW_AT_signature_type)
9426         (decode_locdesc, file_file_name, consume_improper_spaces)
9427         (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
9428         (dwarf_decode_macro_bytes, dwarf_decode_macros)
9429         (dwarf2_symbol_mark_computed, set_die_type)
9430         (read_attribute_value): Update.
9431         * stap-probe.c (handle_stap_probe, get_stap_base_address):
9432         Update.
9433         * dbxread.c (unknown_symtype_complaint)
9434         (lbrac_mismatch_complaint, repeated_header_complaint)
9435         (set_namestring, function_outside_compilation_unit_complaint)
9436         (read_dbx_symtab, process_one_symbol): Update.
9437         * gdbtypes.c (stub_noname_complaint): Update.
9438         * windows-nat.c (handle_unload_dll): Update.
9439         * coffread.c (coff_symtab_read, enter_linenos, decode_type)
9440         (decode_base_type): Update.
9441         * xcoffread.c (bf_notfound_complaint, ef_complaint)
9442         (eb_complaint, record_include_begin, record_include_end)
9443         (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
9444         (process_xcoff_symbol, read_symbol)
9445         (function_outside_compilation_unit_complaint)
9446         (scan_xcoff_symtab): Update.
9447         * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
9448         * buildsym.c (finish_block_internal, make_blockvector)
9449         (end_symtab_get_static_block, augment_type_symtab): Update.
9450         * dtrace-probe.c (dtrace_process_dof)
9451         (dtrace_static_probe_ops::get_probes): Update.
9452         * complaints.h (struct complaint): Don't declare.
9453         (symfile_complaints): Remove.
9454         (complaint_internal): Remove "complaints" parameter.
9455         (complaint): Likewise.
9456         (clear_complaints): Likewise.
9457         * symfile.c (syms_from_objfile_1, finish_new_objfile)
9458         (reread_symbols): Update.
9459         * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
9460         (dwarf2_frame_cache, decode_frame_entry): Update.
9461         * dwarf2loc.c (dwarf_reg_to_regnum): Update.
9462         * objc-lang.c (lookup_objc_class, lookup_child_selector)
9463         (info_selectors_command): Update.
9464         * macrotab.c (macro_include, check_for_redefinition)
9465         (macro_undef): Update.
9466         * objfiles.c (filter_overlapping_sections): Update.
9467         * stabsread.c (invalid_cpp_abbrev_complaint)
9468         (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
9469         (define_symbol, error_type, read_type, rs6000_builtin_type)
9470         (stabs_method_name_from_physname, read_member_functions)
9471         (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
9472         (attach_fields_to_type, complain_about_struct_wipeout)
9473         (read_range_type, read_args, common_block_start)
9474         (common_block_end, cleanup_undefined_types_1, scan_file_globals):
9475         Update.
9476         * mdebugread.c (index_complaint, unknown_ext_complaint)
9477         (basic_type_complaint, bad_tag_guess_complaint)
9478         (bad_rfd_entry_complaint, unexpected_type_code_complaint)
9479         (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
9480         (parse_procedure, parse_lines)
9481         (function_outside_compilation_unit_complaint)
9482         (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
9483         (bad_tag_guess_complaint, reg_value_complaint): Update.
9484         * cp-support.c (demangled_name_complaint): Update.
9485         * macroscope.c (sal_macro_scope): Update.
9486         * dwarf-index-write.c (class debug_names): Update.
9487
9488 2018-05-23  Tom Tromey  <tom@tromey.com>
9489
9490         * complaints.c (clear_complaints): Remove "noisy" parameter.
9491         * complaints.h (clear_complaints): Update.
9492         * symfile.c (syms_from_objfile_1, finish_new_objfile)
9493         (reread_symbols): Update.
9494
9495 2018-05-23  Tom Tromey  <tom@tromey.com>
9496
9497         * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
9498         SUBSEQUENT_MESSAGE.
9499         (vcomplaint, clear_complaints): Update.
9500         (symfile_explanations): Remove some messages.
9501
9502 2018-05-23  Tom Tromey  <tom@tromey.com>
9503
9504         * complaints.c (internal_complaint): Remove.
9505         * complaints.h (internal_complaint): Remove.
9506
9507 2018-05-22  Maciej W. Rozycki  <macro@mips.com>
9508
9509         * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
9510
9511 2018-05-22  Pedro Alves  <palves@redhat.com>
9512
9513         * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
9514         (remote_fileio_badfd, remote_fileio_return_errno)
9515         (remote_fileio_return_success, remote_fileio_func_open)
9516         (remote_fileio_func_open, remote_fileio_func_close)
9517         (remote_fileio_func_read, remote_fileio_func_write)
9518         (remote_fileio_func_lseek, remote_fileio_func_rename)
9519         (remote_fileio_func_unlink, remote_fileio_func_stat)
9520         (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
9521         (remote_fileio_func_isatty, remote_fileio_func_system): Add
9522         remote_target parameter.
9523         (remote_fio_func_map) <func>: Add remote_target parameter.
9524         (do_remote_fileio_request, remote_fileio_request):
9525         * remote-fileio.h (remote_fileio_request):
9526         * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
9527         remote_target parameter.
9528         (remote_notif_process, handle_notification): Adjust to pass down
9529         the remote.
9530         (remote_notif_state_allocate): Add remote_target parameter.  Save
9531         it.
9532         * remote-notif.h (struct remote_target): Forward declare.
9533         (struct notif_client) <parse, ack, can_get_pending_events>: Add
9534         remote_target parameter.
9535         (struct remote_notif_state) <remote>: New field.
9536         (remote_notif_ack, remote_notif_parse): Add remote_target
9537         parameter.
9538         (remote_notif_state_allocate, remote_notif_state_allocate): Add
9539         remote_target parameter.
9540         * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
9541         (threads_listing_context, rmt_thread_action, protocol_feature)
9542         (packet_reg, stop_reply, stop_reply_p, enum packet_support)
9543         (packet_result, struct threads_listing_context, remote_state):
9544         Move definitions and declarations higher up.
9545         (remote_target) <~remote_target>: Declare.
9546         (remote_download_command_source, remote_file_put, remote_file_get)
9547         (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
9548         (remote_hostio_pread_vFile, remote_hostio_send_command)
9549         (remote_hostio_set_filesystem, remote_hostio_open)
9550         (remote_hostio_close, remote_hostio_unlink, remote_state)
9551         (get_remote_state, get_remote_packet_size, get_memory_packet_size)
9552         (get_memory_write_packet_size, get_memory_read_packet_size)
9553         (append_pending_thread_resumptions, remote_detach_1)
9554         (append_resumption, remote_resume_with_vcont)
9555         (add_current_inferior_and_thread, wait_ns, wait_as)
9556         (process_stop_reply, remote_notice_new_inferior)
9557         (process_initial_stop_replies, remote_add_thread)
9558         (btrace_sync_conf, remote_btrace_maybe_reopen)
9559         (remove_new_fork_children, kill_new_fork_children)
9560         (discard_pending_stop_replies, stop_reply_queue_length)
9561         (check_pending_events_prevent_wildcard_vcont)
9562         (discard_pending_stop_replies_in_queue, stop_reply)
9563         (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
9564         (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
9565         (remote_interrupt_as, remote_interrupt_ns)
9566         (remote_get_noisy_reply, remote_query_attached)
9567         (remote_add_inferior, remote_current_thread, get_current_thread)
9568         (set_thread, set_general_thread, set_continue_thread)
9569         (set_general_process, write_ptid)
9570         (remote_unpack_thread_info_response, remote_get_threadinfo)
9571         (parse_threadlist_response, remote_get_threadlist)
9572         (remote_threadlist_iterator, remote_get_threads_with_ql)
9573         (remote_get_threads_with_qxfer)
9574         (remote_get_threads_with_qthreadinfo, extended_remote_restart)
9575         (get_offsets, remote_check_symbols, remote_supported_packet)
9576         (remote_query_supported, remote_packet_size)
9577         (remote_serial_quit_handler, remote_detach_pid)
9578         (remote_vcont_probe, remote_resume_with_hc)
9579         (send_interrupt_sequence, interrupt_query)
9580         (remote_notif_get_pending_events, fetch_register_using_p)
9581         (send_g_packet, process_g_packet, fetch_registers_using_g)
9582         (store_register_using_P, store_registers_using_G)
9583         (set_remote_traceframe, check_binary_download)
9584         (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
9585         (remote_xfer_live_readonly_partial, remote_read_bytes)
9586         (remote_send_printf, remote_flash_write, readchar)
9587         (remote_serial_write, putpkt, putpkt_binary, skip_frame)
9588         (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
9589         (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
9590         (extended_remote_disable_randomization, extended_remote_run)
9591         (send_environment_packet, extended_remote_environment_support)
9592         (extended_remote_set_inferior_cwd, remote_write_qxfer)
9593         (remote_read_qxfer, push_stop_reply, vcont_r_supported)
9594         (packet_command): Now methods of ...
9595         (remote_target): ... this class.
9596         (m_remote_state) <remote_target>: New field.
9597         (struct remote_state) <stop_reply_queue,
9598         remote_async_inferior_event_token, wait_forever_enabled_p>: New
9599         fields.
9600         (remote_state::remote_state): Allocate stop_reply_queue.
9601         (remote_state): Delete global.
9602         (get_remote_state_raw): Delete.
9603         (remote_target::get_remote_state): Allocate m_remote_state on
9604         demand.
9605         (get_current_remote_target): New.
9606         (remote_ops, extended_remote_ops): Delete.
9607         (wait_forever_enabled_p, remote_async_inferior_event_token):
9608         Delete, moved to struct remote_state.
9609         (remote_target::close): Delete self.  Destruction bits split to
9610         ...
9611         (remote_target::~remote_target): ... this.
9612         (show_memory_packet_size): Adjust to use
9613         get_current_remote_target.
9614         (struct protocol_feature) <func>: Add remote_target parameter.
9615         All callers adjusted.
9616         (curr_quit_handler_target): New.
9617         (remote_serial_quit_handler): Reimplement.
9618         (remote_target::open_1): Adjust to use get_current_remote_target.
9619         Heap-allocate remote_target/extended_remote_target instances.
9620         (vcont_builder::vcont_builder): Add remote_target parameter, and
9621         save it in m_remote.  All callers adjusted.
9622         (vcont_builder::m_remote): New field.
9623         (vcont_builder::restart, vcont_builder::flush)
9624         (vcont_builder::push_action): Use it.
9625         (remote_target::commit_resume): Use it.
9626         (struct queue_iter_param) <remote>: New field.
9627         (remote_target::remove_new_fork_children): Fill in 'remote' field.
9628         (check_pending_event_prevents_wildcard_vcont_callback_data): New.
9629         (check_pending_event_prevents_wildcard_vcont_callback)
9630         (remote_target::check_pending_events_prevent_wildcard_vcont)
9631         (remote_target::discard_pending_stop_replies)
9632         (remote_target::discard_pending_stop_replies_in_queue)
9633         (remote_target::remote_notif_remove_queued_reply): Fill in
9634         'remote' field.
9635         (remote_notif_get_pending_events): New.
9636         (remote_target::readchar, remote_target::remote_serial_write):
9637         Save/restore curr_quit_handler_target.
9638         (putpkt): New.
9639         (kill_new_fork_children): Fill in 'remote' field.
9640         (packet_command): Use get_current_remote_target, defer to
9641         remote_target method of same name.
9642         (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
9643         parameter, and save it in m_remote.  All callers adjusted.
9644         (scoped_remote_fd::release): Use m_remote.
9645         (scoped_remote_fd::m_remote): New field.
9646         (remote_file_put, remote_file_get, remote_file_delete): Use
9647         get_current_remote_target, defer to remote_target method of same
9648         name.
9649         (remote_btrace_reset): Add remote_state paremeter.  Update all
9650         callers.
9651         (remote_async_inferior_event_handler). Pass down 'data'.
9652         (remote_new_objfile): Use get_current_remote_target.
9653         (remote_target::vcont_r_supported): New.
9654         (set_range_stepping): Use get_current_remote_target and
9655         remote_target::vcont_r_supported.
9656         (_initialize_remote): Don't allocate 'remote_state' and
9657         'stop_reply_queue' globals.
9658         * remote.h (struct remote_target): Forward declare.
9659         (getpkt, putpkt, remote_notif_get_pending_events): Add
9660         'remote_target' parameter.
9661
9662 2018-05-22  Pedro Alves  <palves@redhat.com>
9663
9664         * remote.c (vcont_builder): Now a class.  Make all data members
9665         private.
9666         (vcont_builder) <vcont_builder, restart, flush, push_action>:
9667         Declare methods.
9668         (vcont_builder_restart): Rename to ...
9669         (vcont_builder::restart): ... this.
9670         (vcont_builder_flush): Rename to ...
9671         (vcont_builder::flush): ... this.
9672         (vcont_builder_push_action): Rename to ...
9673         (vcont_builder::push_action): ... this.
9674         (remote_target::commit_resume): Adjust.
9675
9676 2018-05-22  Pedro Alves  <palves@redhat.com>
9677
9678         * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
9679         (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
9680         (get_fixed_memory_packet_size): New.
9681         (get_memory_packet_size): Use it.
9682         (set_memory_packet_size): Don't override the config size with
9683         DEFAULT_MAX_MEMORY_PACKET_SIZE.
9684         (show_memory_packet_size): Use get_fixed_memory_packet_size.
9685         Don't refer to get_memory_packet_size if not connected to a remote
9686         target.  Show "(default)" if configured size is 0.
9687
9688 2018-05-22  Pedro Alves  <palves@redhat.com>
9689
9690         * remote.c (remote_target::mourn_inferior): Move
9691         discard_pending_stop_replies call here from ...
9692         (_initialize_remote): ... here.
9693
9694 2018-05-22  Pedro Alves  <palves@redhat.com>
9695
9696         * remote.c (compare_section_command): Remove set_general_process
9697         call.
9698
9699 2018-05-22  Pedro Alves  <palves@redhat.com>
9700
9701         * remote.c (struct packet_reg, struct remote_arch_state):
9702         Move higher up in the file.
9703         (remote_state) <m_arch_states>: Store remote_arch_state values
9704         instead of remote_arch_state pointers.
9705         (remote_state::get_remote_arch_state): Adjust.
9706
9707 2018-05-22  Pedro Alves  <palves@redhat.com>
9708
9709         * remote.c: Include <unordered_map>.
9710         (remote_state): Now a class.
9711         (remote_state) <get_remote_arch_state>: Declare method.
9712         <get_remote_arch_state>: New field.
9713         (remote_arch_state) <remote_arch_state>: Declare ctor.
9714         <regs>: Now a unique_ptr.
9715         (remote_gdbarch_data_handle): Delete.
9716         (get_remote_arch_state): Delete.
9717         (remote_state::get_remote_arch_state): New.
9718         (get_remote_state): Adjust to call remote_state's
9719         get_remote_arch_state method.
9720         (init_remote_state): Delete, bits factored out to ...
9721         (remote_arch_state::remote_arch_state): ... this new method.
9722         (get_remote_packet_size, get_memory_packet_size)
9723         (process_g_packet, remote_target::fetch_registers)
9724         (remote_target::prepare_to_store, store_registers_using_G)
9725         (remote_target::store_registers, remote_target::get_trace_status):
9726         Adjust to call remote_state's method.
9727         (_initialize_remote): Remove reference to
9728         remote_gdbarch_data_handle.
9729
9730 2018-05-22  Pedro Alves  <palves@redhat.com>
9731
9732         * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
9733         pread>: New method declarations.
9734         (remote_target::open_1): Adjust.
9735         (readahead_cache_invalidate): Rename to ...
9736         (readahead_cache::invalidate): ... this, and adjust to be a class
9737         method.
9738         (readahead_cache_invalidate_fd): Rename to ...
9739         (readahead_cache::invalidate_fd): ... this, and adjust to be a
9740         class method.
9741         (remote_hostio_pwrite): Adjust.
9742         (remote_hostio_pread_from_cache): Rename to ...
9743         (readahead_cache::pread): ... this, and adjust to be a class
9744         method.
9745         (remote_hostio_close): Adjust.
9746
9747 2018-05-22  Pedro Alves  <palves@redhat.com>
9748
9749         * remote.c (remote_hostio_close_cleanup): Delete.
9750         (class scoped_remote_fd): New.
9751         (remote_file_put, remote_file_get): Use it.
9752
9753 2018-05-22  Pedro Alves  <palves@redhat.com>
9754
9755         (struct vCont_action_support): Use bool and initialize all fields.
9756         (struct readahead_cache): Initialize all fields.
9757         (remote_state): Use bool and initialize all fields.
9758         (remote_state::remote_state, remote_state::~remote_state): New.
9759         (new_remote_state): Delete.
9760         (_initialize_remote): Use new to allocate remote_state.
9761
9762 2018-05-22  Pedro Alves  <palves@redhat.com>
9763             張俊芝  <zjz@zjz.name>
9764
9765         PR gdb/22973
9766         * c-exp.y: Include "c-support.h".
9767         (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
9768         of tolower.  Use c_ident_is_alpha to scan names.
9769         * c-lang.c: Include "c-support.h".
9770         (convert_ucn, convert_octal, convert_hex, convert_escape): Use
9771         ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
9772         * c-support.h: New file, with bits factored out from ...
9773         * cp-name-parser.y: ... this file.
9774         Include "c-support.h".
9775         (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
9776         c-support.h and renamed.
9777         (symbol_end, yylex): Adjust.
9778
9779 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
9780
9781         * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
9782         parameter type to CORE_ADDR.
9783         * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
9784         parameter type in declaration to CORE_ADDR.
9785         * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
9786         target_auxv_search to get AT_HWCAP and use the result to get the
9787         target description.
9788         * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
9789         to CORE_ADDR. Remove the cast of the return value to unsigned
9790         long. Fix error predicate of target_auxv_search.
9791         (ppc_linux_nat_target::read_description): Change the type of the
9792         hwcap variable to CORE_ADDR.
9793
9794 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
9795
9796         * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
9797         if the size of fpscr is larger than 32 bits.
9798
9799 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
9800
9801         * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
9802         (ppc32_linux_vsxregmap): New global.
9803         (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
9804         regcache_supply_regset, and regcache_collect_regset.
9805         * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
9806         * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
9807         (fetch_vsx_register, store_vsx_register): Remove.
9808         (fetch_vsx_registers): Add regno parameter. Get regset using
9809         ppc_linux_vsxregset. Use regset to supply registers.
9810         (store_vsx_registers): Add regno parameter. Get regset using
9811         ppc_linux_vsxregset. Use regset to collect registers.
9812         (fetch_register): Call fetch_vsx_registers instead of
9813         fetch_vsx_register.
9814         (store_register): Call store_vsx_registers instead of
9815         store_vsx_register.
9816         (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
9817         new regno parameter.
9818         (store_ppc_registers): Call store_vsx_registers with -1 for the
9819         new regno parameter.
9820         * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
9821         (ppc_collect_vsxregset): Remove.
9822
9823 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
9824
9825         * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
9826         offset fields.
9827         * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
9828         for vector register offset fields.
9829         (ppc64_fbsd_reg_offsets): Likewise.
9830         * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
9831         to vector register offset fields.
9832         * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
9833         to vector register offset fields.
9834         * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
9835         vector register offset fields.
9836         * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
9837         initializers for vector register offset fields.
9838         (rs6000_aix64_reg_offsets): Likewise.
9839         * rs6000-tdep.c (ppc_vrreg_offset): Remove.
9840         (ppc_supply_vrregset): Remove.
9841         (ppc_collect_vrregset): Remove.
9842         * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
9843         (ppc_linux_vrregset) : New function.
9844         (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
9845         (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
9846         (ppc32_linux_vrregset): Remove.
9847         (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
9848         and use result instead of ppc32_linux_vrregset.
9849         (ppc32_linux_reg_offsets): Remove initializers for vector register
9850         offset fields.
9851         (ppc64_linux_reg_offsets): Likewise.
9852         * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
9853         * ppc-linux-nat.c: Include regset.h.
9854         (gdb_vrregset_t): Adjust comment to account for little-endian
9855         mode.
9856         (supply_vrregset, fill_vrregset): Remove.
9857         (fetch_altivec_register, store_altivec_register): Remove.
9858         (fetch_altivec_registers): Add regno parameter. Get regset using
9859         ppc_linux_vrregset. Use regset to supply registers.
9860         (store_altivec_registers): Add regno parameter. Get regset using
9861         ppc_linux_vrregset. Use regset to collect registers.
9862         (fetch_register): Call fetch_altivec_registers instead of
9863         fetch_altivec_register.
9864         (store_register): Call store_altivec_registers instead of
9865         store_altivec_register.
9866         (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
9867         the new regno parameter.
9868         (store_ppc_registers): Call store_altivec_registers with -1 for
9869         the new regno parameter.
9870
9871 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
9872
9873         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
9874         (PPC_LINUX_SIZEOF_VSXREGSET): Define.
9875         * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
9876         (gdb_vrregset_t): Change array type size to
9877         PPC_LINUX_SIZEOF_VRREGSET.
9878         (gdb_vsxregset_t): Change array type size to
9879         PPC_LINUX_SIZEOF_VSXREGSET.
9880         * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
9881         Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
9882         PPC_LINUX_SIZEOF_VSXREGSET.
9883
9884 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
9885
9886         * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
9887         * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
9888         nat/ppc-linux.c.
9889         (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
9890         ppc_linux_target_wordsize with tid.
9891         (ppc_linux_nat_target::read_description): Call ppc_linux_target
9892         wordsize with tid.
9893         * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
9894         (ppc64_64bit_inferior_p): Add static and inline specifiers.
9895         (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
9896         tid parameter. Remove static specifier.
9897         * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
9898         (ppc_linux_target_wordsize): New declaration.
9899
9900 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
9901
9902         * arch/ppc-linux-common.c: New file.
9903         * arch/ppc-linux-common.h: New file.
9904         * arch/ppc-linux-tdesc.h: New file.
9905         * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
9906         * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
9907         (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
9908         arch/ppc-linux-tdesc.h.
9909         * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
9910         arch/ppc-linux-tdesc.h.
9911         (ppc_linux_nat_target::read_description): Remove target
9912         description matching code. Fill a ppc_linux_features struct and
9913         call ppc_linux_match_description with it. Move comment about ISA
9914         2.05 to ppc-linux-common.c.
9915         * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
9916         arch/ppc-linux-tdesc.h.
9917         (ppc_linux_core_read_description): Remove target description
9918         matching code. Fill a ppc_linux_features struct and call
9919         ppc_linux_match_description with it.
9920         * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
9921         (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
9922         (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
9923         (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
9924         (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
9925         (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
9926         (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
9927         (tdesc_powerpc_e500l): Remove.
9928
9929 2018-05-22  Joel Brobecker  <brobecker@adacore.com>
9930
9931         * ada-lang.c (catch_assert_command): Pass empty string instead
9932         of NULL for excep_string argument.
9933
9934 2018-05-22  Maciej W. Rozycki  <macro@mips.com>
9935
9936         * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
9937         the width of the requested register exceeds the width of the
9938         `ptrace' data type.
9939
9940 2018-05-21  Tom Tromey  <tom@tromey.com>
9941
9942         * printcmd.c (output_command): Remove.
9943         (output_command_const): Rename to output_command.
9944         * valprint.h (output_command): Rename from output_command_const.
9945         * tracepoint.c (trace_dump_actions): Call output_command.
9946
9947 2018-05-21  Tom Tromey  <tom@tromey.com>
9948
9949         * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
9950         (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
9951         * ada-lang.h (create_ada_exception_catchpoint): Update.
9952         * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
9953         std::string.
9954         (create_excep_cond_exprs, ~ada_catchpoint)
9955         (should_stop_exception, print_one_exception)
9956         (print_mention_exception, print_recreate_exception): Update.
9957         (ada_get_next_arg): Remove.
9958         (catch_ada_exception_command_split): Use std::string.  Change type
9959         of "excep_string", "cond_string".
9960         (catch_ada_exception_command): Update.
9961         (create_ada_exception_catchpoint): Change type of excep_string.
9962         (ada_exception_sal): Remove excep_string parameter.
9963         (~ada_catchpoint): Remove.
9964
9965 2018-05-21  Tom Tromey  <tom@tromey.com>
9966
9967         * ada-lang.c (ada_collect_symbol_completion_matches): Remove
9968         cleanup.
9969
9970 2018-05-21  Tom Tromey  <tom@tromey.com>
9971
9972         * ada-lang.c (ada_exception_message_1, ada_exception_message):
9973         Return unique_xmalloc_ptr.
9974         (print_it_exception): Update.
9975
9976 2018-05-21  Tom Tromey  <tom@tromey.com>
9977
9978         * tracepoint.c (trace_dump_actions): Use std::string.
9979
9980 2018-05-21  Tom Tromey  <tom@tromey.com>
9981
9982         * symfile.c (reread_symbols): Use std::string for original_name.
9983
9984 2018-05-21  Tom Tromey  <tom@tromey.com>
9985
9986         * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
9987         (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN.  Default
9988         constructor.
9989
9990 2018-05-20  Simon Marchi  <simon.marchi@polymtl.ca>
9991
9992         * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
9993         instance to...
9994         (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
9995         * objfiles.c (get_objfile_bfd_data): Allocate
9996         objfile_per_bfd_storage with obstack_new when allocating on
9997         obstack.
9998
9999 2018-05-20  Simon Marchi  <simon.marchi@ericsson.com>
10000
10001         * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
10002         OBSTACK_ZALLOC.
10003         * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
10004         * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
10005         * mdebugread.c (mdebug_build_psymtabs): Likewise.
10006         (add_pending): Likewise.
10007         (parse_symbol): Likewise.
10008         (parse_partial_symbols): Likewise.
10009         (psymtab_to_symtab_1): Likewise.
10010         (new_psymtab): Likewise.
10011         (elfmdebug_build_psymtabs): Likewise.
10012         * minsyms.c (terminate_minimal_symbol_table): Likewise.
10013         * objfiles.c (get_objfile_bfd_data): Likewise.
10014         (objfile_register_static_link): Likewise.
10015         * psymtab.c (allocate_psymtab): Likewise.
10016         * stabsread.c (read_member_functions): Likewise.
10017         * xcoffread.c (xcoff_end_psymtab): Likewise.
10018
10019 2018-05-20  Simon Marchi  <simon.marchi@ericsson.com>
10020
10021         * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
10022         compiler supports std::is_trivially_constructible.
10023         * common/poison.h: Include obstack.h.
10024         (IsMallocable): Define to is_trivially_constructible if the
10025         compiler supports it, define to true_type otherwise.
10026         (xobnew): New.
10027         (XOBNEW): Redefine.
10028         (xobnewvec): New.
10029         (XOBNEWVEC): Redefine.
10030         * gdb_obstack.h (obstack_zalloc): New.
10031         (OBSTACK_ZALLOC): Redefine.
10032         (obstack_calloc): New.
10033         (OBSTACK_CALLOC): Redefine.
10034         (obstack_new): New.
10035         * gdbarch.sh: Include gdb_obstack in gdbarch.h.
10036         (gdbarch_obstack): New declaration in gdbarch.h, definition in
10037         gdbarch.c.
10038         (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
10039         obstack_calloc/obstack_zalloc.
10040         (gdbarch_obstack_zalloc): Remove.
10041         * target-descriptions.c (tdesc_data_init): Use obstack_new.
10042
10043 2018-05-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
10044
10045         * stack.c (backtrace_command_1): Remove useless variable int i.
10046
10047 2018-05-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
10048
10049         * stack.c (print_frame_info): Fix comment.
10050
10051 2018-05-18  Tom Tromey  <tom@tromey.com>
10052
10053         * dwarf2read.c (struct dwz_file): Add constructor, initializers.
10054         <dwz_bfd>: Now a gdb_bfd_ref_ptr.
10055         (~dwarf2_per_objfile): Update
10056         (dwarf2_get_dwz_file): Use new.
10057         * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
10058         unique_ptr.
10059
10060 2018-05-18  Tom Tromey  <tom@tromey.com>
10061
10062         * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
10063         unique_ptr.
10064         * dwarf2read.c (struct dwp_file): Add constructor and
10065         initializers.
10066         (open_and_init_dwp_file): Return a unique_ptr.
10067         (dwarf2_per_objfile, create_dwp_hash_table)
10068         (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
10069         (lookup_dwo_unit_in_dwp): Update.
10070         (open_and_init_dwp_file, get_dwp_file): Update.
10071
10072 2018-05-18  Tom Tromey  <tom@tromey.com>
10073
10074         * dwarf2read.c (dwarf2_per_objfile): Update.
10075         (struct mapped_index): Add initializers.
10076         (dwarf2_read_index): Use new.
10077         (dw2_symtab_iter_init): Update.
10078         * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
10079         unique_ptr.
10080
10081 2018-05-18  Simon Marchi  <simon.marchi@ericsson.com>
10082
10083         * dwarf2read.c (mapped_index) <total_size>: Remove.
10084
10085 2018-05-18  Simon Marchi  <simon.marchi@ericsson.com>
10086
10087         * unittests/format_pieces-selftests.c (test_format_specifier):
10088         Add ARI comments.
10089
10090 2018-05-18  Tom Tromey  <tom@tromey.com>
10091
10092         * c-typeprint.c (maybe_print_hole): New function.
10093         (c_print_type_struct_field_offset): Update.
10094         (c_type_print_base_struct_union): Call maybe_print_hole.
10095
10096 2018-05-17  Keith Seitz  <keiths@redhat.com>
10097
10098         * breakpoint.c (build_bpstat_chain): New function, moved from
10099         bpstat_stop_status.
10100         (bpstat_stop_status): Add optional parameter, `stop_chain'.
10101         If no stop chain is passed, call build_bpstat_chain to build it.
10102         * breakpoint.h (build_bpstat_chain): Declare.
10103         (bpstat_stop_status): Move documentation here from breakpoint.c.
10104         * infrun.c (handle_signal_stop): Before eliding inlined frames,
10105         build the stop chain and pass it to skip_inline_frames.
10106         Pass this stop chain to bpstat_stop_status.
10107         * inline-frame.c: Include breakpoint.h.
10108         (stopped_by_user_bp_inline_frame): New function.
10109         (skip_inline_frames): Add parameter `stop_chain'.
10110         Move documention to inline-frame.h.
10111         If non-NULL, use stopped_by_user_bp_inline_frame to determine
10112         whether the frame should be elided.
10113         * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
10114         Add moved documentation and update for new parameter.
10115
10116 2018-05-17  Simon Marchi  <simon.marchi@ericsson.com>
10117
10118         PR cli/14975
10119         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10120         unittests/format_pieces-selftests.c.
10121         * common/format.h (format_piece) <operator==>: New.
10122         (format_pieces) <operator[]>: Remove.
10123         * common/format.c (format_pieces::format_pieces): Handle \e.
10124         * unittests/format_pieces-selftests.c: New.
10125
10126 2018-05-17  Tom Tromey  <tom@tromey.com>
10127
10128         PR symtab/23010:
10129         * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
10130         (dw2_instantiate_symtab): Add skip_partial parameter.
10131         (dw2_find_last_source_symtab, dw2_map_expand_apply)
10132         (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
10133         (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
10134         (dw2_expand_symtabs_matching_one)
10135         (dw2_find_pc_sect_compunit_symtab)
10136         (dw2_debug_names_lookup_symbol)
10137         (dw2_debug_names_expand_symtabs_for_function): Update.
10138         (init_cutu_and_read_dies): Add skip_partial parameter.
10139         (process_psymtab_comp_unit, build_type_psymtabs_1)
10140         (process_skeletonless_type_unit, load_partial_comp_unit)
10141         (psymtab_to_symtab_1): Update.
10142         (load_full_comp_unit): Add skip_partial parameter.
10143         (process_imported_unit_die, dwarf2_read_addr_index)
10144         (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
10145         (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
10146         (read_signatured_type): Update.
10147
10148 2018-05-17  Simon Marchi  <simon.marchi@ericsson.com>
10149
10150         * value.c (release_value): Remove unused variable.
10151         (record_latest_value): Likewise.
10152         (access_value_history): Likewise.
10153         (preserve_values): Likewise.
10154
10155 2018-05-17  Tom Tromey  <tom@tromey.com>
10156
10157         * extension.h (struct ext_lang_type_printers) <py_type_printers>:
10158         Initialize.
10159
10160 2018-05-16  Maciej W. Rozycki  <macro@mips.com>
10161
10162         PR gdb/22286
10163         * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
10164         Also handle registers whose width is not a multiple of
10165         PTRACE_TYPE_RET.
10166         (linux_nat_trad_target::store_register): Likewise.
10167
10168 2018-05-16  Tom Tromey  <tom@tromey.com>
10169
10170         * gdbcore.h (core_bfd): Redefine.
10171         * corelow.c (core_target::close): Update.
10172         (core_target_open): Update.
10173         * progspace.h (struct program_space) <cbfd>: Now a
10174         gdb_bfd_ref_ptr.
10175
10176 2018-05-16  Tom Tromey  <tom@tromey.com>
10177
10178         PR cli/19551:
10179         * symfile-add-flags.h (enum symfile_add_flags)
10180         <SYMFILE_NOT_FILENAME>: New constant.
10181         * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME.  Get
10182         objfile name from BFD.
10183         (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
10184         * minidebug.c (find_separate_debug_file_in_section): Put
10185         ".gnu_debugdata" into BFD's file name.
10186
10187 2018-05-16  Simon Marchi  <simon.marchi@ericsson.com>
10188
10189         * regcache.c (regcache_read_ftype, regcache_write_ftype):
10190         Remove.
10191
10192 2018-05-15  Tamar Christina  <tamar.christina@arm.com>
10193
10194         PR binutils/21446
10195         * aarch64-tdep.c (aarch64_analyze_prologue,
10196         aarch64_software_single_step, aarch64_displaced_step_copy_insn):
10197         Indicate not interested in errors.
10198
10199 2018-05-15  Maciej W. Rozycki  <macro@mips.com>
10200
10201         * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
10202         Supply the MIPS_ZERO_REGNUM register.
10203
10204 2018-05-15  Maciej W. Rozycki  <macro@mips.com>
10205
10206         * mips-tdep.c (mask_address_var): Make variable static.
10207
10208 2018-05-14  Tom Tromey  <tom@tromey.com>
10209
10210         * dwarf2read.c (rust_union_quirks): Clear rust_unions.
10211
10212 2018-05-11  Andrew Burgess  <andrew.burgess@embecosm.com>
10213
10214         * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
10215         FXSAVE_ADDR for the mxcsr register.
10216
10217 2018-05-11  Max Filippov  <jcmvbkbc@gmail.com>
10218
10219         * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
10220
10221 2018-05-11  Pedro Alves  <palves@redhat.com>
10222
10223         * corelow.c (core_target) <core_target>: No longer inline.
10224         Initialize m_core_gdbarch, m_core_vec and build the section table
10225         here.
10226         <~core_target>: New.
10227         <core_gdbarch, get_core_register_section>: New methods.
10228         <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
10229         factored out from ...
10230         <core_data, core_vec, core_gdbarch>: ... these deleted globals.
10231         (core_ops): Delete.
10232         (sniff_core_bfd): Add gdbarch parameter.
10233         (core_close): Delete, merged into ...
10234         (core_target::close): ... here.  Delete self.
10235         (core_close_cleanup): Delete.
10236         (core_target_open): Allocate a core_target on the heap.  Use a
10237         unique_ptr instead of a cleanup.  Bits moved into the core_target
10238         ctor.  Adjust to use core_target methods instead of globals.
10239         (get_core_register_section): Rename to ...
10240         (core_target::get_core_register_section): ... this and adjust.
10241         (struct get_core_registers_cb_data): New.
10242         (get_core_registers_cb): Use it.  Use bool.
10243         (core_target::fetch_registers, core_target::files_info)
10244         (core_target::xfer_partial, core_target::read_description)
10245         (core_target::pid_to, core_target::thread_name): Adjust to
10246         reference class fields instead of globals.
10247         * target.h (struct target_ops_deleter, target_ops_up): New.
10248
10249 2018-05-11  Pedro Alves  <palves@redhat.com>
10250
10251         * corefile.c (core_file_command): Move to corelow.c.
10252         * corelow.c (the_core_target): Delete.
10253         (core_file_command): Moved from corefile.c.  Check exec_bfd
10254         instead of the_core_target.  Use target_detach instead of calling
10255         into the_core_target directly.
10256         (maybe_say_no_core_file_now): New.
10257         (core_target::detach): Use it.
10258         (_initialize_corelow): Remove references to the_core_target.
10259         * gdbcore.h (the_core_target): Delete.
10260
10261 2018-05-11  Tom Tromey  <tromey@redhat.com>
10262             Pedro Alves  <palves@redhat.com>
10263
10264         * corefile.c (core_bfd): Remove.
10265         * gdbcore.h (core_bfd): Now a macro.
10266         * progspace.h (struct program_space) <cbfd>: New field.
10267
10268 2018-05-11  Tom Tromey  <tom@tromey.com>
10269
10270         * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
10271         gdb::def_vector.
10272
10273 2018-05-10  Tom Tromey  <tom@tromey.com>
10274
10275         * configure: Rebuild.
10276         * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
10277
10278 2018-05-10  Joel Brobecker  <brobecker@adacore.com>
10279
10280         PR server/23158:
10281         * regformats/regdat.sh: Adjust script, following the addition
10282         of the new expedite_regs parameter to init_target_desc.
10283
10284 2018-05-10  Omair Javaid  <omair.javaid@linaro.org>
10285     
10286         PR gdb/23127
10287         * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
10288         set_gdbarch_significant_addr_bit.
10289         * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
10290         set_gdbarch_significant_addr_bit.
10291         * utils.c (address_significant): Update to sign extend addr.
10292
10293 2018-05-09  Max Filippov  <jcmvbkbc@gmail.com>
10294
10295         * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
10296         (xtensa_linux_init_abi): Limit tdep->num_regs by
10297         tdep->num_nopriv_regs.
10298         * xtensa-tdep.c (xtensa_derive_tdep): Calculate
10299         tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
10300         not initialized.
10301
10302 2018-05-08  Simon Marchi  <simon.marchi@ericsson.com>
10303
10304         * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
10305
10306 2018-05-08  Andrew Burgess  <andrew.burgess@embecosm.com>
10307
10308         * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
10309         (I387_MXCSR_INIT_VAL): New constant.
10310         * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
10311         buffer if it was supplied by the inferior.
10312         * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
10313         (i387_xsave_get_clear_bv): New function.
10314         (i387_supply_xsave): Only read x87 control registers from the
10315         xsave buffer if the feature is enabled, and the state will have
10316         been written, otherwise, provide a suitable default.
10317         (i387_collect_xsave): Pre-clear all registers in xsave buffer,
10318         including x87 control registers.  Update control registers if they
10319         have changed from the default value, and mark features as enabled
10320         as required.
10321         * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
10322
10323 2018-05-08  Ulrich Weigand  <uweigand@de.ibm.com>
10324
10325         * spu-tdep.c (info_spu_event_command): Fix output formatting.
10326
10327 2018-05-07  Tom Tromey  <tom@tromey.com>
10328
10329         * configure: Rebuild.
10330         * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
10331
10332 2018-05-07  Tom Tromey  <tom@tromey.com>
10333
10334         PR tdep/20362:
10335         * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
10336         bit.  Use correct value for VDIV.
10337
10338 2018-05-04  Tom Tromey  <tom@tromey.com>
10339
10340         * configure: Rebuild.
10341         * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
10342
10343 2018-05-04  Tom Tromey  <tom@tromey.com>
10344
10345         * linux-record.c (record_linux_system_call) <case
10346         RECORD_SYS_RECVFROM>: Add "break".
10347
10348 2018-05-04  Tom Tromey  <tom@tromey.com>
10349
10350         * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
10351         Add missing "break".
10352         * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
10353         Add missing "break".
10354
10355 2018-05-04  Tom Tromey  <tom@tromey.com>
10356
10357         * rs6000-tdep.c (ppc_process_record_op4)
10358         (ppc_process_record_op63): Add fall-through comment.
10359
10360 2018-05-04  Tom Tromey  <tom@tromey.com>
10361
10362         * i386-tdep.c (i386_process_record): Add fall-through comment.
10363
10364 2018-05-04  Tom Tromey  <tom@tromey.com>
10365
10366         * stabsread.c (define_symbol) <case 'p'>: Add fall-through
10367         comment.
10368
10369 2018-05-04  Tom Tromey  <tom@tromey.com>
10370
10371         * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
10372         * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
10373         * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
10374         comment.
10375         * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
10376         comment.
10377         * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
10378         comment.
10379
10380 2018-05-04  Tom Tromey  <tom@tromey.com>
10381
10382         * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
10383
10384 2018-05-04  Tom Tromey  <tom@tromey.com>
10385
10386         * s390-tdep.c (s390_process_record): Fix fall-through comments.
10387         * xcoffread.c (scan_xcoff_symtab): Move comment later.
10388         * symfile.c (section_is_mapped): Fix fall-through comment.
10389         * stabsread.c (define_symbol, read_member_functions): Fix
10390         fall-through comment.
10391         * s390-linux-tdep.c (s390_process_record): Fix fall-through
10392         comment.
10393         * remote.c (remote_wait_as): Fix fall-through comment.
10394         * p-exp.y (yylex): Fix fall-through comment.
10395         * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
10396         comment.
10397         * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
10398         * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
10399         * jv-exp.y (yylex): Fix fall-through comment.
10400         * go-exp.y (lex_one_token): Fix fall-through comment.
10401         * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
10402         fall-through comment.
10403         * f-exp.y (yylex): Fix fall-through comment.
10404         * dwarf2read.c (process_die): Fix fall-through comments.
10405         * dbxread.c (process_one_symbol): Fix fall-through comment.
10406         * d-exp.y (lex_one_token): Fix fall-through comment.
10407         * cp-name-parser.y (yylex): Fix fall-through comment.
10408         * coffread.c (coff_symtab_read): Fix fall-through comment.
10409         * c-exp.y (lex_one_token): Fix fall-through comment.
10410         * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
10411         comment.
10412         * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
10413         comment.
10414
10415 2018-05-04  Tom Tromey  <tom@tromey.com>
10416
10417         PR python/22730:
10418         * NEWS: Mention gdb.execute change.
10419         * gdbcmd.h (execute_control_command): Don't declare.
10420         * python/python.c (execute_gdb_command): Use read_command_lines_1,
10421         execute_control_commands, execute_control_commands_to_string.
10422         * cli/cli-script.h (execute_control_commands)
10423         (execute_control_commands_to_string): Declare.
10424         (execute_control_command): Add from_tty parameter.
10425         * cli/cli-script.c (execute_control_commands)
10426         (execute_control_commands_to_string): New functions.
10427         (execute_user_command): Use execute_control_commands.
10428         (execute_control_command_1): Add "from_tty" parameter.  Update.
10429         (execute_control_command): Likewise.
10430
10431 2018-05-04  Tom Tromey  <tom@tromey.com>
10432
10433         PR python/22731:
10434         * NEWS: Mention that breakpoint commands are writable.
10435         * python/py-breakpoint.c (bppy_set_commands): New function.
10436         (breakpoint_object_getset) <"commands">: Use it.
10437
10438 2018-05-04  Tom Tromey  <tom@tromey.com>
10439
10440         * tracepoint.c (actions_command): Update.
10441         * mi/mi-cmd-break.c (mi_command_line_array)
10442         (mi_command_line_array_cnt, mi_command_line_array_ptr)
10443         (mi_read_next_line): Remove.
10444         (mi_cmd_break_commands): Update.
10445         * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
10446         function_view.
10447         * cli/cli-script.c (get_command_line): Update.
10448         (process_next_line): Use function_view.  Constify.
10449         (recurse_read_control_structure, read_command_lines)
10450         (read_command_lines_1): Change argument types to function_view.
10451         (do_define_command, document_command): Update.
10452         * breakpoint.h (check_tracepoint_command): Don't declare.
10453         * breakpoint.c (check_tracepoint_command): Remove.
10454         (commands_command_1, create_tracepoint_from_upload): Update.
10455
10456 2018-05-04  Tom Tromey  <tom@tromey.com>
10457
10458         PR gdb/11750:
10459         * cli/cli-script.h (enum command_control_type) <define_control>:
10460         New constant.
10461         * cli/cli-script.c (multi_line_command_p): Handle define_control.
10462         (build_command_line, execute_control_command_1)
10463         (process_next_line): Likewise.
10464         (do_define_command): New function, extracted from define_command.
10465         (define_command): Use it.
10466
10467 2018-05-04  Tom Tromey  <tom@tromey.com>
10468
10469         * tracepoint.c (actions_command): Update.
10470         * cli/cli-script.h (read_command_lines): Update.
10471         * cli/cli-script.c (read_command_lines): Constify prompt_arg.
10472         (MAX_TMPBUF): Remove define.
10473         (define_command): Use string_printf.
10474         (document_command): Likewise.
10475         * breakpoint.c (commands_command_1): Update.
10476
10477 2018-05-04  Tom Tromey  <tom@tromey.com>
10478
10479         * top.c (execute_command): Update.
10480         * cli/cli-script.h (print_command_lines): Now varargs.
10481         * cli/cli-script.c (print_command_lines): Now varargs.
10482         (execute_control_command_1) <case while_control, case if_control>:
10483         Update.
10484
10485 2018-05-04  Tom Tromey  <tom@tromey.com>
10486
10487         * tracepoint.c (all_tracepoint_actions): Rename from
10488         all_tracepoint_actions_and_cleanup.  Change return type.
10489         (actions_command, encode_actions_1, encode_actions)
10490         (trace_dump_actions, tdump_command): Update.
10491         * remote.c (remote_download_command_source): Update.
10492         * python/python.c (gdbpy_eval_from_control_command)
10493         (python_command, python_interactive_command): Update.
10494         * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
10495         * guile/guile.c (guile_command)
10496         (gdbscm_eval_from_control_command, guile_command): Update.
10497         * compile/compile.c (compile_code_command)
10498         (compile_print_command, compile_to_object): Update.
10499         * cli/cli-script.h (struct command_lines_deleter): New.
10500         (counted_command_line): New typedef.
10501         (struct command_line): Add constructor, destructor.
10502         <body_list>: Remove.
10503         <body_list_0, body_list_1>: New members.
10504         (command_line_up): Remove typedef.
10505         (read_command_lines, read_command_lines_1, get_command_line):
10506         Update.
10507         (copy_command_lines): Don't declare.
10508         * cli/cli-script.c (build_command_line): Use "new".
10509         (get_command_line): Return counted_command_line.
10510         (print_command_lines, execute_user_command)
10511         (execute_control_command_1, while_command, if_command): Update.
10512         (realloc_body_list): Remove.
10513         (process_next_line, recurse_read_control_structure): Update.
10514         (read_command_lines, read_command_lines_1): Return counted_command_line.
10515         (free_command_lines): Use "delete".
10516         (copy_command_lines): Remove.
10517         (define_command, document_command, show_user_1): Update.
10518         * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
10519         a counted_command_line.
10520         * breakpoint.h (counted_command_line): Remove typedef.
10521         (breakpoint_set_commands): Update.
10522         * breakpoint.c (check_no_tracepoint_commands)
10523         (validate_commands_for_breakpoint): Update.
10524         (breakpoint_set_commands): Change commands to be a
10525         counted_command_line.
10526         (commands_command_1, update_dprintf_command_list)
10527         (create_tracepoint_from_upload): Update.
10528
10529 2018-05-04  Tom Tromey  <tom@tromey.com>
10530
10531         * cli/cli-decode.h (cmd_list_element): New constructor.
10532         (~cmd_list_element): New destructor.
10533         (struct cmd_list_element): Add initializers.
10534         * cli/cli-decode.c (do_add_cmd): Use "new".
10535         (delete_cmd): Use "delete".
10536
10537 2018-05-04  Jan Kratochvil  <jan.kratochvil@redhat.com>
10538             Pedro Alves <palves@redhat.com>
10539
10540         PR breakpoints/19806 and support for PR external/20207.
10541         * NEWS: Mention Aarch64 watchpoint improvements.
10542         * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
10543         watchpoints and PR external/20207 watchpoints.
10544         * nat/aarch64-linux-hw-point.c
10545         (kernel_supports_any_contiguous_range): New.
10546         (aarch64_watchpoint_offset): New.
10547         (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
10548         (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
10549         (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
10550         (aarch64_align_watchpoint): New parameters aligned_offset_p and
10551         next_addr_orig_p.  Support PR external/20207 watchpoints.
10552         (aarch64_downgrade_regs): New.
10553         (aarch64_dr_state_insert_one_point): New parameters offset and
10554         addr_orig.
10555         (aarch64_dr_state_remove_one_point): Likewise.
10556         (aarch64_handle_breakpoint): Update caller.
10557         (aarch64_handle_aligned_watchpoint): Likewise.
10558         (aarch64_handle_unaligned_watchpoint): Support addr_orig and
10559         aligned_offset.
10560         (aarch64_linux_set_debug_regs): Remove const from state.  Call
10561         aarch64_downgrade_regs.
10562         (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
10563         * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
10564         (DR_CONTROL_MASK): ... this.
10565         (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
10566         (unsigned int aarch64_watchpoint_offset): New prototype.
10567         (aarch64_linux_set_debug_regs): Remove const from state.
10568         * utils.c (align_up, align_down): Move to ...
10569         * common/common-utils.c (align_up, align_down): ... here.
10570         * utils.h (align_up, align_down): Move to ...
10571         * common/common-utils.h (align_up, align_down): ... here.
10572
10573 2018-05-04  Joel Brobecker  <brobecker@adacore.com>
10574
10575         * sparc-tdep.c (sparc_structure_return_p): Re-implement to
10576         match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
10577         (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
10578         Re-implement to match the ABI as summarized in GCC's
10579         gcc/config/sparc/sparc.c.  All callers updated.
10580         (sparc32_store_arguments): Remove assertion.
10581
10582 2018-05-04  Tom Tromey  <tom@tromey.com>
10583
10584         * printcmd.c: Don't include tui.h.
10585         (decode_format): Use skip_spaces.
10586
10587 2018-05-04  Tom Tromey  <tom@tromey.com>
10588
10589         PR gdb/22619:
10590         * printcmd.c (last_count): New global.
10591         (x_command): Use saved count when repeating.
10592
10593 2018-05-04  Tom Tromey  <tom@tromey.com>
10594
10595         * nto-procfs.c (do_closedir_cleanup): Remove.
10596         (procfs_pidlist): Use gdb_dir_up.
10597         * procfs.c (do_closedir_cleanup): Remove.
10598         (proc_update_threads): Use gdb_dir_up.
10599         * common/filestuff.h (struct gdb_dir_deleter): New.
10600         (gdb_dir_up): New typedef.
10601
10602 2018-05-04  Tom Tromey  <tom@tromey.com>
10603
10604         * ada-lang.c (print_mention_exception): Use std::string.
10605
10606 2018-05-04  Tom Tromey  <tom@tromey.com>
10607
10608         * ada-lang.c (create_excep_cond_exprs): Update.
10609         (ada_exception_catchpoint_cond_string): Use std::string.
10610
10611 2018-05-04  Tom Tromey  <tom@tromey.com>
10612
10613         * ada-lang.c (xget_renaming_scope): Return std::string.
10614         (old_renaming_is_invisible): Update.
10615
10616 2018-05-04  Tom Tromey  <tom@tromey.com>
10617
10618         * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
10619         (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
10620
10621 2018-05-04  Ulrich Weigand  <uweigand@de.ibm.com>
10622
10623         * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
10624
10625 2018-05-04  Tom Tromey  <tom@tromey.com>
10626
10627         * remote.c (remote_query_supported_append): Change type.
10628         (remote_check_symbols): Update.
10629
10630 2018-05-04  Paul Pluzhnikov  <ppluzhnikov@google.com>
10631
10632         PR gdb/11420
10633         * configure.ac: Prepend libpython.
10634         * python/python-config.py: Likewise.
10635         * configure: Regenerate.
10636
10637 2018-05-03  Simon Marchi  <simon.marchi@ericsson.com>
10638
10639         * Makefile.in (%.c: %.l): Use -t instead of --stdout.
10640
10641 2018-05-03  Pedro Alves  <palves@redhat.com>
10642
10643         * s390-linux-nat.c
10644         (s390_linux_nat_target::have_continuable_watchpoint): Mark with
10645         override.  Write 'true' instead of '1'.
10646         (s390_linux_nat_target::watchpoint_addr_within_range): Remove
10647         declaration.
10648
10649 2018-05-02  Pedro Alves  <palves@redhat.com>
10650
10651         * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
10652         add_inf_child_target.
10653         * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
10654         add_inf_child_target.
10655         * aix-thread.c (aix_thread_target_info): New.
10656         (aix_thread_target) <shortname, longname, doc>: Delete.
10657         <info>: New.
10658         * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
10659         add_inf_child_target.
10660         * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
10661         add_inf_child_target.
10662         * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
10663         add_inf_child_target.
10664         * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
10665         add_inf_child_target.
10666         * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
10667         add_inf_child_target.
10668         * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
10669         add_inf_child_target.
10670         * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
10671         add_inf_child_target.
10672         * arm-linux-nat.c (_initialize_arm_linux_nat): Use
10673         add_inf_child_target.
10674         * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
10675         add_inf_child_target.
10676         * bfd-target.c (target_bfd_target_info): New.
10677         (target_bfd) <shortname, longname, doc>: Delete.
10678         <info>: New.
10679         * bsd-kvm.c (bsd_kvm_target_info): New.
10680         (bsd_kvm_target) <shortname, longname, doc>: Delete.
10681         <info>: New.
10682         (bsd_kvm_target::open): Rename to ...
10683         (bsd_kvm_target_open): ... this.  Adjust.
10684         * bsd-uthread.c (bsd_uthread_target_info): New.
10685         (bsd_uthread_target) <shortname, longname, doc>: Delete.
10686         <info>: New.
10687         * corefile.c (core_file_command): Adjust.
10688         * corelow.c (core_target_info): New.
10689         (core_target) <shortname, longname, doc>: Delete.
10690         <info>: New.
10691         (core_target::open): Rename to ...
10692         (core_target_open): ... this.  Adjust.
10693         * ctf.c (ctf_target_info): New.
10694         (ctf_target) <shortname, longname, doc>: Delete.
10695         <info>: New.
10696         (ctf_target::open): Rename to ...
10697         (ctf_target_open): ... this.
10698         (_initialize_ctf): Adjust.
10699         * exec.c (exec_target_info): New.
10700         (exec_target) <shortname, longname, doc>: Delete.
10701         <info>: New.
10702         (exec_target::open): Rename to ...
10703         (exec_target_open): ... this.
10704         * gdbcore.h (core_target_open): Declare.
10705         * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
10706         * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
10707         add_inf_child_target.
10708         * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
10709         add_inf_child_target.
10710         * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
10711         add_inf_child_target.
10712         * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
10713         add_inf_child_target.
10714         * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
10715         add_inf_child_target.
10716         * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
10717         add_inf_child_target.
10718         * i386-linux-nat.c (_initialize_i386_linux_nat): Use
10719         add_inf_child_target.
10720         * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
10721         add_inf_child_target.
10722         * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
10723         add_inf_child_target.
10724         * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
10725         add_inf_child_target.
10726         * inf-child.c (inf_child_target_info): New.
10727         (inf_child_target::info): New.
10728         (inf_child_open_target): Remove 'target' parameter.  Use
10729         get_native_target instead.
10730         (inf_child_target::open): Delete.
10731         (add_inf_child_target): New.
10732         * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
10733         Delete.
10734         <info>: New.
10735         (add_inf_child_target): Declare.
10736         (inf_child_open_target): Declare.
10737         * linux-thread-db.c (thread_db_target_info): New.
10738         (thread_db_target) <shortname, longname, doc>: Delete.
10739         <info>: New.
10740         * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
10741         add_inf_child_target.
10742         * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
10743         add_inf_child_target.
10744         * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
10745         add_inf_child_target.
10746         * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
10747         add_inf_child_target.
10748         * make-target-delegates (print_class): Adjust.
10749         * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
10750         add_inf_child_target.
10751         * mips-linux-nat.c (_initialize_mips_linux_nat): Use
10752         add_inf_child_target.
10753         * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
10754         add_inf_child_target.
10755         * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
10756         add_inf_child_target.
10757         * nto-procfs.c (nto_native_target_info): New.
10758         (nto_procfs_target_native) <shortname, longname, doc>:
10759         Delete.
10760         <info>: New.
10761         (nto_procfs_target_info): New.
10762         (nto_procfs_target_procfs) <shortname, longname, doc>:
10763         Delete.
10764         <info>: New.
10765         (init_procfs_targets): Adjust.
10766         * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
10767         add_inf_child_target.
10768         * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
10769         add_inf_child_target.
10770         * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
10771         add_inf_child_target.
10772         * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
10773         add_inf_child_target.
10774         * ravenscar-thread.c (ravenscar_target_info): New.
10775         (ravenscar_thread_target) <shortname, longname, doc>:
10776         Delete.
10777         <info>: New.
10778         * record-btrace.c (record_btrace_target_info):
10779         (record_btrace_target) <shortname, longname, doc>: Delete.
10780         <info>: New.
10781         (record_btrace_target::open): Rename to ...
10782         (record_btrace_target_open): ... this.  Adjust.
10783         * record-full.c (record_longname, record_doc): New.
10784         (record_full_base_target) <shortname, longname, doc>: Delete.
10785         <info>: New.
10786         (record_full_target_info): New.
10787         (record_full_target): <shortname>: Delete.
10788         <info>: New.
10789         (record_full_core_open_1, record_full_open_1): Update comments.
10790         (record_full_base_target::open): Rename to ...
10791         (record_full_open): ... this.
10792         (cmd_record_full_restore): Update.
10793         (_initialize_record_full): Update.
10794         * remote-sim.c (remote_sim_target_info): New.
10795         (gdbsim_target) <shortname, longname, doc>: Delete.
10796         <info>: New.
10797         (gdbsim_target::open): Rename to ...
10798         (gdbsim_target_open): ... this.
10799         (_initialize_remote_sim): Adjust.
10800         * remote.c (remote_doc): New.
10801         (remote_target_info): New.
10802         (remote_target) <shortname, longname, doc>: Delete.
10803         <info>: New.
10804         (extended_remote_target_info): New.
10805         (extended_remote_target) <shortname, longname, doc>: Delete.
10806         <info>: New.
10807         (remote_target::open_1): Make static.  Adjust.
10808         * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
10809         * s390-linux-nat.c (_initialize_s390_nat): Use
10810         add_inf_child_target.
10811         * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
10812         add_inf_child_target.
10813         * sol-thread.c (thread_db_target_info): New.
10814         (sol_thread_target) <shortname, longname, doc>: Delete.
10815         <info>: New.
10816         * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
10817         add_inf_child_target.
10818         * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
10819         add_inf_child_target.
10820         * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
10821         add_inf_child_target.
10822         * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
10823         add_inf_child_target.
10824         * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
10825         add_inf_child_target.
10826         * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
10827         add_inf_child_target.
10828         * spu-linux-nat.c (_initialize_spu_nat): Use
10829         add_inf_child_target.
10830         * spu-multiarch.c (spu_multiarch_target_info): New.
10831         (spu_multiarch_target) <shortname, longname, doc>: Delete.
10832         <info>: New.
10833         * target-delegates.c: Regenerate.
10834         * target.c: Include <unordered_map>.
10835         (target_ops_p): Delete.
10836         (DEF_VEC_P(target_ops_p)): Delete.
10837         (target_factories): New.
10838         (test_target_info): New.
10839         (test_target_ops::info): New.
10840         (open_target): Adjust to use target_factories.
10841         (add_target_with_completer): Rename to ...
10842         (add_target): ... this.  Change prototype.  Register target_info
10843         and open callback in target_factories.  Register target_info in
10844         command context instead of target_ops.
10845         (add_target): Delete old implementation.
10846         (add_deprecated_target_alias): Change prototype.  Adjust.
10847         (the_native_target): New.
10848         (set_native_target, get_native_target): New.
10849         (find_default_run_target): Use the_native_target.
10850         (find_attach_target, find_run_target): Simplify.
10851         (target_ops::open): Delete.
10852         (dummy_target_info): New.
10853         (dummy_target::shortname, dummy_target::longname)
10854         (dummy_target::doc): Delete.
10855         (dummy_target::info): New.
10856         (debug_target::shortname, debug_target::longname)
10857         (debug_target::doc): Delete.
10858         (debug_target::info): New.
10859         * target.h (struct target_info): New.
10860         (target_ops::~target_ops): Add comment.
10861         (target_ops::info): New.
10862         (target_ops::shortname, target_ops::longname, target_ops::doc): No
10863         longer virtual.  Implement in terms of target_info.
10864         (set_native_target, get_native_target): Declare.
10865         (target_open_ftype): New.
10866         (add_target, add_target_with_completer)
10867         (add_deprecated_target_alias): Change prototype.
10868         (test_target) <shortname, longname, doc>: Delete.
10869         <info>: New.
10870         * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
10871         add_inf_child_target.
10872         * tracefile-tfile.c (tfile_target_info): New.
10873         (tfile_target) <shortname, longname, doc>: Delete.
10874         <info>: New.
10875         (tfile_target::open): Rename to ...
10876         (tfile_target_open): ... this.
10877         (_initialize_tracefile_tfile): Adjust.
10878         * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
10879         add_inf_child_target.
10880         * windows-nat.c (_initialize_windows_nat): Use
10881         add_inf_child_target.
10882         * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
10883         add_inf_child_target.
10884
10885 2018-05-02  Pedro Alves  <palves@redhat.com>
10886
10887         * linux-nat.h (linux_nat_target) <low_new_thread,
10888         low_delete_thread, low_new_fork, low_forget_process,
10889         low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
10890         New virtual methods.
10891         (linux_nat_set_new_thread, linux_nat_set_delete_thread)
10892         (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
10893         (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
10894         (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
10895         (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
10896         Delete.
10897         * linux-fork.c (delete_fork): Adjust to call low method.
10898         * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
10899         (linux_nat_new_fork, linux_nat_forget_process_hook)
10900         (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
10901         (linux_nat_status_is_event):
10902         (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
10903         (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
10904         to call low method.
10905         (sigtrap_is_event): Rename to ...
10906         (linux_nat_target::low_status_is_event): ... this.
10907         (linux_nat_set_status_is_event): Delete.
10908         (save_stop_reason, linux_nat_wait_1)
10909         (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
10910         low methods.
10911         (linux_nat_set_new_thread, linux_nat_set_delete_thread)
10912         (linux_nat_set_new_fork, linux_nat_set_forget_process)
10913         (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
10914         (linux_nat_set_prepare_to_resume): Delete.
10915         * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
10916         low virtual methods.
10917         * amd64-linux-nat.c: Likewise.
10918         * arm-linux-nat.c: Likewise.
10919         * i386-linux-nat.c: Likewise.
10920         * ia64-linux-nat.c: Likewise.
10921         * mips-linux-nat.c: Likewise.
10922         * ppc-linux-nat.c: Likewise.
10923         * s390-linux-nat.c: Likewise.
10924         * sparc64-linux-nat.c: Likewise.
10925         * x86-linux-nat.c: Likewise.
10926         * x86-linux-nat.h: Include "nat/x86-linux.h".
10927         (x86_linux_nat_target) <low_new_fork, low_forget_process,
10928         low_prepare_to_resume, low_new_thread, low_delete_thread>:
10929         Override methods.
10930
10931 2018-05-02  Pedro Alves  <palves@redhat.com>
10932
10933         * target.h (target_ops)
10934         <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
10935         stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
10936         stopped_by_watchpoint, have_continuable_watchpoint,
10937         stopped_data_address, watchpoint_addr_within_range,
10938         can_accel_watchpoint_condition, can_run, thread_alive,
10939         has_all_memory, has_memory, has_stack, has_registers,
10940         has_execution, can_async_p, is_async_p, supports_non_stop,
10941         always_non_stop_p, can_execute_reverse, supports_multi_process,
10942         supports_enable_disable_tracepoint,
10943         supports_disable_randomization, supports_string_tracing,
10944         supports_evaluation_of_breakpoint_conditions,
10945         can_run_breakpoint_commands, filesystem_is_local,
10946         can_download_tracepoint, get_trace_state_variable_value,
10947         set_trace_notes, get_tib_address, use_agent, can_use_agent,
10948         record_is_replaying, record_will_replay,
10949         augmented_libraries_svr4_read>: Adjust to return bool.
10950         * aarch64-linux-nat.c: All implementations adjusted.
10951         * aix-thread.c: All implementations adjusted.
10952         * arm-linux-nat.c: All implementations adjusted.
10953         * breakpoint.c: All implementations adjusted.
10954         * bsd-kvm.c: All implementations adjusted.
10955         * bsd-uthread.c: All implementations adjusted.
10956         * corelow.c: All implementations adjusted.
10957         * ctf.c: All implementations adjusted.
10958         * darwin-nat.c: All implementations adjusted.
10959         * darwin-nat.h: All implementations adjusted.
10960         * exec.c: All implementations adjusted.
10961         * fbsd-nat.c: All implementations adjusted.
10962         * fbsd-nat.h: All implementations adjusted.
10963         * gnu-nat.c: All implementations adjusted.
10964         * gnu-nat.h: All implementations adjusted.
10965         * go32-nat.c: All implementations adjusted.
10966         * ia64-linux-nat.c: All implementations adjusted.
10967         * inf-child.c: All implementations adjusted.
10968         * inf-child.h: All implementations adjusted.
10969         * inf-ptrace.c: All implementations adjusted.
10970         * inf-ptrace.h: All implementations adjusted.
10971         * linux-nat.c: All implementations adjusted.
10972         * linux-nat.h: All implementations adjusted.
10973         * mips-linux-nat.c: All implementations adjusted.
10974         * nto-procfs.c: All implementations adjusted.
10975         * ppc-linux-nat.c: All implementations adjusted.
10976         * procfs.c: All implementations adjusted.
10977         * ravenscar-thread.c: All implementations adjusted.
10978         * record-btrace.c: All implementations adjusted.
10979         * record-full.c: All implementations adjusted.
10980         * remote-sim.c: All implementations adjusted.
10981         * remote.c: All implementations adjusted.
10982         * s390-linux-nat.c: All implementations adjusted.
10983         * sol-thread.c: All implementations adjusted.
10984         * spu-multiarch.c: All implementations adjusted.
10985         * target-delegates.c: All implementations adjusted.
10986         * target.c: All implementations adjusted.
10987         * target.h: All implementations adjusted.
10988         * tracefile-tfile.c: All implementations adjusted.
10989         * tracefile.c: All implementations adjusted.
10990         * tracefile.h: All implementations adjusted.
10991         * windows-nat.c: All implementations adjusted.
10992         * x86-linux-nat.h: All implementations adjusted.
10993         * x86-nat.h: All implementations adjusted.
10994
10995 2018-05-02  Pedro Alves  <palves@redhat.com>
10996
10997         * make-target-delegates (scan_target_h): Don't trim lines here.
10998         Replace sequences of tabs and/or whitespace with a single
10999         whitespace.
11000         (top level, parsing methods): Trim each line before processing it
11001         here.
11002
11003 2018-05-02  Pedro Alves  <palves@redhat.com>
11004             John Baldwin  <jhb@freebsd.org>
11005
11006         * target.h (enum strata) <debug_stratum>: New.
11007         (struct target_ops) <all delegation methods>: Replace by C++
11008         virtual methods, and drop "to_" prefix.  All references updated
11009         throughout.
11010         <to_shortname, to_longname, to_doc, to_data,
11011         to_have_steppable_watchpoint, to_have_continuable_watchpoint,
11012         to_has_thread_control, to_attach_no_wait>: Delete, replaced by
11013         virtual methods.  All references updated throughout.
11014         <can_attach, supports_terminal_ours, can_create_inferior,
11015         get_thread_control_capabilities, attach_no_wait>: New
11016         virtual methods.
11017         <insert_breakpoint, remove_breakpoint>: Now
11018         TARGET_DEFAULT_NORETURN methods.
11019         <info_proc>: Now returns bool.
11020         <to_magic>: Delete.
11021         (OPS_MAGIC): Delete.
11022         (current_target): Delete.  All references replaced by references
11023         to ...
11024         (target_stack): ... this.  New.
11025         (target_shortname, target_longname): Adjust.
11026         (target_can_run): Now a function declaration.
11027         (default_child_has_all_memory, default_child_has_memory)
11028         (default_child_has_stack, default_child_has_registers)
11029         (default_child_has_execution): Remove target_ops parameter.
11030         (complete_target_initialization): Delete.
11031         (memory_breakpoint_target): New template class.
11032         (test_target_ops): Refactor as a C++ class with virtual methods.
11033         * make-target-delegates (NAME_PART): Tighten.
11034         (POINTER_PART, CP_SYMBOL): New.
11035         (SIMPLE_RETURN_PART): Reimplement.
11036         (VEC_RETURN_PART): Expect less.
11037         (RETURN_PART, VIRTUAL_PART): New.
11038         (METHOD): Adjust to C++ virtual methods.
11039         (scan_target_h): Remove reference to C99.
11040         (dname): Output "target_ops::" prefix.
11041         (write_function_header): Adjust to output a C++ class method.
11042         (write_declaration): New.
11043         (write_delegator): Adjust to output a C++ class method.
11044         (tdname): Output "dummy_target::" prefix.
11045         (write_tdefault, write_debugmethod): Adjust to output a C++ class
11046         method.
11047         (tdefault_names, debug_names): Delete.
11048         (return_types, tdefaults, styles, argtypes_array): New.
11049         (top level): All methods are delegators.
11050         (print_class): New.
11051         (top level): Print dummy_target and debug_target classes.
11052         * target-delegates.c: Regenerate.
11053         * target-debug.h (target_debug_print_enum_info_proc_what)
11054         (target_debug_print_thread_control_capabilities)
11055         (target_debug_print_thread_info_p): New.
11056         * target.c (dummy_target): Delete.
11057         (the_dummy_target, the_debug_target): New.
11058         (target_stack): Now extern.
11059         (set_targetdebug): Push/unpush debug target.
11060         (default_child_has_all_memory, default_child_has_memory)
11061         (default_child_has_stack, default_child_has_registers)
11062         (default_child_has_execution): Remove target_ops parameter.
11063         (complete_target_initialization): Delete.
11064         (add_target_with_completer): No longer call
11065         complete_target_initialization.
11066         (target_supports_terminal_ours): Use regular delegation.
11067         (update_current_target): Delete.
11068         (push_target): No longer check magic number.  Don't call
11069         update_current_target.
11070         (unpush_target): Don't call update_current_target.
11071         (target_is_pushed): No longer check magic number.
11072         (target_require_runnable): Skip for all stratums over
11073         process_stratum.
11074         (target_ops::info_proc): New.
11075         (target_info_proc): Use find_target_at and
11076         find_default_run_target.
11077         (target_supports_disable_randomization): Use regular delegation.
11078         (target_get_osdata): Use find_target_at.
11079         (target_ops::open, target_ops::close, target_ops::can_attach)
11080         (target_ops::attach, target_ops::can_create_inferior)
11081         (target_ops::create_inferior, target_ops::can_run)
11082         (target_can_run): New.
11083         (default_fileio_target): Use regular delegation.
11084         (target_ops::fileio_open, target_ops::fileio_pwrite)
11085         (target_ops::fileio_pread, target_ops::fileio_fstat)
11086         (target_ops::fileio_close, target_ops::fileio_unlink)
11087         (target_ops::fileio_readlink): New.
11088         (target_fileio_open_1, target_fileio_unlink)
11089         (target_fileio_readlink): Always call the target method.  Handle
11090         FILEIO_ENOSYS.
11091         (return_zero, return_zero_has_execution): Delete.
11092         (init_dummy_target): Delete.
11093         (dummy_target::dummy_target, dummy_target::shortname)
11094         (dummy_target::longname, dummy_target::doc)
11095         (debug_target::debug_target, debug_target::shortname)
11096         (debug_target::longname, debug_target::doc): New.
11097         (target_supports_delete_record): Use regular delegation.
11098         (setup_target_debug): Delete.
11099         (maintenance_print_target_stack): Skip debug_stratum.
11100         (initialize_targets): Instantiate the_dummy_target and
11101         the_debug_target.
11102         * auxv.c (target_auxv_parse): Remove 'ops' parameter.  Adjust to
11103         use target_stack.
11104         (target_auxv_search, fprint_target_auxv): Adjust.
11105         (info_auxv_command): Adjust to use target_stack.
11106         * auxv.h (target_auxv_parse): Remove 'ops' parameter.
11107         * exceptions.c (print_flush): Handle a NULL target_stack.
11108         * regcache.c (target_ops_no_register): Refactor as class with
11109         virtual methods.
11110
11111         * exec.c (exec_target): New class.
11112         (exec_ops): Now an exec_target.
11113         (exec_open, exec_close_1, exec_get_section_table)
11114         (exec_xfer_partial, exec_files_info, exec_has_memory)
11115         (exec_make_note_section): Refactor as exec_target methods.
11116         (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
11117         Delete.
11118         (exec_target::find_memory_regions): New.
11119         (_initialize_exec): Don't call init_exec_ops.
11120         * gdbcore.h (exec_file_clear): Delete.
11121
11122         * corefile.c (core_target): Delete.
11123         (core_file_command): Adjust.
11124         * corelow.c (core_target): New class.
11125         (the_core_target): New.
11126         (core_close): Remove target_ops parameter.
11127         (core_close_cleanup): Adjust.
11128         (core_target::close): New.
11129         (core_open, core_detach, get_core_registers, core_files_info)
11130         (core_xfer_partial, core_thread_alive, core_read_description)
11131         (core_pid_to_str, core_thread_name, core_has_memory)
11132         (core_has_stack, core_has_registers, core_info_proc): Rework as
11133         core_target methods.
11134         (ignore, core_remove_breakpoint, init_core_ops): Delete.
11135         (_initialize_corelow): Initialize the_core_target.
11136         * gdbcore.h (core_target): Delete.
11137         (the_core_target): New.
11138
11139         * ctf.c: (ctf_target): New class.
11140         (ctf_ops): Now a ctf_target.
11141         (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
11142         (ctf_xfer_partial, ctf_get_trace_state_variable_value)
11143         (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
11144         methods.
11145         (init_ctf_ops): Delete.
11146         (_initialize_ctf): Don't call it.
11147         * tracefile-tfile.c (tfile_target): New class.
11148         (tfile_ops): Now a tfile_target.
11149         (tfile_open, tfile_close, tfile_files_info)
11150         (tfile_get_tracepoint_status, tfile_trace_find)
11151         (tfile_fetch_registers, tfile_xfer_partial)
11152         (tfile_get_trace_state_variable_value, tfile_traceframe_info):
11153         Refactor as tfile_target methods.
11154         (tfile_xfer_partial_features): Remove target_ops parameter.
11155         (init_tfile_ops): Delete.
11156         (_initialize_tracefile_tfile): Don't call it.
11157         * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
11158         (tracefile_has_stack, tracefile_has_registers)
11159         (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
11160         tracefile_target methods.
11161         (init_tracefile_ops): Delete.
11162         (tracefile_target::tracefile_target): New.
11163         * tracefile.h: Include "target.h".
11164         (tracefile_target): New class.
11165         (init_tracefile_ops): Delete.
11166
11167         * spu-multiarch.c (spu_multiarch_target): New class.
11168         (spu_ops): Now a spu_multiarch_target.
11169         (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
11170         (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
11171         (spu_search_memory, spu_mourn_inferior): Refactor as
11172         spu_multiarch_target methods.
11173         (init_spu_ops): Delete.
11174         (_initialize_spu_multiarch): Remove references to init_spu_ops,
11175         complete_target_initialization.
11176
11177         * ravenscar-thread.c (ravenscar_thread_target): New class.
11178         (ravenscar_ops): Now a ravenscar_thread_target.
11179         (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
11180         (ravenscar_thread_alive, ravenscar_pid_to_str)
11181         (ravenscar_fetch_registers, ravenscar_store_registers)
11182         (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
11183         (ravenscar_stopped_by_hw_breakpoint)
11184         (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
11185         (ravenscar_mourn_inferior, ravenscar_core_of_thread)
11186         (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
11187         methods.
11188         (init_ravenscar_thread_ops): Delete.
11189         (_initialize_ravenscar): Remove references to
11190         init_ravenscar_thread_ops and complete_target_initialization.
11191
11192         * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
11193         (bsd_uthread_target): New class.
11194         (bsd_uthread_ops): Now a bsd_uthread_target.
11195         (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
11196         (bsd_uthread_close, bsd_uthread_mourn_inferior)
11197         (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
11198         (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
11199         (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
11200         (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
11201         (bsd_uthread_target): Delete function.
11202         (_initialize_bsd_uthread): Remove reference to
11203         complete_target_initialization.
11204
11205         * bfd-target.c (target_bfd_data): Delete.  Fields folded into ...
11206         (target_bfd): ... this new class.
11207         (target_bfd_xfer_partial, target_bfd_get_section_table)
11208         (target_bfd_close): Refactor as target_bfd methods.
11209         (target_bfd::~target_bfd): New.
11210         (target_bfd_reopen): Adjust.
11211         (target_bfd::close): New.
11212
11213         * record-btrace.c (record_btrace_target): New class.
11214         (record_btrace_ops): Now a record_btrace_target.
11215         (record_btrace_open, record_btrace_stop_recording)
11216         (record_btrace_disconnect, record_btrace_close)
11217         (record_btrace_async, record_btrace_info)
11218         (record_btrace_insn_history, record_btrace_insn_history_range)
11219         (record_btrace_insn_history_from, record_btrace_call_history)
11220         (record_btrace_call_history_range)
11221         (record_btrace_call_history_from, record_btrace_record_method)
11222         (record_btrace_is_replaying, record_btrace_will_replay)
11223         (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
11224         (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
11225         (record_btrace_store_registers, record_btrace_prepare_to_store)
11226         (record_btrace_to_get_unwinder)
11227         (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
11228         (record_btrace_commit_resume, record_btrace_wait)
11229         (record_btrace_stop, record_btrace_can_execute_reverse)
11230         (record_btrace_stopped_by_sw_breakpoint)
11231         (record_btrace_supports_stopped_by_sw_breakpoint)
11232         (record_btrace_stopped_by_hw_breakpoint)
11233         (record_btrace_supports_stopped_by_hw_breakpoint)
11234         (record_btrace_update_thread_list, record_btrace_thread_alive)
11235         (record_btrace_goto_begin, record_btrace_goto_end)
11236         (record_btrace_goto, record_btrace_stop_replaying_all)
11237         (record_btrace_execution_direction)
11238         (record_btrace_prepare_to_generate_core)
11239         (record_btrace_done_generating_core): Refactor as
11240         record_btrace_target methods.
11241         (init_record_btrace_ops): Delete.
11242         (_initialize_record_btrace): Remove reference to
11243         init_record_btrace_ops.
11244         * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
11245         the execution_direction global.
11246         (record_full_base_target, record_full_target)
11247         (record_full_core_target): New classes.
11248         (record_full_ops): Now a record_full_target.
11249         (record_full_core_ops): Now a record_full_core_target.
11250         (record_full_target::detach, record_full_target::disconnect)
11251         (record_full_core_target::disconnect)
11252         (record_full_target::mourn_inferior, record_full_target::kill):
11253         New.
11254         (record_full_open, record_full_close, record_full_async): Refactor
11255         as methods of the record_full_base_target class.
11256         (record_full_resume, record_full_commit_resume): Refactor
11257         as methods of the record_full_target class.
11258         (record_full_wait, record_full_stopped_by_watchpoint)
11259         (record_full_stopped_data_address)
11260         (record_full_stopped_by_sw_breakpoint)
11261         (record_full_supports_stopped_by_sw_breakpoint)
11262         (record_full_stopped_by_hw_breakpoint)
11263         (record_full_supports_stopped_by_hw_breakpoint): Refactor as
11264         methods of the record_full_base_target class.
11265         (record_full_store_registers, record_full_xfer_partial)
11266         (record_full_insert_breakpoint, record_full_remove_breakpoint):
11267         Refactor as methods of the record_full_target class.
11268         (record_full_can_execute_reverse, record_full_get_bookmark)
11269         (record_full_goto_bookmark, record_full_execution_direction)
11270         (record_full_record_method, record_full_info, record_full_delete)
11271         (record_full_is_replaying, record_full_will_replay)
11272         (record_full_goto_begin, record_full_goto_end, record_full_goto)
11273         (record_full_stop_replaying): Refactor as methods of the
11274         record_full_base_target class.
11275         (record_full_core_resume, record_full_core_kill)
11276         (record_full_core_fetch_registers)
11277         (record_full_core_prepare_to_store)
11278         (record_full_core_store_registers, record_full_core_xfer_partial)
11279         (record_full_core_insert_breakpoint)
11280         (record_full_core_remove_breakpoint)
11281         (record_full_core_has_execution): Refactor
11282         as methods of the record_full_core_target class.
11283         (record_full_base_target::supports_delete_record): New.
11284         (init_record_full_ops): Delete.
11285         (init_record_full_core_ops): Delete.
11286         (record_full_save): Refactor as method of the
11287         record_full_base_target class.
11288         (_initialize_record_full): Remove references to
11289         init_record_full_ops and init_record_full_core_ops.
11290
11291         * remote.c (remote_target, extended_remote_target): New classes.
11292         (remote_ops): Now a remote_target.
11293         (extended_remote_ops): Now an extended_remote_target.
11294         (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
11295         (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
11296         (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
11297         (remote_pass_signals, remote_set_syscall_catchpoint)
11298         (remote_program_signals, )
11299         (remote_thread_always_alive): Remove target_ops parameter.
11300         (remote_thread_alive, remote_thread_name)
11301         (remote_update_thread_list, remote_threads_extra_info)
11302         (remote_static_tracepoint_marker_at)
11303         (remote_static_tracepoint_markers_by_strid)
11304         (remote_get_ada_task_ptid, remote_close, remote_start_remote)
11305         (remote_open): Refactor as methods of remote_target.
11306         (extended_remote_open, extended_remote_detach)
11307         (extended_remote_attach, extended_remote_post_attach):
11308         (extended_remote_supports_disable_randomization)
11309         (extended_remote_create_inferior): : Refactor as method of
11310         extended_remote_target.
11311         (remote_set_permissions, remote_open_1, remote_detach)
11312         (remote_follow_fork, remote_follow_exec, remote_disconnect)
11313         (remote_resume, remote_commit_resume, remote_stop)
11314         (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
11315         (remote_terminal_ours, remote_wait, remote_fetch_registers)
11316         (remote_prepare_to_store, remote_store_registers)
11317         (remote_flash_erase, remote_flash_done, remote_files_info)
11318         (remote_kill, remote_mourn, remote_insert_breakpoint)
11319         (remote_remove_breakpoint, remote_insert_watchpoint)
11320         (remote_watchpoint_addr_within_range)
11321         (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
11322         (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
11323         (remote_supports_stopped_by_sw_breakpoint)
11324         (remote_stopped_by_hw_breakpoint)
11325         (remote_supports_stopped_by_hw_breakpoint)
11326         (remote_stopped_by_watchpoint, remote_stopped_data_address)
11327         (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
11328         (remote_verify_memory): Refactor as methods of remote_target.
11329         (remote_write_qxfer, remote_read_qxfer): Remove target_ops
11330         parameter.
11331         (remote_xfer_partial, remote_get_memory_xfer_limit)
11332         (remote_search_memory, remote_rcmd, remote_memory_map)
11333         (remote_pid_to_str, remote_get_thread_local_address)
11334         (remote_get_tib_address, remote_read_description): Refactor as
11335         methods of remote_target.
11336         (remote_target::fileio_open, remote_target::fileio_pwrite)
11337         (remote_target::fileio_pread, remote_target::fileio_close): New.
11338         (remote_hostio_readlink, remote_hostio_fstat)
11339         (remote_filesystem_is_local, remote_can_execute_reverse)
11340         (remote_supports_non_stop, remote_supports_disable_randomization)
11341         (remote_supports_multi_process, remote_supports_cond_breakpoints)
11342         (remote_supports_enable_disable_tracepoint)
11343         (remote_supports_string_tracing)
11344         (remote_can_run_breakpoint_commands, remote_trace_init)
11345         (remote_download_tracepoint, remote_can_download_tracepoint)
11346         (remote_download_trace_state_variable, remote_enable_tracepoint)
11347         (remote_disable_tracepoint, remote_trace_set_readonly_regions)
11348         (remote_trace_start, remote_get_trace_status)
11349         (remote_get_tracepoint_status, remote_trace_stop)
11350         (remote_trace_find, remote_get_trace_state_variable_value)
11351         (remote_save_trace_data, remote_get_raw_trace_data)
11352         (remote_set_disconnected_tracing, remote_core_of_thread)
11353         (remote_set_circular_trace_buffer, remote_traceframe_info)
11354         (remote_get_min_fast_tracepoint_insn_len)
11355         (remote_set_trace_buffer_size, remote_set_trace_notes)
11356         (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
11357         (remote_disable_btrace, remote_teardown_btrace)
11358         (remote_read_btrace, remote_btrace_conf)
11359         (remote_augmented_libraries_svr4_read, remote_load)
11360         (remote_pid_to_exec_file, remote_can_do_single_step)
11361         (remote_execution_direction, remote_thread_handle_to_thread_info):
11362         Refactor as methods of remote_target.
11363         (init_remote_ops, init_extended_remote_ops): Delete.
11364         (remote_can_async_p, remote_is_async_p, remote_async)
11365         (remote_thread_events, remote_upload_tracepoints)
11366         (remote_upload_trace_state_variables): Refactor as methods of
11367         remote_target.
11368         (_initialize_remote): Remove references to init_remote_ops and
11369         init_extended_remote_ops.
11370
11371         * remote-sim.c (gdbsim_target): New class.
11372         (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
11373         (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
11374         (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
11375         (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
11376         (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
11377         (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
11378         Refactor as methods of gdbsim_target.
11379         (gdbsim_ops): Now a gdbsim_target.
11380         (init_gdbsim_ops): Delete.
11381         (gdbsim_cntrl_c): Adjust.
11382         (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
11383
11384         * amd64-linux-nat.c (amd64_linux_nat_target): New class.
11385         (the_amd64_linux_nat_target): New.
11386         (amd64_linux_fetch_inferior_registers)
11387         (amd64_linux_store_inferior_registers): Refactor as methods of
11388         amd64_linux_nat_target.
11389         (_initialize_amd64_linux_nat): Adjust.  Set linux_target.
11390         * i386-linux-nat.c: Don't include "linux-nat.h".
11391         (i386_linux_nat_target): New class.
11392         (the_i386_linux_nat_target): New.
11393         (i386_linux_fetch_inferior_registers)
11394         (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
11395         as methods of i386_linux_nat_target.
11396         (_initialize_i386_linux_nat): Adjust.  Set linux_target.
11397         * inf-child.c (inf_child_ops): Delete.
11398         (inf_child_fetch_inferior_registers)
11399         (inf_child_store_inferior_registers): Delete.
11400         (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
11401         methods of inf_child_target.
11402         (inf_child_target::supports_terminal_ours)
11403         (inf_child_target::terminal_init)
11404         (inf_child_target::terminal_inferior)
11405         (inf_child_target::terminal_ours_for_output)
11406         (inf_child_target::terminal_ours, inf_child_target::interrupt)
11407         (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
11408         New.
11409         (inf_child_open, inf_child_disconnect, inf_child_close)
11410         (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
11411         (inf_child_post_startup_inferior, inf_child_can_run)
11412         (inf_child_pid_to_exec_file): Refactor as methods of
11413         inf_child_target.
11414         (inf_child_follow_fork): Delete.
11415         (inf_child_target::can_create_inferior)
11416         (inf_child_target::can_attach): New.
11417         (inf_child_target::has_all_memory, inf_child_target::has_memory)
11418         (inf_child_target::has_stack, inf_child_target::has_registers)
11419         (inf_child_target::has_execution): New.
11420         (inf_child_fileio_open, inf_child_fileio_pwrite)
11421         (inf_child_fileio_pread, inf_child_fileio_fstat)
11422         (inf_child_fileio_close, inf_child_fileio_unlink)
11423         (inf_child_fileio_readlink, inf_child_use_agent)
11424         (inf_child_can_use_agent): Refactor as methods of
11425         inf_child_target.
11426         (return_zero, inf_child_target): Delete.
11427         (inf_child_target::inf_child_target): New.
11428         * inf-child.h: Include "target.h".
11429         (inf_child_target): Delete function prototype.
11430         (inf_child_target): New class.
11431         (inf_child_open_target, inf_child_mourn_inferior)
11432         (inf_child_maybe_unpush_target): Delete.
11433         * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
11434         (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
11435         (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
11436         (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
11437         (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
11438         (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
11439         (inf_ptrace_wait, inf_ptrace_xfer_partial)
11440         (inf_ptrace_thread_alive, inf_ptrace_files_info)
11441         (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
11442         methods of inf_ptrace_target.
11443         (inf_ptrace_target): Delete function.
11444         * inf-ptrace.h: Include "inf-child.h".
11445         (inf_ptrace_target): Delete function declaration.
11446         (inf_ptrace_target): New class.
11447         (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
11448         * linux-nat.c (linux_target): New.
11449         (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
11450         (linux_nat_target::~linux_nat_target): New.
11451         (linux_child_post_attach, linux_child_post_startup_inferior)
11452         (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
11453         (linux_child_remove_fork_catchpoint)
11454         (linux_child_insert_vfork_catchpoint)
11455         (linux_child_remove_vfork_catchpoint)
11456         (linux_child_insert_exec_catchpoint)
11457         (linux_child_remove_exec_catchpoint)
11458         (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
11459         (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
11460         (linux_nat_resume, linux_nat_stopped_by_watchpoint)
11461         (linux_nat_stopped_data_address)
11462         (linux_nat_stopped_by_sw_breakpoint)
11463         (linux_nat_supports_stopped_by_sw_breakpoint)
11464         (linux_nat_stopped_by_hw_breakpoint)
11465         (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
11466         (linux_nat_kill, linux_nat_mourn_inferior)
11467         (linux_nat_xfer_partial, linux_nat_thread_alive)
11468         (linux_nat_update_thread_list, linux_nat_pid_to_str)
11469         (linux_nat_thread_name, linux_child_pid_to_exec_file)
11470         (linux_child_static_tracepoint_markers_by_strid)
11471         (linux_nat_is_async_p, linux_nat_can_async_p)
11472         (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
11473         (linux_nat_supports_multi_process)
11474         (linux_nat_supports_disable_randomization, linux_nat_async)
11475         (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
11476         (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
11477         (linux_nat_fileio_open, linux_nat_fileio_readlink)
11478         (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
11479         methods of linux_nat_target.
11480         (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
11481         (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
11482         parameter.
11483         (check_stopped_by_watchpoint): Adjust.
11484         (linux_xfer_partial): Delete.
11485         (linux_target_install_ops, linux_target, linux_nat_add_target):
11486         Delete.
11487         (linux_nat_target::linux_nat_target): New.
11488         * linux-nat.h: Include "inf-ptrace.h".
11489         (linux_nat_target): New.
11490         (linux_target, linux_target_install_ops, linux_nat_add_target):
11491         Delete function declarations.
11492         (linux_target): Declare global.
11493         * linux-thread-db.c (thread_db_target): New.
11494         (thread_db_target::thread_db_target): New.
11495         (thread_db_ops): Delete.
11496         (the_thread_db_target): New.
11497         (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
11498         (thread_db_update_thread_list, thread_db_pid_to_str)
11499         (thread_db_extra_thread_info)
11500         (thread_db_thread_handle_to_thread_info)
11501         (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
11502         (thread_db_resume): Refactor as methods of thread_db_target.
11503         (init_thread_db_ops): Delete.
11504         (_initialize_thread_db): Remove reference to init_thread_db_ops.
11505         * x86-linux-nat.c: Don't include "linux-nat.h".
11506         (super_post_startup_inferior): Delete.
11507         (x86_linux_nat_target::~x86_linux_nat_target): New.
11508         (x86_linux_child_post_startup_inferior)
11509         (x86_linux_read_description, x86_linux_enable_btrace)
11510         (x86_linux_disable_btrace, x86_linux_teardown_btrace)
11511         (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
11512         methods of x86_linux_nat_target.
11513         (x86_linux_create_target): Delete.  Bits folded ...
11514         (x86_linux_add_target): ... here.  Now takes a linux_nat_target
11515         pointer.
11516         * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
11517         (x86_linux_nat_target): New class.
11518         (x86_linux_create_target): Delete.
11519         (x86_linux_add_target): Now takes a linux_nat_target pointer.
11520         * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
11521         (x86_region_ok_for_watchpoint, x86_stopped_data_address)
11522         (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
11523         (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
11524         (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
11525         make extern.
11526         (x86_use_watchpoints): Delete.
11527         * x86-nat.h: Include "breakpoint.h" and "target.h".
11528         (x86_use_watchpoints): Delete.
11529         (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
11530         (x86_stopped_by_watchpoint, x86_stopped_data_address)
11531         (x86_insert_watchpoint, x86_remove_watchpoint)
11532         (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
11533         (x86_stopped_by_hw_breakpoint): New declarations.
11534         (x86_nat_target): New template class.
11535
11536         * ppc-linux-nat.c (ppc_linux_nat_target): New class.
11537         (the_ppc_linux_nat_target): New.
11538         (ppc_linux_fetch_inferior_registers)
11539         (ppc_linux_can_use_hw_breakpoint)
11540         (ppc_linux_region_ok_for_hw_watchpoint)
11541         (ppc_linux_ranged_break_num_registers)
11542         (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
11543         (ppc_linux_insert_mask_watchpoint)
11544         (ppc_linux_remove_mask_watchpoint)
11545         (ppc_linux_can_accel_watchpoint_condition)
11546         (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
11547         (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
11548         (ppc_linux_watchpoint_addr_within_range)
11549         (ppc_linux_masked_watch_num_registers)
11550         (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
11551         (ppc_linux_read_description): Refactor as methods of
11552         ppc_linux_nat_target.
11553         (_initialize_ppc_linux_nat): Adjust.  Set linux_target.
11554
11555         * procfs.c (procfs_xfer_partial): Delete forward declaration.
11556         (procfs_target): New class.
11557         (the_procfs_target): New.
11558         (procfs_target): Delete function.
11559         (procfs_auxv_parse, procfs_attach, procfs_detach)
11560         (procfs_fetch_registers, procfs_store_registers, procfs_wait)
11561         (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
11562         (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
11563         (procfs_create_inferior, procfs_update_thread_list)
11564         (procfs_thread_alive, procfs_pid_to_str)
11565         (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
11566         (procfs_stopped_data_address, procfs_insert_watchpoint)
11567         (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
11568         (proc_find_memory_regions, procfs_info_proc)
11569         (procfs_make_note_section): Refactor as methods of procfs_target.
11570         (_initialize_procfs): Adjust.
11571         * sol-thread.c (sol_thread_target): New class.
11572         (sol_thread_ops): Now a sol_thread_target.
11573         (sol_thread_detach, sol_thread_resume, sol_thread_wait)
11574         (sol_thread_fetch_registers, sol_thread_store_registers)
11575         (sol_thread_xfer_partial, sol_thread_mourn_inferior)
11576         (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
11577         (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
11578         (init_sol_thread_ops): Delete.
11579         (_initialize_sol_thread): Adjust.  Remove references to
11580         init_sol_thread_ops and complete_target_initialization.
11581
11582         * windows-nat.c (windows_nat_target): New class.
11583         (windows_fetch_inferior_registers)
11584         (windows_store_inferior_registers, windows_resume, windows_wait)
11585         (windows_attach, windows_detach, windows_pid_to_exec_file)
11586         (windows_files_info, windows_create_inferior)
11587         (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
11588         (windows_close, windows_pid_to_str, windows_xfer_partial)
11589         (windows_get_tib_address, windows_get_ada_task_ptid)
11590         (windows_thread_name, windows_thread_alive): Refactor as
11591         windows_nat_target methods.
11592         (do_initial_windows_stuff): Adjust.
11593         (windows_target): Delete function.
11594         (_initialize_windows_nat): Adjust.
11595
11596         * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
11597         (darwin_mourn_inferior, darwin_kill_inferior)
11598         (darwin_create_inferior, darwin_attach, darwin_detach)
11599         (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
11600         (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
11601         (darwin_supports_multi_process): Refactor as darwin_nat_target
11602         methods.
11603         (darwin_resume_to, darwin_files_info): Delete.
11604         (_initialize_darwin_inferior): Rename to ...
11605         (_initialize_darwin_nat): ... this.  Adjust to C++ification.
11606         * darwin-nat.h: Include "inf-child.h".
11607         (darwin_nat_target): New class.
11608         (darwin_complete_target): Delete.
11609         * i386-darwin-nat.c (i386_darwin_nat_target): New class.
11610         (darwin_target): New.
11611         (i386_darwin_fetch_inferior_registers)
11612         (i386_darwin_store_inferior_registers): Refactor as methods of
11613         darwin_nat_target.
11614         (darwin_complete_target): Delete, with ...
11615         (_initialize_i386_darwin_nat): ... bits factored out here.
11616
11617         * alpha-linux-nat.c (alpha_linux_nat_target): New class.
11618         (the_alpha_linux_nat_target): New.
11619         (alpha_linux_register_u_offset): Refactor as
11620         alpha_linux_nat_target method.
11621         (_initialize_alpha_linux_nat): Adjust.
11622         * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
11623         (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
11624         (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
11625         methods of linux_nat_trad_target.
11626         (linux_trad_target): Delete.
11627         * linux-nat-trad.h (linux_trad_target): Delete function.
11628         (linux_nat_trad_target): New class.
11629         * mips-linux-nat.c (mips_linux_nat_target): New class.
11630         (super_fetch_registers, super_store_registers, super_close):
11631         Delete.
11632         (the_mips_linux_nat_target): New.
11633         (mips64_linux_regsets_fetch_registers)
11634         (mips64_linux_regsets_store_registers)
11635         (mips64_linux_fetch_registers, mips64_linux_store_registers)
11636         (mips_linux_register_u_offset, mips_linux_read_description)
11637         (mips_linux_can_use_hw_breakpoint)
11638         (mips_linux_stopped_by_watchpoint)
11639         (mips_linux_stopped_data_address)
11640         (mips_linux_region_ok_for_hw_watchpoint)
11641         (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
11642         (mips_linux_close): Refactor as methods of mips_linux_nat.
11643         (_initialize_mips_linux_nat): Adjust to C++ification.
11644
11645         * aix-thread.c (aix_thread_target): New class.
11646         (aix_thread_ops): Now an aix_thread_target.
11647         (aix_thread_detach, aix_thread_resume, aix_thread_wait)
11648         (aix_thread_fetch_registers, aix_thread_store_registers)
11649         (aix_thread_xfer_partial, aix_thread_mourn_inferior)
11650         (aix_thread_thread_alive, aix_thread_pid_to_str)
11651         (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
11652         Refactor as methods of aix_thread_target.
11653         (init_aix_thread_ops): Delete.
11654         (_initialize_aix_thread): Remove references to init_aix_thread_ops
11655         and complete_target_initialization.
11656         * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
11657         (rs6000_nat_target): New class.
11658         (the_rs6000_nat_target): New.
11659         (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
11660         (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
11661         (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
11662         (super_create_inferior): Delete.
11663         (_initialize_rs6000_nat): Adjust to C++ification.
11664
11665         * arm-linux-nat.c (arm_linux_nat_target): New class.
11666         (the_arm_linux_nat_target): New.
11667         (arm_linux_fetch_inferior_registers)
11668         (arm_linux_store_inferior_registers, arm_linux_read_description)
11669         (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
11670         (arm_linux_remove_hw_breakpoint)
11671         (arm_linux_region_ok_for_hw_watchpoint)
11672         (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
11673         (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
11674         (arm_linux_watchpoint_addr_within_range): Refactor as methods of
11675         arm_linux_nat_target.
11676         (_initialize_arm_linux_nat): Adjust to C++ification.
11677
11678         * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
11679         (the_aarch64_linux_nat_target): New.
11680         (aarch64_linux_fetch_inferior_registers)
11681         (aarch64_linux_store_inferior_registers)
11682         (aarch64_linux_child_post_startup_inferior)
11683         (aarch64_linux_read_description)
11684         (aarch64_linux_can_use_hw_breakpoint)
11685         (aarch64_linux_insert_hw_breakpoint)
11686         (aarch64_linux_remove_hw_breakpoint)
11687         (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
11688         (aarch64_linux_region_ok_for_hw_watchpoint)
11689         (aarch64_linux_stopped_data_address)
11690         (aarch64_linux_stopped_by_watchpoint)
11691         (aarch64_linux_watchpoint_addr_within_range)
11692         (aarch64_linux_can_do_single_step): Refactor as methods of
11693         aarch64_linux_nat_target.
11694         (super_post_startup_inferior): Delete.
11695         (_initialize_aarch64_linux_nat): Adjust to C++ification.
11696
11697         * hppa-linux-nat.c (hppa_linux_nat_target): New class.
11698         (the_hppa_linux_nat_target): New.
11699         (hppa_linux_fetch_inferior_registers)
11700         (hppa_linux_store_inferior_registers): Refactor as methods of
11701         hppa_linux_nat_target.
11702         (_initialize_hppa_linux_nat): Adjust to C++ification.
11703
11704         * ia64-linux-nat.c (ia64_linux_nat_target): New class.
11705         (the_ia64_linux_nat_target): New.
11706         (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
11707         (ia64_linux_stopped_data_address)
11708         (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
11709         (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
11710         ia64_linux_nat_target methods.
11711         (super_xfer_partial): Delete.
11712         (_initialize_ia64_linux_nat): Adjust to C++ification.
11713
11714         * m32r-linux-nat.c (m32r_linux_nat_target): New class.
11715         (the_m32r_linux_nat_target): New.
11716         (m32r_linux_fetch_inferior_registers)
11717         (m32r_linux_store_inferior_registers): Refactor as
11718         m32r_linux_nat_target methods.
11719         (_initialize_m32r_linux_nat): Adjust to C++ification.
11720
11721         * m68k-linux-nat.c (m68k_linux_nat_target): New class.
11722         (the_m68k_linux_nat_target): New.
11723         (m68k_linux_fetch_inferior_registers)
11724         (m68k_linux_store_inferior_registers): Refactor as
11725         m68k_linux_nat_target methods.
11726         (_initialize_m68k_linux_nat): Adjust to C++ification.
11727
11728         * s390-linux-nat.c (s390_linux_nat_target): New class.
11729         (the_s390_linux_nat_target): New.
11730         (s390_linux_fetch_inferior_registers)
11731         (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
11732         (s390_insert_watchpoint, s390_remove_watchpoint)
11733         (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
11734         (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
11735         (s390_auxv_parse, s390_read_description): Refactor as methods of
11736         s390_linux_nat_target.
11737         (_initialize_s390_nat): Adjust to C++ification.
11738
11739         * sparc-linux-nat.c (sparc_linux_nat_target): New class.
11740         (the_sparc_linux_nat_target): New.
11741         (_initialize_sparc_linux_nat): Adjust to C++ification.
11742         * sparc-nat.c (sparc_fetch_inferior_registers)
11743         (sparc_store_inferior_registers): Remove target_ops parameter.
11744         * sparc-nat.h (sparc_fetch_inferior_registers)
11745         (sparc_store_inferior_registers): Remove target_ops parameter.
11746         * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
11747         (the_sparc64_linux_nat_target): New.
11748         (_initialize_sparc64_linux_nat): Adjust to C++ification.
11749
11750         * spu-linux-nat.c (spu_linux_nat_target): New class.
11751         (the_spu_linux_nat_target): New.
11752         (spu_child_post_startup_inferior, spu_child_post_attach)
11753         (spu_child_wait, spu_fetch_inferior_registers)
11754         (spu_store_inferior_registers, spu_xfer_partial)
11755         (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
11756         methods.
11757         (_initialize_spu_nat): Adjust to C++ification.
11758
11759         * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
11760         (the_tilegx_linux_nat_target): New.
11761         (fetch_inferior_registers, store_inferior_registers):
11762         Refactor as methods.
11763         (_initialize_tile_linux_nat): Adjust to C++ification.
11764
11765         * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
11766         (the_xtensa_linux_nat_target): New.
11767         (xtensa_linux_fetch_inferior_registers)
11768         (xtensa_linux_store_inferior_registers): Refactor as
11769         xtensa_linux_nat_target methods.
11770         (_initialize_xtensa_linux_nat): Adjust to C++ification.
11771
11772         * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
11773         (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
11774         (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
11775         (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
11776         (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
11777         (fbsd_stopped_by_sw_breakpoint)
11778         (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
11779         (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
11780         (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
11781         (fbsd_post_startup_inferior, fbsd_post_attach)
11782         (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
11783         (fbsd_set_syscall_catchpoint)
11784         (super_xfer_partial, super_resume, super_wait)
11785         (fbsd_supports_stopped_by_hw_breakpoint): Delete.
11786         (fbsd_handle_debug_trap): Remove target_ops parameter.
11787         (fbsd_nat_add_target): Delete.
11788         * fbsd-nat.h: Include "inf-ptrace.h".
11789         (fbsd_nat_add_target): Delete.
11790         (USE_SIGTRAP_SIGINFO): Define.
11791         (fbsd_nat_target): New class.
11792
11793         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
11794         (amd64bsd_store_inferior_registers): Remove target_ops parameter.
11795         (amd64bsd_target): Delete.
11796         * amd64-bsd-nat.h: New file.
11797         * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
11798         "x86-bsd-nat.h".
11799         (amd64_fbsd_nat_target): New class.
11800         (the_amd64_fbsd_nat_target): New.
11801         (amd64fbsd_read_description): Refactor as method of
11802         amd64_fbsd_nat_target.
11803         (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
11804         (_initialize_amd64fbsd_nat): Adjust to C++ification.
11805         * amd64-nat.h (amd64bsd_target): Delete function declaration.
11806         * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
11807         (i386bsd_store_inferior_registers): Remove target_ops parameter.
11808         (i386bsd_target): Delete.
11809         * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
11810         (i386bsd_fetch_inferior_registers)
11811         (i386bsd_store_inferior_registers): Declare.
11812         (i386_bsd_nat_target): New class.
11813         * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
11814         (the_i386_fbsd_nat_target): New.
11815         (i386fbsd_resume, i386fbsd_read_description): Refactor as
11816         i386_fbsd_nat_target methods.
11817         (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
11818         (_initialize_i386fbsd_nat): Adjust to C++ification.
11819         * x86-bsd-nat.c (super_mourn_inferior): Delete.
11820         (x86bsd_mourn_inferior, x86bsd_target): Delete.
11821         (_initialize_x86_bsd_nat): Adjust to C++ification.
11822         * x86-bsd-nat.h: Include "x86-nat.h".
11823         (x86bsd_target): Delete declaration.
11824         (x86bsd_nat_target): New class.
11825
11826         * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
11827         (the_aarch64_fbsd_nat_target): New.
11828         (aarch64_fbsd_fetch_inferior_registers)
11829         (aarch64_fbsd_store_inferior_registers): Refactor as methods of
11830         aarch64_fbsd_nat_target.
11831         (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
11832         * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
11833         (the_alpha_bsd_nat_target): New.
11834         (alphabsd_fetch_inferior_registers)
11835         (alphabsd_store_inferior_registers): Refactor as
11836         alpha_bsd_nat_target methods.
11837         (_initialize_alphabsd_nat): Refactor as methods of
11838         alpha_bsd_nat_target.
11839         * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
11840         (the_amd64_nbsd_nat_target): New.
11841         (_initialize_amd64nbsd_nat): Adjust to C++ification.
11842         * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
11843         (the_amd64_obsd_nat_target): New.
11844         (_initialize_amd64obsd_nat): Adjust to C++ification.
11845         * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
11846         (the_arm_fbsd_nat_target): New.
11847         (arm_fbsd_fetch_inferior_registers)
11848         (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
11849         (_initialize_arm_fbsd_nat): Refactor as methods of
11850         arm_fbsd_nat_target.
11851         (_initialize_arm_fbsd_nat): Adjust to C++ification.
11852         * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
11853         (the_arm_netbsd_nat_target): New.
11854         (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
11855         arm_netbsd_nat_target.
11856         (_initialize_arm_netbsd_nat): Adjust to C++ification.
11857         * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
11858         (the_hppa_nbsd_nat_target): New.
11859         (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
11860         hppa_nbsd_nat_target methods.
11861         (_initialize_hppanbsd_nat): Adjust to C++ification.
11862         * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
11863         (the_hppa_obsd_nat_target): New.
11864         (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
11865         methods of hppa_obsd_nat_target.
11866         (_initialize_hppaobsd_nat): Adjust to C++ification.  Use
11867         add_target.
11868         * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
11869         (_initialize_i386nbsd_nat): Adjust to C++ification.  Use
11870         add_target.
11871         * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
11872         (_initialize_i386obsd_nat): Use add_target.
11873         * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
11874         (the_m68k_bsd_nat_target): New.
11875         (m68kbsd_fetch_inferior_registers)
11876         (m68kbsd_store_inferior_registers): Refactor as methods of
11877         m68k_bsd_nat_target.
11878         (_initialize_m68kbsd_nat): Adjust to C++ification.
11879         * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
11880         (the_mips_fbsd_nat_target): New.
11881         (mips_fbsd_fetch_inferior_registers)
11882         (mips_fbsd_store_inferior_registers): Refactor as methods of
11883         mips_fbsd_nat_target.
11884         (_initialize_mips_fbsd_nat): Adjust to C++ification.  Use
11885         add_target.
11886         * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
11887         (the_mips_nbsd_nat_target): New.
11888         (mipsnbsd_fetch_inferior_registers)
11889         (mipsnbsd_store_inferior_registers): Refactor as methods of
11890         mips_nbsd_nat_target.
11891         (_initialize_mipsnbsd_nat): Adjust to C++ification.
11892         * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
11893         (the_mips64_obsd_nat_target): New.
11894         (mips64obsd_fetch_inferior_registers)
11895         (mips64obsd_store_inferior_registers): Refactor as methods of
11896         mips64_obsd_nat_target.
11897         (_initialize_mips64obsd_nat): Adjust to C++ification.  Use
11898         add_target.
11899         * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
11900         nbsd_nat_target.
11901         * nbsd-nat.h: Include "inf-ptrace.h".
11902         (nbsd_nat_target): New class.
11903         * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
11904         (obsd_wait): Refactor as methods of obsd_nat_target.
11905         (obsd_add_target): Delete.
11906         * obsd-nat.h: Include "inf-ptrace.h".
11907         (obsd_nat_target): New class.
11908         * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
11909         (the_ppc_fbsd_nat_target): New.
11910         (ppcfbsd_fetch_inferior_registers)
11911         (ppcfbsd_store_inferior_registers): Refactor as methods of
11912         ppc_fbsd_nat_target.
11913         (_initialize_ppcfbsd_nat): Adjust to C++ification.  Use
11914         add_target.
11915         * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
11916         (the_ppc_nbsd_nat_target): New.
11917         (ppcnbsd_fetch_inferior_registers)
11918         (ppcnbsd_store_inferior_registers): Refactor as methods of
11919         ppc_nbsd_nat_target.
11920         (_initialize_ppcnbsd_nat): Adjust to C++ification.
11921         * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
11922         (the_ppc_obsd_nat_target): New.
11923         (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
11924         methods of ppc_obsd_nat_target.
11925         (_initialize_ppcobsd_nat): Adjust to C++ification.  Use
11926         add_target.
11927         * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
11928         (the_sh_nbsd_nat_target): New.
11929         (shnbsd_fetch_inferior_registers)
11930         (shnbsd_store_inferior_registers): Refactor as methods of
11931         sh_nbsd_nat_target.
11932         (_initialize_shnbsd_nat): Adjust to C++ification.
11933         * sparc-nat.c (sparc_xfer_wcookie): Make extern.
11934         (inf_ptrace_xfer_partial): Delete.
11935         (sparc_xfer_partial, sparc_target): Delete.
11936         * sparc-nat.h (sparc_fetch_inferior_registers)
11937         (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
11938         (sparc_target): Delete function declaration.
11939         (sparc_target): New template class.
11940         * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
11941         (_initialize_sparcnbsd_nat): Adjust to C++ification.
11942         * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
11943         (_initialize_sparc64fbsd_nat): Adjust to C++ification.  Use
11944         add_target.
11945         * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
11946         (_initialize_sparc64nbsd_nat): Adjust to C++ification.
11947         * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
11948         (_initialize_sparc64obsd_nat): Adjust to C++ification.  Use
11949         add_target.
11950         * vax-bsd-nat.c (vax_bsd_nat_target): New class.
11951         (the_vax_bsd_nat_target): New.
11952         (vaxbsd_fetch_inferior_registers)
11953         (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
11954         methods.
11955         (_initialize_vaxbsd_nat): Adjust to C++ification.
11956
11957         * bsd-kvm.c (bsd_kvm_target): New class.
11958         (bsd_kvm_ops): Now a bsd_kvm_target.
11959         (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
11960         (bsd_kvm_files_info, bsd_kvm_fetch_registers)
11961         (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
11962         bsd_kvm_target.
11963         (bsd_kvm_return_one): Delete.
11964         (bsd_kvm_add_target): Adjust to C++ification.
11965
11966         * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
11967         (nto_procfs_target_procfs): New classes.
11968         (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
11969         (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
11970         (procfs_post_attach, procfs_wait, procfs_fetch_registers)
11971         (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
11972         (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
11973         (procfs_remove_hw_breakpoint, procfs_resume)
11974         (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
11975         (procfs_kill_inferior, procfs_store_registers)
11976         (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
11977         as methods of nto_procfs_target.
11978         (nto_procfs_ops): Now an nto_procfs_target_procfs.
11979         (nto_native_ops): Delete.
11980         (procfs_open, procfs_native_open): Delete.
11981         (nto_native_ops): Now an nto_procfs_target_native.
11982         (init_procfs_targets): Adjust to C++ification.
11983         (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
11984         (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
11985         Refactor as methods of nto_procfs_target.
11986
11987         * go32-nat.c (go32_nat_target): New class.
11988         (the_go32_nat_target): New.
11989         (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
11990         (go32_store_registers, go32_xfer_partial, go32_files_info)
11991         (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
11992         (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
11993         (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
11994         (go32_pid_to_str): Refactor as methods of go32_nat_target.
11995         (go32_target): Delete.
11996         (_initialize_go32_nat): Adjust to C++ification.
11997
11998         * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
11999         (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
12000         (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
12001         (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
12002         gnu_nat_target.
12003         (gnu_target): Delete.
12004         * gnu-nat.h (gnu_target): Delete.
12005         (gnu_nat_target): New class.
12006         * i386-gnu-nat.c (gnu_base_target): New.
12007         (i386_gnu_nat_target): New class.
12008         (the_i386_gnu_nat_target): New.
12009         (_initialize_i386gnu_nat): Adjust to C++ification.
12010
12011 2018-05-02  Pedro Alves  <palves@redhat.com>
12012
12013         * bfd-target.c (target_bfd_xclose): Rename to ...
12014         (target_bfd_close): ... this.
12015         (target_bfd_reopen): Adjust.
12016         * target.c (target_close): Remove references to to_xclose.
12017         * target.h (target_ops::to_xclose): Delete.
12018         (target_ops::to_close): Update comments.
12019
12020 2018-05-02  Pedro Alves  <palves@redhat.com>
12021
12022         * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
12023         "linux-nat.h".
12024         * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
12025         * inf-ptrace.c (inf_ptrace_register_u_offset)
12026         (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
12027         (inf_ptrace_store_register, inf_ptrace_store_registers)
12028         (inf_ptrace_trad_target): Move to ...
12029         * linux-nat-trad.c: ... this new file.
12030         * linux-nat-trad.h: New file.
12031         * linux-nat.c (linux_target_install_ops): Make extern.
12032         (linux_trad_target): Delete.
12033         * linux-nat.h (linux_trad_target): Delete declaration.
12034         (linux_target_install_ops): Declare.
12035         * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
12036         "linux-nat.h".
12037
12038 2018-05-02  Pedro Alves  <palves@redhat.com>
12039
12040         * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
12041         procfs_target/add_target here.
12042         * procfs.c (procfs_target): Make static.
12043         (_initialize_procfs): Call add_target here.
12044         * procfs.h (struct target_ops): Remove forward declaration.
12045         (procfs_target): Remove declaration.
12046         * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
12047
12048 2018-05-02  Pedro Alves  <palves@redhat.com>
12049
12050         * procfs.c (procfs_stopped_by_watchpoint)
12051         (procfs_insert_watchpoint, procfs_remove_watchpoint)
12052         (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
12053         Forward declare.
12054         (procfs_use_watchpoints): Delete, move contents...
12055         (procfs_target): ... here.
12056         * procfs.h (procfs_use_watchpoints): Delete declaration.
12057         * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
12058         procfs_use_watchpoints.
12059         * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
12060         procfs_use_watchpoints.
12061
12062 2018-05-02  Tom Tromey  <tom@tromey.com>
12063
12064         PR python/20084:
12065         * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
12066         and var_zuinteger_unlimited.
12067         * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
12068         and PARAM_ZUINTEGER_UNLIMITED.
12069         (set_parameter_value): Handle var_zuinteger and
12070         var_zuinteger_unlimited.
12071         (add_setshow_generic): Likewise.
12072         (parmpy_init): Likewise.
12073
12074 2018-04-28  Dan Robertson  <danlrobertson89@gmail.com>
12075
12076         PR rust/23124
12077         * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
12078         pointer is not null before dereferencing it.
12079
12080 2018-04-30  Tom Tromey  <tom@tromey.com>
12081
12082         * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
12083         is_mi_like_p.
12084
12085 2018-04-30  Tom Tromey  <tom@tromey.com>
12086
12087         * breakpoint.c (mention): Remove use of is_mi_like_p.
12088         (print_mention_ranged_breakpoint): Likewise.
12089         * break-catch-throw.c (print_it_exception_catchpoint): Remove use
12090         of is_mi_like_p.
12091
12092 2018-04-30  Tom Tromey  <tom@tromey.com>
12093
12094         * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
12095
12096 2018-04-30  Tom Tromey  <tom@tromey.com>
12097
12098         * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
12099         (info_spu_event_command): Remove some uses of is_mi_like_p.
12100
12101 2018-04-30  Tom Tromey  <tom@tromey.com>
12102
12103         * python/py-framefilter.c (py_print_single_arg)
12104         (enumerate_locals, py_print_args, py_print_frame): Remove some
12105         uses of is_mi_like_p.
12106
12107 2018-04-30  Tom Tromey  <tom@tromey.com>
12108
12109         * ui-out.c: Update.
12110         * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
12111         * ui-out.h (ui_out::is_mi_like_p): Now const.
12112         (ui_out::do_is_mi_like_p): Now const.
12113         * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
12114
12115 2018-04-30  Tom Tromey  <tom@tromey.com>
12116
12117         * varobj.c (varobj_set_visualizer): Use new_reference.
12118         * python/python.c (gdbpy_decode_line): Use new_reference.
12119         * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
12120         new_reference.
12121
12122 2018-04-30  Tom Tromey  <tom@tromey.com>
12123
12124         * varobj.c (install_new_value): Use new_reference.
12125         * value.h (value_incref): Return void.  Swap intro comment with
12126         value_decref.
12127         * value.c (set_value_parent): Use new_reference.
12128         (value_incref): Return void.  Update intro comment.
12129         (release_value): Use new_reference.
12130         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
12131
12132 2018-04-30  Tom Tromey  <tom@tromey.com>
12133
12134         * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
12135         * gdb_bfd.h (new_bfd_ref): Remove.
12136         (gdb_bfd_open): Update comment.
12137         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
12138         (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
12139         (gdb_bfd_fdopenr): Use new_reference.
12140         * exec.c (exec_file_attach): Use new_reference.
12141
12142 2018-04-30  Tom Tromey  <tom@tromey.com>
12143
12144         * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
12145         method.
12146
12147 2018-04-30  Tom Tromey  <tom@tromey.com>
12148
12149         * jit.c (jit_read_code_entry): Use type_align.
12150         * i386-tdep.c (i386_gdbarch_init): Don't call
12151         set_gdbarch_long_long_align_bit.
12152         * gdbarch.sh: Remove long_long_align_bit.
12153         * gdbarch.c, gdbarch.h: Rebuild.
12154         * arc-tdep.c (arc_type_align): New function.
12155         (arc_gdbarch_init): Use arc_type_align.  Don't call
12156         set_gdbarch_long_long_align_bit.
12157
12158 2018-04-30  Tom Tromey  <tom@tromey.com>
12159
12160         * rust-lang.c (rust_type_alignment): Remove.
12161         (rust_composite_type): Use type_align.
12162
12163 2018-04-30  Tom Tromey  <tom@tromey.com>
12164
12165         * NEWS: Mention Type.align.
12166         * python/py-type.c (typy_get_alignof): New function.
12167         (type_object_getset): Add "alignof".
12168
12169 2018-04-30  Tom Tromey  <tom@tromey.com>
12170
12171         PR exp/17095:
12172         * NEWS: Update.
12173         * std-operator.def (UNOP_ALIGNOF): New operator.
12174         * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
12175         New.
12176         * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
12177         * c-lang.c (c_op_print_tab): Add alignof.
12178         * c-exp.y (ALIGNOF): New token.
12179         (exp): Add "ALIGNOF" production.
12180         (ident_tokens): Add _Alignof and alignof.
12181
12182 2018-04-30  Tom Tromey  <tom@tromey.com>
12183
12184         * i386-tdep.c (i386_type_align): New function.
12185         (i386_gdbarch_init): Update.
12186         * gdbarch.sh (type_align): New method.
12187         * gdbarch.c, gdbarch.h: Rebuild.
12188         * arch-utils.h (default_type_align): Declare.
12189         * arch-utils.c (default_type_align): New function.
12190         * gdbtypes.h (TYPE_ALIGN_BITS): New define.
12191         (struct type) <align_log2>: New field.
12192         <instance_flags>: Now a bitfield.
12193         (TYPE_RAW_ALIGN): New macro.
12194         (type_align, type_raw_align, set_type_align): Declare.
12195         * gdbtypes.c (type_align, type_raw_align, set_type_align): New
12196         functions.
12197         * dwarf2read.c (quirk_rust_enum): Set type alignment.
12198         (get_alignment, maybe_set_alignment): New functions.
12199         (read_structure_type, read_enumeration_type, read_array_type)
12200         (read_set_type, read_tag_pointer_type, read_tag_reference_type)
12201         (read_subrange_type, read_base_type): Set type alignment.
12202
12203 2018-04-30  Simon Marchi  <simon.marchi@ericsson.com>
12204
12205         * dwarf2read.c (read_index_from_section): Use bool.
12206
12207 2018-04-29  Fabian Groffen  <grobian@gentoo.org>
12208
12209         PR gdb/22950
12210         * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
12211         with #ifdef.
12212
12213 2018-04-29  John Reiser  <jreiser@BitWagon.com>
12214
12215         PR build/22873
12216         * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
12217         last step, and do it atomically.
12218
12219 2018-04-27  Alexandre Oliva  <aoliva@redhat.com>
12220
12221         * compile/compile-c-types.c (convert_int, convert_float):
12222         Update for C FE v1.
12223
12224 2018-04-27  Tom Tromey  <tom@tromey.com>
12225
12226         PR rust/22545:
12227         * rust-lang.c (rust_inclusive_range_type_p): New function.
12228         (rust_range): Handle inclusive ranges.
12229         (rust_compute_range): Likewise.
12230         * rust-exp.y (struct rust_op) <inclusive>: New field.
12231         (DOTDOTEQ): New constant.
12232         (range_expr): Add "..=" productions.
12233         (operator_tokens): Add "..=" token.
12234         (ast_range): Add "inclusive" parameter.
12235         (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
12236         ranges.
12237         * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
12238         bounds values.
12239         * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
12240         LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
12241         Update comments.
12242         * expprint.c (print_subexp_standard): Handle new bounds values.
12243         (dump_subexp_body_standard): Likewise.
12244
12245 2018-04-27  Tom Tromey  <tom@tromey.com>
12246
12247         * configure: Rebuild.
12248         * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
12249         * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
12250         "OVERRIDE".
12251         (class symbol_needs_eval_context): Likewise.
12252         * dwarf2read.c (mock_mapped_index::symbol_name_count)
12253         (mock_mapped_index::symbol_name_at): Use "override".  Remove
12254         "virtual".
12255         * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
12256         "override".
12257         (class dwarf_expr_executor): Use "override", not "OVERRIDE".
12258         * aarch64-tdep.c (instruction_reader::read): Use "override".
12259         (instruction_reader_test::read): Likewise.
12260         * arm-tdep.c (instruction_reader::read): Use "override".
12261         (instruction_reader_thumb::read): Likewise.
12262
12263 2018-04-26  Andrzej Kaczmarek  <andrzej.kaczmarek@codecoup.pl>
12264
12265         PR remote/9665
12266         * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
12267         instead of remote_send.
12268         (remote_send): Remove.
12269
12270 2018-04-26  Pedro Alves  <palves@redhat.com>
12271
12272         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
12273         find_function_start_sal instead of find_pc_line.
12274
12275 2018-04-26  Pedro Alves  <palves@redhat.com>
12276
12277         * breakpoint.c (set_breakpoint_location_function): Handle
12278         mst_data_gnu_ifunc.
12279         * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
12280         * elfread.c (elf_symtab_read): Give data symbols with
12281         BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
12282         (elf_rel_plt_read): Update comment.
12283         * linespec.c (convert_linespec_to_sals): Handle
12284         mst_data_gnu_ifunc.
12285         (minsym_found): Handle mst_data_gnu_ifunc.
12286         * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
12287         (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
12288         * parse.c (find_minsym_type_and_address): Handle
12289         mst_data_gnu_ifunc.
12290         * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
12291         * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
12292         * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
12293         comment.
12294         <mst_data_gnu_ifunc>: New enumerator.
12295
12296 2018-04-26  Pedro Alves  <palves@redhat.com>
12297
12298         * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
12299         (lookup_minimal_symbol_by_pc_section): ... this.  Replace
12300         'want_trampoline' parameter by a lookup_msym_prefer parameter.
12301         Handle it.
12302         (lookup_minimal_symbol_by_pc_section): Delete old implementation.
12303         (lookup_minimal_symbol_by_pc): Adjust.
12304         (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
12305         (lookup_solib_trampoline_symbol_by_pc): Adjust.
12306         * minsyms.h (lookup_msym_prefer): New enum.
12307         (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
12308         parameter by a lookup_msym_prefer parameter.
12309
12310 2018-04-26  Pedro Alves  <palves@redhat.com>
12311
12312         * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
12313         ends in "@plt" instead of looking at the symbol's section.
12314
12315 2018-04-26  Pedro Alves  <palves@redhat.com>
12316
12317         * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete.  Remove
12318         all references.
12319         (find_pc_partial_function_gnu_ifunc): Rename to ...
12320         (find_pc_partial_function): ... this, and remove references to
12321         'is_gnu_ifunc_p'.
12322         (find_pc_partial_function): Delete old implementation.
12323         * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
12324
12325 2018-04-26  Pedro Alves  <palves@redhat.com>
12326
12327         * linespec.c (struct bound_minimal_symbol_search_key): New.
12328         (convert_linespec_to_sals): Sort minimal symbols earlier.  Don't
12329         skip first line if we found a GNU ifunc minimal symbol by name.
12330         (compare_msymbols): Change parameters to work with a destructured
12331         lhs minsym.
12332         (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
12333         functions.
12334
12335 2018-04-26  Pedro Alves  <palves@redhat.com>
12336
12337         * breakpoint.c (set_breakpoint_location_function): Don't resolve
12338         ifunc targets here.  Instead, if we have an ifunc minsym, use its
12339         address/name.
12340         (add_location_to_breakpoint): Store the minsym and the objfile in
12341         the breakpoint location.
12342         * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
12343         * linespec.c (minsym_found): Resolve GNU ifunc targets here.
12344         Record the minsym in the sal.
12345         * symtab.h (symtab_and_line) <msymbol>: New field.
12346
12347 2018-04-26  Pedro Alves  <palves@redhat.com>
12348
12349         * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
12350         unless we actually resolved the ifunc.
12351
12352 2018-04-26  Pedro Alves  <palves@redhat.com>
12353
12354         * c-exp.y (variable production): Prefer ifunc minsyms over
12355         regular function symbols.
12356         * symtab.c (find_gnu_ifunc): New function.
12357         * minsyms.h (lookup_msym_prefer): New enum.
12358         (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
12359         parameter by a lookup_msym_prefer parameter.
12360         * symtab.h (find_gnu_ifunc): New declaration.
12361
12362 2018-04-26  Pedro Alves  <palves@redhat.com>
12363
12364         * blockframe.c (find_gnu_ifunc_target_type): New function.
12365         (find_function_type): New.
12366         * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
12367         return a value with a memory address.
12368         (eval_call): For calls to GNU ifunc functions, try to find the
12369         type of the target function from the type that the resolver
12370         returns.
12371         * gdbtypes.c (objfile_type): Don't install a return type for ifunc
12372         symbols.
12373         * infcall.c (find_function_return_type): Delete.
12374         (find_function_addr): Add 'function_type' parameter.  For calls to
12375         GNU ifunc functions, try to find the type of the target function
12376         from the type that the resolver returns, and return it via
12377         FUNCTION_TYPE.
12378         (call_function_by_hand_dummy): Adjust to use the function type
12379         returned by find_function_addr.
12380         (find_function_addr): Add 'function_type' parameter and move
12381         description here.
12382         * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
12383         declarations.
12384
12385 2018-04-26  Pedro Alves  <palves@redhat.com>
12386
12387         * c-exp.y (variable production): Skip finding an alias for ifunc
12388         symbols.
12389
12390 2018-04-26  Pedro Alves  <palves@redhat.com>
12391
12392         * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
12393
12394 2018-04-25  Pedro Alves  <palves@redhat.com>
12395
12396         * infcmd.c (kill_command): Print the pid as string, not the whole
12397         thread's ptid.  Add comment.  s/has been killed/killed/ in output
12398         message.
12399         * remote.c (remote_detach_1): Print the pid as string, not the
12400         whole thread's ptid.
12401
12402 2018-04-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
12403             Sergio Durigan Junior  <sergiodj@redhat.com>
12404             Pedro Alves  <palves@redhat.com>
12405
12406         * infcmd.c (kill_command): Print message when inferior has
12407         been killed.
12408         * inferior.c (print_inferior_events): Remove 'static'.  Set as
12409         '1'.
12410         (add_inferior): Improve message printed when
12411         'print_inferior_events' is on.
12412         (exit_inferior): Remove message printed when
12413         'print_inferior_events' is on.
12414         (detach_inferior): Improve message printed when
12415         'print_inferior_events' is on.
12416         (initialize_inferiors): Use 'add_inferior_silent' to set
12417         'current_inferior_'.
12418         * inferior.h (print_inferior_events): Declare here as
12419         'extern'.
12420         * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
12421         '[Detaching...]' messages when 'print_inferior_events' is on.
12422         Use 'add_thread_silent' instead of 'add_thread'.  Add '[' and ']'
12423         as prefix/suffix for messages.  Remove periods.  Fix erroneous
12424         'Detaching after fork from child...', replace it by '... from
12425         parent...'.
12426         (handle_vfork_child_exec_or_exit): Add '[' and ']' as
12427         prefix/suffix when printing 'Detaching...' messages.  Print
12428         them when 'print_inferior_events' is on.
12429         * remote.c (remote_detach_1): Print message when detaching
12430         from inferior and '!is_fork_parent'.
12431
12432 2018-04-24  Tom Tromey  <tom@tromey.com>
12433
12434         * cli-out.h: Reindent.
12435
12436 2018-04-24  Tom Tromey  <tom@tromey.com>
12437
12438         * cli-out.c (cli_ui_out::out_field_fmt): Remove.
12439         (cli_ui_out::do_field_string): Use fputs_filtered.
12440         * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
12441
12442 2018-04-23  Tom Tromey  <tom@tromey.com>
12443
12444         * guile/scm-frame.c (gdbscm_frame_read_var): Use
12445         gdb::unique_xmalloc_ptr.
12446
12447 2018-04-23  Tom Tromey  <tom@tromey.com>
12448
12449         * configure: Rebuild.
12450
12451 2018-04-22  Rajendra SY  <rajendra.sy@gmail.com>
12452
12453         PR gdb/23095
12454         * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
12455         prepare_for_testing.  Set normal_bp to r_debug_state if target
12456         is bsd.
12457
12458 2018-04-21  Pedro Alves  <palves@redhat.com>
12459             Rajendra SY  <rajendra.sy@gmail.com>
12460
12461         * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
12462         * remote.c (extended_remote_attach): In all-stop mode, mark the
12463         thread as executing.
12464
12465 2018-04-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
12466
12467         * thread.c (thread_apply_all_command): Fix comment.
12468         (thread_command): Fix comment.
12469
12470 2018-04-10  Alan Hayward  <alan.hayward@arm.com>
12471
12472         * common/tdesc.h (tdesc_create_feature): Remove xml filename
12473         parameter.
12474         * features/aarch64-core.c (create_feature_aarch64_core):
12475         Regenerate.
12476         * features/aarch64-fpu.c (create_feature_aarch64_fpu):
12477         Likewise.
12478         * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
12479         Likewise.
12480         * features/i386/32bit-avx512.c
12481         (create_feature_i386_32bit_avx512): Likewise.
12482         * features/i386/32bit-core.c (create_feature_i386_32bit_core):
12483         Likewise.
12484         * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
12485         Likewise.
12486         * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
12487         Likewise.
12488         * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
12489         Likewise.
12490         * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
12491         Likewise.
12492         * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
12493         Likewise.
12494         * features/i386/64bit-avx512.c
12495         (create_feature_i386_64bit_avx512): Likewise.
12496         * features/i386/64bit-core.c (create_feature_i386_64bit_core):
12497         Likewise.
12498         * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
12499         Likewise.
12500         * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
12501         Likewise.
12502         * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
12503         Likewise.
12504         * features/i386/64bit-segments.c
12505         (create_feature_i386_64bit_segments): Likewise.
12506         * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
12507         Likewise.
12508         * features/i386/x32-core.c
12509         (create_feature_i386_x32_core): Likewise.
12510         * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
12511         * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
12512         * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
12513         * target-descriptions.c: In generated code, don't pass xml
12514         filename.
12515
12516 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
12517
12518         * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
12519         (print_xml_feature::visit_post): Likewise.
12520         (print_xml_feature::visit): Likewise.
12521         * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
12522         (print_xml_feature): Add new class.
12523         * regformats/regdat.sh: Null xmltarget on feature targets.
12524         * target-descriptions.c (struct target_desc): Add xmltarget.
12525         (maintenance_check_tdesc_xml_convert): Add unittest function.
12526         (tdesc_get_features_xml): Add function to get xml.
12527         (maintenance_check_xml_descriptions): Test xml generation.
12528         * xml-tdesc.c (string_read_description_xml): Add function.
12529         * xml-tdesc.h (string_read_description_xml): Add declaration.
12530
12531 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
12532
12533         * features/Makefile: Add feature marker to targets with new style
12534         target descriptions.
12535         * regformats/aarch64.dat: Regenerate.
12536         * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
12537         * regformats/i386/amd64-avx-linux.dat: Likewise.
12538         * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
12539         * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
12540         * regformats/i386/amd64-linux.dat: Likewise.
12541         * regformats/i386/amd64-mpx-linux.dat: Likewise.
12542         * regformats/i386/amd64.dat: Likewise.
12543         * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
12544         * regformats/i386/i386-avx-linux.dat: Likewise.
12545         * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
12546         * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
12547         * regformats/i386/i386-linux.dat: Likewise.
12548         * regformats/i386/i386-mmx-linux.dat: Likewise.
12549         * regformats/i386/i386-mpx-linux.dat: Likewise.
12550         * regformats/i386/i386.dat: Likewise.
12551         * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
12552         * regformats/i386/x32-avx-linux.dat: Likewise.
12553         * regformats/i386/x32-linux.dat: Likewise.
12554         * regformats/tic6x-c62x-linux.dat: Likewise.
12555         * regformats/tic6x-c64x-linux.dat: Likewise.
12556         * regformats/tic6x-c64xp-linux.dat: Likewise.
12557         * regformats/regdat.sh: Parse feature marker.
12558
12559 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
12560
12561         * common/tdesc.h (tdesc_architecture_name): Add new declaration.
12562         (tdesc_osabi_name): Likewise.
12563         * target-descriptions.c (tdesc_architecture_name): Add new
12564         function.
12565         (tdesc_osabi_name): Likewise.
12566
12567 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
12568
12569         * common/tdesc.c (tdesc_predefined_type): Move to here.
12570         (tdesc_named_type): Likewise.
12571         (tdesc_create_vector): Likewise.
12572         (tdesc_create_struct): Likewise.
12573         (tdesc_set_struct_size): Likewise.
12574         (tdesc_create_union): Likewise.
12575         (tdesc_create_flags): Likewise.
12576         (tdesc_create_enum): Likewise.
12577         (tdesc_add_field): Likewise.
12578         (tdesc_add_typed_bitfield): Likewise.
12579         (tdesc_add_bitfield): Likewise.
12580         (tdesc_add_flag): Likewise.
12581         (tdesc_add_enum_value): Likewise.
12582         * common/tdesc.h (struct tdesc_type_builtin): Likewise.
12583         (struct tdesc_type_vector): Likewise.
12584         (struct tdesc_type_field): Likewise.
12585         (struct tdesc_type_with_fields): Likewise.
12586         (tdesc_create_enum): Add declaration.
12587         (tdesc_add_typed_bitfield): Likewise.
12588         (tdesc_add_enum_value): Likewise.
12589         * target-descriptions.c (tdesc_type_field): Move from here.
12590         (tdesc_type_builtin): Likewise.
12591         (tdesc_type_vector): Likewise.
12592         (tdesc_type_with_fields): Likewise.
12593         (tdesc_predefined_types): Likewise.
12594         (tdesc_named_type): Likewise.
12595         (tdesc_create_vector): Likewise.
12596         (tdesc_create_struct): Likewise.
12597         (tdesc_set_struct_size): Likewise.
12598         (tdesc_create_union): Likewise.
12599         (tdesc_create_flags): Likewise.
12600         (tdesc_create_enum): Likewise.
12601         (tdesc_add_field): Likewise.
12602         (tdesc_add_typed_bitfield): Likewise.
12603         (tdesc_add_bitfield): Likewise.
12604         (tdesc_add_flag): Likewise.
12605         (tdesc_add_enum_value): Likewise.
12606         * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
12607         (tdesc_add_typed_bitfield): Likewise.
12608         (tdesc_add_enum_value): Likewise.
12609
12610 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
12611
12612         * common/tdesc.c (tdesc_feature::accept): Move to here.
12613         (tdesc_feature::operator==): Likewise.
12614         (tdesc_create_reg): Likewise.
12615         * common/tdesc.h (tdesc_type_kind): Likewise.
12616         (struct tdesc_type): Likewise.
12617         (struct tdesc_feature): Likewise.
12618         * regformats/regdat.sh: Create a feature.
12619         * target-descriptions.c (tdesc_type_kind): Move from here.
12620         (tdesc_type): Likewise.
12621         (tdesc_type_up): Likewise.
12622         (tdesc_feature): Likewise.
12623         (tdesc_create_reg): Likewise.
12624
12625 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
12626
12627         * Makefile.in: Add arch/tdesc.c
12628         * common/tdesc.c: New file.
12629         * common/tdesc.h (tdesc_element_visitor): Move to here.
12630         (tdesc_element): Likewise.
12631         (tdesc_reg): Likewise.
12632         (tdesc_reg_up): Likewise.
12633         * regformats/regdef.h (reg): Add offset to constructors.
12634         * target-descriptions.c (tdesc_element_visitor): Move from here.
12635         (tdesc_element): Likewise.
12636         (tdesc_reg): Likewise.
12637         (tdesc_reg_up): Likewise.
12638
12639 2018-04-17  Tom Tromey  <tom@tromey.com>
12640
12641         * dwarf2read.c (quirk_rust_enum): Conditionally drop the
12642         discriminant field.
12643
12644 2018-04-17  Tom Tromey  <tom@tromey.com>
12645
12646         * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
12647
12648 2018-04-17  Andreas Arnez  <arnez@linux.vnet.ibm.com>
12649
12650         * symtab.c (print_symbol_info): Skip printing filename and line
12651         number when `last' is NULL.
12652         (symtab_symbol_info): Use empty string instead of NULL for first
12653         invocation of print_symbol_info.
12654         (rbreak_command): Pass NULL to `last' parameter of
12655         print_symbol_info.
12656
12657 2018-04-16  Simon Marchi  <simon.marchi@ericsson.com>
12658
12659         * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
12660         instead of nullptr.
12661
12662 2018-04-16  Pedro Alves  <palves@redhat.com>
12663
12664         * MAINTAINERS (sh): Remove.
12665         * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
12666         (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
12667         (ALLDEPFILES): Remove sh64-tdep.c.
12668         * NEWS: Mentions that support for SH-5/SH64 is removed.
12669         * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
12670         (sh*-*-openbsd*): Ditto.
12671         (sh64-*-elf*): Remove.
12672         (sh*): Remove.
12673         * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
12674         * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
12675         * sh-tdep.c: No longer include "sh64-tdep.h".
12676         (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
12677         * sh64-tdep.c, sh64-tdep.h: Remove files.
12678
12679 2018-04-16  Pedro Alves  <palves@redhat.com>
12680
12681         * MAINTAINERS: Remove m88k.
12682         * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
12683         (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
12684         (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
12685         * NEWS: Mention that support for m88k was removed.
12686         * configure.host (m88*-*-*): Remove support.
12687         * configure.nat (m88k-*-*): Remove support.
12688         * configure.tgt (m88*-*-openbsd*): Remove.
12689         * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
12690
12691 2018-04-15  Simon Marchi  <simon.marchi@polymtl.ca>
12692
12693         * configure.tgt (x86_tobjs): New variable.
12694         (amd64_tobjs, i386_tobjs): Use it.
12695
12696 2018-04-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
12697
12698         * symtab.c (print_symbol_info): Precede the symbol definition by
12699         the line number when available.
12700         * NEWS: Advertise this enhancement.
12701
12702 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
12703
12704         * NEWS (New options): announce set/show record btrace cpu.
12705         * btrace.c: Include record-btrace.h.
12706         (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
12707         the vendor is unknown.
12708         (btrace_compute_ftrace_1): Add cpu parameter.  Update callers.
12709         Maybe overwrite the btrace configuration's cpu.
12710         (btrace_compute_ftrace): Add cpu parameter.  Update callers.
12711         (btrace_fetch): Add cpu parameter.  Update callers.
12712         (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
12713         Maybe overwrite the btrace configuration's cpu.  Skip enabling
12714         errata workarounds if the vendor is unknown.
12715         * python/py-record-btrace.c: Include record-btrace.h.
12716         (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
12717         (recpy_bt_function_call_history): Call record_btrace_get_cpu.
12718         * record-btrace.c (record_btrace_cpu_state_kind): New.
12719         (record_btrace_cpu): New.
12720         (set_record_btrace_cpu_cmdlist): New.
12721         (record_btrace_get_cpu): New.
12722         (require_btrace_thread, record_btrace_info)
12723         (record_btrace_resume_thread): Call record_btrace_get_cpu.
12724         (cmd_set_record_btrace_cpu_none): New.
12725         (cmd_set_record_btrace_cpu_auto): New.
12726         (cmd_set_record_btrace_cpu): New.
12727         (cmd_show_record_btrace_cpu): New.
12728         (_initialize_record_btrace): Initialize set/show record btrace cpu
12729         commands.
12730         * record-btrace.h (record_btrace_get_cpu): New.
12731
12732 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
12733
12734         * record.c (set_record_command): Fix typo in message.
12735
12736 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
12737
12738         * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
12739
12740 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
12741
12742         * infrun.c (process_event_stop_test): Call
12743         gdbarch_in_indirect_branch_thunk.
12744         * gdbarch.sh (in_indirect_branch_thunk): New.
12745         * gdbarch.c: Regenerated.
12746         * gdbarch.h: Regenerated.
12747         * x86-tdep.h: New.
12748         * x86-tdep.c: New.
12749         * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
12750         (HFILES_NO_SRCDIR): Add x86-tdep.h.
12751         (ALLDEPFILES): Add x86-tdep.c.
12752         * arch-utils.h (default_in_indirect_branch_thunk): New.
12753         * arch-utils.c (default_in_indirect_branch_thunk): New.
12754         * i386-tdep: Include x86-tdep.h.
12755         (i386_in_indirect_branch_thunk): New.
12756         (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
12757         function.
12758         * amd64-tdep: Include x86-tdep.h.
12759         (amd64_in_indirect_branch_thunk): New.
12760         (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
12761
12762 2018-04-12  Jan Kratochvil  <jan.kratochvil@redhat.com>
12763
12764         PR gdb/23053
12765         * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
12766         (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
12767         (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
12768         regression.
12769
12770 2018-04-12  Tom Tromey  <tom@tromey.com>
12771
12772         * rust-lang.c (rust_print_struct_def): Remove univariant code.
12773         (rust_evaluate_subexp): Likewise.
12774
12775 2018-04-12  Pedro Alves  <palves@redhat.com>
12776
12777         * procfs.c (procfs_detach): Make forward declaration's prototype
12778         match definition's protototype.
12779         (proc_get_LDT_entry): Remove stale do_cleanups call.
12780
12781 2018-04-12  Pedro Alves  <palves@redhat.com>
12782
12783         * target.h (target_ops::to_has_exited): Delete.
12784         (target_has_exited): Delete.
12785         * target-delegates.c: Regenerate.
12786
12787 2018-04-11  Pedro Alves  <palves@redhat.com>
12788
12789         * target.c (fileio_fh_t::t): Add comment.
12790         (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
12791         (target_fileio_close): Handle a NULL target.
12792         (invalidate_fileio_fh): New.
12793         (target_close): Call it.
12794         * remote.c (remote_hostio_send_command): No longer check whether
12795         remote_desc is open.
12796
12797 2018-04-11  Pedro Alves  <palves@redhat.com>
12798
12799         * target.c (fileio_fh_t): Make it a named struct instead of a
12800         typedef.
12801         (fileio_fh_t::is_closed): New method.
12802         (DEF_VEC_O (fileio_fh_t)): Remove.
12803         (fileio_fhandles): Now a std::vector.
12804         (is_closed_fileio_fh): Delete.
12805         (acquire_fileio_fd): Adjust.  Rename parameters.
12806         (release_fileio_fd): Adjust.
12807         (fileio_fd_to_fh): Reimplement as a function instead of a macro.
12808         (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
12809         (target_fileio_close): Adjust.
12810
12811 2018-04-10  Simon Marchi  <simon.marchi@ericsson.com>
12812
12813         * auto-load.c (auto_load_safe_path_vec_update): Iterate by
12814         index.
12815
12816 2018-04-10  Pedro Alves  <palves@redhat.com>
12817
12818         * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
12819         (scoped_finish_thread_state): New class.
12820         * infcmd.c (run_command_1): Use it instead of finish_thread_state
12821         cleanup.
12822         * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
12823         (fetch_inferior_event, normal_stop): Likewise.
12824         * thread.c (finish_thread_state_cleanup): Delete.
12825
12826 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
12827             Pedro Alves  <palves@redhat.com>
12828
12829         * value.c: Include "selftest.h" and "common/array-view.h".
12830         (struct range) <operator ==>: New.
12831         (test_ranges_contain): New.
12832         (check_ranges_vector): New.
12833         (test_insert_into_bit_range_vector): New.
12834         (_initialize_values): Register selftests.
12835         * common/array-view.h (operator==, operator!=): New.
12836
12837 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
12838
12839         * common/gdb_vecs.h (unordered_remove): Add overload that takes
12840         an iterator.
12841         * inline-frame.c: Include <algorithm>.
12842         (struct inline_state): Add constructor.
12843         (inline_state_s): Remove.
12844         (DEF_VEC_O(inline_state_s)): Remove.
12845         (inline_states): Change type to std::vector.
12846         (find_inline_frame_state): Adjust to std::vector.
12847         (allocate_inline_frame_state): Remove.
12848         (clear_inline_frame_state): Adjust to std::vector.
12849         (skip_inline_frames): Adjust to std::vector.
12850
12851 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
12852
12853         * tracepoint.h (struct trace_state_variable): Add constructor.
12854         <name>: Change type to std::string.
12855         * tracepoint.c (tsv_s): Remove.
12856         (DEF_VEC_O(tsv_s)): Remove.
12857         (tvariables): Change to std::vector.
12858         (create_trace_state_variable): Adjust to std::vector.
12859         (find_trace_state_variable): Likewise.
12860         (find_trace_state_variable_by_number): Likewise.
12861         (delete_trace_state_variable): Likewise.
12862         (trace_variable_command): Adjust to std::string.
12863         (delete_trace_variable_command): Likewise.
12864         (tvariables_info_1): Adjust to std::vector.
12865         (save_trace_state_variables): Likewise.
12866         (start_tracing): Likewise.
12867         (merge_uploaded_trace_state_variables): Adjust to std::vector
12868         and std::string.
12869         * target.h (struct target_ops)
12870         <to_download_trace_state_variable>: Pass reference to
12871         trace_state_variable.
12872         * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
12873         * target-delegates.c: Re-generate.
12874         * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
12875         (mi_tsv_deleted): Likewise.
12876         * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
12877         * remote.c (remote_download_trace_state_variable): Change
12878         pointer to reference and adjust.
12879         * make-target-delegates (parse_argtypes): Handle references.
12880         (write_function_header): Likewise.
12881         (munge_type): Likewise.
12882
12883 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
12884
12885         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12886         string_view-selftests.c.
12887         * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
12888         testsuite.
12889         * unittests/basic_string_view/cons/char/1.cc: Likewise.
12890         * unittests/basic_string_view/cons/char/2.cc: Likewise.
12891         * unittests/basic_string_view/cons/char/3.cc: Likewise.
12892         * unittests/basic_string_view/element_access/char/1.cc:
12893         Likewise.
12894         * unittests/basic_string_view/element_access/char/empty.cc:
12895         Likewise.
12896         * unittests/basic_string_view/element_access/char/front_back.cc:
12897         Likewise.
12898         * unittests/basic_string_view/inserters/char/2.cc: Likewise.
12899         * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
12900         Likewise.
12901         * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
12902         Likewise.
12903         * unittests/basic_string_view/modifiers/swap/char/1.cc:
12904         Likewise.
12905         * unittests/basic_string_view/operations/compare/char/1.cc:
12906         Likewise.
12907         * unittests/basic_string_view/operations/compare/char/13650.cc:
12908         Likewise.
12909         * unittests/basic_string_view/operations/copy/char/1.cc:
12910         Likewise.
12911         * unittests/basic_string_view/operations/data/char/1.cc:
12912         Likewise.
12913         * unittests/basic_string_view/operations/find/char/1.cc:
12914         Likewise.
12915         * unittests/basic_string_view/operations/find/char/2.cc:
12916         Likewise.
12917         * unittests/basic_string_view/operations/find/char/3.cc:
12918         Likewise.
12919         * unittests/basic_string_view/operations/find/char/4.cc:
12920         Likewise.
12921         * unittests/basic_string_view/operations/rfind/char/1.cc:
12922         Likewise.
12923         * unittests/basic_string_view/operations/rfind/char/2.cc:
12924         Likewise.
12925         * unittests/basic_string_view/operations/rfind/char/3.cc:
12926         Likewise.
12927         * unittests/basic_string_view/operations/substr/char/1.cc:
12928         Likewise.
12929         * unittests/basic_string_view/operators/char/2.cc: Likewise.
12930         * unittests/string_view-selftests.c: New file.
12931
12932 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
12933
12934         * unittests/basic_string_view/capacity/1.cc: New file.
12935         * unittests/basic_string_view/capacity/empty_neg.cc: New file.
12936         * unittests/basic_string_view/cons/char/1.cc: New file.
12937         * unittests/basic_string_view/cons/char/2.cc: New file.
12938         * unittests/basic_string_view/cons/char/3.cc: New file.
12939         * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
12940         * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
12941         * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
12942         * unittests/basic_string_view/element_access/char/1.cc: New file.
12943         * unittests/basic_string_view/element_access/char/2.cc: New file.
12944         * unittests/basic_string_view/element_access/char/empty.cc: New file.
12945         * unittests/basic_string_view/element_access/char/front_back.cc: New file.
12946         * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
12947         * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
12948         * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
12949         * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
12950         * unittests/basic_string_view/include.cc: New file.
12951         * unittests/basic_string_view/inserters/char/1.cc: New file.
12952         * unittests/basic_string_view/inserters/char/2.cc: New file.
12953         * unittests/basic_string_view/inserters/char/3.cc: New file.
12954         * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
12955         * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
12956         * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
12957         * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
12958         * unittests/basic_string_view/literals/types.cc: New file.
12959         * unittests/basic_string_view/literals/values.cc: New file.
12960         * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
12961         * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
12962         * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
12963         * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
12964         * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
12965         * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
12966         * unittests/basic_string_view/operations/compare/char/1.cc: New file.
12967         * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
12968         * unittests/basic_string_view/operations/compare/char/2.cc: New file.
12969         * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
12970         * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
12971         * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
12972         * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
12973         * unittests/basic_string_view/operations/copy/char/1.cc: New file.
12974         * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
12975         * unittests/basic_string_view/operations/data/char/1.cc: New file.
12976         * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
12977         * unittests/basic_string_view/operations/find/char/1.cc: New file.
12978         * unittests/basic_string_view/operations/find/char/2.cc: New file.
12979         * unittests/basic_string_view/operations/find/char/3.cc: New file.
12980         * unittests/basic_string_view/operations/find/char/4.cc: New file.
12981         * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
12982         * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
12983         * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
12984         * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
12985         * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
12986         * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
12987         * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
12988         * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
12989         * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
12990         * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
12991         * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
12992         * unittests/basic_string_view/operations/substr/char/1.cc: New file.
12993         * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
12994         * unittests/basic_string_view/operators/char/2.cc: New file.
12995         * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
12996         * unittests/basic_string_view/range_access/char/1.cc: New file.
12997         * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
12998         * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
12999         * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
13000         * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
13001         * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
13002         * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
13003         * unittests/basic_string_view/requirements/typedefs.cc: New file.
13004         * unittests/basic_string_view/typedefs.cc: New file.
13005         * unittests/basic_string_view/types/1.cc: New file.
13006
13007 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
13008
13009         * common/gdb_string_view.h: Remove libstdc++ implementation
13010         details, adjust to gdb reality.
13011         * common/gdb_string_view.tcc: Likewise.
13012         * cli/cli-script.c (struct string_view): Remove.
13013         (user_args) <m_args>: Change element type to gdb::string_view.
13014         (user_args::insert_args): Adjust.
13015
13016 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
13017
13018         * common/gdb_string_view.h: New file.
13019         * common/gdb_string_view.tcc: New file.
13020
13021 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
13022
13023         * ax_cxx_compile_stdcxx.m4: Sync with upstream.
13024         * configure: Re-generate.
13025
13026 2018-04-09  Pedro Alves  <palves@redhat.com>
13027
13028         * gdbarch.sh: Include "observable.h" instead of "observer.h".
13029         (set_target_gdbarch): Call
13030         gdb::observers::architecture_changed.notify instead of
13031         observer_notify_architecture_changed.
13032
13033 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
13034
13035         * tracepoint.c (struct current_traceframe_cleanup): Remove.
13036         (do_restore_current_traceframe_cleanup): Remove.
13037         (restore_current_traceframe_cleanup_dtor): Remove.
13038         (make_cleanup_restore_current_traceframe): Remove.
13039         (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
13040         New.
13041         * tracepoint.h (struct scoped_restore_current_traceframe): New.
13042         * infrun.c (fetch_inferior_event): Use
13043         scoped_restore_current_traceframe.
13044
13045 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
13046
13047         * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
13048         Remove.
13049         <n_allocated_type_units>: Remove.
13050         <all_type_units>: Change to std::vector.
13051         * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
13052         to std::vector change.
13053         (dwarf2_per_objfile::get_cutu): Likewise.
13054         (dwarf2_per_objfile::get_tu): Likewise.
13055         (create_signatured_type_table_from_index): Likewise.
13056         (create_signatured_type_table_from_debug_names): Likewise.
13057         (dw2_symtab_iter_next): Likewise.
13058         (dw2_print_stats): Likewise.
13059         (dw2_expand_all_symtabs): Likewise.
13060         (dw2_expand_marked_cus): Likewise.
13061         (dw2_debug_names_iterator::next): Likewise.
13062         (dwarf2_initialize_objfile): Likewise.
13063         (add_signatured_type_cu_to_table): Likewise.
13064         (create_all_type_units): Likewise.
13065         (add_type_unit): Likewise.
13066         (struct tu_abbrev_offset): Add constructor.
13067         (build_type_psymtabs_1): Adjust to std::vector change.
13068         (print_tu_stats): Likewise.
13069         * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
13070         (write_debug_names): Likewise.
13071
13072 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
13073
13074         * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
13075         Make an std::vector.
13076         <n_comp_units>: Remove.
13077         * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
13078         to std::vector change.
13079         (dwarf2_per_objfile::get_cutu): Likewise.
13080         (dwarf2_per_objfile::get_cu): Likewise.
13081         (create_cus_from_index): Likewise.
13082         (create_addrmap_from_index): Likewise.
13083         (create_addrmap_from_aranges): Likewise.
13084         (dwarf2_read_index): Likewise.
13085         (dw2_find_last_source_symtab): Likewise.
13086         (dw2_map_symtabs_matching_filename): Likewise.
13087         (dw2_symtab_iter_next): Likewise.
13088         (dw2_print_stats): Likewise.
13089         (dw2_expand_all_symtabs): Likewise.
13090         (dw2_expand_symtabs_with_fullname): Likewise.
13091         (dw2_expand_marked_cus): Likewise.
13092         (dw2_map_symbol_filenames): Likewise.
13093         (create_cus_from_debug_names): Likewise.
13094         (dwarf2_read_debug_names): Likewise.
13095         (dw2_debug_names_iterator::next): Likewise.
13096         (dwarf2_initialize_objfile): Likewise.
13097         (set_partial_user): Likewise.
13098         (dwarf2_build_psymtabs_hard): Likewise.
13099         (read_comp_units_from_section): Remove arguments, adjust to
13100         std::vector change.
13101         (create_all_comp_units): Adjust to std::vector and
13102         read_comp_units_from_section changes.
13103         (dwarf2_find_containing_comp_unit): Adjust to std::vector
13104         change.
13105         * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
13106         (psyms_seen_size): Likewise.
13107         (write_gdbindex): Likewise.
13108         (write_debug_names): Likewise.
13109
13110 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
13111
13112         * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
13113         with dwarf2_per_objfile.
13114         (create_cus_from_index): Likewise.
13115         (create_signatured_type_table_from_index): Likewise.
13116         (dwarf2_read_index): Likewise.
13117         (dwarf2_initialize_objfile): Likewise.
13118         (dwarf2_fetch_die_loc_sect_off):  Get dwarf2_per_objfile from
13119         per_cu rather than get_dwarf2_per_objfile.
13120
13121 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
13122
13123         * dwarf2read.h (struct signatured_type): Forward declare.
13124         (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
13125         New methods.
13126         * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
13127         (dw2_get_cutu): ...this.
13128         (dwarf2_per_objfile::get_cu): Rename from...
13129         (dw2_get_cu): ...this.
13130         (dwarf2_per_objfile::get_tu): New.
13131         (create_addrmap_from_index): Adjust.
13132         (create_addrmap_from_aranges): Adjust.
13133         (dw2_find_last_source_symtab): Adjust.
13134         (dw2_map_symtabs_matching_filename): Adjust.
13135         (dw2_symtab_iter_next): Adjust.
13136         (dw2_print_stats): Adjust.
13137         (dw2_expand_all_symtabs): Adjust.
13138         (dw2_expand_symtabs_with_fullname): Adjust.
13139         (dw2_expand_marked_cus): Adjust.
13140         (dw_expand_symtabs_matching_file_matcher): Adjust.
13141         (dw2_map_symbol_filenames): Adjust.
13142         (dw2_debug_names_iterator::next): Adjust.
13143         (dwarf2_initialize_objfile): Adjust.
13144         (set_partial_user): Adjust.
13145         (dwarf2_build_psymtabs_hard): Adjust.
13146
13147 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
13148
13149         * dwarf2read.c (create_signatured_type_table_from_debug_names):
13150         Remove unused variables.
13151         (dw2_map_symtabs_matching_filename): Likewise.
13152         (dwarf2_record_block_ranges): Likewise.
13153         (dwarf2_read_addr_index): Likewise.
13154         (follow_die_offset): Likewise.
13155
13156 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
13157
13158         * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
13159         to symbol_file_add_main.
13160
13161 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
13162
13163         PR mi/22299
13164         * mi/mi-console.c (do_fputc_async_safe): New.
13165         (mi_console_file::write_async_safe): New.
13166         (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
13167         * mi/mi-console.h (class mi_console_file) <write_async_safe>:
13168         New.
13169         * ui-file.c (ui_file::putstrn): Adjust call to
13170         fputstrn_unfiltered.
13171         * utils.c (printchar): Replace do_fputs and do_fprintf
13172         parameters by do_fputc.
13173         (fputstr_filtered): Adjust call to printchar.
13174         (fputstr_unfiltered): Likewise.
13175         (fputstrn_filtered): Likewise.
13176         (fputstrn_unfiltered): Add do_fputc parameter, pass to
13177         printchar.
13178         * utils.h (do_fputc_ftype): New typedef.
13179         (fputstrn_unfiltered): Add do_fputc parameter.
13180
13181 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
13182
13183         * regformats/i386/i386-avx.dat: Remove.
13184
13185 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
13186
13187         PR gdb/22979
13188         * amd64-tdep.c (amd64_none_init_abi): New function.
13189         (amd64_x32_none_init_abi): New function.
13190         (_initialize_amd64_tdep): Register handlers for x86-64 and
13191         x64_32 with GDB_OSABI_NONE.
13192         * osabi.c (gdbarch_init_osabi): Allow running handlers for the
13193         GDB_OSABI_NONE osabi.
13194
13195 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
13196
13197         PR gdb/22980
13198         * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
13199         GDB_OSABI_NONE.
13200         * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
13201         * osabi.c (gdb_osabi_names): Add "unknown" entry.
13202
13203 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
13204
13205         * common/byte-vector.h (char_vector): New type.
13206         * target.h (target_read_alloc): Return
13207         gdb::optional<byte_vector>.
13208         (target_read_stralloc): Return gdb::optional<char_vector>.
13209         (target_get_osdata): Return gdb::optional<char_vector>.
13210         * target.c (target_read_alloc_1): Templatize.  Replacement
13211         manual memory management with vector.
13212         (target_read_alloc): Change return type, adjust.
13213         (target_read_stralloc): Change return type, adjust.
13214         (target_get_osdata): Change return type, adjust.
13215         * auxv.c (struct auxv_info) <length>: Remove.
13216         <data>: Change type to gdb::optional<byte_vector>.
13217         (auxv_inferior_data_cleanup): Free auxv_info with delete.
13218         (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
13219         (target_auxv_search): Adjust.
13220         (fprint_target_auxv): Adjust.
13221         * avr-tdep.c (avr_io_reg_read_command): Adjust.
13222         * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
13223         (linux_make_corefile_notes): Adjust.
13224         * osdata.c (get_osdata): Adjust.
13225         * remote.c (remote_get_threads_with_qxfer): Adjust.
13226         (remote_memory_map): Adjust.
13227         (remote_traceframe_info): Adjust.
13228         (btrace_read_config): Adjust.
13229         (remote_read_btrace): Adjust.
13230         (remote_pid_to_exec_file): Adjust.
13231         * solib-aix.c (solib_aix_get_library_list): Adjust.
13232         * solib-dsbt.c (decode_loadmap): Don't free buf.
13233         (dsbt_get_initial_loadmaps): Adjust.
13234         * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
13235         * solib-target.c (solib_target_current_sos): Adjust.
13236         * tracepoint.c (sdata_make_value): Adjust.
13237         * xml-support.c (xinclude_start_include): Adjust.
13238         (xml_fetch_content_from_file): Adjust.
13239         * xml-support.h (xml_fetch_another): Change return type.
13240         (xml_fetch_content_from_file): Change return type.
13241         * xml-syscall.c (xml_init_syscalls_info): Adjust.
13242         * xml-tdesc.c (file_read_description_xml): Adjust.
13243         (fetch_available_features_from_target): Change return type.
13244         (target_fetch_description_xml): Adjust.
13245         (target_read_description_xml): Adjust.
13246
13247 2018-04-06  Tom Tromey  <tom@tromey.com>
13248
13249         * value.c (~value): Update.
13250         (struct value) <contents>: Now unique_xmalloc_ptr.
13251         (value_contents_bits_eq, allocate_value_contents)
13252         (value_contents_raw, value_contents_all_raw)
13253         (value_contents_for_printing, value_contents_for_printing_const)
13254         (set_value_enclosing_type): Update.
13255
13256 2018-04-06  Tom Tromey  <tom@tromey.com>
13257
13258         * value.c (range_s): Remove typedef, VEC.
13259         (struct range): Add operator<.
13260         (range_lessthan): Remove.
13261         (ranges_contain): Change type.
13262         (~value): Update.
13263         (struct value) <unavailable, optimized_out>: Now std::vector.
13264         (value_entirely_available)
13265         (value_entirely_covered_by_range_vector)
13266         (value_entirely_unavailable, value_entirely_optimized_out):
13267         Update.
13268         (insert_into_bit_range_vector): Change argument type.
13269         (find_first_range_overlap): Likewise.
13270         (struct ranges_and_idx, value_contents_bits_eq)
13271         (require_not_optimized_out, require_available): Update.
13272         (ranges_copy_adjusted): Change argument types.
13273         (value_optimized_out, value_copy, value_fetch_lazy): Update.
13274
13275 2018-04-06  Tom Tromey  <tom@tromey.com>
13276
13277         * value.c (~value): Update.
13278         (struct value) <parent>: Now a value_ref_ptr.
13279         (value_parent, set_value_parent, value_address, value_copy):
13280         Update.
13281
13282 2018-04-06  Tom Tromey  <tom@tromey.com>
13283
13284         * value.c (struct value): Add constructor, destructor, and member
13285         initializers.
13286         (allocate_value_lazy, value_decref): Update.
13287
13288 2018-04-06  Tom Tromey  <tom@tromey.com>
13289
13290         * value.c (struct value) <released, next>: Remove.
13291         (all_values): Now a std::vector.
13292         (allocate_value_lazy): Update.
13293         (value_next): Remove.
13294         (value_mark, value_free_to_mark, release_value)
13295         (value_release_to_mark): Update.
13296
13297 2018-04-06  Tom Tromey  <tom@tromey.com>
13298
13299         * value.h (fetch_subexp_value, value_release_to_mark): Update.
13300         (free_value_chain): Remove.
13301         * value.c (free_value_chain): Remove.
13302         (value_release_to_mark): Return a std::vector.
13303         * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
13304         std::vector.
13305         (check_condition): Update.
13306         * eval.c (fetch_subexp_value): Change "val_chain" to a
13307         std::vector.
13308         * breakpoint.c (update_watchpoint): Update.
13309         (can_use_hardware_watchpoint): Change "vals" to a std::vector.
13310
13311 2018-04-06  Tom Tromey  <tom@tromey.com>
13312
13313         * value.h (free_all_values): Remove.
13314         * value.c (free_all_values): Remove.
13315
13316 2018-04-06  Tom Tromey  <tom@tromey.com>
13317
13318         * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
13319         (value_history_chain, value_history_count): Remove.
13320         (value_history): New global.
13321         (record_latest_value, access_value_history, show_values)
13322         (preserve_values): Update.
13323
13324 2018-04-06  Tom Tromey  <tom@tromey.com>
13325
13326         * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
13327         * varobj.c (varobj_set_display_format, varobj_set_value)
13328         (install_default_visualizer, construct_visualizer)
13329         (install_new_value, ~varobj, varobj_get_value_type)
13330         (my_value_of_variable, varobj_editable_p): Update.
13331         * c-varobj.c (c_describe_child, c_value_of_variable)
13332         (cplus_number_of_children, cplus_describe_child): Update.
13333         * ada-varobj.c (ada_number_of_children, ada_name_of_child)
13334         (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
13335         (ada_value_of_variable, ada_value_is_changeable_p): Update.
13336
13337 2018-04-06  Tom Tromey  <tom@tromey.com>
13338
13339         * printcmd.c (last_examine_address): Change type to
13340         value_ref_ptr.
13341         (do_examine, x_command): Update.
13342
13343 2018-04-06  Tom Tromey  <tom@tromey.com>
13344
13345         * value.c (release_value): Update.
13346         * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
13347         (struct bpstats) <val>: Now a value_ref_ptr.
13348         * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
13349         (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
13350         (~watchpoint, print_it_watchpoint, watch_command_1)
13351         (invalidate_bp_value_on_memory_change): Update.
13352
13353 2018-04-06  Tom Tromey  <tom@tromey.com>
13354
13355         * varobj.c (varobj_clear_saved_item)
13356         (update_dynamic_varobj_children, install_new_value, ~varobj):
13357         Update.
13358         * value.h (value_incref): Move declaration earlier.
13359         (value_decref): Rename from value_free.
13360         (struct value_ref_policy): New.
13361         (value_ref_ptr): New typedef.
13362         (struct value_deleter): Remove.
13363         (gdb_value_up): Remove typedef.
13364         (release_value): Change return type.
13365         (release_value_or_incref): Remove.
13366         * value.c (set_value_parent): Update.
13367         (value_incref): Change return type.
13368         (value_decref): Rename from value_free.
13369         (value_free_to_mark, free_all_values, free_value_chain): Update.
13370         (release_value): Return value_ref_ptr.
13371         (release_value_or_incref): Remove.
13372         (record_latest_value, set_internalvar, clear_internalvar):
13373         Update.
13374         * stack.c (info_frame_command): Don't call value_free.
13375         * python/py-value.c (valpy_dealloc, valpy_new)
13376         (value_to_value_object): Update.
13377         * printcmd.c (do_examine): Update.
13378         * opencl-lang.c (lval_func_free_closure): Update.
13379         * mi/mi-main.c (register_changed_p): Don't call value_free.
13380         * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
13381         * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
13382         * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
13383         value_free.
13384         * guile/scm-value.c (vlscm_free_value_smob)
13385         (vlscm_scm_from_value): Update.
13386         * frame.c (frame_register_unwind, frame_unwind_register_signed)
13387         (frame_unwind_register_unsigned, get_frame_register_bytes)
13388         (put_frame_register_bytes): Don't call value_free.
13389         * findvar.c (address_from_register): Don't call value_free.
13390         * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
13391         * dwarf2loc.c (entry_data_value_free_closure)
13392         (value_of_dwarf_reg_entry, free_pieced_value_closure)
13393         (dwarf2_evaluate_loc_desc_full): Update.
13394         * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
13395         (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
13396         (~watchpoint, watch_command_1)
13397         (invalidate_bp_value_on_memory_change): Update.
13398         * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
13399
13400 2018-04-06  Simon Marchi  <simon.marchi@polymtl.ca>
13401
13402         PR gdb/23022
13403         * warning.m4: Add -Wno-error=deprecated-register.
13404         * configure: Re-generate.
13405
13406 2018-04-05  Tom Tromey  <tom@tromey.com>
13407
13408         * linespec.h: Remove include of "vec.h".
13409
13410 2018-04-05  Tom Tromey  <tom@tromey.com>
13411
13412         * linespec.c (typep): Remove typedef.
13413         (find_methods, find_superclass_methods): Take a std::vector.
13414         (find_method): Use std::vector.
13415
13416 2018-04-05  Tom Tromey  <tom@tromey.com>
13417
13418         * utils.c (compare_strings): Remove.
13419         * utils.h (compare_strings): Remove.
13420         * objc-lang.h (find_imps): Update.
13421         * objc-lang.c (find_methods): Take a std::vector.
13422         (uniquify_strings, find_imps): Likewise.
13423         * linespec.c (find_methods): Take a std::vector.
13424         (decode_objc): Use std::vector.
13425         (add_all_symbol_names_from_pspace, find_superclass_methods): Take
13426         a std::vector.
13427         (find_method, find_function_symbols): Use std::vector.
13428
13429 2018-04-05  Tom Tromey  <tom@tromey.com>
13430
13431         * completer.c (completion_tracker::completion_tracker): Remove
13432         cast.
13433         (completion_tracker::discard_completions): Likewise.
13434         * breakpoint.c (ambiguous_names_p): Remove cast.
13435         * ada-lang.c (_initialize_ada_language): Remove cast.
13436         * utils.h (streq): Update.
13437         (streq_hash): Add new declaration.
13438         * utils.c (streq): Return bool.
13439         (streq_hash): New function.
13440
13441 2018-04-05  Tom Tromey  <tom@tromey.com>
13442
13443         * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
13444         Remove a string copy.
13445
13446 2018-04-05  Tom Tromey  <tom@tromey.com>
13447
13448         * linespec.c (filter_results): Use std::vector.
13449         (decode_line_2, decode_line_full): Update.
13450
13451 2018-04-05  Tom Tromey  <tom@tromey.com>
13452
13453         * linespec.c (canonical_to_fullform): Return std::string.
13454         (filter_results): Update.
13455         (struct decode_line_2_item): Add constructor.
13456         <fullform, displayform>: Now std::string.
13457         (decode_line_2_compare_items): Now a std::sort comparator.
13458         (decode_line_2): Update.
13459
13460 2018-04-05  Tom Tromey  <tom@tromey.com>
13461
13462         * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
13463         (unexpected_linespec_error): Update.
13464         (linespec_parse_basic, parse_linespec): Update.
13465
13466 2018-04-05  Tom Tromey  <tom@tromey.com>
13467
13468         * linespec.c (linespec_parse_basic): Reindent.
13469
13470 2018-04-05  Tom Tromey  <tom@tromey.com>
13471
13472         * minsyms.h (iterate_over_minimal_symbols): Update.
13473         * minsyms.c (iterate_over_minimal_symbols): Take a
13474         gdb::function_view.
13475         * linespec.c (struct collect_minsyms): Remove.
13476         (compare_msyms): Now a std::sort comparator.
13477         (add_minsym): Add parameters.
13478         (search_minsyms_for_name): Update.  Use std::vector.
13479
13480 2018-04-03  Tom Tromey  <tom@tromey.com>
13481
13482         * mipsread.c (read_alphacoff_dynamic_symtab): Use
13483         gdb::byte_vector.
13484
13485 2018-04-02  Weimin Pan  <weimin.pan@oracle.com>
13486
13487         * MAINTAINERS (Write After Approval): Add Weimin Pan.
13488
13489 2018-04-02  Weimin Pan  <weimin.pan@oracle.com>
13490
13491         PR gdb/16959
13492         * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when 
13493         printing static type.
13494
13495 2018-04-01  Tom Tromey  <tom@tromey.com>
13496
13497         * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
13498         (rs6000_xfer_shared_libraries): Update.
13499
13500 2018-04-01  Simon Marchi  <simon.marchi@polymtl.ca>
13501
13502         * common/gdb_vecs.h (char_ptr): Remove.
13503         * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
13504
13505 2018-03-30  Simon Marchi  <simon.marchi@polymtl.ca>
13506
13507         * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
13508         with std::vector.
13509         * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
13510
13511 2018-03-30  Simon Marchi  <simon.marchi@polymtl.ca>
13512
13513         * tracepoint.h (struct uploaded_tp): Initialize fields.
13514         <actions, step_actions, cmd_strings>: Change type to
13515         std::vector<char *>.
13516         * tracepoint.c (get_uploaded_tp): Allocate with new.
13517         (free_uploaded_tps): Free with delete.
13518         (parse_tracepoint_definition): Adjust to std::vector change.
13519         * breakpoint.c (read_uploaded_action): Likewise.
13520         (create_tracepoint_from_upload): Likewise.
13521         * ctf.c (ctf_write_uploaded_tp): Likewise.
13522         (SET_ARRAY_FIELD): Likewise.
13523         * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
13524
13525 2018-03-30  Tom Tromey  <tom@tromey.com>
13526
13527         * solib-svr4.c (lm_info_read): Use gdb::byte_vector.  Return
13528         std::unique_ptr.
13529         (svr4_keep_data_in_core): Update.
13530         (svr4_read_so_list): Update.
13531
13532 2018-03-30  Tom Tromey  <tom@tromey.com>
13533
13534         * windows-nat.c (handle_output_debug_string, handle_exception):
13535         Update.
13536         * target.h (target_read_string): Update.
13537         * target.c (target_read_string): Change "string" to
13538         unique_xmalloc_ptr.
13539         * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
13540         Update.
13541         * solib-frv.c (frv_current_sos): Update.
13542         * solib-dsbt.c (dsbt_current_sos): Update.
13543         * solib-darwin.c (darwin_current_sos): Update.
13544         * linux-thread-db.c (inferior_has_bug): Update.
13545         * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
13546         Update.  Remove alloca.
13547         * ada-lang.c (ada_main_name): Update.
13548
13549 2018-03-30  Tom Tromey  <tom@tromey.com>
13550
13551         * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
13552         (struct dwo_file_deleter): New.
13553         (dwo_file_up): New typedef.
13554         (open_and_init_dwo_file): Use dwo_file_up.
13555         (free_dwo_file_cleanup): Remove.
13556
13557 2018-03-30  Tom Tromey  <tom@tromey.com>
13558
13559         * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
13560         (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
13561
13562 2018-03-30  Tom Tromey  <tom@tromey.com>
13563
13564         * dwarf2read.c (class free_cached_comp_units): New class.
13565         (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
13566         (free_cached_comp_units): Remove function.
13567
13568 2018-03-30  Tom Tromey  <tom@tromey.com>
13569
13570         * utils.h (make_cleanup_unpush_target): Remove.
13571         * inf-ptrace.c (struct target_unpusher): New.
13572         (target_unpush_up) New typedef.
13573         (inf_ptrace_create_inferior, inf_ptrace_attach): Use
13574         target_unpush_up.
13575         * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
13576
13577 2018-03-27  Tom Tromey  <tom@tromey.com>
13578
13579         * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
13580
13581 2018-03-27  Pedro Alves  <palves@redhat.com>
13582             Tom Tromey  <tom@tromey.com>
13583
13584         * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
13585         destructor.  Now a class.
13586         (gdb_readline_wrapper_cleanup): Remove function.
13587         (gdb_readline_wrapper): Remove cleanups.
13588
13589 2018-03-27  Tom Tromey  <tom@tromey.com>
13590
13591         * typeprint.h (struct type_print_options) <local_typedefs,
13592         global_typedefs>: Remove "struct" keyword.
13593         (class typedef_hash_table): New class.
13594         (recursively_update_typedef_hash, add_template_parameters)
13595         (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
13596         (find_typedef_in_hash): Don't declare.
13597         * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
13598         (typedef_hash_table::recursively_update): Rename from
13599         recursively_update_typedef_hash.  Now a member.
13600         (typedef_hash_table::add_template_parameters): Rename from
13601         add_template_parameters.  Now a member.
13602         (typedef_hash_table::typedef_hash_table): Now a constructor;
13603         rename from create_typedef_hash.
13604         (typedef_hash_table::~typedef_hash_table): Now a destructor;
13605         rename from free_typedef_hash.
13606         (do_free_typedef_hash, make_cleanup_free_typedef_hash)
13607         (do_free_global_table): Remove.
13608         (typedef_hash_table::typedef_hash_table): New constructor; renamed
13609         from copy_type_recursive.
13610         (create_global_typedef_table): Remove.
13611         (typedef_hash_table::find_global_typedef): Now a member of
13612         typedef_hash_table.
13613         (typedef_hash_table::find_typedef): Rename from
13614         find_typedef_in_hash; now a member.
13615         (whatis_exp): Update.
13616         * extension.h (struct ext_lang_type_printers): Add constructor and
13617         destructor.
13618         (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
13619         declare.
13620         * extension.c (ext_lang_type_printers::ext_lang_type_printers):
13621         Now a constructor; rename from start_ext_lang_type_printers.
13622         (ext_lang_type_printers): Now a destructor; rename from
13623         free_ext_lang_type_printers.
13624         * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
13625         Update.
13626         (c_type_print_base_struct_union): Update.  Remove cleanups.
13627
13628 2018-03-27  Tom Tromey  <tom@tromey.com>
13629
13630         * dwarf-index-write.c: Include <cmath>.
13631
13632 2018-03-27  Joel Brobecker  <brobecker@adacore.com>
13633
13634         * NEWS: Add entry describing new "set|show varsize-limit" command.
13635         * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
13636         command.
13637         * printcmd.c (_initialize_printcmd): Add "set var" alias of
13638         "set variable".
13639
13640 2018-03-27  Simon Marchi  <simon.marchi@ericsson.com>
13641
13642         * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
13643         dwarf-index-write.c
13644         (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
13645         * dwarf-index-common.c: New file.
13646         * dwarf-index-common.h: New file.
13647         * dwarf-index-write.c: New file.
13648         * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
13649         (struct dwarf2_section_info): Move from here.
13650         (dwarf2_section_info_def): Likewise.
13651         (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
13652         (offset_type): Likewise.
13653         (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
13654         (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
13655         (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
13656         (byte_swap): Likewise.
13657         (MAYBE_SWAP): Likewise.
13658         (dwarf2_per_cu_ptr): Likewise.
13659         (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
13660         (struct tu_stats): Likewise.
13661         (struct dwarf2_per_objfile): Likewise.
13662         (struct dwarf2_per_cu_data): Likewise.
13663         (struct signatured_type): Likewise.
13664         (sig_type_ptr): Likewise.
13665         (DEF_VEC_P (sig_type_ptr)): Likewise.
13666         (INDEX4_SUFFIX): Likewise.
13667         (INDEX5_SUFFIX): Likewise.
13668         (DEBUG_STR_SUFFIX): Likewise.
13669         (dwarf2_read_section): Make non-static.
13670         (mapped_index_string_hash): Move from here.
13671         (dwarf5_djb_hash): Likewise.
13672         (file_write): Likewise.
13673         (class data_buf): Likewise.
13674         (struct symtab_index_entry): Likewise.
13675         (struct mapped_symtab): Likewise.
13676         (find_slot): Likewise.
13677         (hash_expand): Likewise.
13678         (add_index_entry): Likewise.
13679         (uniquify_cu_indices): Likewise.
13680         (class c_str_view): Likewise.
13681         (class c_str_view_hasher): Likewise.
13682         (class vector_hasher): Likewise.
13683         (write_hash_table): Likewise.
13684         (psym_index_map): Likewise.
13685         (struct addrmap_index_data): Likewise.
13686         (add_address_entry): Likewise.
13687         (add_address_entry_worker): Likewise.
13688         (write_address_map): Likewise.
13689         (symbol_kind): Likewise.
13690         (write_psymbols): Likewise.
13691         (struct signatured_type_index_data): Likewise.
13692         (write_one_signatured_type): Likewise.
13693         (recursively_count_psymbols): Likewise.
13694         (recursively_write_psymbols): Likewise.
13695         (class debug_names): Likewise.
13696         (check_dwarf64_offsets): Likewise.
13697         (psyms_seen_size): Likewise.
13698         (write_gdbindex): Likewise.
13699         (write_debug_names): Likewise.
13700         (assert_file_size): Likewise.
13701         (write_psymtabs_to_index): Likewise.
13702         (save_gdb_index_command): Likewise.
13703         (_initialize_dwarf2_read): Don't register the "save gdb-index"
13704         command.
13705         * dwarf2read.h: New file.
13706
13707 2018-03-27  Joel Brobecker  <brobecker@adacore.com>
13708
13709         PR gdb/22670
13710         * dwarf2read.c (dwarf2_physname): Do not return the demangled
13711         symbol name if the CU's language stores symbol names in linkage
13712         format.
13713         * language.h (struct language_defn)
13714         <la_store_sym_names_in_linkage_form_p>: New field.  Adjust
13715         all instances of this struct.
13716
13717 2018-03-26  Tom Tromey  <tom@tromey.com>
13718
13719         * stack.c (backtrace_command_1): Remove verbose code.
13720
13721 2018-03-26  Tom Tromey  <tom@tromey.com>
13722
13723         * python/py-framefilter.c (py_print_type): Don't catch
13724         exceptions.  Return void.
13725         (py_print_value): Likewise.
13726         (py_print_single_arg): Likewise.
13727         (enumerate_args): Don't catch exceptions.
13728         (py_print_args): Likewise.
13729         (py_print_frame): Likewise.
13730         (gdbpy_apply_frame_filter): Catch exceptions here.
13731
13732 2018-03-26  Tom Tromey  <tom@tromey.com>
13733
13734         * stack.c (_initialize_stack): Remove trailing newlines from help
13735         text.  Add "Usage" line to "backtrace" help.
13736
13737 2018-03-26  Tom Tromey  <tom@tromey.com>
13738
13739         PR python/16486:
13740         * python/py-framefilter.c (py_print_args): Call wrap_hint.
13741
13742 2018-03-26  Tom Tromey  <tom@tromey.com>
13743
13744         * python/py-framefilter.c (py_print_single_arg): Return
13745         EXT_LANG_BT_ERROR from catch.
13746
13747 2018-03-26  Tom Tromey  <tom@tromey.com>
13748
13749         PR backtrace/15584:
13750         * stack.c (backtrace_command_1): Move some code into no-filters
13751         "if".
13752
13753 2018-03-26  Tom Tromey  <tom@tromey.com>
13754
13755         * python/py-framefilter.c (throw_quit_or_print_exception): New
13756         function.
13757         (gdbpy_apply_frame_filter): Use it.
13758
13759 2018-03-26  Tom Tromey  <tom@tromey.com>
13760
13761         PR cli/17716:
13762         * python/py-framefilter.c (py_print_type, py_print_value)
13763         (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
13764         RETURN_MASK_ERROR.
13765
13766 2018-03-26  Tom Tromey  <tom@tromey.com>
13767
13768         * python/py-framefilter.c (enumerate_args): Use
13769         gdb::unique_xmalloc_ptr.
13770
13771 2018-03-26  Tom Tromey  <tom@tromey.com>
13772
13773         * python/py-framefilter.c (py_print_frame): Return
13774         EXT_LANG_BT_OK.
13775         (gdbpy_apply_frame_filter): Update comment.
13776         * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
13777         Remove.
13778         <EXT_LANG_BT_NO_FILTERS>: Change value.
13779
13780 2018-03-26  Tom Tromey  <tom@tromey.com>
13781
13782         PR backtrace/15582:
13783         * stack.c (backtrace_command): Parse "hide" argument.
13784         * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
13785         * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
13786         constant.
13787
13788 2018-03-26  Tom Tromey  <tom@tromey.com>
13789
13790         * stack.c (backtrace_command_1): Remove "show_locals" parameter,
13791         add "flags".
13792         (backtrace_command): Remove "fulltrace", add "flags".
13793
13794 2018-03-26  Tom Tromey  <tom@tromey.com>
13795
13796         * stack.c (backtrace_command): Rewrite command line parsing.
13797
13798 2018-03-26  Simon Marchi  <simon.marchi@ericsson.com>
13799
13800         * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
13801
13802 2018-03-26  Simon Marchi  <simon.marchi@ericsson.com>
13803
13804         * filename-seen-cache.h: Add include guard.
13805
13806 2018-03-26  Keith Seitz  <keiths@redhat.com>
13807
13808         * symfile.c (place_section): Remove "struct" from section_addr_info
13809         in comment.
13810         * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
13811         "struct" keyword from section_addr_info.
13812
13813 2018-03-26  Alan Hayward  <alan.hayward@arm.com>
13814
13815         * regformats/regdef.h (reg): Add constructors.
13816
13817 2018-03-25  Pedro Alves  <palves@redhat.com>
13818
13819         * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
13820         if then/else bodies in var_func_name extraction.
13821
13822 2018-03-23  Weimin Pan  <weimin.pan@oracle.com>
13823
13824         * minsyms.c (lookup_minimal_symbol_and_objfile): Use
13825         lookup_minimal_symbol() to find symbol entry.
13826         * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
13827
13828 2018-03-23  Keith Seitz  <keiths@redhat.com>
13829
13830         PR c++/22968
13831         * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
13832         nested type definitions for C++, too.
13833
13834 2018-03-23  Tom Tromey  <tom@tromey.com>
13835
13836         * machoread.c (struct oso_el): Add a constructor.  Don't define as
13837         a typedef.
13838         (macho_register_oso): Remove.
13839         (macho_symtab_read): Take a std::vector.
13840         (oso_el_compare_name): Now a std::sort comparator.
13841         (macho_symfile_read_all_oso): Take a std::vector.
13842         (macho_symfile_read): Use std::vector.  Remove cleanups.
13843
13844 2018-03-22  Tom Tromey  <tom@tromey.com>
13845
13846         * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
13847         (record_full_goto_bookmark): Use std::string.
13848
13849 2018-03-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
13850
13851         PR tdep/18295
13852         * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
13853         a single mask.
13854
13855 2018-03-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
13856
13857         * rs6000-tdep.c (store_insn_p): New function.
13858         (skip_prologue): New variable alloca_reg_offset. Set lr_reg
13859         and cr_reg to their unshifted values. Use store_insn_p to
13860         match LR saves using either R1 or fdata->alloca_reg. Use
13861         store_insn_p to match CR saves. Set alloca_reg_offset
13862         when alloca_reg and framep are set. Remove lr_reg shift
13863         when assigning to fdata->lr_register.
13864
13865 2018-03-22  Andreas Arnez  <arnez@linux.vnet.ibm.com>
13866
13867         * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
13868         command line args instead of emitting a warning.
13869
13870 2018-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
13871
13872         * tracepoint.h (struct static_tracepoint_marker): Initialize
13873         fields, define default constructor, move constructor and move
13874         assignment, disable the rest.
13875         <str_id, extra>: Make std::string.
13876         (release_static_tracepoint_marker): Remove.
13877         (free_current_marker): Remove.
13878         * tracepoint.c (free_current_marker): Remove.
13879         (parse_static_tracepoint_marker_definition): Adjust to
13880         std::string, use new hex2str overload.
13881         (release_static_tracepoint_marker): Remove.
13882         (print_one_static_tracepoint_marker): Get marker by reference
13883         and adjust to std::string.
13884         (info_static_tracepoint_markers_command): Adjust to std::vector
13885         changes
13886         * target.h (static_tracepoint_marker_p): Remove typedef.
13887         (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
13888         (struct target_ops) <to_static_tracepoint_marker_at>: Return
13889         bool.
13890         <to_static_tracepoint_markers_by_strid>: Return std::vector.
13891         * target-debug.h
13892         (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
13893         (target_debug_print_std_vector_static_tracepoint_marker): New.
13894         (target_debug_print_struct_static_tracepoint_marker_p): Rename
13895         to...
13896         (target_debug_print_static_tracepoint_marker_p): ... this.
13897         * target-delegates.c: Re-generate.
13898         * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
13899         Make std::string.
13900         * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
13901         (decode_static_tracepoint_spec): Adjust to std::vector.
13902         (tracepoint_print_one_detail): Adjust to std::string.
13903         (strace_marker_decode_location): Adjust to std::string.
13904         (update_static_tracepoint): Adjust to std::string, remove call
13905         to release_static_tracepoint_marker.
13906         * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
13907         Adjust to std::vector.
13908         * remote.c (remote_static_tracepoint_marker_at): Return bool.
13909         (remote_static_tracepoint_markers_by_strid): Adjust to
13910         std::vector.
13911         * common/rsp-low.h (hex2str): New overload with explicit count
13912         of bytes.
13913         * common/rsp-low.c (hex2str): New overload with explicit count
13914         of bytes.
13915         * unittests/rsp-low-selftests.c (test_hex2str): New function.
13916         (_initialize_rsp_low_selftests): Add test_hex2str test.
13917         * unittests/tracepoint-selftests.c
13918         (test_parse_static_tracepoint_marker_definition): Adjust to
13919         std::string.
13920
13921 2018-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
13922
13923         * tracepoint.c (parse_static_tracepoint_marker_definition):
13924         Consider case where the definition is followed by more
13925         definitions.
13926         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
13927         tracepoint-selftests.c.
13928         * unittests/tracepoint-selftests.c: New.
13929
13930 2018-03-21  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
13931
13932         * MAINTAINERS (Write After Approval): Add Pedro Franco de
13933         Carvalho.
13934
13935 2018-03-20  Stephen Roberts  <stephen.roberts@arm.com>
13936
13937         * symtab.c (find_pc_sect_line): fixed indentation.
13938
13939 2018-03-20  Stephen Roberts  <stephen.roberts@arm.com>
13940
13941         * symtab.c (find_pc_sect_line): now uses binary search.
13942
13943 2018-03-19  Tom Tromey  <tom@tromey.com>
13944
13945         * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
13946         "IDENT" production.
13947
13948 2018-03-19  Pedro Alves  <palves@redhat.com>
13949             Tom Tromey  <tom@tromey.com>
13950
13951         * unittests/observable-selftests.c: New file.
13952         * common/observable.h: New file.
13953         * observable.h: New file.
13954         * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
13955         arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
13956         breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
13957         corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
13958         extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
13959         infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
13960         linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
13961         mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
13962         ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
13963         python/py-breakpoint.c, python/py-finishbreakpoint.c,
13964         python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
13965         record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
13966         riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
13967         spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
13968         symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
13969         tui/tui-interp.c, valops.c: Update all users.
13970         * tui/tui-hooks.c (tui_bp_created_observer)
13971         (tui_bp_deleted_observer, tui_bp_modified_observer)
13972         (tui_inferior_exit_observer, tui_before_prompt_observer)
13973         (tui_normal_stop_observer, tui_register_changed_observer):
13974         Remove.
13975         (tui_observers_token): New global.
13976         (attach_or_detach, tui_attach_detach_observers): New functions.
13977         (tui_install_hooks, tui_remove_hooks): Use
13978         tui_attach_detach_observers.
13979         * record-btrace.c (record_btrace_thread_observer): Remove.
13980         (record_btrace_thread_observer_token): New global.
13981         * observer.sh: Remove.
13982         * observer.c: Rename to observable.c.
13983         * observable.c (namespace gdb_observers): Define new objects.
13984         (observer_debug): Move into gdb_observers namespace.
13985         (struct observer, struct observer_list, xalloc_observer_list_node)
13986         (xfree_observer_list_node, generic_observer_attach)
13987         (generic_observer_detach, generic_observer_notify): Remove.
13988         (_initialize_observer): Update.
13989         Don't include observer.inc.
13990         * Makefile.in (generated_files): Remove observer.h, observer.inc.
13991         (clean mostlyclean): Likewise.
13992         (observer.h, observer.inc): Remove targets.
13993         (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
13994         (COMMON_SFILES): Use observable.c, not observer.c.
13995         * .gitignore: Remove observer.h.
13996
13997 2018-03-18  Tom Tromey  <tom@tromey.com>
13998
13999         * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
14000         gdb::def_vector.
14001         (bfd_lookup_symbol_from_dyn_symtab): Likewise.
14002
14003 2018-03-17  Tom Tromey  <tom@tromey.com>
14004
14005         * auto-load.c (auto_load_objfile_script_1): Use std::string.
14006
14007 2018-03-17  Tom Tromey  <tom@tromey.com>
14008
14009         * target.c (class scoped_target_fd): New.
14010         (target_fileio_close_cleanup): Remove.
14011         (target_fileio_read_alloc_1): Use scoped_target_fd.
14012
14013 2018-03-16  Simon Marchi  <simon.marchi@polymtl.ca>
14014
14015         * silent-rules.mk: New.
14016         * Makefile.in: Include silent-rules.mk
14017         (srcdir, VPATH, top_srcdir): Move up.
14018         (COMPILE): Add ECHO_CXX.
14019         (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
14020         (init.c): Add ECHO_INIT_C.
14021         (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
14022         (version.c): Add ECHO_GEN.
14023         (printcmd.o): Add ECHO_CXX.
14024         (target-float.o): Add ECHO_CXX.
14025         (ada-exp.o): Add ECHO_CXX.
14026         (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
14027         (insight$(EXEEXT)): Add ECHO_CXXLD.
14028         * gnulib/configure.ac: Add AM_SILENT_RULES.
14029         * gnulib/aclocal.m4: Re-generate.
14030         * gnulib/configure: Re-generate.
14031         * gnulib/import/Makefile.in: Re-generate.
14032
14033 2018-03-16  Tom Tromey  <tom@tromey.com>
14034
14035         * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
14036         * utils.h (make_cleanup_free_section_addr_info): Don't declare.
14037         * utils.c (do_free_section_addr_info)
14038         (make_cleanup_free_section_addr_info): Remove.
14039         * symfile.h (struct other_sections): Add constructor.
14040         (struct section_addr_info): Remove.
14041         (section_addr_info): New typedef.
14042         (struct sym_fns) <sym_offsets>: Change type of parameter.
14043         (build_section_addr_info_from_objfile)
14044         (relative_addr_info_to_section_offsets, addr_info_make_relative)
14045         (default_symfile_offsets, symbol_file_add)
14046         (symbol_file_add_from_bfd)
14047         (build_section_addr_info_from_section_table): Update.
14048         (alloc_section_addr_info, free_section_addr_info): Don't declare.
14049         * symfile.c (alloc_section_addr_info): Remove.
14050         (build_section_addr_info_from_section_table): Change return type.
14051         Update.
14052         (build_section_addr_info_from_bfd)
14053         (build_section_addr_info_from_objfile): Likewise.
14054         (free_section_addr_info): Remove.
14055         (relative_addr_info_to_section_offsets): Change type of "addrs".
14056         (addrs_section_compar): Now a std::sort comparator.
14057         (addrs_section_sort): Change return type.
14058         (addr_info_make_relative): Change type of "addrs".  Update.
14059         (default_symfile_offsets, syms_from_objfile_1)
14060         (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
14061         (symbol_file_add_separate): Update.
14062         (symbol_file_add): Change type of "addrs".  Update.
14063         (add_symbol_file_command): Update.  Remove cleanups.
14064         * symfile-mem.c (symbol_file_add_from_memory): Update.  Remove
14065         cleanups.
14066         * symfile-debug.c (debug_sym_offsets): Change type of "info".
14067         * solib.c (solib_read_symbols): Update.
14068         * objfiles.c (objfile_relocate): Update.  Remove cleanups.
14069         * machoread.c (macho_symfile_offsets): Update.
14070         * jit.c (jit_bfd_try_read_symtab): Update.
14071
14072 2018-03-15  Simon Marchi  <simon.marchi@polymtl.ca>
14073
14074         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
14075         unittests/utils-selftests.c.
14076         * unittests/utils-selftests.c: New file.
14077
14078 2018-03-14  Tom Tromey  <tom@tromey.com>
14079
14080         PR cli/14977:
14081         * printcmd.c (printf_c_string, printf_wide_c_string): Special case
14082         for NULL.
14083
14084 2018-03-14  Tom Tromey  <tom@tromey.com>
14085
14086         PR cli/19918:
14087         * printcmd.c (printf_pointer): Allow "-" in format.
14088
14089 2018-03-14  Tom Tromey  <tom@tromey.com>
14090
14091         * printcmd.c (_initialize_printcmd): Add usage to printf.
14092
14093 2018-03-14  Yao Qi  <qiyao@sourceware.org>
14094
14095         * MAINTAINERS: Update my email address.
14096
14097 2018-03-13  Tom Tromey  <tom@tromey.com>
14098
14099         * machoread.c (macho_check_dsym): Change filenamep to a
14100         std::string*.
14101         (macho_symfile_read): Update.
14102         * symfile.c (load_command): Use std::string.
14103
14104 2018-03-12  Andrew Burgess  <andrew.burgess@embecosm.com>
14105
14106         * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
14107         to error message string.
14108         (riscv_register_name): Use xsnprintf instead of sprintf.
14109         (riscv_insn::fetch_instruction): Use gdb_assert instead of
14110         internal_error.
14111         (riscv_print_arg_location): Use gdb_assert_not_reached instead of
14112         error.
14113         (riscv_push_dummy_call): Likewise.
14114
14115 2018-03-12  Tom Tromey  <tom@tromey.com>
14116
14117         * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
14118         Use gdb::byte_vector.
14119         * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
14120
14121 2018-03-12  Yao Qi  <yao.qi@linaro.org>
14122
14123         * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
14124         parameter type to readable_regcache.
14125         * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
14126         the declaration.
14127
14128 2018-03-11  Tom Tromey  <tom@tromey.com>
14129
14130         * dwarf2read.c (struct nextfield): Add initializers.
14131         (struct nextfnfield): Remove.
14132         (struct fnfieldlist): Add initializers.  Remove "length" and
14133         "head", use std::vector.
14134         (struct decl_field_list): Remove.
14135         (struct field_info): Add initializers.
14136         <fields, baseclasses>: Now std::vector.
14137         <nbaseclasses, nfnfields, typedef_field_list_count,
14138         nested_types_list_count>: Remove.
14139         (dwarf2_add_field, dwarf2_add_type_defn)
14140         (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
14141         (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
14142         (process_structure_scope): Update.
14143
14144 2018-03-11  Tom Tromey  <tom@tromey.com>
14145
14146         * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
14147         for use by std::sort.
14148         (build_type_psymtabs_1): Use std::vector.
14149
14150 2018-03-09  Eli Zaretskii  <eliz@gnu.org>
14151
14152         * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
14153         and LIBMPFR in the printed configuration.
14154
14155 2018-03-08  Tom Tromey  <tom@tromey.com>
14156
14157         * source.c (get_filename_and_charpos): Use scoped_fd.
14158         * nto-procfs.c (procfs_open_1): Use scoped_fd.
14159         (procfs_pidlist): Likewise.
14160         * procfs.c (proc_get_LDT_entry): Use scoped_fd.
14161         (iterate_over_mappings): Likewise.
14162
14163 2018-03-08  Tom Tromey  <tom@tromey.com>
14164
14165         * infcall.c (struct call_return_meta_info)
14166         <stack_temporaries_enabled>: Remove.
14167         (get_call_return_value, call_function_by_hand_dummy): Update.
14168         * thread.c (disable_thread_stack_temporaries): Remove.
14169         (enable_thread_stack_temporaries): Remove.
14170         (thread_stack_temporaries_enabled_p): Return bool.
14171         (push_thread_stack_temporary, value_in_thread_stack_temporaries)
14172         (get_last_thread_stack_temporary): Update.
14173         * eval.c (evaluate_subexp): Update.
14174         * gdbthread.h (class enable_thread_stack_temporaries): Now a
14175         class, not a function.
14176         (value_ptr, value_vec): Remove typedefs.
14177         (class thread_info) <stack_temporaries_enabled>: Now bool.
14178         <stack_temporaries>: Now a std::vector.
14179         (thread_stack_temporaries_enabled_p)
14180         (value_in_thread_stack_temporaries): Return bool.
14181
14182 2018-03-08  Simon Marchi  <simon.marchi@ericsson.com>
14183
14184         * remote.c (putpkt_binary): Fix omitted bytes reporting.
14185         (getpkt_or_notif_sane_1): Likewise.
14186
14187 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
14188
14189         * build-id.c (build_id_to_debug_bfd): Use std::string.
14190
14191 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
14192
14193         * build-id.c (find_separate_debug_file_by_buildid): Return
14194         std::string.
14195         * build-id.h (find_separate_debug_file_by_buildid): Return
14196         std::string.
14197         * coffread.c (coff_symfile_read): Adjust to std::string.
14198         * elfread.c (elf_symfile_read): Adjust to std::string.
14199         * symfile.c (separate_debug_file_exists): Change parameter to
14200         std::string.
14201         (find_separate_debug_file): Return std::string.
14202         (find_separate_debug_file_by_debuglink): Return std::string.
14203         * symfile.h (find_separate_debug_file_by_debuglink): Return
14204         std::string.
14205
14206 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
14207
14208         * common/xml-utils.c (xml_escape_text): Move code to...
14209         (xml_escape_text_append): ... this new function.
14210         * common/xml-utils.h (xml_escape_text_append): New declaration.
14211         * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
14212         New function.
14213         (_initialize_xml_utils): register test_xml_escape_text_append as
14214         a selftest.
14215
14216 2018-03-07  Alan Hayward  <alan.hayward@arm.com>
14217
14218         * defs.h: Remove MAX_REGISTER_SIZE.
14219         * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
14220         asserts.
14221         * python/py-unwind.c (pyuw_sniffer): Likewise.
14222
14223 2018-03-07  Tom Tromey  <tom@tromey.com>
14224
14225         * linux-tdep.c (linux_info_proc): Update.
14226         * target.h (struct target_ops) <to_fileio_readlink>: Return
14227         optional<string>.
14228         (target_fileio_readlink): Return optional<string>.
14229         * remote.c (remote_hostio_readlink): Return optional<string>.
14230         * inf-child.c (inf_child_fileio_readlink): Return
14231         optional<string>.
14232         * target.c (target_fileio_readlink): Return optional<string>.
14233
14234 2018-03-07  Andrew Burgess  <andrew.burgess@embecosm.com>
14235
14236         * regcache.c (cooked_read_test): Add riscv to the list of
14237         architectures that have a save_reggroup.
14238
14239 2018-03-07  Andreas Arnez  <arnez@linux.vnet.ibm.com>
14240
14241         * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
14242         value is not a dynamic class object.
14243
14244 2018-03-06  Tom Tromey  <tom@tromey.com>
14245
14246         * rust-exp.y: Formatting fixes.
14247
14248 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
14249
14250         * riscv-tdep.c (riscv_register_name): Remove target description
14251         support.
14252         (riscv_gdbarch_init): Remove target description check.
14253
14254 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
14255
14256         * riscv-tdep.c: Remove 'Contributed by ...' lines from header
14257         comment.
14258         * riscv-tdep.h: Likewise.
14259
14260 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
14261
14262         * riscv-tdep.c (riscv_pseudo_register_read): Delete.
14263         (riscv_pseudo_register_write): Delete.
14264         (riscv_gdbarch_init): Remove all use of pseudo registers.
14265
14266 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
14267
14268         * record-btrace.c (btrace_print_lines): Replace cleanup
14269         parameter with RAII equivalents.
14270         (btrace_insn_history): Replace cleanup with RAII equivalents.
14271         * ui-out.h (make_cleanup_ui_out_list_begin_end,
14272         make_cleanup_ui_out_tuple_begin_end): Remove.
14273         * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
14274         make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
14275         make_cleanup_ui_out_list_begin_end): Remove.
14276
14277 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
14278
14279         * record-btrace.c (record_btrace_maybe_mark_async_event): Change
14280         parameter types to std::vector.  Use bool.
14281         (record_btrace_wait): Replace VEC(tp_t) with
14282         std::vector<thread_info *>.
14283         * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
14284
14285 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
14286
14287         * record-btrace.c (record_btrace_disable_callback): Remove.
14288         (struct scoped_btrace_disable): New.
14289         (record_btrace_open): Use scoped_btrace_disable.
14290
14291 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
14292
14293         * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
14294         reading values from registers.
14295
14296 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
14297
14298         * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
14299         where appropriate.
14300
14301 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
14302
14303         * riscv-tdep.c (riscv_print_arg_location): Add header comment,
14304         change parameter type.  Use GDB's print functions, and use
14305         core_addr_to_string where appropriate.
14306         (riscv_push_dummy_call): Use core_addr_to_string where
14307         appropriate, update call to riscv_print_arg_location, and reindent
14308         a few lines.
14309         (riscv_return_value): Update call to riscv_print_arg_location.
14310
14311 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
14312             Tim Newsome <tim@sifive.com>
14313             Albert Ou <a0u@eecs.berkeley.edu>
14314             Darius Rad <darius@bluespec.com>
14315
14316         * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
14317         (HFILES_NO_SRCDIR): Add riscv-tdep.h.
14318         (ALLDEPFILES): Add riscv-tdep.c
14319         * configure.tgt: Add riscv support.
14320         * riscv-tdep.c: New file.
14321         * riscv-tdep.h: New file.
14322         * NEWS: Mention new target.
14323         * MAINTAINERS: Add entry for riscv.
14324
14325 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
14326
14327         * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
14328         fields within aggregates.
14329
14330 2018-03-04  Simon Marchi  <simon.marchi@polymtl.ca>
14331
14332         * record-btrace.c (btrace_print_lines): Change type of flags to
14333         gdb_disassembly_flags.
14334
14335 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
14336
14337         * fbsd-nat.c: Include "inf-ptrace.h".
14338         (USE_SIGTRAP_SIGINFO): Conditionally define.
14339         [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
14340         (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
14341         [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
14342         function.
14343         [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
14344         Likewise.
14345         [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
14346         Likewise.
14347         (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
14348         "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
14349         "supports_stopped_by_hw_breakpoint" target methods.
14350
14351 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
14352
14353         * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
14354         * fbsd-nat.c (debug_fbsd_nat): New variable.
14355         (show_fbsd_nat_debug): New function.
14356         (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
14357         (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
14358
14359 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
14360
14361         * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
14362         * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
14363         prototype.
14364         * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
14365         (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
14366         method.
14367
14368 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
14369
14370         * common/gdb_vecs.c (free_char_ptr_vec): Remove.
14371         * common/gdb_vecs.h (free_char_ptr_vec): Remove.
14372
14373 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
14374
14375         * charset.c (struct charset_vector): New.
14376         (charsets): Change type to charset_vector.
14377         (find_charset_names): Adjust.
14378         (add_one): Adjust.
14379         (_initialize_charset): Adjust.
14380
14381 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
14382
14383         * progspace.h (struct program_space) <deleted_solibs>: Change
14384         type to std::vector<std::string>.
14385         * progspace.c (clear_program_space_solib_cache): Adjust.
14386         * breakpoint.c (print_solib_event): Adjust.
14387         (check_status_catch_solib): Adjust.
14388         * solib.c (update_solib_list): Adjust.
14389         * ui-out.h (class ui_out) <field_string>: New overload.
14390         * ui-out.c (ui_out::field_string): New overload.
14391
14392 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
14393
14394         * progspace.h (struct program_space): Add constructor and
14395         destructor, initialize fields.
14396         (add_program_space): Remove.
14397         * progspace.c (add_program_space): Rename to...
14398         (program_space::program_space): ... this.
14399         (release_program_space): Rename to...
14400         (program_space::~program_space): ... this.
14401         (delete_program_space): Use delete to delete program_space.
14402         (initialize_progspace): Use new to allocate program_space.
14403         * inferior.c (add_inferior_with_spaces): Likewise.
14404         (clone_inferior_command): Likewise.
14405         * infrun.c (follow_fork_inferior): Likewise.
14406         (handle_vfork_child_exec_or_exit): Likewise.
14407
14408 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
14409
14410         * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
14411         (delim_string_to_char_ptr_vec): Return std::vector of
14412         gdb::unique_xmalloc_ptr.
14413         (dirnames_to_char_ptr_vec_append): Take std::vector of
14414         gdb::unique_xmalloc_ptr.
14415         (dirnames_to_char_ptr_vec): Return std::vector of
14416         gdb::unique_xmalloc_ptr.
14417         * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
14418         Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
14419         (delim_string_to_char_ptr_vec): Return an std::vector of
14420         gdb::unique_xmalloc_ptr, adjust the code.
14421         (dirnames_to_char_ptr_vec_append): Take an std::vector of
14422         gdb::unique_xmalloc_ptr, adjust the code.
14423         (dirnames_to_char_ptr_vec): Return an std::vector of
14424         gdb::unique_xmalloc_ptr, adjust the code.
14425         * auto-load.c (auto_load_safe_path_vec): Change type to
14426         std::vector of gdb::unique_xmalloc_ptr.
14427         (auto_load_expand_dir_vars): Return an std::vector of
14428         gdb::unique_xmalloc_ptr, adjust the code.
14429         (auto_load_safe_path_vec_update): Adjust.
14430         (filename_is_in_auto_load_safe_path_vec): Adjust.
14431         (auto_load_objfile_script_1): Adjust.
14432         * build-id.c (build_id_to_debug_bfd): Adjust.
14433         * linux-thread-db.c (thread_db_load_search): Adjust.
14434         * source.c (add_path): Adjust.
14435         (openp): Adjust.
14436         * symfile.c (find_separate_debug_file): Adjust.
14437         * utils.c (do_free_char_ptr_vec): Remove.
14438         (make_cleanup_free_char_ptr_vec): Remove.
14439
14440 2018-03-01  Sergio Durigan Junior  <sergiodj@redhat.com>
14441
14442         PR gdb/22907
14443         * common/pathstuff.c: Conditionally include "<windows.h>".
14444
14445 2018-03-01  Georg Sauthoff  <mail@georg.so>
14446
14447         PR gdb/22888
14448         * gcore.in: Quote variables and switch interpreter to bash.
14449
14450 2018-03-01  Tom Tromey  <tom@tromey.com>
14451
14452         * dwarf2read.c (alloc_discriminant_info): Fix default_index
14453         assertion.  Add assertion for discriminant_index.
14454         (quirk_rust_enum): Use correct base type name in univariant case.
14455
14456 2018-03-01  Simon Marchi  <simon.marchi@ericsson.com>
14457
14458         * record.c (get_call_history_modifiers): Return a
14459         record_print_flags.
14460         (cmd_record_call_history): Adjust.
14461         * record-btrace.c (record_btrace_call_history): Adjust.
14462         (record_btrace_call_history_range): Adjust.
14463         (record_btrace_call_history_from): Adjust.
14464         * target-debug.h (target_debug_print_record_print_flags): New.
14465         * target-delegates.c: Re-generate.
14466         * target.c (target_call_history): Change flags type.
14467         (target_call_history_from): Likewise.
14468         (target_call_history_range): Likewise.
14469         * target.h (struct target_ops) <target_call_history>: Likewise.
14470         (target_call_history_from): Likewise.
14471         (target_call_history_range): Likewise.
14472
14473 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
14474             Simon Marchi  <simon.marchi@polymtl.ca>
14475
14476         * common/common-utils.c: Include "sys/stat.h".
14477         (is_regular_file): Move here from "source.c"; change return
14478         type to "bool".
14479         * common/common-utils.h (is_regular_file): New prototype.
14480         * common/pathstuff.c (contains_dir_separator): New function.
14481         * common/pathstuff.h (contains_dir_separator): New prototype.
14482         * source.c: Don't include "sys/stat.h".
14483         (is_regular_file): Move to "common/common-utils.c".
14484
14485 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
14486
14487         * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
14488         (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
14489         * auto-load.c: Include "common/pathstuff.h".
14490         * common/common-def.h (current_directory): Move here.
14491         * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
14492         function.
14493         * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
14494         prototype.
14495         * common/pathstuff.c: New file.
14496         * common/pathstuff.h: New file.
14497         * compile/compile.c: Include "common/pathstuff.h".
14498         * defs.h (current_directory): Move to "common/common-defs.h".
14499         * dwarf2read.c: Include "common/pathstuff.h".
14500         * exec.c: Likewise.
14501         * guile/scm-safe-call.c: Likewise.
14502         * linux-thread-db.c: Likewise.
14503         * main.c: Likewise.
14504         * nto-tdep.c: Likewise.
14505         * objfiles.c: Likewise.
14506         * source.c: Likewise.
14507         * symtab.c: Likewise.
14508         * utils.c: Include "common/pathstuff.h".
14509         (gdb_realpath): Move to "common/pathstuff.c".
14510         (gdb_realpath_keepfile): Likewise.
14511         (gdb_abspath): Likewise.
14512         * utils.h (gdb_realpath): Move to "common/pathstuff.h".
14513         (gdb_realpath_keepfile): Likewise.
14514         (gdb_abspath): Likewise.
14515
14516 2018-02-28  John Baldwin  <jhb@FreeBSD.org>
14517
14518         * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
14519         wildcard process pid for super_resume for kernels with a
14520         specific bug.
14521
14522 2018-02-27  Phil Muldoon  <pmuldoon@redhat.com>
14523
14524         * compile/compile.c (get_args): Add additional comments
14525         explaining function.
14526
14527 2018-02-27  Simon Marchi  <simon.marchi@polymtl.ca>
14528             Tom Tromey  <tom@tromey.com>
14529
14530         * target.h (memory_write_request_s): Remove typedef.  Don't define
14531         VEC.
14532         (target_write_memory_blocks): Change argument to std::vector.
14533         (struct memory_write_request): Add constructor.
14534         * target-memory.c (compare_block_starting_address): Return bool.
14535         Change argument types.
14536         (claim_memory): Change arguments to use std::vector.
14537         (split_regular_and_flash_blocks, blocks_to_erase)
14538         (compute_garbled_blocks): Likewise.
14539         (cleanup_request_data, cleanup_write_requests_vector): Remove.
14540         (target_write_memory_blocks): Change argument to std::vector.
14541         * symfile.c (struct load_section_data): Add constructor and
14542         destructor.  Use std::vector for "requests".
14543         (struct load_progress_data): Add initializers.
14544         (load_section_callback): Update.  Use "new".
14545         (clear_memory_write_data): Remove.
14546         (generic_load): Update.
14547
14548 2018-02-27  Alan Hayward  <alan.hayward@arm.com>
14549
14550         * arch/aarch64.h: Use common/tdesc.h.
14551
14552 2018-02-26  Maciej W. Rozycki  <macro@mips.com>
14553
14554         * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
14555         architecture with a 64-bit ABI.
14556
14557 2018-02-26  Maciej W. Rozycki  <macro@mips.com>
14558
14559         * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
14560         ahead of target description loading.
14561
14562 2018-02-26  Tom Tromey  <tom@tromey.com>
14563
14564         * stack.c (backtrace_command_1): Update.
14565         * python/python-internal.h (gdbpy_apply_frame_filter): Change type
14566         of "flags".
14567         * python/py-framefilter.c (py_print_frame)
14568         (gdbpy_apply_frame_filter): Change type of "flags".
14569         * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
14570         of "flags".
14571         (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
14572         (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
14573         * extension.h (enum frame_filter_flag): Rename from
14574         frame_filter_flags.
14575         (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
14576         (apply_ext_lang_frame_filter): Change type of "flags".
14577         * extension.c (apply_ext_lang_frame_filter): Change type of
14578         "flags".
14579         * extension-priv.h (struct extension_language_ops)
14580         <apply_frame_filter>: Change type of "flags".
14581
14582 2018-02-26  Tom Tromey  <tom@tromey.com>
14583
14584         PR python/16497:
14585         * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag.  Fix
14586         off-by-one in py_end computation.
14587         * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
14588         PRINT_MORE_FRAMES.
14589         * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
14590         constant.
14591
14592 2018-02-26  Tom Tromey  <tom@tromey.com>
14593
14594         * dwarf2read.c (struct variant_field): New.
14595         (struct nextfield) <variant>: New field.
14596         (dwarf2_add_field): Handle DW_TAG_variant_part.
14597         (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
14598         discriminated union.
14599         (read_structure_type): Handle DW_TAG_variant_part.
14600         (handle_struct_member_die): New function, extracted from
14601         process_structure_scope.  Handle DW_TAG_variant.
14602         (process_structure_scope): Handle discriminated unions.  Call
14603         handle_struct_member_die.
14604
14605 2018-02-26  Tom Tromey  <tom@tromey.com>
14606
14607         * rust-lang.h (rust_last_path_segment): Declare.
14608         * rust-lang.c (rust_last_path_segment): Now public.  Change
14609         contract.
14610         (struct disr_info): Remove.
14611         (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
14612         (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
14613         (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
14614         (rust_enum_p, rust_enum_variant): New function.
14615         (rust_underscore_fields): Remove "offset" parameter.
14616         (rust_print_enum): New function.
14617         (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
14618         <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
14619         (rust_print_struct_def): Add "for_rust_enum" parameter.  Handle
14620         enums.
14621         (rust_internal_print_type): New function, from rust_print_type.
14622         Remove enum code.
14623         (rust_print_type): Call rust_internal_print_type.
14624         (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
14625         Update enum handling.
14626         * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
14627         (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
14628         (rust_union_quirks): New functions.
14629         (process_full_comp_unit, process_full_type_unit): Call
14630         rust_union_quirks.
14631         (process_structure_scope): Update rust_unions if necessary.
14632
14633 2018-02-26  Tom Tromey  <tom@tromey.com>
14634
14635         * value.h (value_union_variant): Declare.
14636         * valops.c (value_union_variant): New function.
14637         * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
14638         (struct discriminant_info): New.
14639         (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
14640         enumerator.
14641         (struct main_type) <flag_discriminated_union>: New field.
14642
14643 2018-02-26  Tom Tromey  <tom@tromey.com>
14644
14645         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
14646         unittests/unpack-selftests.c.
14647         * unittests/unpack-selftests.c: New file.
14648         * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
14649
14650 2018-02-26  Yao Qi  <yao.qi@linaro.org>
14651
14652         * dwarf2read.c (struct partial_die_info) <read>: New method.
14653         (read_partial_die): Remove the declaration.
14654         (load_partial_dies): Update.
14655         (partial_die_info::partial_die_info):
14656         (read_partial_die): Change it to partial_die_info::read.
14657
14658 2018-02-26  Yao Qi  <yao.qi@linaro.org>
14659
14660         * dwarf2read.c (struct partial_die_info) <fixup>: New method.
14661         (fixup_partial_die): Remove declaration.
14662         (scan_partial_symbols): Update.
14663         (partial_die_parent_scope): Likewise.
14664         (partial_die_full_name): Likewise.
14665         (fixup_partial_die): Change it to partial_die_info::fixup.
14666
14667 2018-02-26  Yao Qi  <yao.qi@linaro.org>
14668
14669         * dwarf2read.c (read_partial_die): Update the declaration.
14670         (load_partial_dies): Caller update.
14671         (read_partial_die): Remove one argument abbrev_len.
14672
14673 2018-02-26  Yao Qi  <yao.qi@linaro.org>
14674
14675         * dwarf2read.c (struct partial_die_info): Add ctor, delete
14676         assignment operator.
14677         (load_partial_dies): Use ctor and copy ctor.
14678         (read_partial_die): Update.
14679         (dwarf2_cu::find_partial_die): Use ctor.
14680
14681 2018-02-26  Yao Qi  <yao.qi@linaro.org>
14682
14683         * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
14684         (find_partial_die_in_comp_unit): Change it to
14685         dwarf2_cu::find_partial_die.
14686         (find_partial_die): Update.
14687
14688 2018-02-26  Yao Qi  <yao.qi@linaro.org>
14689
14690         * dwarf2read.c (read_partial_die): Remove the code checking abbrev
14691         is NULL.
14692
14693 2018-02-26  Yao Qi  <yao.qi@linaro.org>
14694
14695         * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
14696
14697 2018-02-26  Alan Hayward  <alan.hayward@arm.com>
14698
14699         * arch/amd64.h: Use common/tdesc.h.
14700         * arch/i386.c: Likewise.
14701         * arch/i386.h: Likewise.
14702         * arch/tic6x.c: Likewise.
14703         * arch/tdesc.h: Move file from here...
14704         * common/tdesc.h: ...to here.
14705         * features/aarch64-core.c: Regenerate.
14706         * features/aarch64-fpu.c: Regenerate.
14707         * features/i386/32bit-avx.c: Regenerate.
14708         * features/i386/32bit-avx512.c: Regenerate.
14709         * features/i386/32bit-core.c: Regenerate.
14710         * features/i386/32bit-linux.c: Regenerate.
14711         * features/i386/32bit-mpx.c: Regenerate.
14712         * features/i386/32bit-pkeys.c: Regenerate.
14713         * features/i386/32bit-sse.c: Regenerate.
14714         * features/i386/64bit-avx.c: Regenerate.
14715         * features/i386/64bit-avx512.c: Regenerate.
14716         * features/i386/64bit-core.c: Regenerate.
14717         * features/i386/64bit-linux.c: Regenerate.
14718         * features/i386/64bit-mpx.c: Regenerate.
14719         * features/i386/64bit-pkeys.c: Regenerate.
14720         * features/i386/64bit-segments.c: Regenerate.
14721         * features/i386/64bit-sse.c: Regenerate.
14722         * features/i386/x32-core.c: Regenerate.
14723         * features/tic6x-c6xp.c: Regenerate.
14724         * features/tic6x-core.c: Regenerate.
14725         * features/tic6x-gp.c: Regenerate.
14726         * target-descriptions.c: Use common/tdesc.h.
14727         * target-descriptions.h: Likewise.
14728
14729 2018-02-24  Tom Tromey  <tom@tromey.com>
14730
14731         * linux-thread-db.c (try_thread_db_load_from_pdir_1)
14732         (try_thread_db_load_from_dir, thread_db_load_search): Use
14733         std::string.
14734         (info_auto_load_libthread_db_compare): Return bool.  Change
14735         argument types.
14736         (info_auto_load_libthread_db): Use std::vector, std::string.
14737         Remove cleanups.
14738
14739 2018-02-24  Tom Tromey  <tom@tromey.com>
14740
14741         * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
14742         std::string.
14743         * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
14744         std::string*.
14745         * gdbarch.c: Rebuild.
14746         * gdbarch.h: Rebuild.
14747         * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
14748         * arch-utils.h (default_fast_tracepoint_valid_at): Update.
14749         * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
14750         std::string*.
14751
14752 2018-02-23  Simon Marchi  <simon.marchi@polymtl.ca>
14753
14754         * gdbtypes.h (sect_offset): Change type to uint64_t.
14755         (sect_offset_str): New function.
14756         * dwarf2read.c (create_addrmap_from_aranges): Use
14757         sect_offset_str.
14758         (error_check_comp_unit_head): Likewise.
14759         (create_debug_type_hash_table): Likewise.
14760         (read_cutu_die_from_dwo): Likewise.
14761         (init_cutu_and_read_dies): Likewise.
14762         (init_cutu_and_read_dies_no_follow): Likewise.
14763         (process_psymtab_comp_unit_reader): Likewise.
14764         (partial_die_parent_scope): Likewise.
14765         (peek_die_abbrev): Likewise.
14766         (process_queue): Likewise.
14767         (dwarf2_physname): Likewise.
14768         (read_namespace_alias): Likewise.
14769         (read_import_statement): Likewise.
14770         (create_dwo_cu_reader): Likewise.
14771         (create_cus_hash_table): Likewise.
14772         (lookup_dwo_cutu): Likewise.
14773         (inherit_abstract_dies): Likewise.
14774         (read_func_scope): Likewise.
14775         (read_call_site_scope): Likewise.
14776         (dwarf2_add_member_fn): Likewise.
14777         (read_common_block): Likewise.
14778         (read_module_type): Likewise.
14779         (read_typedef): Likewise.
14780         (read_subrange_type): Likewise.
14781         (load_partial_dies): Likewise.
14782         (read_partial_die): Likewise.
14783         (find_partial_die): Likewise.
14784         (read_str_index): Likewise.
14785         (dwarf2_string_attr): Likewise.
14786         (build_error_marker_type): Likewise.
14787         (lookup_die_type): Likewise.
14788         (dump_die_shallow): Likewise.
14789         (follow_die_ref): Likewise.
14790         (dwarf2_fetch_die_loc_sect_off): Likewise.
14791         (dwarf2_fetch_constant_bytes): Likewise.
14792         (follow_die_sig): Likewise.
14793         (get_signatured_type): Likewise.
14794         (get_DW_AT_signature_type): Likewise.
14795         (dwarf2_find_containing_comp_unit): Likewise.
14796         (set_die_type): Likewise.
14797
14798 2018-02-21  John Baldwin  <jhb@FreeBSD.org>
14799
14800         * arch/aarch64.c: Include "common-defs.h".
14801         * arch/amd64.c: Likewise.
14802         * arch/i386.c: Likewise.
14803
14804 2018-02-21  Tom Tromey  <tom@tromey.com>
14805
14806         * value.h: (extract_field_op): Update.
14807         * eval.c (extract_field_op): Return a const char *.
14808         * expression.h (parse_expression_for_completion): Update.
14809         * completer.c (complete_expression): Update.
14810         (add_struct_fields): Make fieldname const.
14811         * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
14812         (mark_completion_tag, parse_exp_in_context_1): Update.
14813         (parse_expression_for_completion): Change "name" to
14814         unique_xmalloc_ptr*.
14815
14816 2018-02-21  Tom Tromey  <tom@tromey.com>
14817
14818         * infcall.c (call_function_by_hand_dummy): Use std::vector.
14819
14820 2018-02-21  Yao Qi  <yao.qi@linaro.org>
14821
14822         * avr-tdep.c (avr_read_pc): Change parameter type to
14823         readable_regcache.
14824         * gdbarch.sh (read_pc): Likewise.
14825         * gdbarch.c: Re-generated.
14826         * gdbarch.h: Re-generated.
14827         * hppa-tdep.c (hppa_read_pc): Change parameter type to
14828         readable_regcache.
14829         * ia64-tdep.c (ia64_read_pc): Likewise.
14830         * mips-tdep.c (mips_read_pc): Likewise.
14831         * spu-tdep.c (spu_read_pc): Likewise.
14832
14833 2018-02-21  Yao Qi  <yao.qi@linaro.org>
14834
14835         * Makefile.in (COMMON_SFILES): Add regcache-dump.c
14836         * regcache-dump.c: New file.
14837         * regcache.c: Move register_dump to regcache-dump.c.
14838         (maintenance_print_registers): Likewise.
14839         (maintenance_print_raw_registers): Likewise.
14840         (maintenance_print_cooked_registers): Likewise.
14841         (maintenance_print_register_groups): Likewise.
14842         (maintenance_print_remote_registers): Likewise.
14843         (_initialize_regcache): Likewise.
14844         * regcache.h (register_dump): Moved from regcache.c.
14845
14846 2018-02-21  Yao Qi  <yao.qi@linaro.org>
14847
14848         * regcache.c (regcache::regcache): Update.
14849         (regcache::invalidate): Move it to detached_regcache::invalidate.
14850         (get_thread_arch_aspace_regcache): Update.
14851         (regcache::raw_update): Update.
14852         (regcache::cooked_read): Remove some code.
14853         (regcache::cooked_read_value): Likewise.
14854         (regcache::raw_write): Remove assert on m_readonly_p.
14855         (regcache::raw_supply_integer): Move it to
14856         detached_regcache::raw_supply_integer.
14857         (regcache::raw_supply_zeroed): Likewise.
14858         * regcache.h (detached_regcache) <raw_supply_integer>: New
14859         declaration.
14860         <raw_supply_zeroed, invalidate>: Likewise.
14861         (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
14862         <invalidate>: Likewise.
14863         <m_readonly_p>: Removed.
14864
14865 2018-02-21  Yao Qi  <yao.qi@linaro.org>
14866
14867         * infcmd.c (get_return_value): Let stop_regs point to
14868         get_current_regcache.
14869         * regcache.c (regcache::regcache): Remove.
14870         (register_dump_reg_buffer): New class.
14871         (regcache_print): Adjust.
14872         * regcache.h (regcache): Remove constructors.
14873
14874 2018-02-21  Yao Qi  <yao.qi@linaro.org>
14875
14876         * regcache.c (class register_dump): New class.
14877         (register_dump_regcache, register_dump_none): New class.
14878         (register_dump_remote, register_dump_groups): New class.
14879         (regcache_print): Update.
14880         * regcache.h (regcache_dump_what): Move it to regcache.c.
14881         (regcache) <dump>: Remove.
14882
14883 2018-02-21  Yao Qi  <yao.qi@linaro.org>
14884
14885         * jit.c (struct jit_unwind_private) <regcache>: Change its type to
14886          reg_buffer_rw *.
14887         (jit_unwind_reg_set_impl): Call raw_supply.
14888         (jit_frame_sniffer): Use reg_buffer_rw.
14889         * record-full.c (record_full_core_regbuf): Change its type.
14890         (record_full_core_open_1): Use reg_buffer_rw.
14891         (record_full_close): Likewise.
14892         (record_full_core_fetch_registers): Use regcache->raw_supply.
14893         (record_full_core_store_registers): Likewise.
14894         * regcache.c (regcache::get_register_status): Move it to
14895         reg_buffer.
14896         (regcache_raw_set_cached_value): Remove.
14897         (regcache::raw_set_cached_value): Remove.
14898         (regcache::raw_write): Call raw_supply.
14899         (regcache::raw_supply): Move it to reg_buffer_rw.
14900         * regcache.h (regcache_raw_set_cached_value): Remove.
14901         (reg_buffer_rw): New class.
14902
14903 2018-02-21  Yao Qi  <yao.qi@linaro.org>
14904
14905         * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
14906         readonly_detached_regcache.
14907         (dummy_frame_prev_register): Use regcache->cooked_read.
14908         * frame.c (frame_save_as_regcache): Change return type.
14909         (frame_pop): Update.
14910         * frame.h (frame_save_as_regcache): Update declaration.
14911         * inferior.h (get_infcall_suspend_state_regcache): Update
14912         declaration.
14913         * infrun.c (infcall_suspend_state) <registers>: use
14914         readonly_detached_regcache.
14915         (save_infcall_suspend_state): Don't use regcache_dup.
14916         (get_infcall_suspend_state_regcache): Change return type.
14917         * linux-fork.c (struct fork_info) <savedregs>: Change to
14918         readonly_detached_regcache.
14919         <pc>: New field.
14920         (fork_save_infrun_state): Don't use regcache_dup.
14921         (info_checkpoints_command): Adjust.
14922         * mi/mi-main.c (register_changed_p): Update declaration.
14923         (mi_cmd_data_list_changed_registers): Use
14924         readonly_detached_regcache.
14925         (register_changed_p): Change parameter type to
14926         readonly_detached_regcache.
14927         * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
14928         readonly_detached_regcache.
14929         (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
14930         * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
14931         New.
14932         (regcache::save): Move it to reg_buffer.
14933         (regcache::restore): Change parameter type.
14934         (regcache_dup): Remove.
14935         * regcache.h (reg_buffer) <save>: New method.
14936         (readonly_detached_regcache): New class.
14937         * spu-tdep.c (spu2ppu_cache) <regcache>: Use
14938         readonly_detached_regcache.
14939         (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
14940
14941 2018-02-21  Yao Qi  <yao.qi@linaro.org>
14942
14943         * frame.c (frame_save_as_regcache): Use regcache method save.
14944         (frame_pop): Use regcache method restore.
14945         * infrun.c (restore_infcall_suspend_state): Likewise.
14946         * linux-fork.c (fork_load_infrun_state): Likewise.
14947         * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
14948         save.
14949         * regcache.c (regcache_save): Remove.
14950         (regcache::restore): More asserts.
14951         (regcache_cpy): Remove.
14952         * regcache.h (regcache_save): Remove the declaration.
14953         (regcache::restore): Move from private to public.
14954         Remove the friend declaration of regcache_cpy.
14955         (regcache_cpy): Remove declaration.
14956
14957 2018-02-21  Yao Qi  <yao.qi@linaro.org>
14958
14959         * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
14960         parameter type to 'readable_regcache *'.
14961         * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
14962         * arm-tdep.c (arm_neon_quad_read): Likewise.
14963         (arm_pseudo_read): Likewise.
14964         * avr-tdep.c (avr_pseudo_register_read): Likewise.
14965         * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
14966         * frv-tdep.c (frv_pseudo_register_read): Likewise.
14967         * gdbarch.c: Re-generated.
14968         * gdbarch.h: Re-generated.
14969         * gdbarch.sh (pseudo_register_read): Change parameter type to
14970         'readable_regcache *'.
14971         (pseudo_register_read_value): Likewise.
14972         * h8300-tdep.c (pseudo_from_raw_register): Likewise.
14973         (h8300_pseudo_register_read): Likewise.
14974         * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
14975         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
14976         (i386_pseudo_register_read_into_value): Likewise.
14977         (i386_pseudo_register_read_value): Likewise.
14978         * i386-tdep.h (i386_pseudo_register_read_into_value): Update
14979         declaration.
14980         * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
14981         * m32c-tdep.c (m32c_raw_read): Likewise.
14982         (m32c_read_flg): Likewise.
14983         (m32c_banked_register): Likewise.
14984         (m32c_banked_read): Likewise.
14985         (m32c_sb_read): Likewise.
14986         (m32c_part_read): Likewise.
14987         (m32c_cat_read): Likewise.
14988         (m32c_r3r2r1r0_read): Likewise.
14989         (m32c_pseudo_register_read): Likewise.
14990         * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
14991         * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
14992         (mep_pseudo_cr64_read): Likewise.
14993         (mep_pseudo_register_read): Likewise.
14994         * mips-tdep.c (mips_pseudo_register_read): Likewise.
14995         * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
14996         * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
14997         * regcache.c (regcache::raw_read): Move it to readable_regcache.
14998         (regcache::cooked_read): Likewise.
14999         (regcache::cooked_read_value): Likewise.
15000         (regcache_cooked_read_signed):
15001         (regcache::cooked_read): Likewise.
15002         * regcache.h (readable_regcache): New class.
15003         (regcache): Inherit readable_regcache.  Move some methods to
15004         readable_regcache.
15005         * rl78-tdep.c (rl78_pseudo_register_read): Change
15006         parameter type to 'readable_regcache *'.
15007         * rs6000-tdep.c (do_regcache_raw_read): Remove.
15008         (e500_pseudo_register_read): Change parameter type to
15009         'readable_regcache *'.
15010         (dfp_pseudo_register_read): Likewise.
15011         (vsx_pseudo_register_read): Likewise.
15012         (efpr_pseudo_register_read): Likewise.
15013         * s390-tdep.c (s390_pseudo_register_read): Likewise.
15014         * sh-tdep.c (sh_pseudo_register_read): Likewise.
15015         * sh64-tdep.c (pseudo_register_read_portions): Likewise.
15016         (sh64_pseudo_register_read): Likewise.
15017         * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
15018         * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
15019         * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
15020         (spu_pseudo_register_read): Likewise.
15021         * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
15022         (xtensa_pseudo_register_read): Likewise.
15023
15024 2018-02-21  Yao Qi  <yao.qi@linaro.org>
15025
15026         * regcache.c (regcache::regcache): Call reg_buffer ctor.
15027         (regcache::arch): Move it to reg_buffer::arch.
15028         (regcache::register_buffer): Likewise.
15029         (regcache::assert_regnum): Likewise.
15030         (regcache::num_raw_registers): Likewise.
15031         * regcache.h (reg_buffer): New class.
15032         (regcache): Inherit reg_buffer.
15033
15034 2018-02-20  Simon Marchi  <simon.marchi@ericsson.com>
15035
15036         * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
15037         gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
15038
15039 2018-02-20  Markus Metzger  <markus.t.metzger@intel.com>
15040
15041         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
15042
15043 2018-02-19  Alan Hayward  <alan.hayward@arm.com>
15044
15045         * Makefile.in: (COMMON_SFILES): Add common/*.c files.
15046         (SFILES): Remove common/*.c files.
15047         (COMMON_OBS): Remove some *.o files built from common/*.c files.
15048         * common/common.host: Add common reference.
15049         * configure.ac: Likewise.
15050         * configure: Regenerate.
15051
15052 2018-02-16  Yao Qi  <yao.qi@linaro.org>
15053
15054         * block.c (block_namespace_info): Inherit allocate_on_obstack.
15055         (block_initialize_namespace): Use new.
15056         * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
15057         (dwarf2_free_objfile): Use delete.
15058         * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
15059         (copy_type_recursive): Use new.
15060         * gdb_obstack.h (allocate_on_obstack): New.
15061
15062 2018-02-15  Yao Qi  <yao.qi@linaro.org>
15063
15064         PR gdb/22849
15065         * inferior.c (exit_inferior_1): Reset inf->control.
15066
15067 2018-02-15  Joel Brobecker  <brobecker@adacore.com>
15068
15069         * ada-lang.c (ada_to_fixed_value_create): Delete advance
15070         declaration.
15071
15072 2018-02-14  Pedro Alves  <palves@redhat.com>
15073
15074         * frame-unwind.c (frame_unwind_try_unwinder): Always call
15075         frame_cleanup_after_sniffer on exception.
15076
15077 2018-02-14  Tom Tromey  <tom@tromey.com>
15078
15079         * solist.h (struct target_so_ops) <bfd_open>: Make pathname
15080         const.
15081         (solib_bfd_open): Make pathname const.
15082         * solib.c (solib_bfd_open): Make pathname const.
15083         * solib-spu.c (spu_bfd_fopen): Make name const.
15084         (spu_bfd_open): Make pathname const.
15085         * solib-darwin.c (darwin_bfd_open): Make pathname const.
15086         * solib-aix.c (solib_aix_bfd_open): Make pathname const.
15087
15088 2018-02-14  Tom Tromey  <tom@tromey.com>
15089
15090         * symfile.c (symfile_bfd_open): Update.
15091         * source.h (openp, source_full_path_of, find_and_open_source):
15092         Change argument type to unique_xmalloc_ptr.
15093         * source.c (openp): Take a unique_xmalloc_ptr.
15094         (source_full_path_of, find_and_open_source): Likewise.
15095         (open_source_file, symtab_to_fullname): Update.
15096         * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
15097         unique_xmalloc_ptr.
15098         * solib.c (solib_find_1): Use unique_xmalloc_ptr.
15099         (exec_file_find): Update.
15100         * psymtab.c (psymtab_to_fullname): Update.
15101         * nto-tdep.h (nto_find_and_open_solib): Update.
15102         * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
15103         unique_xmalloc_ptr.
15104         * exec.c (exec_file_attach): Update.
15105         * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
15106         * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
15107
15108 2018-02-14  Tom Tromey  <tom@tromey.com>
15109
15110         * solib.c: Include source.h.
15111         * nto-tdep.c: Include source.h.
15112         * mi/mi-cmd-env.c: Include source.h.
15113         * infcmd.c: Include source.h.
15114         * exec.c: Include source.h.
15115         * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
15116         (add_path, directory_switch, source_path, init_source_path): Move
15117         declarations...
15118         * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
15119         (add_path, directory_switch, source_path, init_source_path):
15120         ...here.
15121
15122 2018-02-14  Tom Tromey  <tom@tromey.com>
15123
15124         * solist.h (exec_file_find, solib_find): Return
15125         unique_xmalloc_ptr.
15126         (solib_bfd_fopen): Take a const char *.
15127         * solib.c (solib_find_1): Return unique_xmalloc_ptr.
15128         (exec_file_find, solib_find): Likewise.
15129         (solib_bfd_fopen): Do not take ownership of "pathname".
15130         (solib_bfd_open): Use unique_xmalloc_ptr.
15131         * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
15132         * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
15133         * infrun.c (follow_exec): Use unique_xmalloc_ptr.
15134         * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
15135
15136 2018-02-14  Joel Brobecker  <brobecker@adacore.com>
15137
15138         * ada-lang.c (name_match_type_from_name): Remove reference to
15139         ada_name_for_lookup in function's documentation.
15140         * ada-lang.h (ada_name_for_lookup): Delete declaration.
15141
15142 2018-02-13  Simon Marchi  <simon.marchi@polymtl.ca>
15143
15144         * defs.h (enum openp_flags): New enum.
15145         (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
15146         Move to enum openp_flags.
15147         (openp_flags): New enum flags.
15148         (openp): Change parameter type to openp_flags.
15149         * source.c (openp): Change parameter type to openp_flags.
15150         * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
15151         * dwarf2read.c (try_open_dwop_file): Use openp_flags.
15152
15153 2018-02-13  Simon Marchi  <simon.marchi@polymtl.ca>
15154
15155         * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
15156         per-command.
15157
15158 2018-02-12  Andrew Burgess  <andrew.burgess@embecosm.com>
15159
15160         * dwarf2read.c (dwarf2_release_queue): Delete function, move body
15161         into...
15162         (class dwarf2_queue_guard): ...the destructor of this new class.
15163         (dw2_do_instantiate_symtab): Create instance of the new class
15164         dwarf2_queue_guard, remove cleanup.
15165
15166 2018-02-09  Tom Tromey  <tom@tromey.com>
15167
15168         * source.c (find_source_lines): Don't reference past the end of
15169         the vector.
15170
15171 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
15172
15173         * remote.c (remote_btrace_maybe_reopen): Change error message.
15174         * btrace.c (btrace_enable): Likewise.
15175         (parse_xml_btrace): Likewise.
15176         (parse_xml_btrace_conf): Likewise.
15177
15178 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
15179
15180         * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
15181         (linux_enable_pt, linux_enable_bts): Call
15182         diagnose_perf_event_open_fail.
15183
15184 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
15185
15186         * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
15187         Remove parameter and change return type.  Update callers.  Move it.
15188         (linux_enable_bts, linux_enable_pt): Improve error message.
15189         (linux_enable_pt): Remove zero buffer size check.
15190         (linux_enable_btrace): Improve error messages.  Remove NULL return
15191         check.
15192
15193 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
15194
15195         * btrace.c (btrace_enable): Remove target_supports_btrace call.
15196         * nat/linux-btrace.c (perf_event_pt_event_type): Move.
15197         (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
15198         (linux_supports_pt, linux_supports_btrace): Remove.
15199         (linux_enable_bts): Call cpu_supports_bts.
15200         * nat/linux-btrace.h (linux_supports_btrace): Remove.
15201         * remote.c (remote_supports_btrace): Remove.
15202         (init_remote_ops): Remove remote_supports_btrace.
15203         * target-delegates.c: Regenerated.
15204         * target.c (target_supports_btrace): Remove.
15205         * target.h (target_ops) <to_supports_btrace>: Remove
15206         (target_supports_btrace): Remove.
15207         * x86-linux-nat.c (x86_linux_create_target): Remove
15208         linux_supports_btrace.
15209
15210 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
15211
15212         * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
15213         btrace failed.
15214         * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
15215         exception and use message in own exception.
15216
15217 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
15218
15219         * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
15220         (perf_event_pt_event_type): Use gdb_file_up.
15221         (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
15222         scoped_fd, and scoped_mmap.
15223
15224 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
15225
15226         * common/scoped_mmap.h: New.
15227         * unittests/scoped_mmap-selftest.c: New.
15228         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
15229         unittests/scoped_mmap-selftest.c.
15230
15231 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
15232
15233         * common/scoped_fd.h: New.
15234         * unittests/scoped_fd-selftest.c: New.
15235         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
15236         unittests/scoped_fd-selftest.c.
15237
15238 2018-02-09  Tom Tromey  <tom@tromey.com>
15239
15240         * auto-load.c (auto_load_section_scripts): Use
15241         gdb::unique_xmalloc_ptr.
15242
15243 2018-02-09  Tom Tromey  <tom@tromey.com>
15244
15245         * auto-load.c (execute_script_contents): Use std::string.
15246
15247 2018-02-09  Joel Brobecker  <brobecker@adacore.com>
15248
15249         * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
15250         Python function, rather than a new command.
15251
15252 2018-02-08  Tom Tromey  <tom@tromey.com>
15253
15254         * solib.c (solib_find_1): Use std::string.
15255         (solib_bfd_fopen): Use unique_xmalloc_ptr.
15256
15257 2018-02-08  Tom Tromey  <tom@tromey.com>
15258
15259         * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
15260
15261 2018-02-08  Tom Tromey  <tom@tromey.com>
15262
15263         * source.c (find_source_lines): Use gdb::def_vector.
15264
15265 2018-02-08  Tom Tromey  <tom@tromey.com>
15266
15267         * macrocmd.c (struct temporary_macro_definition): New.
15268         (macro_define_command): Use temporary_macro_definition.  Remove
15269         cleanups.
15270         (free_macro_definition_ptr): Remove.
15271
15272 2018-02-08  Tom Tromey  <tom@tromey.com>
15273
15274         * macroexp.c (maybe_expand): Use std::string.
15275
15276 2018-02-08  Tom Tromey  <tom@tromey.com>
15277
15278         * macroexp.c (struct macro_buffer): Add initializers for some
15279         members.
15280         (init_buffer, init_shared_buffer, free_buffer)
15281         (free_buffer_return_text): Remove.
15282         (macro_buffer): New constructors.
15283         (~macro_buffer): New destructor.
15284         (macro_buffer::set_shared): New method.
15285         (macro_buffer::resize_buffer, macro_buffer::appendc)
15286         (macro_buffer::appendmem): Now methods, not free functions.
15287         (set_token, append_tokens_without_splicing, stringify)
15288         (macro_stringify): Update.
15289         (gather_arguments): Change return type.  Remove argc_p argument,
15290         add args_ptr argument.  Use std::vector.
15291         (substitute_args): Remove argc argument.  Accept std::vector.
15292         (expand): Update.  Use std::vector.
15293         (scan, macro_expand, macro_expand_next): Update.
15294
15295 2018-02-08  Tom Tromey  <tom@tromey.com>
15296
15297         * symtab.c (default_collect_symbol_completion_matches_break_on):
15298         Use unique_xmalloc_ptr.
15299         * macroscope.h: (sal_macro_scope, user_macro_scope)
15300         (default_macro_scope): Return unique_xmalloc_ptr.
15301         * macroscope.c (sal_macro_scope, user_macro_scope)
15302         (default_macro_scope): Return unique_xmalloc_ptr.
15303         * macroexp.h (macro_expand, macro_expand_once): Return
15304         unique_xmalloc_ptr.
15305         * macroexp.c (macro_expand, macro_expand_once): Return
15306         unique_xmalloc_ptr.
15307         * macrocmd.c (macro_expand_command, macro_expand_once_command)
15308         (info_macro_command, info_macros_command): Use
15309         unique_xmalloc_ptr.
15310         * compile/compile-c-support.c (write_macro_definitions): Use
15311         unique_xmalloc_ptr.
15312         * c-exp.y (c_parse): Use unique_xmalloc_ptr.
15313
15314 2018-02-07  Simon Marchi  <simon.marchi@ericsson.com>
15315
15316         * value.c (value_static_field): Assign field type instead of
15317         containing type when returning an optimized out value.
15318
15319 2018-02-06  Yao Qi  <yao.qi@linaro.org>
15320
15321         * ft32-tdep.c (ft32_read_pc): Remove.
15322         (ft32_write_pc): Remove.
15323         (ft32_gdbarch_init): Update.
15324         * m32r-tdep.c (m32r_read_pc): Remove.
15325         (m32r_gdbarch_init): Update.
15326         * mep-tdep.c (mep_read_pc): Remove.
15327         (mep_gdbarch_init): Update.
15328         * microblaze-tdep.c (microblaze_write_pc): Remove.
15329         (microblaze_gdbarch_init): Update.
15330         * mn10300-tdep.c (mn10300_read_pc): Remove.
15331         (mn10300_write_pc): Remove.
15332         (mn10300_gdbarch_init): Update.
15333         * moxie-tdep.c (moxie_read_pc): Remove.
15334         (moxie_write_pc): Remove.
15335         (moxie_gdbarch_init): Update.
15336
15337 2018-02-06  Yao Qi  <yao.qi@linaro.org>
15338
15339         * expprint.c (print_subexp_standard): Handle
15340         OP_F77_UNDETERMINED_ARGLIST.
15341         (dump_subexp_body_standard): Likewise.
15342
15343 2018-02-05  Alan Hayward  <alan.hayward@arm.com>
15344
15345         * target-descriptions.c (tdesc_element_visitor) Add empty
15346         implementations.
15347         (tdesc_type): Move make_gdb_type from here.
15348         (tdesc_type_builtin): Likewise.
15349         (tdesc_type_vector): Likewise.
15350         (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
15351         (make_gdb_type_struct): Move from tdesc_type_with_fields.
15352         (make_gdb_type_union): Likewise.
15353         (make_gdb_type_flags): Likewise.
15354         (make_gdb_type_enum): Likewise.
15355         (make_gdb_type): New function.
15356         (tdesc_register_type): Use static make_gdb_type.
15357
15358 2018-02-05  Ruslan Kabatsayev <b7.10110111@gmail.com>
15359
15360         * infcmd.c (default_print_one_register_info): Align natural-format
15361         column values consistently one under another.
15362         (pad_to_column): New function.
15363
15364 2018-02-05  Joel Brobecker  <brobecker@adacore.com>
15365
15366         * dwarf2read.c (dwarf2_physname): Move commment.
15367
15368 2018-02-01  Leszek Swirski  <leszeks@google.com>
15369
15370         * varobj.c (varobj_formatted_print_options): Allow recursive
15371         pretty printing if pretty printing is enabled.
15372
15373 2018-02-01  Leszek Swirski  <leszeks@google.com>
15374
15375         * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
15376         names after a structop as a filename.
15377
15378 2018-02-01  Yao Qi  <yao.qi@linaro.org>
15379
15380         * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
15381         (arm_record_coproc_data_proc): Likewise.
15382
15383 2018-02-01  Yao Qi  <yao.qi@linaro.org>
15384
15385         * arm-tdep.c (arm_record_extension_space): Change ret to signed.
15386
15387 2018-01-31  Nikola Prica  <nikola.prica@rt-rk.com>
15388
15389         * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
15390         assign shifted lr_reg to fdata->lr_register when lr_reg is set.
15391
15392 2018-01-31  Pedro Alves  <palves@redhat.com>
15393
15394         * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
15395         * inflow.c (child_terminal_save_inferior): Wrap reference to
15396         tcgetpgrp in HAVE_TERMIOS_H.
15397         (child_interrupt, child_pass_ctrlc): Wrap references to signal in
15398         _WIN32.
15399         * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
15400         always iterate over all inferiors.
15401         (gdbsim_cntrl_c): Adjust.
15402         * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
15403
15404 2018-01-31  Joel Brobecker  <brobecker@adacore.com>
15405
15406         * gdbtypes.c (lookup_array_range_type): Make sure the array's
15407         index type is objfile-owned if the element type is as well.
15408
15409 2018-01-31  Joel Brobecker  <brobecker@adacore.com>
15410
15411         GDB 8.1 released.
15412
15413 2018-01-30  Philipp Rudo  <prudo@linux.vnet.ibm.com>
15414
15415         * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
15416         "features/s390x-linux64.c".
15417         (_initialize_s390_linux_tdep): Remove initialization of tdescs
15418         s390_linux32 and s390x_linux64.
15419         (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
15420         default tdesc.
15421         * s390-tdep.c: Include "features/s390-linux32.c" and
15422         "features/s390x-linux64.c".
15423         (s390_tdesc_valid): Add check for tdesc_has_registers.
15424         (s390_gdbarch_init): Make sure there is always a valid tdesc.
15425         (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
15426         tdesc_s390x_linux64.
15427         * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
15428         tdesc_s390x_linux64 to...
15429         * s390-tdep.h: ...here.
15430
15431 2018-01-30  Pedro Alves  <palves@redhat.com>
15432
15433         PR gdb/13211
15434         * config.in, configure: Regenerate.
15435         * configure.ac: Check for getpgid.
15436         * go32-nat.c (go32_pass_ctrlc): New.
15437         (go32_target): Install it.
15438         * inf-child.c (inf_child_target): Install
15439         child_terminal_save_inferior, child_pass_ctrlc and
15440         child_interrupt.
15441         * inf-ptrace.c (inf_ptrace_interrupt): Delete.
15442         (inf_ptrace_target): No longer install it.
15443         * infcmd.c (interrupt_target_1): Adjust.
15444         * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
15445         (child_interrupt): Declare.
15446         (inferior::terminal_state): New.
15447         * inflow.c (struct terminal_info): Update comments.
15448         (inferior_process_group): Delete.
15449         (terminal_is_ours): Delete.
15450         (gdb_tty_state): New.
15451         (child_terminal_init): Adjust.
15452         (is_gdb_terminal, sharing_input_terminal_1)
15453         (sharing_input_terminal): New functions.
15454         (child_terminal_inferior): Adjust.  Use sharing_input_terminal.
15455         Set the process's actual process group in the foreground if
15456         possible.  Handle is_ours_for_output/is_ours distinction.  Don't
15457         mark terminal as the inferior's if not sharing GDB's terminal.
15458         Don't check attach_flag.
15459         (child_terminal_ours_for_output, child_terminal_ours): Adjust to
15460         pass down a target_terminal_state.
15461         (child_terminal_save_inferior): New, factored out from ...
15462         (child_terminal_ours_1): ... this.  Handle
15463         target_terminal_state::is_ours_for_output.
15464         (child_interrupt, child_pass_ctrlc): New.
15465         (inflow_inferior_exit): Clear the inferior's terminal_state.
15466         (copy_terminal_info): Copy the inferior's terminal state.
15467         (_initialize_inflow): Remove reference to terminal_is_ours.
15468         * inflow.h (inferior_process_group): Delete.
15469         * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
15470         * procfs.c (procfs_target): Don't install procfs_interrupt.
15471         (procfs_interrupt): Delete.
15472         * remote.c (remote_serial_quit_handler): Adjust.
15473         (remote_interrupt): Remove ptid parameter.  Adjust.
15474         * target-delegates.c: Regenerate.
15475         * target.c: Include "terminal.h".
15476         (target_terminal::terminal_state): Rename to ...
15477         (target_terminal::m_terminal_state): ... this.
15478         (target_terminal::init): Adjust.
15479         (target_terminal::inferior): Adjust to per-inferior
15480         terminal_state.
15481         (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
15482         (target_terminal::ours, target_terminal::ours_for_output): Use
15483         target_terminal_is_ours_kind.
15484         (target_interrupt): Remove ptid parameter.  Adjust.
15485         (default_target_pass_ctrlc): Adjust.
15486         * target.h (target_ops::to_terminal_save_inferior): New field.
15487         (target_ops::to_interrupt): Remove ptid_t parameter.
15488         (target_interrupt): Remove ptid_t parameter.  Update comment.
15489         (target_pass_ctrlc): Update comment.
15490         * target/target.h (target_terminal_state): New scoped enum,
15491         factored out of ...
15492         (target_terminal::terminal_state): ... here.
15493         (target_terminal::inferior): Update comments.
15494         (target_terminal::restore_inferior): New.
15495         (target_terminal::is_inferior, target_terminal::is_ours)
15496         (target_terminal::is_ours_for_output): Adjust.
15497         (target_terminal::scoped_restore_terminal_state): Adjust to
15498         rename, and call restore_inferior() instead of inferior().
15499         (target_terminal::scoped_restore_terminal_state::m_state): Change
15500         type.
15501         (target_terminal::terminal_state): Rename to ...
15502         (target_terminal::m_terminal_state): ... this and change type.
15503
15504 2018-01-30  Pedro Alves  <palves@redhat.com>
15505
15506         * linux-nat.c (wait_for_signal): New function.
15507         (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
15508         directly.
15509         (async_terminal_is_ours)
15510         (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
15511         (linux_nat_add_target): Don't override
15512         to_terminal_inferior/to_terminal_ours.
15513
15514 2018-01-29  Sergio Durigan Junior  <sergiodj@redhat.com>
15515
15516         * remote.c (remote_follow_fork): Don't call "detach_inferior".
15517
15518 2018-01-28  Simon Marchi  <simon.marchi@ericsson.com>
15519
15520         * dwarf2read.c (free_dwo_files): Add forward-declaration.
15521         (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
15522         dwarf2_per_objfile_free here.
15523         (dwarf2_per_objfile_free): Remove.
15524         (_initialize_dwarf2_read): Don't register
15525         dwarf2_per_objfile_free as a registry cleanup.
15526
15527 2018-01-27  Eli Zaretskii  <eliz@gnu.org>
15528
15529         Avoid compilation errors in MinGW native builds
15530
15531         The error is triggered by including python-internal.h, and the
15532         error message is:
15533
15534              In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
15535                       from build-gnulib/import/math.h:27,
15536                       from d:/usr/Python26/include/pyport.h:235,
15537                       from d:/usr/Python26/include/Python.h:58,
15538                       from python/python-internal.h:94,
15539                       from python/py-arch.c:24:
15540              d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
15541         using ::hypot;
15542                 ^~~~~
15543
15544         This happens because Python headers define 'hypot' to expand t
15545         '_hypot' in the Windows builds.
15546         * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
15547         'hypoth'.  This avoids a compilation error.
15548
15549 2018-01-26  Alan Hayward  <alan.hayward@arm.com>
15550
15551         * MAINTAINERS (Write After Approval): Fix ordering.
15552
15553 2018-01-26  Alan Hayward  <alan.hayward@arm.com>
15554
15555         * MAINTAINERS (Write After Approval): Add Alan Hayward.
15556
15557 2018-01-26  Alan Modra  <amodra@gmail.com>
15558
15559         * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
15560         (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
15561         Remove nop.  Make const.  Comment.
15562         (powerpc32_plt_stub_so_2): New.
15563         (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
15564         Correct count.  Update uses.
15565         (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
15566         Move common code reading PLT entry word.  Correct
15567         powerpc32_plt_stub PLT address calculation.
15568         * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
15569         (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
15570         (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
15571         (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
15572         (ppc64_standard_linkage8): Likewise.
15573         * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
15574         Correct insns description.
15575         * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
15576
15577 2018-01-24  Pedro Alves  <palves@redhat.com>
15578
15579         GCC PR libstdc++/83906
15580         * gdbtypes.c (operator==(const dynamic_prop &,
15581         const dynamic_prop &)): New.
15582         (operator==(const range_bounds &, const range_bounds &)): New.
15583         (check_types_equal): Use them instead of memcmp.
15584         * gdbtypes.h (operator==(const dynamic_prop &,
15585         const dynamic_prop &)): Declare.
15586         (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
15587         (operator==(const range_bounds &, const range_bounds &)): Declare.
15588         (operator!=(const range_bounds &, const range_bounds &)): Declare.
15589
15590 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
15591
15592         * s390-linux-tdep.c (s390_record_address_mask)
15593         (s390_record_calc_disp_common, s390_record_calc_disp)
15594         (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
15595         (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
15596         (s390_process_record): Move to s390-tdep.c.
15597         (s390_linux_init_abi_any): Adjust.
15598         * s390-tdep.c (s390_record_address_mask)
15599         (s390_record_calc_disp_common, s390_record_calc_disp)
15600         (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
15601         (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
15602         (s390_process_record): Moved from s390-linux-tdep.c
15603         (s390_gdbarch_init): Adjust.
15604
15605 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
15606
15607         * s390-linux-nat.c (s390-tdep.h): New include.
15608         * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
15609         (HFILES_NO_SRCDIR): Add s390-tdep.h.
15610         (ALLDEPFILES): Add s390-tdep.c.
15611         * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
15612         * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
15613         * s390-tdep.h: ...this.  New file.
15614         * s390-linux-tdep.c (s390-tdep.h): New include.
15615         (_initialize_s390_tdep): Rename to...
15616         (_initialize_s390_linux_tdep): ...this and adjust.
15617         (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
15618         (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
15619         s390-tdep.h.
15620         (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
15621         (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
15622         (s390_is_partial_instruction, s390_software_single_step)
15623         (is_non_branch_ril, s390_displaced_step_copy_insn)
15624         (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
15625         (s390_prologue_data, s390_addr, s390_store, s390_load)
15626         (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
15627         (s390_register_call_saved, s390_guess_tracepoint_registers)
15628         (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
15629         (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
15630         (s390_pseudo_register_name, s390_pseudo_register_type)
15631         (s390_pseudo_register_read, s390_pseudo_register_write)
15632         (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
15633         (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
15634         (s390_addr_bits_remove, s390_address_class_type_flags)
15635         (s390_address_class_type_flags_to_name)
15636         (s390_address_class_name_to_type_flags, s390_effective_inner_type)
15637         (s390_function_arg_float, s390_function_arg_vector)
15638         (is_power_of_two, s390_function_arg_integer, s390_arg_state)
15639         (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
15640         (s390_frame_align, s390_register_return_value, s390_return_value)
15641         (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
15642         (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
15643         (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
15644         (s390_trad_frame_prev_register, s390_unwind_cache)
15645         (s390_prologue_frame_unwind_cache)
15646         (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
15647         (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
15648         (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
15649         (s390_stub_frame_this_id, s390_stub_frame_prev_register)
15650         (s390_stub_frame_sniffer, s390_stub_frame_unwind)
15651         (s390_frame_base_address, s390_local_base_address)
15652         (s390_frame_base, s390_gcc_target_options)
15653         (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
15654         (s390_validate_reg_range, s390_tdesc_valid)
15655         (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
15656         * s390-tdep.c: ...this.  New file.
15657
15658 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
15659
15660         * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
15661         (s390_process_record, s390_gdbarch_tdep_alloc)
15662         (s390_linux_init_abi_any): Use/set new hook.
15663
15664 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
15665
15666         * s390-linux-tdep.c (osabi.h): New include.
15667         (s390_linux_init_abi_31, s390_linux_init_abi_64)
15668         (s390_linux_init_abi_any): New functions.
15669         (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
15670
15671 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
15672
15673         * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
15674         tdesc_has_registers check
15675
15676 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
15677
15678         * s390-linux-tdep.c (s390_tdesc_valid): New function.
15679         (s390_validate_reg_range): New macro.
15680         (s390_gdbarch_init): Adjust.
15681
15682 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
15683
15684         * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
15685         (s390_gdbarch_tdep_alloc): Adjust.
15686         (s390_gdbarch_init): Adjust.
15687
15688 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
15689
15690         * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
15691         <have_tdb>: Change type to bool.
15692         (s390_gdbarch_tdep_alloc): Adjust.
15693         (s390_gdbarch_init): Adjust.
15694
15695 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
15696
15697         * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
15698         (gdbarch_tdep) <have_upper, have_vx>: New fields.
15699         (s390_gdbarch_tdep_alloc): New function.
15700         (s390_gdbarch_init): Allocate tdep at start and use its fields
15701         instead of separate variables.
15702
15703 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
15704
15705         * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
15706         when looking for cached gdbarch and add comment for remaining.
15707
15708 2018-01-22  Pedro Alves  <palves@redhat.com>
15709             Sergio Durigan Junior  <sergiodj@redhat.com>
15710
15711         * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
15712         case.
15713
15714 2018-01-22  Maciej W. Rozycki  <macro@mips.com>
15715
15716         * MAINTAINERS: Update my company e-mail address.
15717
15718 2018-01-22  Yao Qi  <yao.qi@linaro.org>
15719
15720         * regcache.c (cooked_write_test): New function.
15721         (_initialize_regcache): Register the test.
15722
15723 2018-01-22  Yao Qi  <yao.qi@linaro.org>
15724
15725         * ia64-tdep.c (ia64_pseudo_register_read): Call
15726         regcache->cooked_read instead of regcache_cooked_read_unsigned.
15727         * m32c-tdep.c (m32c_cat_read): Likewise.
15728         (m32c_r3r2r1r0_read): Likewise.
15729         * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
15730         * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
15731
15732 2018-01-22  Yao Qi  <yao.qi@linaro.org>
15733
15734         * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
15735         method raw_read instead of regcache_raw_read.
15736         * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
15737         * arm-tdep.c (arm_neon_quad_read): Likewise.
15738         * avr-tdep.c (avr_pseudo_register_read): Likewise.
15739         * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
15740         * frv-tdep.c (frv_pseudo_register_read): Likewise.
15741         * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
15742         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
15743         (i386_pseudo_register_read_into_value): Likewise.
15744         * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
15745         * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
15746         * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
15747         * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
15748         * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
15749         * sparc-tdep.c (sparc32_pseudo_register_read):  Likewise.
15750         * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
15751         * spu-tdep.c (spu_pseudo_register_read_spu):  Likewise.
15752         * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
15753
15754 2018-01-22  Yao Qi  <yao.qi@linaro.org>
15755
15756         * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
15757         * configure.tgt: Remove target mt.
15758         * mt-tdep.c: Remove.
15759         * regcache.c (cooked_read_test): Remove the check for mt.
15760
15761 2018-01-22  Yao Qi  <yao.qi@linaro.org>
15762
15763         * jit.c (jit_frame_prev_register): Call regcache::cooked_read
15764         instead of gdbarch_pseudo_register_read_value.
15765
15766 2018-01-22  Joel Brobecker  <brobecker@adacore.com>
15767
15768         * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
15769         language is Ada.
15770
15771 2018-01-22  Joel Brobecker  <brobecker@adacore.com>
15772
15773         * linespec.c (create_sals_line_offset): Remove code that preserved
15774         the symtab_and_line's line number.
15775
15776 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
15777
15778         * varobj.c (varobj_create): Don't set valid_block when creating a
15779         floating varobj.
15780
15781 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
15782
15783         * varobj.c (varobj_create): Remove out of date comment.
15784
15785 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
15786
15787         PR mi/20395
15788         * ada-exp.y (write_var_from_sym): Pass extra parameter when
15789         updating innermost block.
15790         * parse.c (innermost_block_tracker::update): Take extra type
15791         parameter, and check types match before updating innermost block.
15792         (write_dollar_variable): Update innermost block for registers.
15793         * parser-defs.h (enum innermost_block_tracker_type): New enum.
15794         (innermost_block_tracker::innermost_block_tracker): Initialise
15795         m_types member.
15796         (innermost_block_tracker::reset): Take type parameter.
15797         (innermost_block_tracker::update): Take type parameter, and pass
15798         type through as needed.
15799         (innermost_block_tracker::m_types): New member.
15800         * varobj.c (varobj_create): Pass type when reseting innermost
15801         block.
15802
15803 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
15804
15805         * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
15806         * ada-lang.c (resolve_subexp): Likewise.
15807         * breakpoint.c (set_breakpoint_condition) Likewise.
15808         (watch_command_1) Likewise.
15809         * c-exp.y (variable): Likewise.
15810         * d-exp.y (PrimaryExpression): Likewise.
15811         * f-exp.y (variable): Likewise.
15812         * go-exp.y (variable): Likewise.
15813         * m2-exp.y (variable): Likewise.
15814         * objfiles.c (objfile::~objfile): Likewise.
15815         * p-exp.y (variable): Likewise.
15816         * parse.c (innermost_block): Change type.
15817         * parser-defs.h (class innermost_block_tracker): New.
15818         (innermost_block): Change to innermost_block_tracker.
15819         * printcmd.c (display_command): Switch to innermost_block API.
15820         (do_one_display): Likewise.
15821         * rust-exp.y (do_one_display): Likewise.
15822         * symfile.c (clear_symtab_users): Likewise.
15823         * varobj.c (varobj_create): Switch to innermost_block API, replace
15824         use of innermost_block with block stored on varobj object.
15825
15826 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
15827
15828         * expression.h (innermost_block): Remove declaration.
15829         * varobj.c: Add 'parser-defs.h' include.
15830
15831 2018-01-19  Tom Tromey  <tom@tromey.com>
15832
15833         * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
15834         symbols in the static and global blocks.
15835
15836 2018-01-19  James Clarke  <jrtc27@jrtc27.com>
15837
15838         * nat/linux-ptrace.c: Remove unnecessary reinclusion of
15839         gdb_ptrace.h, and move including gdb_wait.h ...
15840         * nat/linux-ptrace.h: ... to here.
15841
15842 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
15843
15844         * inf-ptrace.c (inf_ptrace_detach): Adjust call to
15845         inf_ptrace_detach_success.
15846         (inf_ptrace_detach_success): Add inferior parameter, use it
15847         instead of inferior_ptid, pass it to detach_inferior.
15848         * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
15849         parameter.
15850         * inferior.c (detach_inferior): Add overload that takes an
15851         inferior object.
15852         * inferior.h (detach_inferior): Likewise.
15853         * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
15854         use inferior_ptid, adjust call to inf_ptrace_detach_success.
15855         * linux-thread-db.c (thread_db_detach): Use inf parameter.
15856
15857 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
15858
15859         * target.h (struct target_ops) <to_detach>: Add inferior
15860         parameter.
15861         (target_detach): Likewise.
15862         * target.c (dispose_inferior): Pass inferior down.
15863         (target_detach): Pass inferior down.  Assert that it is equal to
15864         the current inferior.
15865         * aix-thread.c (aix_thread_detach): Pass inferior down.
15866         * corefile.c (core_file_command): Pass current_inferior() down.
15867         * corelow.c (core_detach): Add inferior parameter.
15868         * darwin-nat.c (darwin_detach): Likewise.
15869         * gnu-nat.c (gnu_detach): Likewise.
15870         * inf-ptrace.c (inf_ptrace_detach): Likewise.
15871         * infcmd.c (detach_command): Pass current_inferior() down to
15872         target_detach.
15873         * infrun.c (follow_fork_inferior): Pass parent_inf to
15874         target_detach.
15875         (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
15876         target_detach.
15877         * linux-nat.c (linux_nat_detach): Add inferior parameter.
15878         * linux-thread-db.c (thread_db_detach): Likewise.
15879         * nto-procfs.c (procfs_detach): Likewise.
15880         * procfs.c (procfs_detach): Likewise.
15881         * record.c (record_detach): Likewise.
15882         * record.h (struct inferior): Forward-declare.
15883         (record_detach): Add inferior parameter.
15884         * remote-sim.c (gdbsim_detach): Likewise.
15885         * remote.c (remote_detach_1): Likewise.
15886         (remote_detach): Likewise.
15887         (extended_remote_detach): Likewise.
15888         * sol-thread.c (sol_thread_detach): Likewise.
15889         * target-debug.h (target_debug_print_inferior_p): New macro.
15890         * target-delegates.c: Re-generate.
15891         * top.c (kill_or_detach): Pass inferior down to target_detach.
15892         * windows-nat.c (windows_detach): Add inferior parameter.
15893
15894 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
15895
15896         * target.h (struct target_ops) <to_detach>: Remove args
15897         parameter.
15898         (target_detach): Likewise.
15899         * target.c (dispose_inferior): Adjust.
15900         (target_detach): Remove args parameter, adjust.
15901         * aix-thread.c (aix_thread_detach): Adjust.
15902         * corefile.c (core_file_command): Adjust.
15903         * corelow.c (core_detach): Adjust.
15904         * darwin-nat.c (darwin_detach): Adjust.
15905         * gnu-nat.c (gnu_detach): Adjust.
15906         * inf-ptrace.c (inf_ptrace_detach): Adjust.
15907         * infcmd.c (detach_command): Adjust
15908         * infrun.c (follow_fork_inferior): Adjust.
15909         (handle_vfork_child_exec_or_exit): Adjust.
15910         * linux-fork.c (linux_fork_detach): Remove args parameter.
15911         * linux-fork.h (linux_fork_detach): Likewise.
15912         * linux-nat.c (linux_nat_detach): Likewise, and adjust.
15913         * linux-thread-db.c (thread_db_detach): Likewise.
15914         * nto-procfs.c (procfs_detach): Likewise.
15915         * procfs.c (procfs_detach): Likewise.
15916         (do_detach): Remove signo parameter.
15917         * record.c (record_detach): Remove args parameter.
15918         * record.h (record_detach): Likewise.
15919         * remote-sim.c (gdbsim_detach): Likewise.
15920         * remote.c (remote_detach_1): Likewise.
15921         (remote_detach): Likewise.
15922         (extended_remote_detach): Likewise.
15923         * sol-thread.c (sol_thread_detach): Likewise.
15924         * target-delegates.c: Re-generate.
15925         * top.c (struct qt_args) <args>: Remove field.
15926         (kill_or_detach): Don't pass args.
15927         (quit_force): Don't set args.
15928         * windows-nat.c (windows_detach): Remove args parameter.
15929
15930 2018-01-19  Yao Qi  <yao.qi@linaro.org>
15931
15932         * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
15933         (arm_linux_init_abi): Install it.
15934
15935 2018-01-19  Yao Qi  <yao.qi@linaro.org>
15936
15937         * osabi.c (gdb_osabi_names): Extend the regexp for
15938         arm-linux-gnueabihf.
15939
15940 2018-01-18  Yao Qi  <yao.qi@linaro.org>
15941
15942         * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
15943         m_abbrevs.
15944         (abbrev_table::add_abbrev): Update.
15945         (abbrev_table::lookup_abbrev): Update.
15946
15947 2018-01-18  Yao Qi  <yao.qi@linaro.org>
15948
15949         * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
15950
15951 2018-01-17  Sergio Durigan Junior  <sergiodj@redhat.com>
15952
15953         * compile/compile.c (compile_to_object): Convert "triplet_rx"
15954         to "std::string".
15955
15956 2018-01-17  Tom Tromey  <tom@tromey.com>
15957
15958         * dwarf2read.c (symbolp): Remove typedef.  Don't instantiate VEC.
15959
15960 2018-01-17  Tom Tromey  <tom@tromey.com>
15961
15962         * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
15963         * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
15964         (create_array_type_with_stride): Update.
15965         * dwarf2read.c (set_die_type): Update.
15966
15967 2018-01-17  Tom Tromey  <tom@tromey.com>
15968
15969         * dwarf2read.c (delayed_method_info): Remove typedef.
15970         (dwarf2_cu::method_info): Now a std::vector.
15971         (add_to_method_list): Update.
15972         (free_delayed_list): Remove.
15973         (compute_delayed_physnames): Update.
15974         (process_full_comp_unit, process_full_type_unit): Clear the method
15975         list.  Remove cleanups.
15976         (psymtab_include_file_name): Add name_holder parameter.  Use
15977         unique_xmalloc_ptr.
15978         (dwarf_decode_lines): Update.
15979
15980 2018-01-17  Tom Tromey  <tom@tromey.com>
15981             Simon Marchi  <simon.marchi@ericsson.com>
15982
15983         * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
15984         (dwarf2_per_objfile::free_cached_comp_units)
15985         (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
15986         (init_cutu_and_read_dies_no_follow): Update.
15987         (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
15988         (dwarf2_cu::~dwarf2_cu): New.
15989         (free_heap_comp_unit, free_stack_comp_unit): Remove.
15990         (age_cached_comp_units, free_one_cached_comp_unit): Update.
15991
15992 2018-01-17  Tom Tromey  <tom@tromey.com>
15993             Simon Marchi  <simon.marchi@ericsson.com>
15994
15995         * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
15996         (struct die_reader_specs) <abbrev_table>: New member.
15997         (struct abbrev_table): Add constructor.
15998         <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
15999         <abbrev_obstack>: Now an auto_obstack.
16000         (abbrev_table_up): New typedef.
16001         (init_cu_die_reader): Add abbrev_table parameter.
16002         (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
16003         Add result_dwo_abbrev_table.
16004         (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
16005         (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
16006         Update.
16007         (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
16008         parameter.
16009         (skip_children): Update.
16010         (abbrev_table::alloc_abbrev): Rename from
16011         abbrev_table_alloc_abbrev.
16012         (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
16013         (abbrev_table::lookup_abbrev): Rename from
16014         abbrev_table_lookup_abbrev.
16015         (abbrev_table_read_table): Return abbrev_table_up.
16016         (abbrev_table_free, abbrev_table_free_cleanup)
16017         (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
16018         (load_partial_dies): Update.
16019
16020 2018-01-17  Tom Tromey  <tom@tromey.com>
16021
16022         * dwarf2read.c (dwarf2_compute_name): Update comment.
16023         (read_func_scope, read_variable): Update.
16024         (new_symbol): Remove.
16025         (new_symbol_full): Rename to new_symbol.
16026
16027 2018-01-17  Mike Gulick  <mgulick@mathworks.com>
16028
16029         PR gdb/16577
16030         * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
16031         a warning instead of throwing an error, set section size to 0 and return
16032         NULL.
16033         * gdb_bfd.h (gdb_bfd_map_section): Update description.
16034
16035 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
16036
16037         * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
16038         std::string.
16039         (linux_ptrace_attach_fail_reason_string): Likewise.
16040         * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
16041         Likewise.
16042         (linux_ptrace_attach_fail_reason_string): Likewise.
16043         * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
16044
16045 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
16046
16047         * linux-nat.c (linux_nat_attach): Remove xstrdup.
16048
16049 2018-01-17  Eldar Abusalimov  <eldar.abusalimov@jetbrains.com>
16050
16051         PR gdb/21559
16052         * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
16053         checking for fs_base/gs_base fields in struct user_regs_struct.
16054         * configure: Regenerate.
16055
16056 2018-01-17  Yao Qi  <yao.qi@linaro.org>
16057
16058         * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
16059         function.
16060         (aarch64_linux_init_abi): Install it to gdbarch hook
16061         gcc_target_options.
16062
16063 2018-01-15  Pedro Alves  <palves@redhat.com>
16064
16065         * common/signals-state-save-restore.c
16066         (save_original_signals_state): Fix typos.
16067
16068 2017-01-12  Tom Tromey  <tom@tromey.com>
16069             Sergio Durigan Junior  <sergiodj@redhat.com>
16070
16071         * Makefile.in (install-only): Install gdb-add-index.
16072
16073 2018-01-12  John Baldwin  <jhb@FreeBSD.org>
16074
16075         * fbsd-tdep.c (KVE_PROTECTION): Correct value.
16076
16077 2018-01-12  Andreas Arnez  <arnez@linux.vnet.ibm.com>
16078
16079         * infrun.c (keep_going_pass_signal): Clear step-over info when
16080         insert_breakpoints fails.
16081
16082 2018-01-11  Pedro Alves  <palves@redhat.com>
16083
16084         PR gdb/22583
16085         * infrun.c (resume): Rename to ...
16086         (resume_1): ... this.
16087         (resume): Reimplement as wrapper around resume_1.
16088
16089 2018-01-11  Pedro Alves  <palves@redhat.com>
16090
16091         PR remote/22597
16092         * remote.c (remote_parse_stop_reply): Default to the last-set
16093         general thread instead of to 'magic_null_ptid'.
16094
16095 2018-01-10  Pedro Alves  <palves@redhat.com>
16096
16097         * language.h (language_get_symbol_name_matcher): Rename ...
16098         (get_symbol_name_matcher): ... this.
16099         * language.c (language_get_symbol_name_matcher): Ditto.
16100         * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
16101         callers adjusted.
16102
16103 2018-01-10  Pedro Alves  <palves@redhat.com>
16104
16105         PR gdb/22670
16106         * dwarf2read.c
16107         (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
16108         Adjust to use language_get_symbol_name_matcher instead of
16109         language_defn::la_get_symbol_name_matcher.
16110         * language.c (language_get_symbol_name_matcher): If in Ada mode
16111         and the lookup name is a verbatim match, return Ada's matcher.
16112         * language.h (language_get_symbol_name_matcher): Adjust comment.
16113         (ada_lookup_name_info::verbatim_p):: New method.
16114
16115 2018-01-10  Pedro Alves  <palves@redhat.com>
16116
16117         PR gdb/22670
16118         * ada-lang.c (ada_collect_symbol_completion_matches): If the
16119         minsym's language is language_auto or language_cplus, pass down
16120         language_ada instead.
16121         * symtab.c (compare_symbol_name): Don't frob symbol language here.
16122
16123 2018-01-10  Pedro Alves  <palves@redhat.com>
16124
16125         PR gdb/22670
16126         * minsyms.c (linkage_name_str): New function.
16127         (iterate_over_minimal_symbols): Use it.
16128
16129 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
16130
16131         * NEWS: Document that 'info proc' now works on FreeBSD.
16132
16133 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
16134
16135         * configure.ac: Check for kinfo_getfile in libutil.
16136         * configure: Regenerate.
16137         * config.in: Regenerate.
16138         * fbsd-nat.c: Include "fbsd-tdep.h".
16139         (fbsd_fetch_cmdline): New.
16140         (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
16141         rather than calling error.
16142         (fbsd_info_proc): New.
16143         (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
16144         (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
16145         (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
16146
16147 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
16148
16149         * fbsd-nat.c (struct free_deleter): Remove.
16150         (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
16151
16152 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
16153
16154         * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
16155         NULL for an empty pathname.
16156
16157 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
16158
16159         * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
16160         (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
16161         (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
16162         (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
16163         (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
16164         (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
16165         (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
16166         (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
16167         (kinfo_proc_layout_32, kinfo_proc_layout_i386)
16168         (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
16169         (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
16170         (fbsd_core_fetch_timeval, fbsd_print_sigset)
16171         (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
16172         (fbsd_init_abi):  Install gdbarch "core_info_proc" method.
16173         * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
16174
16175 2018-01-08  Samuel Thibault  <samuel.thibault@ens-lyon.org>
16176
16177         * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
16178         (gnu_xfer_auxv): New function.
16179         (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
16180         TARGET_OBJECT_AUXV.
16181
16182 2018-01-08  Yao Qi  <yao.qi@linaro.org>
16183             Simon Marchi  <simon.marchi@ericsson.com>
16184
16185         * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
16186         common/selftest.c.
16187         (COMMON_OBS): Remove selftest.o.
16188         * configure.ac: Append selftest-arch.c and common/selftest.c to
16189         CONFIG_SRCS.  Append selftest-arch.o and selftest.o to COMMON_OBS.
16190         * configure: Re-generated.
16191         * maint.c (maintenance_selftest): Wrap selftests::run_tests with
16192         GDB_SELF_TEST.
16193         (maintenance_info_selftests): Likewise.
16194
16195 2018-01-08  Xavier Roirand  <roirand@adacore.com>
16196
16197         * ada-valprint.c (val_print_packed_array_elements): Use
16198         proper number of elements when printing an array indexed
16199         by an enumeration type.
16200
16201 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
16202
16203         * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
16204         (dw2_get_file_names_reader): Adjust.
16205         (lookup_dwo_signatured_type): Adjust.
16206         (lookup_dwp_signatured_type): Adjust.
16207         (lookup_signatured_type): Adjust.
16208         (create_type_unit_group): Adjust.
16209         (get_type_unit_group): Adjust.
16210         (process_psymtab_comp_unit_reader): Adjust.
16211         (build_type_psymtabs_reader): Adjust.
16212         (scan_partial_symbols): Adjust.
16213         (add_partial_symbol): Adjust.
16214         (add_partial_subprogram): Adjust.
16215         (peek_die_abbrev): Adjust.
16216         (fixup_go_packaging): Adjust.
16217         (process_imported_unit_die): Adjust.
16218         (dwarf2_compute_name): Adjust.
16219         (dwarf2_physname): Adjust.
16220         (read_import_statement): Adjust.
16221         (handle_DW_AT_stmt_list): Adjust.
16222         (read_file_scope): Adjust.
16223         (read_func_scope): Adjust.
16224         (read_lexical_block_scope): Adjust.
16225         (read_call_site_scope): Adjust.
16226         (read_variable): Adjust.
16227         (dwarf2_rnglists_process): Adjust.
16228         (dwarf2_ranges_process): Adjust.
16229         (dwarf2_ranges_read): Adjust.
16230         (dwarf2_get_pc_bounds): Adjust.
16231         (dwarf2_record_block_ranges): Adjust.
16232         (dwarf2_add_field): Adjust.
16233         (dwarf2_add_member_fn): Adjust.
16234         (read_structure_type): Adjust.
16235         (process_structure_scope): Adjust.
16236         (read_enumeration_type): Adjust.
16237         (read_array_type): Adjust.
16238         (mark_common_block_symbol_computed): Adjust.
16239         (read_common_block): Adjust.
16240         (read_namespace_type): Adjust.
16241         (read_namespace): Adjust.
16242         (read_module_type): Adjust.
16243         (read_tag_pointer_type): Adjust.
16244         (read_tag_ptr_to_member_type): Adjust.
16245         (read_tag_string_type): Adjust.
16246         (read_subroutine_type): Adjust.
16247         (read_typedef): Adjust.
16248         (read_base_type): Adjust.
16249         (attr_to_dynamic_prop): Adjust.
16250         (read_subrange_type): Adjust.
16251         (read_unspecified_type): Adjust.
16252         (dwarf2_read_abbrevs): Adjust.
16253         (load_partial_dies): Adjust.
16254         (read_partial_die): Adjust.
16255         (find_partial_die): Adjust.
16256         (guess_partial_die_structure_name): Adjust.
16257         (fixup_partial_die): Adjust.
16258         (read_attribute_value): Adjust.
16259         (read_addr_index): Adjust.
16260         (read_addr_index_from_leb128): Adjust.
16261         (read_str_index): Adjust.
16262         (dwarf2_string_attr): Adjust.
16263         (get_debug_line_section): Adjust.
16264         (dwarf_decode_line_header): Adjust.
16265         (lnp_state_machine::check_line_address): Adjust.
16266         (dwarf_decode_lines_1): Adjust.
16267         (dwarf_decode_lines): Adjust.
16268         (dwarf2_start_symtab): Adjust.
16269         (var_decode_location): Adjust.
16270         (new_symbol_full): Adjust.
16271         (dwarf2_const_value_data): Adjust.
16272         (dwarf2_const_value_attr): Adjust.
16273         (dwarf2_const_value): Adjust.
16274         (die_type): Adjust.
16275         (die_containing_type): Adjust.
16276         (build_error_marker_type): Adjust.
16277         (lookup_die_type): Adjust.
16278         (guess_full_die_structure_name): Adjust.
16279         (anonymous_struct_prefix): Adjust.
16280         (determine_prefix): Adjust.
16281         (dwarf2_name): Adjust.
16282         (follow_die_ref_or_sig): Adjust.
16283         (follow_die_offset): Adjust.
16284         (follow_die_ref): Adjust.
16285         (follow_die_sig_1): Adjust.
16286         (follow_die_sig): Adjust.
16287         (get_signatured_type): Adjust.
16288         (get_DW_AT_signature_type): Adjust.
16289         (decode_locdesc): Adjust.
16290         (dwarf_decode_macros): Adjust.
16291         (cu_debug_loc_section): Adjust.
16292         (fill_in_loclist_baton): Adjust.
16293         (dwarf2_symbol_mark_computed): Adjust.
16294         (init_one_comp_unit): Don't assign
16295         dwarf2_cu::dwarf2_per_objfile.
16296         (set_die_type): Adjust.
16297
16298 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
16299
16300         * dwarf2read.c (struct mapped_debug_names): Add constructor.
16301         <dwarf2_per_objfile>: New field.
16302         (dwarf2_per_objfile): Remove global.
16303         (get_dwarf2_per_objfile): New function.
16304         (set_dwarf2_per_objfile): New function.
16305         (dwarf2_build_psymtabs_hard): Change objfile parameter to
16306         dwarf2_per_objfile.
16307         (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
16308         (read_abbrev_offset): Likewise.
16309         (read_indirect_string): Likewise.
16310         (read_indirect_line_string): Likewise.
16311         (read_indirect_string_at_offset): Likewise.
16312         (read_indirect_string_from_dwz): Likewise.
16313         (dwarf2_find_containing_comp_unit): Change objfile parameter to
16314         dwarf2_per_objfile.
16315         (age_cached_comp_units): Add dwarf2_per_objfile parameter.
16316         (create_all_comp_units): Change objfile parameter to
16317         dwarf2_per_objfile.
16318         (create_all_type_units): Likewise.
16319         (process_queue): Add dwarf2_per_objfile parameter.
16320         (read_and_check_comp_unit_head): Likewise.
16321         (lookup_dwo_unit_in_dwp): Likewise.
16322         (get_dwp_file): Likewise.
16323         (process_cu_includes): Likewise.
16324         (struct free_dwo_file_cleanup_data): New struct.
16325         (dwarf2_has_info): Use get_dwarf2_per_objfile and
16326         set_dwarf2_per_objfile.
16327         (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
16328         (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
16329         context, adjust calls.
16330         (dw2_instantiate_symtab): Likewise.
16331         (dw2_get_cutu): Add dwarf2_per_objfile parameter.
16332         (dw2_get_cu): Likewise.
16333         (create_cu_from_index_list): Change objfile parameter to
16334         dwarf2_per_objfile.
16335         (create_cus_from_index_list): Get dwarf2_per_objfile from
16336         context, adjust calls.
16337         (create_cus_from_index): Likewise.
16338         (create_signatured_type_table_from_index): Change objfile
16339         parameter to dwarf2_per_objfile.
16340         (create_signatured_type_table_from_debug_names): Change objfile
16341         parameter to dwarf2_per_objfile.
16342         (create_addrmap_from_index): Likewise.
16343         (create_addrmap_from_aranges): Likewise.
16344         (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
16345         (dw2_setup): Remove.
16346         (dw2_get_file_names_reader): Get dwarf2_per_objfile from
16347         context.
16348         (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
16349         get_dwarf2_per_objfile.
16350         (dw2_forget_cached_source_info): Likewise.
16351         (dw2_map_symtabs_matching_filename): Likewise.
16352         (struct dw2_symtab_iterator) <index>: Remove.
16353         <dwarf2_per_objfile>: New field.
16354         (dw2_symtab_iter_init): Replace index parameter with
16355         dwarf2_per_objfile.
16356         (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
16357         (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
16358         (dw2_print_stats): Likewise.
16359         (dw2_dump): Likewise.
16360         (dw2_expand_symtabs_for_function): Likewise.
16361         (dw2_expand_all_symtabs): Likewise.
16362         (dw2_expand_symtabs_with_fullname): Likewise.
16363         (dw2_expand_marked_cus): Replace index and objfile parameters
16364         with dwarf2_per_objfile.
16365         (dw_expand_symtabs_matching_file_matcher): Add
16366         dwarf2_per_objfile parameter and adjust calls.
16367         (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
16368         adjust calls.
16369         (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
16370         (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
16371         adjust calls.
16372         (create_cus_from_debug_names_list): Replace objfile parameter
16373         with dwarf2_per_objfile and adjust calls.
16374         (create_cus_from_debug_names): Likewise.
16375         (dwarf2_read_debug_names): Likewise.
16376         (mapped_debug_names::namei_to_name): Adjust call.
16377         (dw2_debug_names_iterator::next): Likewise.
16378         (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
16379         (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
16380         (dw2_debug_names_dump): Likewise.
16381         (dw2_debug_names_expand_symtabs_for_function): Likewise.
16382         (dw2_debug_names_expand_symtabs_matching): Likewise.
16383         (dwarf2_initialize_objfile): Likewise.
16384         (dwarf2_build_psymtabs): Likewise.
16385         (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
16386         this_cu.
16387         (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
16388         (read_and_check_comp_unit_head): Likewise.
16389         (read_abbrev_offset): Likewise.
16390         (create_debug_type_hash_table): Likewise.
16391         (create_debug_types_hash_table): Likewise.
16392         (create_all_type_units): Replace objfile parameter with
16393         dwarf2_per_objfile.
16394         (add_type_unit): Add dwarf2_per_objfile parameter.
16395         (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
16396         with dwarf2_per_objfile.
16397         (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
16398         (lookup_dwp_signatured_type): Likewise.
16399         (lookup_signatured_type): Likewise.
16400         (read_cutu_die_from_dwo): Likewise.
16401         (init_tu_and_read_dwo_dies): Likewise.
16402         (init_cutu_and_read_dies): Likewise.
16403         (init_cutu_and_read_dies_no_follow): Likewise.
16404         (allocate_type_unit_groups_table): Add objfile parameter.
16405         (create_type_unit_group): Use dwarf2_per_objfile from cu.
16406         (get_type_unit_group): Likewise.
16407         (process_psymtab_comp_unit): Update call.
16408         (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
16409         (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
16410         (print_tu_stats): Likewise.
16411         (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
16412         in void* parameter.
16413         (build_type_psymtabs): Change objfile parameter to
16414         dwarf2_per_objfile.
16415         (process_skeletonless_type_unit): Use dwarf2_per_objfile
16416         passed in void* parameter.
16417         (process_skeletonless_type_units): Change objfile parameter to
16418         dwarf2_per_objfile.
16419         (set_partial_user): Likewise.
16420         (dwarf2_build_psymtabs_hard): Likewise.
16421         (read_comp_units_from_section): Likewise.
16422         (create_all_comp_units): Likewise.
16423         (scan_partial_symbols): Update calls.
16424         (add_partial_symbol): Likewise.
16425         (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
16426         (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
16427         (process_queue): Add dwarf2_per_objfile parameter.
16428         (get_compunit_symtab): Use dwarf2_per_objfile from cu.
16429         (compute_compunit_symtab_includes): Likewise.
16430         (process_cu_includes): Add dwarf2_per_objfile parameter.
16431         (process_full_comp_unit): Use dwarf2_per_objfile from cu.
16432         (process_full_type_unit): Likewise.
16433         (process_imported_unit_die): Update call.
16434         (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
16435         (read_file_scope): Likewise.
16436         (allocate_dwo_file_hash_table): Add objfile parameter.
16437         (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
16438         (create_cus_hash_table): Likewise.
16439         (create_dwp_hash_table): Likewise.
16440         (create_dwo_unit_in_dwp_v1): Likewise.
16441         (create_dwp_v2_section): Likewise.
16442         (create_dwo_unit_in_dwp_v2): Likewise.
16443         (lookup_dwo_unit_in_dwp): Likewise.
16444         (try_open_dwop_file): Likewise.
16445         (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
16446         (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
16447         cleanup to include a reference to dwarf2_per_objfile.
16448         (open_dwp_file): Add dwarf2_per_objfile parameter.
16449         (open_and_init_dwp_file): Likewise.
16450         (get_dwp_file): Likewise.
16451         (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
16452         (queue_and_load_all_dwo_tus): Update call.
16453         (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
16454         data.
16455         (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
16456         (dwarf2_ranges_process): Likewise.
16457         (dwarf2_get_pc_bounds): Likewise.
16458         (mark_common_block_symbol_computed): Likewise.
16459         (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
16460         (dwarf2_read_abbrevs): Update call.
16461         (read_partial_die): Use dwarf2_per_objfile from cu.
16462         (find_partial_die): Likewise.
16463         (fixup_partial_die): Likewise.
16464         (read_attribute_value): Likewise.
16465         (read_indirect_string_at_offset_from): Add objfile parameter.
16466         (read_indirect_string_at_offset): Add dwarf2_per_objfile
16467         parameter.
16468         (read_indirect_string_from_dwz): Add objfile parameter.
16469         (read_indirect_string): Add objfile parameter.
16470         (read_addr_index_1): Add dwarf2_per_objfile parameter.
16471         (read_addr_index): Use dwarf2_per_objfile from cu.
16472         (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
16473         call dw2_setup.
16474         (read_str_index): Use dwarf2_per_objfile from cu.
16475         (get_debug_line_section): Likewise.
16476         (read_formatted_entries): Add dwarf2_per_objfile parameter.
16477         (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
16478         (new_symbol_full): Use dwarf2_per_objfile from cu.
16479         (build_error_marker_type): Likewise.
16480         (lookup_die_type): Likewise.
16481         (determine_prefix): Likewise.
16482         (follow_die_offset): Likewise.
16483         (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
16484         (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
16485         (dwarf2_fetch_die_type_sect_off): Likewise.
16486         (dwarf2_get_die_type): Likewise.
16487         (follow_die_sig_1): Use dwarf2_per_objfile from cu.
16488         (get_signatured_type): Likewise.
16489         (get_DW_AT_signature_type): Likewise.
16490         (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
16491         (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
16492         (cu_debug_loc_section): Likewise.
16493         (fill_in_loclist_baton): Likewise.
16494         (dwarf2_symbol_mark_computed): Likewise.
16495         (dwarf2_find_containing_comp_unit): Change objfile parameter to
16496         dwarf2_per_objfile.
16497         (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
16498         parameter.
16499         (age_cached_comp_units): Add dwarf2_per_objfile parameter.
16500         (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
16501         (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
16502         (set_die_type): Use dwarf2_free_objfile from cu.
16503         (get_die_type_at_offset): Likewise.
16504         (dwarf2_per_objfile_free): Don't assign global variable.
16505         (debug_names) <constructor>: Add dwarf2_per_objfile
16506         parameter, update m_debugstrlookup construction.
16507         (debug_names::debug_str_lookup): Add dwarf2_per_objfile
16508         parameter.
16509         <m_dwarf2_per_objfile>: New field.
16510         <lookup>: Use m_dwarf2_per_objfile.
16511         (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
16512         (psyms_seen_size): Likewise.
16513         (write_gdbindex): Replace objfile parameter with
16514         dwarf2_per_objfile.
16515         (write_debug_names): Likewise.
16516         (write_psymtabs_to_index): Likewise.
16517         (save_gdb_index_command): Use get_dwarf2_per_objfile, update
16518         calls.
16519
16520 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
16521
16522         * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
16523         <dwarf2_per_objfile>: New field.
16524         (struct dwarf2_per_cu_data) <objfile>: Remove.
16525         <dwarf2_per_objfile>: New field.
16526         (create_cu_from_index_list): Assign dwarf2_per_objfile instead
16527         of objfile.
16528         (create_signatured_type_table_from_index): Likewise.
16529         (create_debug_type_hash_table): Likewise.
16530         (fill_in_sig_entry_from_dwo_entry): Likewise.
16531         (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
16532         (create_type_unit_group): Assign dwarf2_per_objfile instead of
16533         objfile.
16534         (create_partial_symtab): Access objfile through
16535         dwarf2_per_objfile.
16536         (process_psymtab_comp_unit_reader): Likewise.
16537         (read_comp_units_from_section): Likewise.
16538         (scan_partial_symbols): Likewise.
16539         (add_partial_symbol): Likewise.
16540         (add_partial_subprogram): Likewise.
16541         (peek_die_abbrev): Likewise.
16542         (fixup_go_packaging): Likewise.
16543         (process_full_comp_unit): Likewise.
16544         (process_full_type_unit): Likewise.
16545         (process_imported_unit_die): Likewise.
16546         (dwarf2_compute_name): Likewise.
16547         (dwarf2_physname): Likewise.
16548         (read_import_statement): Likewise.
16549         (create_cus_hash_table): Assign dwarf2_physname instead of
16550         objfile.
16551         (read_func_scope): Access objfile through dwarf2_per_objfile.
16552         (read_lexical_block_scope): Likewise.
16553         (read_call_site_scope): Likewise.
16554         (read_variable): Likewise.
16555         (dwarf2_rnglists_process): Likewise.
16556         (dwarf2_ranges_process): Likewise.
16557         (dwarf2_ranges_read): Likewise.
16558         (dwarf2_record_block_ranges): Likewise.
16559         (dwarf2_add_field): Likewise.
16560         (dwarf2_add_member_fn): Likewise.
16561         (read_structure_type): Likewise.
16562         (process_structure_scope): Likewise.
16563         (read_enumeration_type): Likewise.
16564         (read_array_type): Likewise.
16565         (read_common_block): Likewise.
16566         (read_namespace_type): Likewise.
16567         (read_namespace): Likewise.
16568         (read_module_type): Likewise.
16569         (read_tag_pointer_type): Likewise.
16570         (read_tag_ptr_to_member_type): Likewise.
16571         (read_tag_string_type): Likewise.
16572         (read_subroutine_type): Likewise.
16573         (read_typedef): Likewise.
16574         (read_base_type): Likewise.
16575         (attr_to_dynamic_prop): Likewise.
16576         (read_subrange_type): Likewise.
16577         (read_unspecified_type): Likewise.
16578         (load_partial_dies): Likewise.
16579         (read_partial_die): Likewise.
16580         (find_partial_die): Likewise.
16581         (guess_partial_die_structure_name): Likewise.
16582         (fixup_partial_die): Likewise.
16583         (read_attribute_value): Likewise.
16584         (read_addr_index_from_leb128): Likewise.
16585         (dwarf2_read_addr_index): Likewise.
16586         (dwarf2_string_attr): Likewise.
16587         (lnp_state_machine::check_line_address): Likewise.
16588         (dwarf_decode_lines_1): Likewise.
16589         (dwarf_decode_lines): Likewise.
16590         (dwarf2_start_symtab): Likewise.
16591         (var_decode_location): Likewise.
16592         (new_symbol_full): Likewise.
16593         (dwarf2_const_value_data): Likewise.
16594         (dwarf2_const_value_attr): Likewise.
16595         (dwarf2_const_value): Likewise.
16596         (die_type): Likewise.
16597         (die_containing_type): Likewise.
16598         (lookup_die_type): Likewise.
16599         (guess_full_die_structure_name): Likewise.
16600         (anonymous_struct_prefix): Likewise.
16601         (dwarf2_name): Likewise.
16602         (follow_die_ref_or_sig): Likewise.
16603         (follow_die_offset): Likewise.
16604         (follow_die_ref): Likewise.
16605         (dwarf2_fetch_die_loc_sect_off): Likewise.
16606         (dwarf2_fetch_constant_bytes): Likewise.
16607         (dwarf2_fetch_die_type_sect_off): Likewise.
16608         (dwarf2_get_die_type): Likewise.
16609         (follow_die_sig): Likewise.
16610         (decode_locdesc): Likewise.
16611         (dwarf2_per_cu_objfile): Likewise.
16612         (dwarf2_per_cu_text_offset): Likewise.
16613         (init_one_comp_unit): Assign dwarf2_per_objfile instead of
16614         objfile.
16615         (set_die_type): Access objfile through
16616         dwarf2_per_objfile.
16617
16618 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
16619
16620         * valprint.c (converted_character_d): Remove typedef.
16621         (DEF_VEC_O (converted_character_d)): Remove.
16622         (count_next_character): Use std::vector.
16623         (print_converted_chars_to_obstack): Likewise.
16624         (generic_printstr): Likewise.
16625
16626 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
16627
16628         * xml-support.h (struct gdb_xml_value): Add constructor.
16629         <value>: Change type to unique_xmalloc_ptr.
16630         (gdb_xml_value_s): Remove typedef.
16631         (DEF_VEC_O (gdb_xml_value_s)): Remove.
16632         (gdb_xml_element_start_handler): Change parameter type to
16633         std::vector.
16634         (xml_find_attribute): Likewise.
16635         * xml-support.c (xml_find_attribute): Change parameter type to
16636         std::vector and adjust.
16637         (gdb_xml_values_cleanup): Remove.
16638         (gdb_xml_parser::start_element): Adjust to std::vector.
16639         (xinclude_start_include): Change paraeter type to std::vector
16640         and adjust.
16641         * btrace.c (check_xml_btrace_version): Likewise.
16642         (parse_xml_btrace_block): Likewise.
16643         (parse_xml_btrace_pt_config_cpu): Likewise.
16644         (parse_xml_btrace_pt): Likewise.
16645         (parse_xml_btrace_conf_bts): Likewise.
16646         (parse_xml_btrace_conf_pt): Likewise.
16647         * memory-map.c (memory_map_start_memory): Likewise.
16648         (memory_map_start_property): Likewise.
16649         * osdata.c (osdata_start_osdata): Likewise.
16650         (osdata_start_item): Likewise.
16651         (osdata_start_column): Likewise.
16652         * remote.c (start_thread): Likewise.
16653         * solib-aix.c (library_list_start_library): Likewise.
16654         (library_list_start_list): Likewise.
16655         * solib-svr4.c (library_list_start_library): Likewise.
16656         (svr4_library_list_start_list): Likewise.
16657         * solib-target.c (library_list_start_segment): Likewise.
16658         (library_list_start_section): Likewise.
16659         (library_list_start_library): Likewise.
16660         (library_list_start_list): Likewise.
16661         * tracepoint.c (traceframe_info_start_memory): Likewise.
16662         (traceframe_info_start_tvar): Likewise.
16663         * xml-syscall.c (syscall_start_syscall): Likewise.
16664         * xml-tdesc.c (tdesc_start_target): Likewise.
16665         (tdesc_start_feature): Likewise.
16666         (tdesc_start_reg): Likewise.
16667         (tdesc_start_union): Likewise.
16668         (tdesc_start_struct): Likewise.
16669         (tdesc_start_flags): Likewise.
16670         (tdesc_start_enum): Likewise.
16671         (tdesc_start_field): Likewise.
16672         (tdesc_start_enum_value): Likewise.
16673         (tdesc_start_vector): Likewise.
16674
16675 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
16676
16677         * extension.h (struct xmethod_worker) <clone>: Remove.
16678         * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
16679         Remove.
16680         (python_xmethod_worker::clone): Remove.
16681         * valops.c (find_overload_match): Use std::move instead of
16682         clone.
16683
16684 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
16685
16686         * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
16687         (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
16688         <free_xmethod_worker_data>: Remove.
16689         <get_matching_xmethod_workers>: Chance VEC to std::vector.
16690         <get_xmethod_arg_types>: Remove.
16691         <get_xmethod_result_type>: Remove.
16692         <invoke_xmethod>: Remove.
16693         * extension.c (new_xmethod_worker): Remove.
16694         (clone_xmethod_worker): Remove.
16695         (get_matching_xmethod_workers): Return void, pass std::vector by
16696         pointer.
16697         (get_xmethod_arg_types): Rename to...
16698         (xmethod_worker::get_arg_types): ... this, and adjust.
16699         (get_xmethod_result_type): Rename to...
16700         (xmethod_worker::get_result_type): ... this, and adjust.
16701         (invoke_xmethod): Remove.
16702         (free_xmethod_worker): Remove.
16703         (free_xmethod_worker_vec): Remove.
16704         * extension.h (enum ext_lang_rc): Move here from
16705         extension-priv.h.
16706         (struct xmethod_worker): Add constructor and destructor.
16707         <data>: Remove.
16708         <value>: Remove.
16709         <invoke, clone, do_get_result_type, do_get_arg_types>: New
16710         virtual pure methods.
16711         <get_arg_types, get_result_type>: New methods.
16712         (xmethod_worker_ptr): Remove typedef.
16713         (DEF_VEC_P (xmethod_worker_ptr)): Remove.
16714         (xmethod_worker_vec): Remove typedef.
16715         (xmethod_worker_up): New typedef.
16716         (invoke_xmethod): Remove.
16717         (clone_xmethod_worker): Remove.
16718         (free_xmethod_worker): Remove.
16719         (free_xmethod_worker_vec): Remove.
16720         (get_xmethod_arg_types): Remove.
16721         (get_xmethod_result_type): Remove.
16722         * valops.c (find_method_list): Use std::vector, don't use
16723         intermediate vector.
16724         (value_find_oload_method_list): Use std::vector.
16725         (find_overload_match): Use std::vector.
16726         (find_oload_champ): Use std::vector.
16727         * value.c (value_free): Use operator delete.
16728         (value_of_xmethod): Rename to...
16729         (value_from_xmethod): ... this.  Don't assign
16730         xmethod_worker::value, take rvalue-reference.
16731         (result_type_of_xmethod): Adjust.
16732         (call_xmethod): Adjust.
16733         * value.h: Include extension.h.
16734         (struct xmethod_worker): Don't forward-declare.
16735         (value_of_xmethod): Rename to...
16736         (value_from_xmethod): ... this, take rvalue-reference.
16737         * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
16738         (struct python_xmethod_worker): ... this, add constructor and
16739         destructor.
16740         <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
16741         (gdbpy_free_xmethod_worker_data): Rename to...
16742         (python_xmethod_worker::~python_xmethod_worker): ... this and
16743         adjust.
16744         (gdbpy_clone_xmethod_worker_data): Rename to...
16745         (python_xmethod_worker::clone): ... this and adjust.
16746         (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
16747         temporary vector.
16748         (gdbpy_get_xmethod_arg_types): Rename to...
16749         (python_xmethod_worker::do_get_arg_types): ... this and adjust.
16750         (gdbpy_get_xmethod_result_type): Rename to...
16751         (python_xmethod_worker::do_get_result_type): ... this and
16752         adjust.
16753         (gdbpy_invoke_xmethod): Rename to...
16754         (python_xmethod_worker::invoke): ... this and adjust.
16755         (new_python_xmethod_worker): Rename to...
16756         (python_xmethod_worker::python_xmethod_worker): ... this and
16757         adjust.
16758         * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
16759         Remove.
16760         (gdbpy_free_xmethod_worker_data): Remove.
16761         (gdbpy_get_matching_xmethod_workers): Use std::vector.
16762         (gdbpy_get_xmethod_arg_types): Remove.
16763         (gdbpy_get_xmethod_result_type): Remove.
16764         (gdbpy_invoke_xmethod): Remove.
16765         * python/python.c (python_extension_ops): Remove obsolete
16766         callbacks.
16767
16768 2018-01-05  Pedro Alves  <palves@redhat.com>
16769
16770         PR gdb/18653
16771         * common/signals-state-save-restore.c
16772         (save_original_signals_state): New parameter 'quiet'.  Warn if we
16773         find a custom handler preinstalled, instead of internal erroring.
16774         But only warn if !quiet.
16775         * common/signals-state-save-restore.h
16776         (save_original_signals_state): New parameter 'quiet'.
16777         * main.c (captured_main_1): Move save_original_signals_state call
16778         after option handling, and pass QUIET.
16779
16780 2018-01-05  Pedro Alves  <palves@redhat.com>
16781
16782         * spu-tdep.c (spu_catch_start): Pass
16783         symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
16784
16785 2018-01-05  Pedro Alves  <palves@redhat.com>
16786
16787         PR gdb/22670
16788         * ada-lang.c (literal_symbol_name_matcher): New function.
16789         (ada_get_symbol_name_matcher): Use it for
16790         symbol_name_match_type::SEARCH_NAME.
16791         * block.c (block_lookup_symbol): New parameter 'match_type'.  Pass
16792         it down instead of assuming symbol_name_match_type::FULL.
16793         * block.h (block_lookup_symbol): New parameter 'match_type'.
16794         * c-valprint.c (print_unpacked_pointer): Use
16795         lookup_symbol_search_name instead of lookup_symbol.
16796         * compile/compile-object-load.c (get_out_value_type): Pass down
16797         symbol_name_match_type::SEARCH_NAME.
16798         * cp-namespace.c (cp_basic_lookup_symbol): Pass down
16799         symbol_name_match_type::FULL.
16800         * cp-support.c (cp_get_symbol_name_matcher): Handle
16801         symbol_name_match_type::SEARCH_NAME.
16802         * infrun.c (insert_exception_resume_breakpoint): Use
16803         lookup_symbol_search_name.
16804         * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
16805         * psymtab.c (maintenance_check_psymtabs): Use
16806         symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
16807         * stack.c (print_frame_args): Use lookup_symbol_search_name and
16808         SYMBOL_SEARCH_NAME.
16809         * symtab.c (lookup_local_symbol): Don't demangle the lookup name
16810         if symbol_name_match_type::SEARCH_NAME.
16811         (lookup_symbol_in_language): Pass down
16812         symbol_name_match_type::FULL.
16813         (lookup_symbol_search_name): New.
16814         (lookup_language_this): Pass down
16815         symbol_name_match_type::SEARCH_NAME.
16816         (lookup_symbol_aux, lookup_local_symbol): New parameter
16817         'match_type'.  Pass it down.
16818         * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
16819         (lookup_symbol_search_name): New declaration.
16820         (lookup_symbol_in_block): New 'match_type' parameter.
16821
16822 2018-01-05  Pedro Alves  <palves@redhat.com>
16823
16824         PR gdb/22670
16825         * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
16826         ada_lookup_symbol.
16827         (ada_lookup_symbol): Reimplement in terms of
16828         ada_lookup_symbol_list, bits factored out from
16829         ada_lookup_encoded_symbol.
16830
16831 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
16832
16833         * ada-exp.y (write_object_renaming): When subscripting an array
16834         using a symbol as the index, pass the block in call to
16835         ada_lookup_encoded_symbol when looking that symbol up.
16836
16837 2018-01-05  Jerome Guitton  <guitton@adacore.com>
16838
16839         * ada-lang.c (ada_array_length): Use ada_index_type instead of
16840         TYPE_INDEX_TYPE.
16841
16842 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
16843
16844         * ada-lang.c (ada_to_fixed_value_create): Add handling of
16845         the case where VALUE_LVAL (val0) is not lval_memory.
16846
16847 2018-01-05  Xavier Roirand  <roirand@adacore.com>
16848
16849         * ada-valprint.c (print_optional_low_bound): Handle
16850         character-indexed array printing like boolean-indexed array
16851         printing.
16852
16853 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
16854
16855         * NEWS: Create a new section for the next release branch.
16856         Rename the section of the current branch, now that it has
16857         been cut.
16858
16859 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
16860
16861         GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
16862         * version.in: Bump version to 8.1.50.DATE-git.
16863
16864 2018-01-03  Xavier Roirand  <roirand@adacore.com>
16865
16866         * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
16867         Add field.
16868         * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
16869         Add field.
16870         (default_exception_support_info) <catch_handlers_sym>: Add field.
16871         (exception_support_info_fallback) <catch_handlers_sym>: Add field.
16872         (ada_exception_name_addr_1): Add "catch handlers" handling.
16873         (ada_exception_catchpoint_cond_string) <ex>: New parameter.
16874         Update all callers.
16875         (create_excep_cond_exprs) <ex>: Add parameter.
16876         (re_set_exception): Update create_excep_cond_exprs call.
16877         (print_it_exception, print_one_exception, print_mention_exception)
16878         (print_recreate_exception): Add "catch handler" handling.
16879         (allocate_location_catch_handlers, re_set_catch_handlers)
16880         (check_status_catch_handlers, print_it_catch_handlers)
16881         (print_one_catch_handlers, print_mention_catch_handlers)
16882         (print_recreate_catch_handlers): New function.
16883         (catch_handlers_breakpoint_ops): New variable.
16884         (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
16885         Add parameter.  Add "catch handler" handling.
16886         (ada_exception_sym_name, ada_exception_breakpoint_ops):
16887         Add "catch handler" handling.
16888         (ada_exception_catchpoint_cond_string): Add "catch handler"
16889         handling.
16890         (create_ada_exception_catchpoint): Update create_excep_cond_exprs
16891         call.
16892         (catch_ada_handlers_command): New function.
16893         (initialize_ada_catchpoint_ops): Initialize "catch handlers"
16894         operations structure.
16895         (_initialize_ada_language): Add "catch handlers" command entry.
16896         * NEWS: Document "catch handlers" feature.
16897
16898 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
16899
16900         * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
16901         account when creating the array type of the slice.
16902         (ada_value_slice): Likewise.
16903
16904 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
16905
16906         * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
16907         New enum value.
16908         (create_array_type_with_stride): Add byte_stride_prop parameter.
16909         * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
16910         New parameter.  Update all callers in this file.
16911         (array_type_has_dynamic_stride): New function.
16912         (is_dynamic_type_internal, resolve_dynamic_array): Add handling
16913         of arrays with dynamic byte strides.
16914         * dwarf2read.c (read_array_type): Add support for dynamic
16915         DW_AT_byte_stride attributes.
16916
16917 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
16918
16919         * dwarf2read.c (read_unspecified_type): Treat
16920         DW_TAG_enumeration_type DIEs from Ada units as stubs.
16921
16922 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
16923
16924         Update copyright year range in all GDB files.
16925
16926 2018-01-01, 18  Joel Brobecker  <brobecker@adacore.com>
16927
16928         * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
16929         and gdb/testsuite/gdb.base/step-line.c.
16930
16931 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
16932
16933         * copyright.py (main): Dump the contents of
16934         MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
16935         even if BY_HAND is empty.
16936
16937 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
16938
16939         * top.c (print_gdb_version): Update Copyright year in version
16940         message.
16941
16942 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
16943
16944         * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
16945
16946 For older changes see ChangeLog-2017.
16947 \f
16948 Local Variables:
16949 mode: change-log
16950 left-margin: 8
16951 fill-column: 74
16952 version-control: never
16953 coding: utf-8
16954 End: