gdb/riscv: Format CORE_ADDR as a string for printing
[external/binutils.git] / gdb / ChangeLog
1 2018-12-21  Andrew Burgess  <andrew.burgess@embecosm.com>
2
3         * riscv-tdep.c (riscv_scan_prologue): Use plongest to format
4         a signed offset as a string.
5
6 2018-12-21  Dave Murphy  <davem@devkitpro.org>
7
8         * dtrace-probe.c (dtrace_static_probe_ops): Explicit zero
9         initialise.
10         * probe.c (any_static_probe_ops): Ditto.
11         * record-btrace.c (record_btrace_thread_observer_token): Ditto.
12         * stap-probe.c (stap_static_probe_ops): Ditto.
13         * tui/tui-hooks.c (tui_observers_token): Ditto.
14         * unittests/observable-selftests.c (token1, token2, token3): Ditto.
15
16 2018-12-19  Andrew Burgess  <andrew.burgess@embecosm.com>
17
18         * gdb/dummy-frame.c (default_dummy_id): Defined new function.
19         * gdb/dummy-frame.h (default_dummy_id): Declare new function.
20         * gdb/frame-unwind.c (default_unwind_pc): Define new function.
21         (default_unwind_sp): Define new function.
22         * gdb/frame-unwind.h (default_unwind_pc): Declare new function.
23         (default_unwind_sp): Declare new function.
24         * gdb/frame.c (frame_unwind_pc): Assume gdbarch_unwind_pc is
25         available.
26         (get_frame_sp): Assume that gdbarch_unwind_sp is available.
27         * gdb/gdbarch.c: Regenerate.
28         * gdb/gdbarch.h: Regenerate.
29         * gdb/gdbarch.sh: Update definition of dummy_id, unwind_pc, and
30         unwind_sp.  Add additional header files to be included in
31         generated file.
32
33 2018-12-19  Dimitar Dimitrov  <dimitar@dinux.eu>
34
35         * nat/linux-ptrace.c (linux_ptrace_test_ret_to_nx): Remove
36         sp clobbers.
37
38 2018-12-17  Andrew Burgess  <andrew.burgess@embecosm.com>
39
40         * dwarf2read.c (struct dwarf2_cu): Convert the fields 'mark',
41         'has_loclist', 'checked_producer', 'producer_is_gxx_lt_4_6',
42         'producer_is_gcc_lt_4_3', 'producer_is_icc_lt_14',
43         'processing_has_namespace_info' from unsigned int to bool.  Update
44         comments.
45         (producer_is_icc_lt_14): Update return type.
46         (producer_is_gcc_lt_4_3): Likewise.
47         (producer_is_gxx_lt_4_6): Likewise.
48         (process_die): Write true instead of 1 into predicate fields.
49         (dwarf2_start_symtab): Likewise.
50         (var_decode_location): Likewise.
51         (dwarf2_mark_helper): Likewise.
52         (dwarf2_mark): Likewise.
53         (dwarf2_clear_marks): Write false instead of 0 into predicate
54         field.
55         (dwarf2_cu::dwarf2_cu): Initialise predicate fields to false, not
56         0.
57
58 2018-12-17  Szabolcs Nagy  <szabolcs.nagy@arm.com>
59
60         * nat/aarch64-sve-linux-ptrace.h: Include signal.h instead of
61         asm/sigcontext.h.
62
63 2018-12-17  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
64
65         * nat/linux-ptrace.c (kill_child): Fix ARI warning by removing
66         warning trailing new line.
67
68 2018-12-16  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
69
70         * nat/linux-ptrace.c (kill_child): New function.
71         (linux_ptrace_test_ret_to_nx): Use kill_child instead of local code.
72         Add a call to kill_child in case of early return after fork.
73         (linux_check_ptrace_features): Use kill_child instead of local code.
74         (linux_test_for_tracefork): Likewise.
75
76 2018-12-14  Tom Tromey  <tom@tromey.com>
77
78         * Makefile.in: Remove "alloca" comment.
79         (INFOFILES): Remove.
80         (local-maintainer-clean): Don't use INFOFILES.
81
82 2018-12-13  John Baldwin  <jhb@FreeBSD.org>
83
84         * syscalls/update-freebsd.sh: New file.
85         * syscalls/freebsd.xml: Regenerate.
86
87 2018-12-13  John Baldwin  <jhb@FreeBSD.org>
88
89         * NEWS: Add entry documenting system call aliases.
90         * break-catch-syscall.c (catch_syscall_split_args): Pass 'result'
91         to get_syscalls_by_name.
92         * gdbarch.sh (UNKNOWN_SYSCALL): Remove.
93         * gdbarch.h: Regenerate.
94         * syscalls/gdb-syscalls.dtd (syscall): Add alias attribute.
95         * xml-syscall.c [!HAVE_LIBEXPAT] (get_syscalls_by_name): Rename
96         from get_syscall_by_name.  Now accepts a pointer to a vector of
97         integers and returns a bool.
98         [HAVE_LIBEXPAT] (struct syscall_desc): Add alias member.
99         (syscall_create_syscall_desc): Add alias parameter and pass it to
100         syscall_desc constructor.
101         (syscall_start_syscall): Handle alias attribute.
102         (syscall_attr): Add alias attribute.
103         (xml_get_syscalls_by_name): Rename from xml_get_syscall_number.
104         Now accepts a pointer to a vector of integers and returns a
105         bool.  Add syscalls whose alias or name matches the requested
106         name.
107         (get_syscalls_by_name): Rename from get_syscall_by_name.  Now
108         accepts a pointer to a vector of integers and returns a bool.
109         * xml-syscall.h (get_syscalls_by_name): Likewise.
110
111 2018-12-13  John Baldwin  <jhb@FreeBSD.org>
112
113         * break-catch-syscall.c (catch_syscall_split_args): Pass 'result'
114         to get_syscalls_by_group.
115         * xml-syscall.c [!HAVE_LIBEXPAT] (get_syscalls_by_group): Return
116         false.
117         [HAVE_LIBEXPAT] (xml_list_syscalls_by_group): Append syscall
118         numbers to an existing vector of integers and return a bool.
119         (get_syscalls_by_group): Accept pointer to vector of integers
120         and change return type to bool.
121         * xml-syscall.h (get_syscalls_by_group): Likewise.
122
123 2018-12-13  Jim Wilson  <jimw@sifive.com>
124
125         * riscv-tdep.c (riscv_print_one_register_info): For MSTATUS, add
126         comment for SD field, and correct xlen calculation.  For MISA, add
127         comment for MXL field, add call to register_size, and correct base
128         calculation.
129
130 2018-12-13  Stafford Horne  <shorne@gmail.com>
131
132         * NEWS(New targets): Add or1k*-*-linux*.
133
134 2018-12-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
135
136         * nat/linux-osdata.c (linux_xfer_osdata_info_os_types): Forward
137         declare on one line to fix ARI warning.
138
139 2018-12-12  Andrew Burgess  <andrew.burgess@embecosm.com>
140
141         * infrun.c (infcall_suspend_state::infcall_suspend_state): New.
142         (infcall_suspend_state::registers): New.
143         (infcall_suspend_state::restore): New.
144         (infcall_suspend_state::thread_suspend): Rename to...
145         (infcall_suspend_state::m_thread_suspend): ...this.
146         (infcall_suspend_state::registers): Rename to...
147         (infcall_suspend_state::m_registers): ...this.
148         (infcall_suspend_state::siginfo_gdbarch): Rename to...
149         (infcall_suspend_state::m_siginfo_gdbarch): ...this.
150         (infcall_suspend_state::siginfo_data): Rename to...
151         (infcall_suspend_state::m_siginfo_data): ...this.
152         (save_infcall_suspend_state): Rewrite to use infcall_suspend_state
153         constructor.
154         (restore_infcall_suspend_state): Rewrite to use
155         infcall_suspend_state::restore method.
156         (get_infcall_suspend_state_regcache): Use
157         infcall_suspend_state::registers method.
158
159 2018-12-12  Andrew Burgess  <andrew.burgess@embecosm.com>
160
161         * riscv-tdep.c (riscv_call_arg_scalar_float): Unnamed (variadic)
162         arguments are passed in integer registers.
163         (riscv_call_arg_complex_float): Likewise.
164
165 2018-12-11  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
166
167         * nat/linux-osdata.c (common_getter): New function.
168         (struct osdata_type): Change getter to take_snapshot.
169         Add LONGEST len_avail and struct buffer buffer.
170         Change all elements in the initializer.
171         Add an element for the list of types.
172         (linux_xfer_osdata_info_os_types): New function.
173         (linux_common_xfer_osdata): Use common_getter for the list of types.
174         Replace getter call by common_getter.
175         (linux_xfer_osdata_cpus): Remove args READBUF, OFFSET, LEN.
176         Add arg BUFFER.  Only keep the code that adds data in BUFFER.
177         (linux_xfer_osdata_fds): Likewise.
178         (linux_xfer_osdata_modules): Likewise.
179         (linux_xfer_osdata_msg): Likewise.
180         (linux_xfer_osdata_processes): Likewise.
181         (linux_xfer_osdata_processgroups): Likewise.
182         (linux_xfer_osdata_sem): Likewise.
183         (linux_xfer_osdata_shm): Likewise.
184         (linux_xfer_osdata_isockets): Likewise.
185         (linux_xfer_osdata_threads): Likewise.
186
187 2018-12-11  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
188
189         * nat/linux-osdata.c: Removed various trailing spaces.
190
191 2018-12-10  Andrew Burgess  <andrew.burgess@embecosm.com>
192
193         * riscv-tdep.c (riscv_register_name): Fix ARI warning by removing
194         leading whitespace before #include line.
195
196 2018-12-08  Simon Marchi  <simon.marchi@ericsson.com>
197             Дилян Палаузов  <dilyan.palauzov@aegee.org>
198
199         PR gdb/23950
200         * configure.ac: Search for tgetent in libtinfow.
201         * configure: Re-generate.
202
203 2018-12-08  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
204
205         * linux-thread-db.c (struct thread_db_info): Add td_ta_delete_p.
206         (thread_db_err_str): Forward declare.
207         (delete_thread_db_info): Call td_ta_delete_p if available.
208         (try_thread_db_load_1): Acquire td_ta_delete address.
209         * nat/gdb_thread_db.h (td_ta_delete_ftype): Declare.
210
211 2018-12-08  Pedro Alves  <palves@redhat.com>
212
213         * source.c (forward_search_command): Rename to ...
214         (search_command_helper): ... this.  Add 'forward' parameter.
215         Tweak to use a gdb::def_vector<char> instead of a xrealloc'ed
216         buffer.  Handle backward searches too.
217         (forward_search_command, reverse_search_command): Reimplement by
218         calling search_command_helper.
219
220 2018-12-07  Andrew Burgess  <andrew.burgess@embecosm.com>
221
222         * .dir-locals.el: Copy most of the settings from c-mode over to
223         c++-mode.
224
225 2018-12-08  Stafford Horne  <shorne@gmail.com>
226
227         * Makefile.in (ALL_TARGET_OBS): Add or1k-linux-tdep.o.
228         * configure.tgt: Add or1k*-*-linux*.
229         * or1k-linux-tdep.c: New file.
230         * or1k-tdep.c (or1k_gdbarch_init): Call gdbarch_init_osabi.
231
232 2018-12-07  Pedro Alves  <palves@redhat.com>
233
234         * dwarf2read.c (get_gdb_index_contents_from_section): Use
235         gdb::make_array_view.
236
237 2018-12-05  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
238
239         * language.c (_initialize_language): Fix leak by assigning
240         a static string to language.  Same for range and case_sensitive,
241         even if no leak is detected for these variables.
242
243 2018-12-05  John Baldwin  <jhb@FreeBSD.org>
244
245         * configure: Re-generate.
246         * configure.ac: Use separate sed expressions to escape variables
247         in auto-load directories.
248
249 2018-12-05  Andrew Burgess  <andrew.burgess@embecosm.com>
250
251         * riscv-tdep.c (riscv_features_from_gdbarch_info): New function.
252         (riscv_find_default_target_description): Use new function to
253         extract feature from gdbarch_info.
254         (riscv_gdbarch_init): Add error checks for xlen and flen between
255         target description and bfd headers.  Be smarter about when we
256         think the hardware floating point abi should be used.
257
258 2018-12-05  Alan Hayward  <alan.hayward@arm.com>
259
260         * nat/aarch64-linux-hw-point.c
261         (aarch64_linux_any_set_debug_regs_state): New function.
262         * nat/aarch64-linux-hw-point.h
263         (aarch64_linux_any_set_debug_regs_state): New declaration.
264         * nat/aarch64-linux.c (aarch64_linux_new_thread): Check if any
265         BPs or WPs are set.
266
267 2018-11-30  John Baldwin  <jhb@FreeBSD.org>
268
269         * common/filestuff.c [HAVE_KINFO_GETFILE]: Include headers.
270         (fdwalk) [HAVE_KINFO_GETFILE]: Use kinfo_getfile.
271
272 2018-11-30  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
273             Simon Marchi  <simon.marchi@ericsson.com>
274
275         * linespec.c (symtab_vector_up): Remove.
276         (symtabs_from_filename): Change return type to std::vector.
277         (collect_symtabs_from_filename): Likewise.
278         (create_sals_line_offset): Assign return value of
279         collect_symtabs_from_filename to *ls->file_symtabs.
280         (convert_explicit_location_to_linespec): Remove call to release.
281         (parse_linespec): Likewise.
282         (symtab_collector) <symtab_collector>: Remove initialization of
283         m_symtabs.
284         <release_symtabs>: Change return type to std::vector<symtab *>.
285         <operator ()>: Adjust.
286
287 2018-11-30  John Baldwin  <jhb@FreeBSD.org>
288
289         * fbsd-nat.c [__FreeBSD_version >= 700009] (USE_SIGINFO): Macro
290         defined.
291         (union sigval32, struct siginfo32, fbsd_siginfo_size)
292         (fbsd_convert_siginfo): Make conditional on USE_SIGINFO instead
293         of KERN_PROC_AUXV and PT_LWPINFO.
294         (fbsd_nat_target::xfer_partial): Define method unconditionally.
295         Make TARGET_OBJECT_SIGNAL_INFO conditional on USE_SIGINFO.
296         Make TARGET_OBJECT_AUXV conditional on KERN_PROC_AUXV.
297         Make TARGET_OBJECT_FREEBSD_VMMAP and
298         TARGET_OBJECT_FREEBSD_PS_STRINGS conditional on KERN_PROC_VMMAP
299         and KERN_PROC_PS_STRINGS.
300         * fbsd-nat.h: Include <sys/proc.h>.
301         (fbsd_nat_target::xfer_partial): Declare method unconditionally.
302
303 2018-11-30  Andrew Burgess  <andrew.burgess@embecosm.com>
304
305         * riscv-linux-nat.c: Add 'inferior.h' and 'target-descriptions.h'
306         header files.
307         (riscv_linux_nat_target::read_description): New method.
308
309 2018-11-30  Andrew Burgess  <andrew.burgess@embecosm.com>
310
311         * arch/riscv.h (riscv_gdbarch_features::hash): New method.
312         * arch/riscv.c (struct riscv_gdbarch_features_hasher): New.
313         (riscv_tdesc_cache): New global.
314         (riscv_create_target_description): Look in the cache before
315         creating a new target description.
316
317 2018-11-30  Andrew Burgess  <andrew.burgess@embecosm.com>
318
319         * arch/riscv.h (riscv_gdb_features::operator==): New.
320         (riscv_gdb_features::operator!=): New.
321         * riscv-tdep.c (riscv_gdbarch_init): Make use of the inequality
322         operator.
323
324 2018-11-30  Andrew Burgess  <andrew.burgess@embecosm.com>
325
326         * arch/riscv.h (riscv_create_target_description): Make return type
327         const.
328         * arch/riscv.c (riscv_create_target_description): Likewise.
329         * riscv-tdep.c (riscv_find_default_target_description): Likewise.
330
331 2018-11-30  Jan Kratochvil  <jan.kratochvil@redhat.com>
332             Keith Seitz  <keiths@redhat.com>
333             Tom Tromey  <tom@tromey.com>
334             Sergio Durigan Junior  <sergiodj@redhat.com>
335
336         https://bugzilla.redhat.com/show_bug.cgi?id=1613614
337         * dwarf2read.c (dwarf2_find_containing_comp_unit): Add
338         'mid_cu->length' to '*cu_off' when checking if 'sect_off' is
339         inside the CU.
340
341 2018-11-30  Pedro Alves  <palves@redhat.com>
342
343         * aix-thread.c (aix_thread_target) <aix_thread_target>: Delete.
344         <stratum>: New override.
345         * bfd-target.c (aix_thread_target) <aix_thread_target>: Delete.
346         <stratum>: New override.
347         * bsd-uthread.c (bsd_uthread_target) <bsd_uthread_target>: Delete.
348         <stratum>: New override.
349         * exec.c (exec_target) <exec_target>: Delete.
350         <stratum>: New override.
351         * gdbarch-selftests.c (register_to_value_test): Adjust to use the
352         stratum method instead of the to_stratum field.
353         * linux-thread-db.c (thread_db_target) <thread_db_target>: Delete.
354         <stratum>: New override.
355         (thread_db_target::thread_db_target): Delete.
356         * make-target-delegates (print_class): Don't print a ctor
357         declaration.  Print a stratum method override declaration.
358         * process-stratum-target.h (process_stratum_target)
359         <process_stratum_target>: Delete.
360         <stratum>: New override.
361         * ravenscar-thread.c (ravenscar_thread_target)
362         <ravenscar_thread_target>: Delete.
363         <stratum>: New override.
364         * record-btrace.c (record_btrace_target)
365         <record_btrace_target>: Delete.
366         <stratum>: New override.
367         * record-full.c (record_full_base_target)
368         <record_full_base_target>: Delete.
369         <stratum>: New override.
370         * record.c (record_disconnect, record_detach)
371         (record_mourn_inferior, record_kill): Adjust to use the stratum
372         method instead of the to_stratum field.
373         * regcache.c (cooked_read_test, cooked_write_test): Likewise.
374         * sol-thread.c (sol_thread_target)
375         <sol_thread_target>: Delete.
376         <stratum>: New override.
377         * spu-multiarch.c (spu_multiarch_target)
378         <spu_multiarch_target>: Delete.
379         <stratum>: New override.
380         * target-delegates.c: Regenerate.
381         * target.c (target_stack::push, target_stack::unpush)
382         (pop_all_targets_above, pop_all_targets_at_and_above)
383         (info_target_command, target_require_runnable)
384         (target_stack::find_beneath): Adjust to use the stratum method
385         instead of the to_stratum field.
386         (dummy_target::dummy_target): Delete.
387         (dummy_target::stratum): New.
388         (debug_target::debug_target): Delete.
389         (debug_target::stratum): New.
390         (maintenance_print_target_stack): Adjust to use the stratum method
391         instead of the to_stratum field.
392         * target.h (struct target_ops) <stratum>: New method.
393         <to_stratum>: Delete.
394         <is_pushed>: Adjust to use the stratum method
395         instead of the to_stratum field.
396
397 2018-11-30  Pedro Alves  <palves@redhat.com>
398
399         * corelow.c (core_target) <has_all_memory, has_execution>: New
400         overrides.
401         * inf-child.c (inf_child_target::has_all_memory)
402         (inf_child_target::has_memory, inf_child_target::has_stack)
403         (inf_child_target::has_registers)
404         (inf_child_target::has_execution): Delete.
405         * inf-child.h (inf_child_target) <has_all_memory, has_memory,
406         has_stack, has_registers, has_execution>: Delete.
407         * process-stratum-target.c
408         (process_stratum_target::has_all_memory)
409         (process_stratum_target::has_memory)
410         (process_stratum_target::has_stack)
411         (process_stratum_target::has_registers)
412         (process_stratum_target::has_execution): New.
413         * process-stratum-target.h (process_stratum_target)
414         <has_all_memory, has_memory, has_stack, has_registers,
415         has_execution>: New method overrides.
416         * ravenscar-thread.c (ravenscar_thread_target) <has_all_memory,
417         has_memory, has_stack, has_registers, has_execution>: Delete.
418         * remote-sim.c (gdbsim_target) <has_stack, has_registers,
419         has_execution>: Delete.
420         * remote.c (remote_target) <has_all_memory, has_memory, has_stack,
421         has_registers, has_execution>: Delete.
422         * target.c (default_child_has_all_memory)
423         (default_child_has_memory, default_child_has_stack)
424         (default_child_has_registers, default_child_has_execution):
425         Delete.
426         * target.h (default_child_has_all_memory)
427         (default_child_has_memory, default_child_has_stack)
428         (default_child_has_registers, default_child_has_execution):
429         Delete.
430         * tracefile.h (tracefile_target) <has_execution>: New override.
431
432 2018-11-30  Pedro Alves  <palves@redhat.com>
433
434         * Makefile.in (COMMON_SFILES): Add process-stratum-target.c.
435         * bsd-kvm.c: Include "process-stratum-target.h".
436         (bsd_kvm_target): Now inherits from process_stratum_target.
437         (bsd_kvm_target::bsd_kvm_target): Default it.
438         * corelow.c: Include "process-stratum-target.h".
439         (core_target): Now inherits from process_stratum_target.
440         (core_target::core_target): Don't set to_stratum here.
441         * inf-child.c (inf_child_target::inf_child_target): Delete.
442         * inf-child.h: Include "process-stratum-target.h".
443         (inf_child_target): Inherit from process_stratum_target.
444         (inf_child_target) <inf_child_target>: Default it.
445         <can_async_p, supports_non_stop, supports_disable_randomization>:
446         Delete overrides.
447         * process-stratum-target.c: New file.
448         * process-stratum-target.h: New file.
449         * remote-sim.c: Include "process-stratum-target.h".
450         (gdbsim_target): Inherit from process_stratum_target.
451         <gdbsim_target>: Default it.
452         * remote.c: Include "process-stratum-target.h".
453         (remote_target): Inherit from process_stratum_target.
454         <remote_target>: Default it.
455         * target.c (default_thread_address_space)
456         (default_thread_architecture): Delete.
457         * target.h (target_ops) <thread_architecture>: Now returns NULL by
458         default.
459         <thread_address_space>: Ditto.
460         * test-target.h: Include "process-stratum-target.h" instead of
461         "target.h".
462         (test_target_ops): Inherit from process_stratum_target.
463         <test_target_ops>: Default it.
464         * tracefile.c (tracefile_target::tracefile_target): Delete.
465         * tracefile.h: Include "process-stratum-target.h".
466         (tracefile_target): Inherit from process_stratum_target.
467         <tracefile_target>: Default it.
468         * target-delegates.c: Regenerate.
469
470 2018-11-30  Pedro Alves  <palves@redhat.com>
471
472         * Makefile.in (COMMON_SFILES): Add test-target.c.
473         * gdbarch-selftests.c: Include "test-target.h".
474         * regcache.c: Include "test-target.h".
475         * target.c (test_target_info, test_target_ops::info): Move to ...
476         * test-target.c: ... this new file.
477         * target.h (test_target_ops): Move to ...
478         * test-target.h: ... this new file.
479
480 2018-11-29  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
481
482         * source.c (forward_search_command): Fix leak by using
483         xrealloc even for the first allocation in the loop, as buf
484         is static.
485
486 2018-11-29  Rajendra SY  <rajendra.sy@gmail.com>
487
488         PR gdb/23093
489         * gdb/fbsd-tdep.c (fbsd_gdb_signal_from_target)
490         (fbsd_gdb_signal_to_target): New.
491         (fbsd_init_abi): Install gdbarch "signal_from_target" and
492         "signal_to_target" methods.
493
494 2018-11-29  Tom Tromey  <tom@tromey.com>
495
496         * valarith.c (value_x_unop): Don't set argvec[3].
497
498 2018-11-26  Simon Marchi  <simon.marchi@ericsson.com>
499
500         PR gdb/23917
501         * sparc-linux-nat.c (sparc_linux_nat_target): Remove extraneous
502         semicolon.
503
504 2018-11-26  Pedro Alves  <palves@redhat.com>
505
506         * procfs.c (procfs_notice_thread): Replace uses of
507         in_thread_list/is_exited with find_thread_ptid/THREAD_EXITED.
508         * sol-thread.c (sol_thread_target::wait)
509         (sol_update_thread_list_callback): Likewise.
510
511 2018-11-25  Tom Tromey  <tom@tromey.com>
512
513         * ui-out.c (ui_out::field_fmt): Remove comment.
514         * tui/tui-out.c (tui_ui_out::do_field_fmt): Remove comment.
515         * mi/mi-out.c (mi_ui_out::do_field_fmt): Remove comment.
516
517 2018-11-24  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
518
519         * source.c (open_source_file): Leak fixed in '8e6a5953e1d Fix 4K
520         leak in open_source_file' has been partially undone by '2179fbc36d23
521         Return scoped_fd from open_source_file'. Re-add the transfer of
522         current s->fullname to the unique_xmalloc_ptr fullname given
523         to find_and_open_source.
524
525 2018-11-23  Pedro Alves  <palves@redhat.com>
526
527         * gdbthread.h (enum thread_state): Move comments here.
528         (is_running, is_stopped, is_exited): Remove declarations.
529
530 2018-11-22  Pedro Alves  <palves@redhat.com>
531
532         * Makefile.in (COMMON_SFILES): Add thread-iter.c.
533         * breakpoint.c (breakpoints_should_be_inserted_now): Replace
534         ALL_NON_EXITED_THREADS with all_non_exited_threads.
535         (print_one_breakpoint_location): Replace ALL_INFERIORS with
536         all_inferiors.
537         * bsd-kvm.c: Include inferior.h.
538         * btrace.c (btrace_free_objfile): Replace ALL_NON_EXITED_THREADS
539         with all_non_exited_threads.
540         * common/filtered-iterator.h: New.
541         * common/safe-iterator.h: New.
542         * corelow.c (core_target_open): Don't call init_thread_list here.
543         * darwin-nat.c (thread_info_from_private_thread_info): Replace
544         ALL_THREADS with all_threads.
545         * fbsd-nat.c (fbsd_nat_target::resume): Replace
546         ALL_NON_EXITED_THREADS with inf->non_exited_threads.
547         * fbsd-tdep.c (fbsd_make_corefile_notes): Replace
548         ALL_NON_EXITED_THREADS with inf->non_exited_threads.
549         * fork-child.c (postfork_hook): Don't call init_thread_list here.
550         * gdbarch-selftests.c (register_to_value_test): Adjust.
551         * gdbthread.h: Don't include "inferior.h" here.
552         (struct inferior): Forward declare.
553         (enum step_over_calls_kind): Moved here from inferior.h.
554         (thread_info::deletable): Definition moved to thread.c.
555         (find_thread_ptid (inferior *, ptid_t)): Declare.
556         (ALL_THREADS, ALL_THREADS_BY_INFERIOR, ALL_THREADS_SAFE): Delete.
557         Include "thread-iter.h".
558         (all_threads, all_non_exited_threads, all_threads_safe): New.
559         (any_thread_p): Declare.
560         (thread_list): Delete.
561         * infcmd.c (signal_command): Replace ALL_NON_EXITED_THREADS with
562         all_non_exited_threads.
563         (proceed_after_attach_callback): Delete.
564         (proceed_after_attach): Take an inferior pointer instead of an
565         integer PID.  Adjust to use range-for.
566         (attach_post_wait): Pass down inferior pointer instead of pid.
567         Use range-for instead of ALL_NON_EXITED_THREADS.
568         (detach_command): Remove init_thread_list call.
569         * inferior-iter.h: New.
570         * inferior.c (struct delete_thread_of_inferior_arg): Delete.
571         (delete_thread_of_inferior): Delete.
572         (delete_inferior, exit_inferior_1): Use range-for with
573         inf->threads_safe() instead of iterate_over_threads.
574         (inferior_appeared): Call init_thread_list here.
575         (discard_all_inferiors): Use all_non_exited_inferiors.
576         (find_inferior_id, find_inferior_pid): Use all_inferiors.
577         (iterate_over_inferiors): Use all_inferiors_safe.
578         (have_inferiors, number_of_live_inferiors): Use
579         all_non_exited_inferiors.
580         (number_of_inferiors): Use all_inferiors and std::distance.
581         (print_inferior): Use all_inferiors.
582         * inferior.h: Include gdbthread.h.
583         (enum step_over_calls_kind): Moved to gdbthread.h.
584         (struct inferior) <thread_list>: New field.
585         <threads, non_exited_threads, threads_safe>: New methods.
586         (ALL_INFERIORS): Delete.
587         Include "inferior-iter.h".
588         (ALL_NON_EXITED_INFERIORS): Delete.
589         (all_inferiors_safe, all_inferiors, all_non_exited_inferiors): New
590         functions.
591         * inflow.c (child_interrupt, child_pass_ctrlc): Replace
592         ALL_NON_EXITED_THREADS with all_non_exited_threads.
593         * infrun.c (follow_exec): Use all_threads_safe.
594         (clear_proceed_status, proceed): Use all_non_exited_threads.
595         (init_wait_for_inferior): Don't clear inline frame state here.
596         (infrun_thread_stop_requested, for_each_just_stopped_thread): Use
597         all_threads instead of ALL_NON_EXITED_THREADS.
598         (random_pending_event_thread): Use all_non_exited_threads instead
599         of ALL_NON_EXITED_THREADS.  Use a lambda for repeated code.
600         (clean_up_just_stopped_threads_fsms): Use all_non_exited_threads
601         instead of ALL_NON_EXITED_THREADS.
602         (handle_no_resumed): Use all_non_exited_threads instead of
603         ALL_NON_EXITED_THREADS.  Use all_inferiors instead of
604         ALL_INFERIORS.
605         (restart_threads, switch_back_to_stepped_thread): Use
606         all_non_exited_threads instead of ALL_NON_EXITED_THREADS.
607         * linux-nat.c (check_zombie_leaders): Replace ALL_INFERIORS with
608         all_inferiors.
609         (kill_unfollowed_fork_children): Use inf->non_exited_threads
610         instead of ALL_NON_EXITED_THREADS.
611         * linux-tdep.c (linux_make_corefile_notes): Use
612         inf->non_exited_threads instead of ALL_NON_EXITED_THREADS.
613         * linux-thread-db.c (thread_db_target::update_thread_list):
614         Replace ALL_INFERIORS with all_inferiors.
615         (thread_db_target::thread_handle_to_thread_info): Use
616         inf->non_exited_threads instead of ALL_NON_EXITED_THREADS.
617         * mi/mi-interp.c (multiple_inferiors_p): New.
618         (mi_on_resume_1): Simplify using all_non_exited_threads and
619         multiple_inferiors_p.
620         * mi/mi-main.c (mi_cmd_thread_list_ids): Use all_non_exited_threads
621         instead of ALL_NON_EXITED_THREADS.
622         * nto-procfs.c (nto_procfs_target::open): Don't call
623         init_thread_list here.
624         * record-btrace.c (record_btrace_target_open)
625         (record_btrace_target::stop_recording)
626         (record_btrace_target::close)
627         (record_btrace_target::record_is_replaying)
628         (record_btrace_target::resume, record_btrace_target::wait)
629         (record_btrace_target::record_stop_replaying): Use
630         all_non_exited_threads instead of ALL_NON_EXITED_THREADS.
631         * record-full.c (record_full_wait_1): Use all_non_exited_threads
632         instead of ALL_NON_EXITED_THREADS.
633         * regcache.c (cooked_read_test): Remove reference to global
634         thread_list.
635         * remote-sim.c (gdbsim_target::create_inferior): Don't call
636         init_thread_list here.
637         * remote.c (remote_target::update_thread_list): Use
638         all_threads_safe instead of ALL_NON_EXITED_THREADS.
639         (remote_target::process_initial_stop_replies): Replace
640         ALL_INFERIORS with all_non_exited_inferiors and use
641         all_non_exited_threads instead of ALL_NON_EXITED_THREADS.
642         (remote_target::open_1): Don't call init_thread_list here.
643         (remote_target::append_pending_thread_resumptions)
644         (remote_target::remote_resume_with_hc): Use all_non_exited_threads
645         instead of ALL_NON_EXITED_THREADS.
646         (remote_target::commit_resume)
647         (remote_target::remove_new_fork_children): Replace ALL_INFERIORS
648         with all_non_exited_inferiors and use all_non_exited_threads
649         instead of ALL_NON_EXITED_THREADS.
650         (remote_target::kill_new_fork_children): Use
651         all_non_exited_threads instead of ALL_NON_EXITED_THREADS.  Remove
652         init_thread_list and init_wait_for_inferior calls.
653         (remote_target::remote_btrace_maybe_reopen)
654         (remote_target::thread_handle_to_thread_info): Use
655         all_non_exited_threads instead of ALL_NON_EXITED_THREADS.
656         * target.c (target_terminal::restore_inferior)
657         (target_terminal_is_ours_kind): Replace ALL_INFERIORS with
658         all_non_exited_inferiors.
659         * thread-iter.c: New file.
660         * thread-iter.h: New file.
661         * thread.c: Include "inline-frame.h".
662         (thread_list): Delete.
663         (clear_thread_inferior_resources): Call clear_inline_frame_state.
664         (init_thread_list): Use all_threads_safe instead of
665         ALL_THREADS_SAFE.  Adjust to per-inferior thread lists.
666         (new_thread): Adjust to per-inferior thread lists.
667         (add_thread_silent): Pass inferior to find_thread_ptid.
668         (thread_info::deletable): New, moved from the header.
669         (delete_thread_1): Adjust to per-inferior thread lists.
670         (find_thread_global_id): Use inf->threads().
671         (find_thread_ptid): Use find_inferior_ptid and pass inferior to
672         find_thread_ptid.
673         (find_thread_ptid(inferior*, ptid_t)): New overload.
674         (iterate_over_threads): Use all_threads_safe.
675         (any_thread_p): New.
676         (thread_count): Use all_threads and std::distance.
677         (live_threads_count): Use all_non_exited_threads and
678         std::distance.
679         (valid_global_thread_id): Use all_threads.
680         (in_thread_list): Use find_thread_ptid.
681         (first_thread_of_inferior): Adjust to per-inferior thread lists.
682         (any_thread_of_inferior, any_live_thread_of_inferior): Use
683         inf->non_exited_threads().
684         (prune_threads, delete_exited_threads): Use all_threads_safe.
685         (thread_change_ptid): Pass inferior pointer to find_thread_ptid.
686         (set_resumed, set_running): Use all_non_exited_threads.
687         (is_thread_state, is_stopped, is_exited, is_running)
688         (is_executing): Delete.
689         (set_executing, set_stop_requested, finish_thread_state): Use
690         all_non_exited_threads.
691         (print_thread_info_1): Use all_inferiors and all_threads.
692         (thread_apply_all_command): Use all_non_exited_threads.
693         (thread_find_command): Use all_threads.
694         (update_threads_executing): Use all_non_exited_threads.
695         * tid-parse.c (parse_thread_id): Use inf->threads.
696         * x86-bsd-nat.c (x86bsd_dr_set): Use inf->non_exited_threads ().
697
698 2018-11-22  Pedro Alves  <palves@redhat.com>
699
700         * infrun.c (follow_exec) <set follow-exec new>: Add thread and
701         switch to it before calling into try_open_exec_file.
702
703 2018-11-22  Pedro Alves  <palves@redhat.com>
704
705         * cli/cli-interp.c (cli_on_user_selected_context_changed): Use
706         inferior_thread instead of find_thread_ptid, and only when
707         inferior_ptid is not null_ptid.
708         * inferior.c (add_inferior): Don't include target_pid_to_str
709         output when the inferior is not started.
710         * python/py-inferior.c (python_on_normal_stop): Don't use
711         find_thread_ptid.
712         (tui_on_user_selected_context_changed): Use inferior_thread
713         instead of find_thread_ptid, and only when inferior_ptid is not
714         null_ptid.
715
716 2018-11-21  Benno Fünfstück  <benno.fuenfstueck@gmail.com>
717
718         PR python/23714
719         * gdb/python/python.c (execute_gdb_command): Call
720         prevent_dont_repeat earlier to avoid affecting dont_repeat.
721
722 2018-11-21  Andrew Burgess  <andrew.burgess@embecosm.com>
723
724         * Makefile.in (ALL_TARGET_OBS): Add arch/riscv.o.
725         (HFILES_NO_SRCDIR): Add arch/riscv.h.
726         * arch/riscv.c: New file.
727         * arch/riscv.h: New file.
728         * configure.tgt: Add cpu_obs list of riscv, move riscv-tdep.o into
729         this list, and add arch/riscv.o.
730         * features/Makefile: Add riscv features.
731         * features/riscv/32bit-cpu.c: New file.
732         * features/riscv/32bit-cpu.xml: New file.
733         * features/riscv/32bit-csr.c: New file.
734         * features/riscv/32bit-csr.xml: New file.
735         * features/riscv/32bit-fpu.c: New file.
736         * features/riscv/32bit-fpu.xml: New file.
737         * features/riscv/64bit-cpu.c: New file.
738         * features/riscv/64bit-cpu.xml: New file.
739         * features/riscv/64bit-csr.c: New file.
740         * features/riscv/64bit-csr.xml: New file.
741         * features/riscv/64bit-fpu.c: New file.
742         * features/riscv/64bit-fpu.xml: New file.
743         * features/riscv/rebuild-csr-xml.sh: New file.
744         * riscv-tdep.c: Add 'arch/riscv.h' include.
745         (riscv_gdb_reg_names): Delete.
746         (csr_reggroup): New global.
747         (struct riscv_register_alias): Delete.
748         (struct riscv_register_feature): New structure.
749         (riscv_register_aliases): Delete.
750         (riscv_xreg_feature): New global.
751         (riscv_freg_feature): New global.
752         (riscv_virtual_feature): New global.
753         (riscv_csr_feature): New global.
754         (riscv_create_csr_aliases): New function.
755         (riscv_read_misa_reg): Delete.
756         (riscv_has_feature): Delete.
757         (riscv_isa_xlen): Simplify, just return cached xlen.
758         (riscv_isa_flen): Simplify, just return cached flen.
759         (riscv_has_fp_abi): Update for changes in struct gdbarch_tdep.
760         (riscv_register_name): Update to make use of tdesc_register_name.
761         Look up xreg and freg names in the new globals riscv_xreg_feature
762         and riscv_freg_feature.  Don't supply csr aliases here.
763         (riscv_fpreg_q_type): Delete.
764         (riscv_register_type): Use tdesc_register_type in almost all
765         cases, override the returned type in a few specific cases only.
766         (riscv_print_one_register_info): Handle errors reading registers.
767         (riscv_register_reggroup_p): Use tdesc_register_in_reggroup_p for
768         registers that are otherwise unknown to GDB.  Also check the
769         csr_reggroup.
770         (riscv_print_registers_info): Remove assert about upper register
771         number, and use gdbarch_register_reggroup_p instead of
772         short-cutting.
773         (riscv_find_default_target_description): New function.
774         (riscv_check_tdesc_feature): New function.
775         (riscv_add_reggroups): New function.
776         (riscv_setup_register_aliases): New function.
777         (riscv_init_reggroups): New function.
778         (_initialize_riscv_tdep): Add calls to setup CSR aliases, and
779         setup register groups.  Register new riscv debug variable.
780         * riscv-tdep.h: Add 'arch/riscv.h' include.
781         (struct gdbarch_tdep): Remove abi union, and add
782         riscv_gdbarch_features field.  Remove cached quad floating point
783         type, and provide initialisation for double type field.
784         * target-descriptions.c (maint_print_c_tdesc_cmd): Add riscv to
785         the list of targets using the feature based target descriptions.
786         * NEWS: Mention target description support.
787
788 2018-11-21  Pedro Alves  <palves@redhat.com>
789
790         * valops.c (find_method_list, value_find_oload_method_list)
791         (find_overload_match, find_oload_champ): Rename parameters and
792         locals.
793
794 2018-11-21  Pedro Alves  <palves@redhat.com>
795
796         * valops.c (find_method_list): Replace pointer and length
797         parameters with an gdb::array_view.  Adjust.
798         (value_find_oload_method_list): Likewise.
799         (find_overload_match): Use gdb::array_view for methods list.
800         Adjust to find_oload_champ interface change.
801         (find_oload_champ): 'xm_worker_vec' parameter now a pointer/array.
802         'num_fns' parameter now a size_t.  Eliminate 'fn_count' local.
803
804 2018-11-21  Pedro Alves  <palves@redhat.com>
805
806         * gdbtypes.c (compare_badness): Change type of parameters to const
807         reference.  Adjust to badness_vector being a std::vector now.
808         (rank_function): Adjust to badness_vector being a std::vector now.
809         * gdbtypes.h (badness_vector): Now a typedef to std::vector.
810         (LENGTH_MATCH): Delete.
811         (compare_badness): Change type of parameters to const reference.
812         (rank_function): Return a badness_vector by value now.
813         (find_overload_match): Adjust to badness_vector being a
814         std::vector now.  Remove cleanups.
815         (find_oload_champ_namespace): 'oload_champ_bv' parameter now a
816         badness_vector pointer.
817         (find_oload_champ_namespace_loop): 'oload_champ_bv' parameter now
818         a badness_vector pointer.  Adjust to badness_vector being a
819         std::vector now.  Remove cleanups.
820         (find_oload_champ): 'oload_champ_bv' parameter now
821         a badness_vector pointer.  Adjust to badness_vector being a
822         std::vector now.  Remove cleanups.
823
824 2018-11-21  Pedro Alves  <palves@redhat.com>
825
826         * cp-support.c (sym_return_val_size, sym_return_val_index)
827         (sym_return_val): Delete.
828         (overload_list_add_symbol): Add std::vector parameter.  Adjust to
829         add to the vector.
830         (make_symbol_overload_list): Adjust to return a std::vector
831         instead of maintaining a global open coded vector.
832         (make_symbol_overload_list_block): Add std::vector parameter.
833         (make_symbol_overload_list_block): Rename to ...
834         (add_symbol_overload_list_block): ... this and add std::vector
835         parameter.
836         (make_symbol_overload_list_namespace): Rename to ...
837         (add_symbol_overload_list_namespace): ... this and add std::vector
838         parameter.
839         (make_symbol_overload_list_adl_namespace): Rename to ...
840         (add_symbol_overload_list_adl_namespace): ... this and add
841         std::vector parameter.
842         (make_symbol_overload_list_adl): Delete.
843         (add_symbol_overload_list_adl): New.
844         (make_symbol_overload_list_using): Rename to ...
845         (add_symbol_overload_list_using): ... this and add std::vector
846         parameter.
847         (make_symbol_overload_list_qualified): Rename to ...
848         (add_symbol_overload_list_qualified): ... this and add std::vector
849         parameter.
850         * cp-support.h: Include "common/array-view.h" and <vector>.
851         (make_symbol_overload_list): Change return type to std::vector.
852         (make_symbol_overload_list_adl): Delete declaration.
853         (add_symbol_overload_list_adl): New declaration.
854         * valops.c (find_overload_match): Local 'oload_syms' now a
855         std::vector.
856         (find_oload_champ_namespace): 'oload_syms' parameter now a
857         std::vector pointer.
858         (find_oload_champ_namespace_loop): 'oload_syms' parameter now a
859         std::vector pointer.  Adjust to new make_symbol_overload_list
860         interface.
861
862 2018-11-21  Pedro Alves  <palves@redhat.com>
863
864         * common/array-view.h (array_view::splice(size_type, size_t)): New.
865         (array_view::splice(size_type)): New.
866         * eval.c (eval_call, evaluate_funcall): Adjust to use array_view.
867         * extension.c (xmethod_worker::get_arg_types): Adjust to return an
868         std::vector.
869         (xmethod_worker::get_result_type): Adjust to use gdb::array_view.
870         * extension.h: Include "common/array-view.h".
871         (xmethod_worker::invoke): Adjust to use gdb::array_view.
872         (xmethod_worker::get_arg_types): Adjust to return an std::vector.
873         (xmethod_worker::get_result_type): Adjust to use gdb::array_view.
874         (xmethod_worker::do_get_arg_types): Adjust to use std::vector.
875         (xmethod_worker::do_get_result_type): Adjust to use
876         gdb::array_view.
877         * gdbtypes.c (rank_function): Adjust to use gdb::array_view.
878         * gdbtypes.h: Include "common/array-view.h".
879         (rank_function): Adjust to use gdb::array_view.
880         * python/py-xmethods.c (python_xmethod_worker::invoke)
881         (python_xmethod_worker::do_get_arg_types)
882         (python_xmethod_worker::do_get_result_type)
883         (python_xmethod_worker::invoke): Adjust to new interfaces.
884         * valarith.c (value_user_defined_cpp_op, value_user_defined_op)
885         (value_x_binop, value_x_unop): Adjust to use gdb::array_view.
886         * valops.c (find_overload_match, find_oload_champ_namespace)
887         (find_oload_champ_namespace_loop, find_oload_champ): Adjust to use
888         gdb:array_view and the new xmethod_worker interfaces.
889         * value.c (result_type_of_xmethod, call_xmethod): Adjust to use
890         gdb::array_view.
891         * value.h (find_overload_match, result_type_of_xmethod)
892         (call_xmethod): Adjust to use gdb::array_view.
893         * unittests/array-view-selftests.c: Add slicing tests.
894
895 2018-11-21  Pedro Alves  <palves@redhat.com>
896
897         * ada-lang.c (ada_evaluate_subexp): Adjust to pass an array_view.
898         * common/array-view.h (make_array_view): New.
899         * compile/compile-object-run.c (compile_object_run): Adjust to
900         pass an array_view.
901         * elfread.c (elf_gnu_ifunc_resolve_addr): Adjust.
902         * eval.c (eval_call): Adjust to pass an array_view.
903         (evaluate_subexp_standard): Adjust to pass an array_view.
904         * gcore.c (call_target_sbrk): Adjust to pass an array_view.
905         * guile/scm-value.c (gdbscm_value_call): Likewise.
906         * infcall.c (push_dummy_code): Replace pointer + size parameters
907         with an array_view parameter.
908         (call_function_by_hand, call_function_by_hand_dummy): Likewise and
909         adjust.
910         * infcall.h: Include "common/array-view.h".
911         (call_function_by_hand, call_function_by_hand_dummy): Replace
912         pointer + size parameters with an array_view parameter.
913         * linux-fork.c (inferior_call_waitpid): Adjust to use array_view.
914         * linux-tdep.c (linux_infcall_mmap): Likewise.
915         * objc-lang.c (lookup_objc_class, lookup_child_selector)
916         (value_nsstring, print_object_command): Likewise.
917         * python/py-value.c (valpy_call): Likewise.
918         * rust-lang.c (rust_evaluate_funcall): Likewise.
919         * spu-tdep.c (flush_ea_cache): Likewise.
920         * valarith.c (value_x_binop, value_x_unop): Likewise.
921         * valops.c (value_allocate_space_in_inferior): Likewise.
922         * unittests/array-view-selftests.c (run_tests): Add
923         gdb::make_array_view test.
924
925 2018-11-20  Andrew Burgess  <andrew.burgess@embecosm.com>
926
927         * cli-out.c (cli_ui_out::do_field_int): Use string_printf rather
928         than a fixed size buffer.
929
930 2018-11-20  Andrew Burgess  <andrew.burgess@embecosm.com>
931
932         * breakpoint.c (print_one_breakpoint_location): Reduce whitespace,
933         and remove insertion of extra spaces in GDB's output.
934         * cli-out.c (cli_ui_out::do_field_fmt): Update header comment.
935         Layout field into a temporary buffer, and then output it as a
936         string field.
937
938 2018-11-20  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
939
940         * NEWS: Document the language choice done by
941         'info [types|functions|variables]|rbreak'.
942
943 2018-11-20  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
944
945         * symtab.c (treg_matches_sym_type_name): Use
946         scoped_switch_to_sym_language_if_auto instead of local logic.
947         (print_symbol_info): Use scoped_switch_to_sym_language_if_auto
948         to switch to SYM language when language mode is auto.
949
950 2018-11-20  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
951
952         * language.h (scoped_switch_to_sym_language_if_auto): New class.
953
954 2018-11-20  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
955
956         * symtab.c (search_symbols): Properly check absence of type regexp
957         before entering the loop scanning the minimal symbols.
958
959 2018-11-20  John Darrington  <john@darrington.wattle.id.au>
960
961         * s12z-tdep.c (s12z_extract_return_value): New function.
962         (inv_reg_perm) New array.
963         (s12z_return_value): Populate readbuf if non-null.
964
965 2018-11-20  Eli Zaretskii  <eliz@gnu.org>
966
967         * common/filestuff.c (gdb_fopen_cloexec): Disable use of "e" mode
968         with 'fopen' also if O_CLOEXEC is equal to O_NOINHERIT, to cater
969         to MinGW fixed by Gnulib.
970         (O_NOINHERIT): Define if not defined.
971
972 2018-11-19  John Darrington  <john@darrington.wattle.id.au>
973
974         * s12z-tdep.c (s12z_frame_cache): Add an assertion.
975
976 2018-11-19  Simon Marchi  <simon.marchi@polymtl.ca>
977
978         * infrun.c (displaced_step_inferior_state) <next>: Remove.
979
980 2018-11-19  Tom Tromey  <tom@tromey.com>
981
982         * source.c (get_filename_and_charpos): Return void.
983
984 2018-11-19  Simon Marchi  <simon.marchi@polymtl.ca>
985
986         * skip.c (_initialize_step_skip): Fix "info skip" help.
987
988 2018-11-16  Tom Tromey  <tom@tromey.com>
989
990         PR rust/23625:
991         * rust-lang.c (rust_internal_print_type): Handle TYPE_CODE_PTR.
992
993 2018-11-19  Simon Marchi  <simon.marchi@ericsson.com>
994
995         * infrun.c (displaced_step_inferior_states): Change type to
996         std::forward_list.
997         (get_displaced_stepping_state): Adjust.
998         (displaced_step_in_progress_any_inferior): Adjust.
999         (add_displaced_stepping_state): Adjust.
1000         (remove_displaced_stepping_state): Adjust.
1001
1002 2018-11-18  Tom Tromey  <tom@tromey.com>
1003
1004         PR build/23814:
1005         * target-delegates.c: Rebuild.
1006         * ia64-linux-nat.c (class ia64_linux_nat_target)
1007         <have_steppable_watchpoint>: Use override.  Return true, not 1.
1008         (ia64_linux_nat_target::can_use_hw_breakpoint): Rename.  Remove
1009         "self" argument.
1010         (ia64_linux_nat_target::low_new_thread): Rename.
1011         (class ia64_linux_nat_target) <read_description>: Don't declare.
1012         * target.h (struct target_ops) <have_steppable_watchpoint>: Return
1013         bool.
1014
1015 2018-11-16  Alan Hayward  <alan.hayward@arm.com>
1016
1017         PR gdb/22736:
1018         * aarch64-tdep.c (aarch64_push_dummy_call): Remove
1019         lang_struct_return code.
1020
1021 2018-11-16  Alan Hayward  <alan.hayward@arm.com>
1022
1023         * aarch64-tdep.c (aarch64_push_dummy_call): Replace arg with
1024         return_method.
1025         * alpha-tdep.c (alpha_push_dummy_call): Likewise.
1026         * amd64-tdep.c (amd64_push_arguments): Likewise.
1027         (amd64_push_dummy_call): Likewise.
1028         * amd64-windows-tdep.c (amd64_windows_push_arguments): Likewise.
1029         * arc-tdep.c (arc_push_dummy_call): Likewise.
1030         * arm-tdep.c (arm_push_dummy_call): Likewise.
1031         * avr-tdep.c (avr_push_dummy_call): Likewise.
1032         * bfin-tdep.c (bfin_push_dummy_call): Likewise.
1033         * cris-tdep.c (cris_push_dummy_call): Likewise.
1034         * csky-tdep.c (csky_push_dummy_call): Likewise.
1035         * frv-tdep.c (frv_push_dummy_call): Likewise.
1036         * gdbarch.c: Regenerate.
1037         * gdbarch.h: Regenerate.
1038         * gdbarch.sh (gdbarch_push_dummy_call): Replace arg with
1039         return_method.
1040         * h8300-tdep.c (h8300_push_dummy_call): Likewise.
1041         * hppa-tdep.c (hppa32_push_dummy_call): Likewise.
1042         (hppa64_push_dummy_call): Likewise.
1043         * i386-darwin-tdep.c (i386_darwin_push_dummy_call): Likewise.
1044         * i386-tdep.c (i386_push_dummy_call): Likewise.
1045         * ia64-tdep.c (ia64_push_dummy_call): Likewise.
1046         * infcall.c (call_function_by_hand_dummy): Likewise.
1047         * iq2000-tdep.c (iq2000_push_dummy_call): Likewise.
1048         * lm32-tdep.c (lm32_push_dummy_call): Likewise.
1049         * m32c-tdep.c (m32c_push_dummy_call): Likewise.
1050         * m32r-tdep.c (m32r_push_dummy_call): Likewise.
1051         * m68hc11-tdep.c (m68hc11_push_dummy_call): Likewise.
1052         * m68k-tdep.c (m68k_push_dummy_call): Likewise.
1053         * mep-tdep.c (mep_push_dummy_call): Likewise.
1054         * mips-tdep.c (mips_eabi_push_dummy_call): Likewise.
1055         (mips_n32n64_push_dummy_call): Likewise.
1056         (mips_o32_push_dummy_call): Likewise.
1057         (mips_o64_push_dummy_call): Likewise.
1058         * mn10300-tdep.c (mn10300_push_dummy_call): Likewise.
1059         * msp430-tdep.c (msp430_push_dummy_call): Likewise.
1060         * nds32-tdep.c (nds32_push_dummy_call): Likewise.
1061         * nios2-tdep.c (nios2_push_dummy_call): Likewise.
1062         * or1k-tdep.c (or1k_push_dummy_call): Likewise.
1063         * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
1064         (ppc64_sysv_abi_push_dummy_call): Likewise.
1065         * ppc-tdep.h (ppc_sysv_abi_push_dummy_call): Likewise.
1066         (ppc64_sysv_abi_push_dummy_call): Likewise.
1067         * riscv-tdep.c (riscv_push_dummy_call): Likewise.
1068         * rl78-tdep.c (rl78_push_dummy_call): Likewise.
1069         * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
1070         * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
1071         * rx-tdep.c (rx_push_dummy_call): Likewise.
1072         * s390-tdep.c (s390_push_dummy_call): Likewise.
1073         * score-tdep.c (score_push_dummy_call): Likewise.
1074         * sh-tdep.c (sh_push_dummy_call_fpu): Likewise.
1075         (sh_push_dummy_call_nofpu): Likewise.
1076         * sparc-tdep.c (sparc32_store_arguments): Likewise.
1077         (sparc32_push_dummy_call): Likewise.
1078         * sparc64-tdep.c (sparc64_store_arguments): Likewise.
1079         (sparc64_push_dummy_call): Likewise.
1080         * spu-tdep.c (spu_push_dummy_call): Likewise.
1081         * tic6x-tdep.c (tic6x_push_dummy_call): Likewise.
1082         * tilegx-tdep.c (tilegx_push_dummy_call): Likewise.
1083         * v850-tdep.c (v850_push_dummy_call): Likewise.
1084         * vax-tdep.c (vax_push_dummy_call): Likewise.
1085         * xstormy16-tdep.c (xstormy16_push_dummy_call): Likewise.
1086         * xtensa-tdep.c (xtensa_push_dummy_call): Likewise.
1087
1088 2018-11-16  Alan Hayward  <alan.hayward@arm.com>
1089
1090         * gdbarch.sh (enum function_call_return_method): Add enum.
1091         * gdbarch.h: Regenerate.
1092         * infcall.c (call_function_by_hand_dummy): Replace vars with enum.
1093
1094 2018-11-15  Joel Brobecker  <brobecker@adacore.com>
1095
1096         * unittests/copy_bitwise-selftests.c: New file.
1097         * utils.c (selftests::bits_to_str, selftests::check_copy_bitwise)
1098         (selftests::copy_bitwise_tests): Delete, moving this code to
1099         unittests/copy_bitwise-selftests.c instead.
1100         (_initialize_utils): Do not register copy_bitwise tests.
1101         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1102         unittests/copy_bitwise-selftests.c.
1103
1104 2018-11-14  Joel Brobecker  <brobecker@adacore.com>
1105
1106         * ada-lang.c (move_bits): Delete. Update all callers to use
1107         copy_bitwise instead.
1108         * dwarf2loc.c (copy_bitwise, bits_to_str::bits_to_str)
1109         (selftests::check_copy_bitwise, selftests::copy_bitwise_tests):
1110         Move from here to utils.c.
1111         (_initialize_dwarf2loc): Remove call to register copy_bitwise
1112         selftests.
1113         * utils.h (copy_bitwise): Add declaration.
1114         * utils.c (copy_bitwise, bits_to_str::bits_to_str)
1115         (selftests::check_copy_bitwise, selftests::copy_bitwise_tests):
1116         Moved here from dwarf2loc.c.
1117         (_initialize_utils): Register copy_bitwise selftests.
1118
1119 2018-11-14  Jim Wilson  <jimw@sifive.com>
1120
1121         * riscv-tdep.c (struct riscv_arg_info): New field is_unnamed.
1122         (riscv_call_arg_scalar_int): If unnamed arg with twice xlen alignment,
1123         then increment next_regnum if odd.
1124         (riscv_arg_location): New arg is_unnamed.  Set ainfo->is_unnamed.
1125         (riscv_push_dummy_call): New local ftype.  Call check_typedef to set
1126         function type.  Pass new arg to riscv_arg_location based on function
1127         type.
1128         (riscv_return_value): Pass new arg to riscv_arg_location.
1129
1130         * riscv-tdep.c (BIGGEST_ALIGNMENT): New.
1131         (riscv_type_alignment) <TYPE_CODE_ARRAY>: If TYPE_VECTOR, return min
1132         of TYPE_LENGTH and BIGGEST_ALIGNMENT.
1133
1134         * riscv-tdep.c (riscv_call_arg_scalar_int): Use std::min when
1135         setting len.  New local align, set to max of arg align and xlen,
1136         and pass to first riscv_assign_stack_location call.
1137
1138 2018-11-12  Simon Marchi  <simon.marchi@polymtl.ca>
1139
1140         * skip.c (complete_skip_number): New function.
1141         (_initialize_step_skip): Add completers to some skip commands.
1142
1143 2018-11-09  Tom Tromey  <tom@tromey.com>
1144
1145         * remote.c (remote_g_packet_guess_s): Remove typedef and DEF_VEC.
1146         (struct remote_g_packet_data): Derive from allocate_on_obstack.
1147         <guesses>: Now a std::vector.
1148         (remote_g_packet_data_init, register_remote_g_packet_guess):
1149         Update.
1150         (remote_read_description_p): Update.  Return bool.
1151         (remote_target::read_description): Update.
1152         (struct remote_g_packet_guess): Add constructor.
1153
1154 2018-11-09  Tom Tromey  <tom@tromey.com>
1155
1156         * common/scoped_fd.h (class scoped_fd): Add move constructor and
1157         move assignment operator.
1158         * psymtab.c (psymtab_to_fullname): Update.
1159         * source.h (open_source_file): Return scoped_fd.
1160         (find_and_open_source): Likewise.
1161         * source.c (open_source_file): Return scoped_fd.
1162         (get_filename_and_charpos): Update.
1163         (print_source_lines_base): Update.  Use scoped_fd::to_file.
1164         (forward_search_command): Likewise.
1165         (reverse_search_command): Likewise.
1166         (find_and_open_source): Return scoped_fd.
1167         * tui/tui-source.c (tui_set_source_content): Update.  Use
1168         gdb_file_up.
1169
1170 2018-11-09  John Baldwin  <jhb@FreeBSD.org>
1171
1172         * minsyms.c (minimal_symbol_reader::install): Fix unsigned
1173         overflow.
1174
1175 2018-11-09  Hafiz Abid Qadeer  <abidh@codesourcery.com>
1176
1177         * configure: Regenerate.
1178
1179 2018-11-09  Tom de Vries  <tdevries@suse.de>
1180
1181         * symtab.c (symbol_set_names): Call symbol_find_demangled_name
1182         unconditionally, to set the language of the symbol.  Manage freeing
1183         returned pointer using gdb::unique_xmalloc_ptr.
1184
1185 2018-11-08  Tom Tromey  <tom@tromey.com>
1186
1187         * record.c (require_record_target): Upper-case "<TAB>".
1188
1189 2018-11-08  Tom Tromey  <tom@tromey.com>
1190
1191         * python/lib/gdb/command/pretty_printers.py
1192         (InfoPrettyPrinter.invoke): Don't indent "objfile" heading.
1193
1194 2018-11-08  Tom Tromey  <tom@tromey.com>
1195
1196         PR gdb/23555:
1197         PR gdb/23838:
1198         * target.h (target_supports_terminal_ours): Return bool.
1199         * target.c (target_supports_terminal_ours): Handle case where
1200         current_top_target returns nullptr.  Return bool.
1201
1202 2018-11-08  Joel Brobecker  <brobecker@adacore.com>
1203
1204         * aarch64-tdep.c (aapcs_is_vfp_call_or_return_candidate_1):
1205         return the correct count for potential HFAs.
1206
1207 2018-11-08  Jan Beulich  <jbeulich@suse.com>
1208
1209         * i387-tdep.c (i387_supply_xsave): Split handling of
1210         X86_XSTATE_ZMM_H and X86_XSTATE_ZMM.
1211         (i387_collect_xsave): Likewise.
1212
1213 2018-11-08  Andrew Burgess  <andrew.burgess@embecosm.com>
1214
1215         * riscv-tdep.c (riscv_insn::decode): Update header comment.
1216         (riscv_frame_this_id): Catch errors thrown while building the
1217         frame cache, leave the frame id as the default, which is the outer
1218         frame id.
1219
1220 2018-11-07  Joel Brobecker  <brobecker@adacore.com>
1221
1222         * ada-lang.c (read_atcb): Only set task_info->called_task if
1223         task_info->state == Entry_Caller_Sleep.
1224         (print_ada_task_info): Do not check task_info->state before
1225         checking task_info->called_task.
1226         (info_task): Likewise.
1227
1228 2018-11-07  Joel Brobecker  <brobecker@adacore.com>
1229
1230         * ada-tasks.c (read_atcb): Clear task_info before computing
1231         the value of each of its fields.
1232
1233 2018-11-07  Andrew Burgess  <andrew.burgess@embecosm.com>
1234
1235         * dwarf2read.c (dwarf2_init_integer_type): Check for name being
1236         NULL before dereferencing it.
1237
1238 2018-11-06  Tom de Vries  <tdevries@suse.de>
1239
1240         * linux-tdep.c (linux_vsyscall_range_raw): Use xmalloc to allocate
1241         program headers.
1242
1243 2018-11-06  Max Filippov  <jcmvbkbc@gmail.com>
1244
1245         * configure.tgt (xtensa*-*-linux*): Change to xtensa*-*-*linux*
1246         so that it applies to uclinux as well.
1247
1248 2018-11-06  Marius Muench  <marius.muench@eurecom.fr>
1249
1250         * arm-tdep.c (arm_scan_prologue): Don't dereference FP reg
1251         when on AAPCS.
1252
1253 2018-11-06  John Baldwin  <jhb@FreeBSD.org>
1254
1255         * riscv-fbsd-nat.c (getregs_supplies): Return true for
1256         RISCV_CSR_SSTATUS_REGNUM.
1257
1258 2018-11-04  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1259
1260         * source.c (open_source_file): Fix leak by transferring the
1261         current s->fullname to the unique_xmalloc_ptr fullname given
1262         to find_and_open_source.
1263
1264 2018-11-04  Tom Tromey  <tom@tromey.com>
1265
1266         * varobj.c (install_default_visualizer): Update.
1267         * python/python-internal.h (gdbpy_get_varobj_pretty_printer):
1268         Return gdbpy_ref.
1269         * python/py-prettyprint.c (search_pp_list): Return gdbpy_ref.
1270         (find_pretty_printer_from_progspace)
1271         (find_pretty_printer_from_gdb, find_pretty_printer)
1272         (gdbpy_get_varobj_pretty_printer): Return gdbpy_ref.
1273         (gdbpy_get_varobj_pretty_printer, gdbpy_default_visualizer):
1274         Update.
1275
1276 2018-11-04  Tom Tromey  <tom@tromey.com>
1277
1278         * python/python.c (gdbpy_parameter_value): Update.
1279         * python/python-internal.h (python_string_to_unicode)
1280         (python_string_to_target_python_string)
1281         (host_string_to_python_string): Return gdbpy_ref.
1282         * python/py-utils.c (python_string_to_unicode)
1283         (unicode_to_encoded_python_string)
1284         (unicode_to_target_python_string)
1285         (python_string_to_target_string)
1286         (python_string_to_target_python_string): Return gdbpy_ref.
1287         (python_string_to_host_string): Update.
1288         (host_string_to_python_string): Return gdbpy_ref.
1289         * python/py-symtab.c (stpy_get_filename, stpy_get_producer)
1290         (stpy_fullname): Update.
1291         * python/py-progspace.c (pspy_get_filename, pspy_solib_name):
1292         Update.
1293         * python/py-prettyprint.c (print_string_repr): Update.
1294         * python/py-objfile.c (objfpy_get_filename, objfpy_get_username)
1295         (objfpy_get_build_id): Update.
1296         * python/py-breakpoint.c (bppy_get_location)
1297         (bppy_get_expression, bppy_get_condition, bppy_get_commands):
1298         Update.
1299
1300 2018-11-04  Tom Tromey  <tom@tromey.com>
1301
1302         * python/python-internal.h (gdb_py_object_from_longest)
1303         (gdb_py_object_from_ulongest): Return gdbpy_ref.
1304         * python/py-value.c (valpy_int): Update.
1305         * python/py-utils.c (gdb_py_object_from_longest): Return
1306         gdbpy_ref.
1307         (gdb_py_object_from_ulongest): Likewise.
1308         * python/py-type.c (typy_get_alignof): Update.
1309         * python/py-linetable.c (ltpy_get_all_source_lines)
1310         (ltpy_entry_get_line, ltpy_entry_get_pc): Update.
1311         * python/py-block.c (blpy_get_start, blpy_get_end): Update.
1312
1313 2018-11-03  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1314
1315         * ada-lang.c (_initialize_ada_language): Fix typo.
1316
1317 2018-11-03  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1318
1319         * language.c (type): Remove.
1320         (_initialize_language): Remove assignment to type.
1321
1322 2018-11-02  Joel Brobecker  <brobecker@adacore.com>
1323
1324         * aarch64-ravenscar-thread.h, aarch64-ravenscar-thread.c: New files.
1325         * aarch64-tdep.c: #include "aarch64-ravenscar-thread.h".
1326         (aarch64_gdbarch_init): Add call to register_aarch64_ravenscar_ops.
1327         * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-ravenscar-thread.o.
1328         (HFILES_NO_SRCDIR): Add aarch64-ravenscar-thread.h.
1329         (ALLDEPFILES): Add aarch64-ravenscar-thread.c.
1330         * configure.tgt (cpu_obs) [aarch64*-*-*]: Add ravenscar-thread.o
1331         and aarch64-ravenscar-thread.o.
1332         * NEWS: Add entry documenting Ravenscar tasking support
1333         on AArch64 ELF.
1334
1335 2018-11-02  Matthew Malcomson  <matthew.malcomson@arm.com>
1336
1337         * symtab.c (info_functions_command): Initialize quiet flag.
1338         * stack.c (info_args_command): Likewise.
1339
1340 2018-11-01  Jim Wilson  <jimw@sifive.com>
1341
1342         * riscv-tdep.c (riscv_breakpoint_kind_from_pc): New local unaligned_p.
1343         Set if pcptr if unaligned.  Return 2 if unaligned_p true.  Update
1344         debugging messages.
1345
1346 2018-11-01  Joel Brobecker  <brobecker@adacore.com>
1347
1348         * ada-lang.c (ada_watch_location_expression): New function.
1349         (ada_language_defn): Set la_watch_location_expression to
1350         ada_watch_location_expression.
1351
1352 2018-11-01  Joel Brobecker  <brobecker@adacore.com>
1353
1354         * print-utils.c (int_string): Remove unnecessary trailing spaces.
1355
1356 2018-11-01  Joel Brobecker  <brobecker@adacore.com>
1357
1358         * rs6000-tdep.c (skip_prologue): Fix potential negative left
1359         shifting.
1360
1361 2018-11-01  Jerome Guitton  <guitton@adacore.com>
1362             Joel Brobecker  <brobecker@adacore.com>
1363
1364         * defs.h (enum gdb_osabi): Add GDB_OSABI_PIKEOS.
1365         * osabi.c (gdb_osabi_names): Add name for GDB_OSABI_PIKEOS.
1366         * arm-pikeos-tdep.c: New file.
1367         * configure.tgt: Add arm-pikeos-tdep.o to the case of ARM
1368         embedded system.
1369         * Makefile.in (ALL_TARGET_OBS): Add arm-pikeos-tdep.o.
1370
1371 2018-11-01  Simon Marchi  <simon.marchi@ericsson.com>
1372
1373         * common/pathstuff.c (get_standard_temp_dir): New.
1374         * common/pathstuff.h (get_standard_temp_dir): New.
1375         * config.in: Re-generate.
1376         * configure: Re-generate.
1377         * configure.ac: Don't check for mkdtemp.
1378         * gnulib/aclocal-m4-deps.mk: Re-generate.
1379         * gnulib/aclocal.m4: Re-generate.
1380         * gnulib/config.in: Re-generate.
1381         * gnulib/configure: Re-generate.
1382         * gnulib/import/Makefile.am: Re-generate.
1383         * gnulib/import/Makefile.in: Re-generate.
1384         * gnulib/import/m4/gnulib-cache.m4: Re-generate.
1385         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
1386         * gnulib/import/m4/mkdtemp.m4: New file.
1387         * gnulib/import/mkdtemp.c: New file.
1388         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES):
1389         Add mkdtemp module.
1390         * unittests/mkdir-recursive-selftests.c (test): Use
1391         get_standard_temp_dir.
1392         (_initialize_mkdir_recursive_selftests): Remove HAVE_MKDTEMP
1393         ifdef.
1394         * compile/compile.c (get_compile_file_tempdir): Likewise.
1395
1396 2018-11-01  Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
1397
1398         * rs6000-aix-tdep.c: Include "trad-frame.h" and "frame-unwind.h".
1399         (SIG_FRAME_LR_OFFSET64): New define.
1400         (SIG_FRAME_FP_OFFSET64): New define.
1401         (aix_sighandle_frame_cache): New Function.
1402         (aix_sighandle_frame_this_id): New Function.
1403         (aix_sighandle_frame_prev_register): New Function.
1404         (aix_sighandle_frame_sniffer): New Function.
1405         (aix_sighandle_frame_unwind): New global variable.
1406         (rs6000_aix_init_osabi): Install new frame unwinder.
1407
1408 2018-10-31  Sergio Durigan Junior  <sergiodj@redhat.com>
1409
1410         PR gdb/23835
1411         * common/common-defs.h: Don't redefine _FORTIFY_SOURCE if it's
1412         already defined.
1413
1414 2018-10-31  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1415
1416         * ppc-linux-nat.c: Include nat/linux-ptrace.h.
1417
1418 2018-10-31  Andrew Burgess  <andrew.burgess@embecosm.com>
1419
1420         * dwarf2read.c (struct dwarf2_cu): Add producer_is_icc field.
1421         (producer_is_icc): New function.
1422         (check_producer): Set producer_is_icc field on dwarf2_cu.
1423         (dwarf2_init_integer_type): New function.
1424         (read_base_type): Call dwarf2_init_integer_type instead of
1425         init_integer_type in all cases.
1426         (dwarf2_cu::dwarf2_cu): Initialise producer_is_icc field.
1427         * valprint.c (maybe_negate_by_bytes): Add an assertion that the
1428         LEN is greater than 0.
1429
1430 2018-10-30  Tom Tromey  <tom@tromey.com>
1431
1432         * main.c (captured_main_1): Check return value of bfd_init.
1433
1434 2018-10-29  Sergio Durigan Junior  <sergiodj@redhat.com>
1435
1436         * common/offset-type.h (DEFINE_OFFSET_REL_OP): Delete.
1437         Adjust comments.
1438
1439 2018-10-29  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1440
1441         * procfs.c: Include common/pathstuff.h.
1442
1443 2018-10-28  Andrew Burgess  <andrew.burgess@embecosm.com>
1444
1445         * riscv-linux-nat.c (riscv_linux_nat_target::fetch_registers):
1446         Add missing braces.  No functional change.
1447
1448 2018-10-27  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1449
1450         * macrocmd.c (info_macro_command): Use report_unrecognized_option_error
1451         to report a bad option and fix indentation.
1452         * demangle.c (demangle_command): Use report_unrecognized_option_error
1453         to report a bad option and correctly report the bad option.
1454
1455 2018-10-27  Tom Tromey  <tom@tromey.com>
1456
1457         PR cli/23364:
1458         * darwin-nat.c (copied_shell): New global.
1459         (may_have_sip): Rename from should_disable_startup_with_shell.
1460         (copy_shell_to_cache, maybe_cache_shell): New functions.
1461         (darwin_nat_target::create_inferior): Update.  Use
1462         copied_shell.
1463
1464 2018-10-27  Tom Tromey  <tom@tromey.com>
1465
1466         * unittests/scoped_fd-selftests.c (test_to_file): New function.
1467         (run_tests): Call test_to_file.
1468         * dwarf-index-write.c (write_psymtabs_to_index): Do not reopen
1469         temporary files.
1470         * common/scoped_fd.h (scoped_fd::to_file): New method.
1471
1472 2018-10-27  Tom Tromey  <tom@tromey.com>
1473
1474         * unittests/scoped_mmap-selftests.c (test_normal): Use
1475         gdb_mkostemp_cloexec.
1476         * unittests/scoped_fd-selftests.c (test_destroy, test_release):
1477         Use gdb_mkostemp_cloexec.
1478         * gnulib/aclocal-m4-deps.mk, gnulib/aclocal.m4,
1479         gnulib/config.in, gnulib/configure,
1480         gnulib/import/Makefile.am, gnulib/import/Makefile.in,
1481         gnulib/import/m4/gnulib-cache.m4,
1482         gnulib/import/m4/gnulib-comp.m4: Update.
1483         * gnulib/import/m4/mkostemp.m4: New file.
1484         * gnulib/import/m4/mkstemp.m4: Remove.
1485         * gnulib/import/mkostemp.c: New file.
1486         * gnulib/import/mkstemp.m4: Remove.
1487         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Remove
1488         mkstemp, add mkostemp.  Apply new patch.
1489         * gnulib/import/stdlib.in.h: Apply patch.
1490         * gnulib/patches/0002-mkostemp-mkostemps-Fix-compilation-error-in-C-mode-o.patch:
1491         New file.
1492         * dwarf-index-write.c (write_psymtabs_to_index): Use
1493         gdb_mkostemp_cloexec.
1494         * common/filestuff.h (gdb_mkostemp_cloexec): New function.
1495
1496 2018-10-27  Tom Tromey  <tom@tromey.com>
1497
1498         * unittests/mkdir-recursive-selftests.c: New file.
1499         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1500         unittests/mkdir-recursive-selftests.c.
1501         * dwarf-index-cache.c (mkdir_recursive): Move to
1502         common/filestuff.c.
1503         (index_cache::store): Check return value of mkdir_recursive.
1504         (create_dir_and_check, test_mkdir_recursive): Move to new file.
1505         (_initialize_index_cache): Don't register test.
1506         * common/filestuff.h (mkdir_recursive): Declare.
1507         * common/filestuff.c (mkdir_recursive): Move from
1508         dwarf-index-cache.c.  Return bool.
1509
1510 2018-10-27  Tom Tromey  <tom@tromey.com>
1511
1512         * dwarf-index-write.c (write_psymtabs_to_index): Move
1513         make_temp_filename to common/pathstuff.c.
1514         * common/pathstuff.h (make_temp_filename): Declare.
1515         * common/pathstuff.c (make_temp_filename): New function, moved
1516         from dwarf-index-write.c.
1517
1518 2018-10-27  Tom Tromey  <tom@tromey.com>
1519
1520         * procfs.c (procfs_target::create_inferior): Use get_shell.
1521         * cli/cli-cmds.c (shell_escape): Use get_shell.
1522         * windows-nat.c (windows_nat_target::create_inferior): Use
1523         get_shell.
1524         * common/pathstuff.c (get_shell): New function.
1525         * nat/fork-inferior.c (SHELL_FILE, get_startup_shell): Remove.
1526         (fork_inferior): Use get_shell.
1527         * common/pathstuff.h (get_shell): Declare.
1528
1529 2018-10-27  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1530
1531         * NEWS: Mention changes to 'info [args|functions|locals|variables]'
1532
1533 2018-10-27  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1534
1535         * stack.c (print_variable_and_value_data): Add preg and treg.
1536         (print_frame_local_vars): Add quiet, regexp and t_regexp arguments,
1537         and update callers.
1538         (print_frame_arg_vars): Likewise.
1539         (prepare_reg): New function.
1540         (info_locals_command): Extract info print args and use them.
1541         (info_args_command): Likewise.
1542         (_initialize_stack): Modify on-line help.
1543         * symtab.c (treg_matches_sym_type_name): New function.
1544         (search_symbols): New arg t_regexp.
1545         (symtab_symbol_info): New args quiet, regexp, t_regexp.
1546         (info_variables_command): Extract info print args and use them.
1547         (info_functions_command): Likewise.
1548         (info_types_command): Update call to symtab_symbol_info.
1549         (_initialize_symtab): Modify on-line help.
1550         * symtab.h (treg_matches_sym_type_name): New function.
1551         (search_symbols): New t_regexp arg.
1552
1553 2018-10-27  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1554
1555         * cli-utils.c (extract_arg_maybe_quoted): New function.
1556         (extract_info_print_args): New function.
1557         (info_print_args_help): New function.
1558         (report_unrecognized_option_error): New function.
1559         * cli-utils.h (extract_arg_maybe_quoted): New function.
1560         (extract_info_print_args): New function.
1561         (info_print_args_help): New function.
1562         (report_unrecognized_option_error): New function.
1563
1564 2018-10-26  Tom Tromey  <tom@tromey.com>
1565
1566         * dwarf2read.c (recursively_compute_inclusions): Use std::vector.
1567         (compute_compunit_symtab_includes): Update.
1568         * symtab.h: (symtab_ptr): Remove typedef.  Don't define a VEC.
1569         (compunit_symtab_ptr): Likewise.
1570
1571 2018-10-26  John Baldwin  <jhb@FreeBSD.org>
1572
1573         * fbsd-tdep.c (fbsd_print_auxv_entry): Only use
1574         default_print_auxv_entry for specific tag values.
1575
1576 2018-10-26  John Baldwin  <jhb@FreeBSD.org>
1577
1578         * fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_FREEBSD_HWCAP2.
1579
1580 2018-10-26  Jim Wilson  <jimw@sifive.com>
1581
1582         * riscv-linux-tdep.c: Include tramp-frame.h and trad-frame.h.
1583         (riscv_linux_sigframe_init): Declare.
1584         (RISCV_INST_LI_A7_SIGRETURN, RISCV_INT_ECALL): New.
1585         (riscv_linux_sigframe): New.
1586         (SIGFRAME_SIGINFO_SIZE, UCONTEXT_MCONTEXT_OFFSET): New.
1587         (riscv_linux_sigframe_init): Define.
1588         (riscv_linux_init_abi): Call tramp_frame_prepend_unwinder.
1589
1590         * riscv-tdep.c (riscv_isa_xlen): Refer to riscv-tdep.h comment.
1591         (riscv_isa_flen): Likewise.  Drop static.
1592         * riscv-tdep.h (riscv_isa_xlen): Move riscv-tdep.c comment to here.
1593         (riscv_isa_flen): Likewise.  Declare.
1594
1595 2018-10-26  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
1596             Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1597
1598         * arch/ppc-linux-tdesc.h (tdesc_powerpc_isa207_htm_vsx32l)
1599         (tdesc_powerpc_isa207_htm_vsx64l): Declare.
1600         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_TM_SPRREGSET)
1601         (PPC32_LINUX_SIZEOF_CGPRREGSET, PPC64_LINUX_SIZEOF_CGPRREGSET)
1602         (PPC_LINUX_SIZEOF_CFPRREGSET, PPC_LINUX_SIZEOF_CVMXREGSET)
1603         (PPC_LINUX_SIZEOF_CVSXREGSET, PPC_LINUX_SIZEOF_CPPRREGSET)
1604         (PPC_LINUX_SIZEOF_CDSCRREGSET, PPC_LINUX_SIZEOF_CTARREGSET):
1605         Define.
1606         (struct ppc_linux_features) <htm>: New field.
1607         (ppc_linux_no_features): Add initializer for htm field.
1608         * arch/ppc-linux-common.c (ppc_linux_match_description): Return
1609         new tdescs.
1610         * nat/ppc-linux.h (PPC_FEATURE2_HTM, NT_PPC_TM_CGPR)
1611         (NT_PPC_TM_CFPR, NT_PPC_TM_CVMX, NT_PPC_TM_CVSX)
1612         (NT_PPC_TM_SPR, NT_PPC_TM_CTAR, NT_PPC_TM_CPPR, NT_PPC_TM_CDSCR):
1613         Define if not already defined.
1614         * features/Makefile (WHICH): Add rs6000/powerpc-isa207-htm-vsx32l
1615         and rs6000/powerpc-isa207-htm-vsx64l.
1616         (XMLTOC): Add rs6000/powerpc-isa207-htm-vsx32l.xml and
1617         rs6000/powerpc-isa207-htm-vsx64l.xml.
1618         * features/rs6000/power-htm-spr.xml: New file.
1619         * features/rs6000/power-htm-core.xml: New file.
1620         * features/rs6000/power64-htm-core.xml: New file.
1621         * features/rs6000/power-htm-fpu.xml: New file.
1622         * features/rs6000/power-htm-altivec.xml: New file.
1623         * features/rs6000/power-htm-vsx.xml: New file.
1624         * features/rs6000/power-htm-ppr.xml: New file.
1625         * features/rs6000/power-htm-dscr.xml: New file.
1626         * features/rs6000/power-htm-tar.xml: New file.
1627         * features/rs6000/powerpc-isa207-htm-vsx32l.xml: New file.
1628         * features/rs6000/powerpc-isa207-htm-vsx64l.xml: New file.
1629         * features/rs6000/powerpc-isa207-htm-vsx32l.c: Generate.
1630         * features/rs6000/powerpc-isa207-htm-vsx64l.c: Generate.
1631         * regformats/rs6000/powerpc-isa207-htm-vsx32l.dat: Generate.
1632         * regformats/rs6000/powerpc-isa207-htm-vsx64l.dat: Generate.
1633         * ppc-linux-nat.c (fetch_register, fetch_ppc_registers): Call
1634         fetch_regset with HTM regsets.
1635         (store_register, store_ppc_registers): Call store_regset with HTM
1636         regsets.
1637         (ppc_linux_nat_target::read_description): Set htm field in the
1638         features struct if needed.
1639         * ppc-linux-tdep.c: Include
1640         features/rs6000/powerpc-isa207-htm-vsx32l.c and
1641         features/rs6000/powerpc-isa207-htm-vsx64l.c.
1642         (ppc32_regmap_tm_spr, ppc32_regmap_cgpr, ppc64_le_regmap_cgpr)
1643         (ppc64_be_regmap_cgpr, ppc32_regmap_cfpr, ppc32_le_regmap_cvmx)
1644         (ppc32_be_regmap_cvmx, ppc32_regmap_cvsx, ppc32_regmap_cppr)
1645         (ppc32_regmap_cdscr, ppc32_regmap_ctar): New globals.
1646         (ppc32_linux_tm_sprregset, ppc32_linux_cgprregset)
1647         (ppc64_be_linux_cgprregset, ppc64_le_linux_cgprregset)
1648         (ppc32_linux_cfprregset, ppc32_le_linux_cvmxregset)
1649         (ppc32_be_linux_cvmxregset, ppc32_linux_cvsxregset)
1650         (ppc32_linux_cpprregset, ppc32_linux_cdscrregset)
1651         (ppc32_linux_ctarregset): New globals.
1652         (ppc_linux_cgprregset, ppc_linux_cvmxregset): New functions.
1653         (ppc_linux_collect_core_cpgrregset): New function.
1654         (ppc_linux_iterate_over_regset_sections): Call back with the htm
1655         regsets.
1656         (ppc_linux_core_read_description): Check if the tm spr section is
1657         present and set htm in the features struct.
1658         (_initialize_ppc_linux_tdep): Call
1659         initialize_tdesc_powerpc_isa207_htm_vsx32l and
1660         initialize_tdesc_powerpc_isa207_htm_vsx64l.
1661         * ppc-linux-tdep.h (ppc_linux_cgprregset, ppc_linux_cvmxregset):
1662         Declare.
1663         (ppc32_linux_tm_sprregset, ppc32_linux_cfprregset)
1664         (ppc32_linux_cvsxregset, ppc32_linux_cpprregset)
1665         (ppc32_linux_cdscrregset, ppc32_linux_ctarregset): Declare.
1666         * ppc-tdep.h (struct gdbarch_tdep) <have_htm_spr, have_htm_core>:
1667         New fields.
1668         <have_htm_fpu, have_htm_altivec, have_htm_vsx>:
1669         Likewise.
1670         <ppc_cppr_regnum, ppc_cdscr_regnum, ppc_ctar_regnum>: Likewise.
1671         <ppc_cdl0_regnum, ppc_cvsr0_regnum, ppc_cefpr0_regnum>: Likewise.
1672         (enum) <PPC_TFHAR_REGNUM, PPC_TEXASR_REGNUM, PPC_TFIAR_REGNUM>:
1673         New enum fields.
1674         <PPC_CR0_REGNUM, PPC_CCR_REGNUM, PPC_CXER_REGNUM>: Likewise.
1675         <PPC_CLR_REGNUM, PPC_CCTR_REGNUM, PPC_CF0_REGNUM>: Likewise.
1676         <PPC_CFPSCR_REGNUM, PPC_CVR0_REGNUM, PPC_CVSCR_REGNUM>: Likewise.
1677         <PPC_CVRSAVE_REGNUM, PPC_CVSR0_UPPER_REGNUM>: Likewise.
1678         <PPC_CPPR_REGNUM, PPC_CDSCR_REGNUM>: Likewise.
1679         <PPC_CTAR_REGNUM>: Likewise.
1680         (PPC_IS_TMSPR_REGNUM, PPC_IS_CKPTGP_REGNUM, PPC_IS_CKPTFP_REGNUM)
1681         (PPC_IS_CKPTVMX_REGNUM, PPC_IS_CKPTVSX_REGNUM): Define.
1682         * rs6000-tdep.c (IS_CDFP_PSEUDOREG, IS_CVSX_PSEUDOREG)
1683         (IS_CEFP_PSEUDOREG): Define.
1684         (rs6000_register_name): Hide the upper halves of checkpointed VSX
1685         registers.  Return names for the checkpointed DFP, VSX, and EFP
1686         pseudo registers.
1687         (rs6000_pseudo_register_type): Remove initial assert and raise an
1688         internal error in the else clause instead.  Return types for the
1689         checkpointed DFP, VSX, and EFP pseudo registers.
1690         (dfp_pseudo_register_read, dfp_pseudo_register_write): Handle
1691         checkpointed DFP pseudo registers.
1692         (vsx_pseudo_register_read, vsx_pseudo_register_write): Handle
1693         checkpointed VSX pseudo registers.
1694         (efp_pseudo_register_read, efp_pseudo_register_write): Rename
1695         from efpr_pseudo_register_read and
1696         efpr_pseudo_register_write.  Handle checkpointed EFP pseudo
1697         registers.
1698         (rs6000_pseudo_register_read, rs6000_pseudo_register_write):
1699         Handle checkpointed DFP, VSX, and EFP registers.
1700         (dfp_ax_pseudo_register_collect, vsx_ax_pseudo_register_collect)
1701         (efp_ax_pseudo_register_collect): New functions.
1702         (rs6000_ax_pseudo_register_collect): Move DFP, VSX and EFP pseudo
1703         register logic to new functions.  Handle checkpointed DFP, VSX,
1704         and EFP pseudo registers.
1705         (rs6000_gdbarch_init): Look for and validate the htm features.
1706         Include checkpointed DFP, VSX and EFP pseudo-registers.
1707         * NEWS: Mention access to PPR, DSCR, TAR, EBB/PMU registers and
1708         HTM registers.
1709
1710 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1711
1712         * rs6000-tdep.c (rs6000_gdbarch_init): Reject tdescs with vsx but
1713         without altivec or fpu.
1714
1715 2018-10-26  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
1716             Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1717
1718         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_EBBREGSET)
1719         (PPC_LINUX_SIZEOF_PMUREGSET): Declare.
1720         * nat/ppc-linux.h (PPC_FEATURE2_EBB, NT_PPC_EBB, NT_PPC_PMU):
1721         Define if not already defined.
1722         * features/rs6000/power-ebb.xml: New file.
1723         * features/rs6000/power-linux-pmu.xml: New file.
1724         * features/rs6000/powerpc-isa207-vsx32l.xml: Include ebb and pmu
1725         features.
1726         * features/rs6000/powerpc-isa207-vsx64l.xml: Likewise.
1727         * features/rs6000/powerpc-isa207-vsx32l.c: Re-generate.
1728         * features/rs6000/powerpc-isa207-vsx64l.c: Re-generate.
1729         * regformats/rs6000/powerpc-isa207-vsx32l.dat: Re-generate.
1730         * regformats/rs6000/powerpc-isa207-vsx64l.dat: Re-generate.
1731         * ppc-linux-nat.c (fetch_register, fetch_ppc_registers): Call
1732         fetch_regset with ebb and pmu regsets.
1733         (store_register, store_ppc_registers): Call store_regset with ebb
1734         and pmu regsets.
1735         (ppc_linux_nat_target::read_description): Set isa207 field in the
1736         features struct if ebb and pmu are avaiable.
1737         * ppc-linux-tdep.c (ppc32_regmap_ebb, ppc32_regmap_pmu)
1738         (ppc32_linux_ebbregset, ppc32_linux_pmuregset): New globals.
1739         (ppc_linux_iterate_over_regset_sections): Call back with the ebb
1740         and pmu regsets.
1741         (ppc_linux_core_read_description): Check if the pmu section is
1742         present and set isa207 in the features struct.
1743         * ppc-linux-tdep.h (ppc32_linux_ebbregset)
1744         (ppc32_linux_pmuregset): Declare.
1745         * ppc-tdep.h (struct gdbarch_tdep) <ppc_mmcr0_regnum>: New field.
1746         <ppc_mmcr2_regnum, ppc_siar_regnum, ppc_sdar_regnum>: New fields.
1747         <ppc_sier_regnum>: New field.
1748         (enum): <PPC_BESCR_REGNUM, PPC_EBBHR_REGNUM, PPC_EBBRR_REGNUM>:
1749         New enum values.
1750         <PPC_MMCR0_REGNUM, PPC_MMCR2_REGNUM, PPC_SIAR_REGNUM>: New enum
1751         values.
1752         <PPC_SDAR_REGNUM, PPC_SIER_REGNUM>: New enum values.
1753         (PPC_IS_EBB_REGNUM, PPC_IS_PMU_REGNUM): Define.
1754         * rs6000-tdep.c (rs6000_gdbarch_init): Look for and validate the
1755         ebb and pmu features.
1756
1757 2018-10-26  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
1758             Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1759
1760         * arch/ppc-linux-tdesc.h (tdesc_powerpc_isa207_vsx32l)
1761         (tdesc_powerpc_isa207_vsx64l): Declare.
1762         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_TARREGSET): Define.
1763         (struct ppc_linux_features) <isa207>: New field.
1764         (ppc_linux_no_features): Add initializer for isa207 field.
1765         * arch/ppc-linux-common.c (ppc_linux_match_description): Return
1766         new tdescs.
1767         * nat/ppc-linux.h (PPC_FEATURE2_ARCH_2_07, PPC_FEATURE2_TAR)
1768         (NT_PPC_TAR): Define if not already defined.
1769         * features/Makefile (WHICH): Add rs6000/powerpc-isa207-vsx32l and
1770         rs6000/powerpc-isa207-vsx64l.
1771         (XMLTOC): Add rs6000/powerpc-isa207-vsx32l.xml and
1772         rs6000/powerpc-isa207-vsx64l.xml.
1773         * features/rs6000/power-tar.xml: New file.
1774         * features/rs6000/powerpc-isa207-vsx32l.xml: New file.
1775         * features/rs6000/powerpc-isa207-vsx64l.xml: New file.
1776         * features/rs6000/powerpc-isa207-vsx32l.c: Generate.
1777         * features/rs6000/powerpc-isa207-vsx64l.c: Generate.
1778         * regformats/rs6000/powerpc-isa207-vsx32l.dat: Generate.
1779         * regformats/rs6000/powerpc-isa207-vsx64l.dat: Generate.
1780         * ppc-linux-nat.c (fetch_register, fetch_ppc_registers): Call
1781         fetch_regset with the TAR regset.
1782         (store_register, store_ppc_registers): Call store_regset with the
1783         TAR regset.
1784         (ppc_linux_nat_target::read_description): Set isa207 field in the
1785         features struct if needed.
1786         * ppc-linux-tdep.c: Include
1787         features/rs6000/powerpc-isa207-vsx32l.c and
1788         features/rs6000/powerpc-isa207-vsx64l.c.
1789         (ppc32_regmap_tar, ppc32_linux_tarregset): New globals.
1790         (ppc_linux_iterate_over_regset_sections): Call back with the tar
1791         regset.
1792         (ppc_linux_core_read_description): Check if the tar section is
1793         present and set isa207 in the features struct.
1794         (_initialize_ppc_linux_tdep): Call
1795         initialize_tdesc_powerpc_isa207_vsx32l and
1796         initialize_tdesc_powerpc_isa207_vsx64l.
1797         * ppc-linux-tdep.h (ppc32_linux_tarregset): Declare.
1798         * ppc-tdep.h (gdbarch_tdep) <ppc_tar_regnum>: New field.
1799         (enum) <PPC_TAR_REGNUM>: New enum value.
1800         * rs6000-tdep.c (rs6000_gdbarch_init): Look for and validate tar
1801         feature.
1802         (ppc_process_record_op31): Record changes to TAR.
1803
1804 2018-10-26  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
1805             Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1806
1807         * arch/ppc-linux-tdesc.h (tdesc_powerpc_isa205_ppr_dscr_vsx32l)
1808         (tdesc_powerpc_isa205_ppr_dscr_vsx64l): Declare.
1809         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_PPRREGSET)
1810         (PPC_LINUX_SIZEOF_DSCRREGSET): Define.
1811         (struct ppc_linux_features) <ppr_dscr>: New field.
1812         (ppc_linux_no_features): Add initializer for ppr_dscr field.
1813         * arch/ppc-linux-common.c (ppc_linux_match_description): Return
1814         new tdescs.
1815         * nat/ppc-linux.h (PPC_FEATURE2_DSCR, NT_PPC_PPR, NT_PPC_DSCR):
1816         Define if not already defined.
1817         * features/Makefile (WHICH): Add
1818         rs6000/powerpc-isa205-ppr-dscr-vsx32l and
1819         rs6000/powerpc-isa205-ppr-dscr-vsx64l.
1820         (XMLTOC): Add rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml and
1821         rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml.
1822         * features/rs6000/power-dscr.xml: New file.
1823         * features/rs6000/power-ppr.xml: New file.
1824         * features/rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml: New file.
1825         * features/rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml: New file.
1826         * features/rs6000/powerpc-isa205-ppr-dscr-vsx32l.c: Generate.
1827         * features/rs6000/powerpc-isa205-ppr-dscr-vsx64l.c: Generate.
1828         * regformats/rs6000/powerpc-isa205-ppr-dscr-vsx32l.dat: Generate.
1829         * regformats/rs6000/powerpc-isa205-ppr-dscr-vsx64l.dat: Generate.
1830         * ppc-linux-nat.c: Include <sys/uio.h>.
1831         (fetch_regset, store_regset, check_regset): New functions.
1832         (fetch_register, fetch_ppc_registers): Call fetch_regset with
1833         DSCR and PPR regsets.
1834         (store_register, store_ppc_registers): Call store_regset with
1835         DSCR and PPR regsets.
1836         (ppc_linux_get_hwcap2): New function.
1837         (ppc_linux_nat_target::read_description): Call
1838         ppc_linux_get_hwcap2 and check_regset, set ppr_dscr field in the
1839         features struct if needed.
1840         * ppc-linux-tdep.c: Include
1841         features/rs6000/powerpc-isa205-ppr-dscr-vsx32l.c and
1842         features/rs6000/powerpc-isa205-ppr-dscr-vsx64l.c.
1843         (ppc32_regmap_ppr, ppc32_regmap_dscr, ppc32_linux_pprregset)
1844         (ppc32_linux_dscrregset): New globals.
1845         (ppc_linux_iterate_over_regset_sections): Call back with the ppr
1846         and dscr regsets.
1847         (ppc_linux_core_read_description): Check if the ppr and dscr
1848         sections are present and set ppr_dscr in the features struct.
1849         (_initialize_ppc_linux_tdep): Call
1850         initialize_tdesc_powerpc_isa205_ppr_dscr_vsx32l and
1851         initialize_tdesc_powerpc_isa205_ppr_dscr_vsx64l.
1852         * ppc-linux-tdep.h (ppc32_linux_pprregset)
1853         (ppc32_linux_dscrregset): Declare.
1854         * ppc-tdep.h (struct gdbarch_tdep) <ppc_ppr_regnum>: New field.
1855         <ppc_dscr_regnum>: New field.
1856         (enum) <PPC_PPR_REGNUM, PPC_DSCR_REGNUM>: New enum values.
1857         * rs6000-tdep.c (rs6000_gdbarch_init): Look for and validate ppr
1858         and dscr features.
1859         (ppc_process_record_op31): Record changes to PPR and DSCR.
1860
1861 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1862
1863         * rs6000-tdep.c (rs6000_gdbarch_init): Replace line wrapping by a
1864         second initializer line for the have_* variables.  Initialize
1865         have_fpu to 0 instead of 1.
1866
1867 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1868
1869         * arch/ppc-linux-common.c (ppc_linux_match_description):
1870         Parenthesize tdesc assignements and indent them properly.
1871
1872 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1873
1874         * ppc-linux-nat.c (fetch_register): Change if statement to else
1875         if.
1876         (store_register): Likewise.
1877
1878 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1879
1880         * rs6000-tdep.c: Remove reggroups.h include.
1881         (rs6000_pseudo_register_reggroup_p): Remove.
1882         (rs6000_gdbarch_init): Remove call to
1883         set_tdesc_pseudo_register_reggroup_p.
1884
1885 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1886
1887         * reggroups.c (default_register_reggroup_p): Return true for
1888         decfloat registers and float_reggroup.
1889
1890 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1891
1892         * ppc-linux-tdep.c (ppc_linux_collect_vrregset): Remove.
1893         (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): Replace
1894         ppc_linux_collect_vrregset by regcache_collect_regset.
1895
1896 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1897
1898         * linux-tdep.c (linux_collect_regset_section_cb): Use
1899         std::vector<gdb_byte> instead of char * and malloc for buf.
1900         Remove xfree.
1901
1902 2018-10-26  Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
1903
1904         * xcoffread.c (read_xcoff_symtab): Pass deduced language to
1905         symtab_start instead of always using language_unknown.
1906
1907 2018-10-26  Andrew Burgess  <andrew.burgess@embecosm.com>
1908
1909         * riscv-tdep.c (riscv_read_misa_reg): Update comment, remove
1910         READ_P parameter, catch and ignore register access errors from
1911         either the old or new MISA location.
1912         (riscv_has_feature): Update call to riscv_read_misa_reg.
1913
1914 2018-10-25  Andrew Burgess  <andrew.burgess@embecosm.com>
1915
1916         * python/py-function.c (convert_values_to_python): Return
1917         gdbpy_ref<>.  Add header comment.
1918         (fnpy_call): Adjust.
1919
1920 2018-10-25  Andrew Burgess  <andrew.burgess@embecosm.com>
1921
1922         * python/py-cmd.c (cmdpy_completer_helper): Return gdbpy_ref<>.
1923         (cmdpy_completer_handle_brkchars): Adjust.
1924         (cmdpy_completer): Adjust.
1925
1926 2018-10-25  Andrew Burgess  <andrew.burgess@embecosm.com>
1927
1928         * riscv-linux-nat.c (riscv_linux_nat_target::fetch_registers):
1929         Pass correct regnum to raw_supply_zeroed.
1930
1931 2018-10-23  Hafiz Abid Qadeer  <abidh@codesourcery.com>
1932
1933         * regcache.c (cooked_read_test): Add CSKY to the list of
1934         architectures with a save_reggroup
1935
1936 2018-10-23  Simon Marchi  <simon.marchi@polymtl.ca>
1937
1938         PR gdb/23368
1939         * infrun.c (follow_exec): In the follow_exec_mode_new case,
1940         transfer terminal state from old new new inferior.
1941         * terminal.h (swap_terminal_info): New function.
1942         * inflow.c (swap_terminal_info): New function.
1943
1944 2018-10-23  Tom Tromey  <tom@tromey.com>
1945
1946         * record-btrace.c (get_thread_current_frame_id): Rename from
1947         get_thread_current_frame.  Return a frame_id.
1948         (record_btrace_start_replaying): Update.
1949
1950 2018-10-23  Andrew Burgess  <andrew.burgess@embecosm.com>
1951
1952         * riscv-tdep.c (riscv_register_name): Use the user-friendly names
1953         for CSRs.
1954
1955 2018-10-23  Joel Brobecker  <brobecker@adacore.com>
1956
1957         * riscv-tdep.c (riscv_gdbarch_init): Set the gdbarch's
1958         have_nonsteppable_watchpoint attribute to 1.
1959
1960 2018-10-23  Andrew Burgess  <andrew.burgess@embecosm.com>
1961
1962         * riscv-tdep.c (riscv_gdb_reg_names): Update comment, and all
1963         register names.
1964         (struct register_alias): Rename to...
1965         (struct riscv_register_alias): ...this, and update comment.
1966         (riscv_register_aliases): Update type, and alias names.  Remove
1967         CSR names from this list.
1968         (riscv_register_name): Use riscv_gdb_reg_names for int and float
1969         register names.  Add an extra assertion.
1970         (riscv_is_regnum_a_named_csr): New function.
1971         (riscv_register_reggroup_p): Use riscv_is_regnum_a_named_csr.
1972
1973 2018-10-23  John Darrington  <john@darrington.wattle.id.au>
1974
1975         * configure.tgt: Add configuration for s12z.
1976         * s12z-tdep.c:  New file.
1977         * NEWS: Mention new target.
1978
1979 2018-10-22  Jim Wilson  <jimw@sifive.com>
1980
1981         * riscv-tdep.c (riscv_push_dummy_call) <in_reg>: Check for value in
1982         FP reg smaller than FP reg size, and fill with -1 instead of 0.
1983
1984         * riscv-tdep.c (riscv_fpreg_d_type, riscv_fpreg_q_type): New.
1985         (riscv_register_type): Use them.
1986         (riscv_print_one_register_info): Handle union of floats same as float.
1987         * riscv-tdep.h (struct gdbarch_tdep): Add riscv_fpreg_d_type and
1988         riscv_fpreg_q_type fields.
1989
1990 2018-10-21  Simon Marchi  <simon.marchi@ericsson.com>
1991
1992         * gdbarch.sh (gdbarch_num_cooked_regs): New.
1993         * gdbarch.h: Re-generate.
1994         * ax-gdb.c (gen_expr): Use gdbarch_num_cooked_regs.
1995         * dwarf2-frame.c (dwarf2_frame_cache): Likewise.
1996         * eval.c (evaluate_subexp_standard): Likewise.
1997         * findvar.c (value_of_register): Likewise.
1998         (value_of_register_lazy): Likewise.
1999         (address_from_register): Likewise.
2000         * frame.c (get_frame_register_bytes): Likewise.
2001         * gdbarch-selftests.c (register_to_value_test): Likewise.
2002         * h8300-tdep.c (h8300_register_type): Likewise.
2003         * i386-tdep.c (i386_dbx_reg_to_regnum): Likewise.
2004         (i386_svr4_reg_to_regnum): Likewise.
2005         * infcmd.c (default_print_registers_info): Likewise.
2006         (registers_info): Likewise.
2007         (print_vector_info): Likewise.
2008         (default_print_float_info): Likewise.
2009         * m68hc11-tdep.c (m68hc11_frame_unwind_cache): Likewise.
2010         * mdebugread.c (mdebug_reg_to_regnum): Likewise.
2011         * mi/mi-main.c (mi_cmd_data_list_register_names): Likewise.
2012         (mi_cmd_data_list_changed_registers): Likewise.
2013         (mi_cmd_data_list_register_values): Likewise.
2014         (mi_cmd_data_write_register_values): Likewise.
2015         (mi_cmd_trace_frame_collected): Likewise.
2016         * mips-tdep.c (print_gp_register_row): Likewise.
2017         (mips_print_registers_info): Likewise.
2018         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
2019         * regcache.c (init_regcache_descr): Likewise.
2020         (register_size): Likewise.
2021         (register_dump::dump): Likewise.
2022         (cooked_read_test): Likewise.
2023         (cooked_write_test): Likewise.
2024         * rs6000-tdep.c (rs6000_register_sim_regno): Likewise.
2025         (rs6000_gdbarch_init): Likewise.
2026         * stabsread.c (stab_reg_to_regnum): Likewise.
2027         * stack.c (info_frame_command): Likewise.
2028         * target-descriptions.c (tdesc_register_name): Likewise.
2029         * trad-frame.c (trad_frame_alloc_saved_regs): Likewise.
2030         * tui/tui-regs.c (tui_show_register_group): Likewise.
2031         * user-regs.c (user_reg_map_name_to_regnum): Likewise.
2032         (user_reg_map_regnum_to_name): Likewise.
2033         (value_of_user_reg): Likewise.
2034         (maintenance_print_user_registers): Likewise.
2035         * xtensa-tdep.c (xtensa_find_register_by_name): Likewise.
2036         (xtensa_register_name): Likewise.
2037         (xtensa_register_type): Likewise.
2038         (xtensa_reg_to_regnum): Likewise.
2039         (xtensa_pseudo_register_read): Likewise.
2040         (xtensa_pseudo_register_write): Likewise.
2041
2042 2018-10-21  Simon Marchi  <simon.marchi@polymtl.ca>
2043
2044         * amd64-tdep.c (amd64_pseudo_register_read_value): Use
2045         correctly-sized buffer with raw_read.
2046         (amd64_pseudo_register_write): Use correctly-sized buffer for
2047         raw_read/raw_write.
2048
2049 2018-10-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
2050
2051         * typeprint.c (_initialize_typeprint): Fix wrong prefixname arg
2052         in add_prefix_cmd of set print type.
2053
2054 2018-10-19  Tom Tromey  <tom@tromey.com>
2055
2056         PR tui/18388:
2057         * NEWS: Mention tabset deprecation.
2058         * tui/tui-win.c (tui_tab_width, internal_tab_width): New globals.
2059         (update_tab_width): New function.
2060         (tui_set_tab_width, tui_show_tab_width): New functions.
2061         (tui_set_tab_width_command): Use update_tab_width.
2062         (_initialize_tui_win): Move to end of file.  Deprecate "tabset".
2063         Add new "set tui tab-width" command.
2064         * tui/tui-source.c (tui_set_source_content): Update.
2065         * tui/tui-disasm.c (tui_set_disassem_content): Update.
2066         * tui/tui-data.h (tui_default_tab_len, tui_set_default_tab_len):
2067         Don't declare.
2068         (tui_tab_width): Declare.
2069         * tui/tui-data.c (default_tab_len, tui_default_tab_len)
2070         (tui_set_default_tab_len): Remove.
2071
2072 2018-10-19  Tom Tromey  <tom@tromey.com>
2073
2074         * tui/tui-io.h (key_is_start_sequence, key_is_end_sequence)
2075         (key_is_backspace, tui_getc): Don't declare.
2076         * tui/tui-io.c (key_is_start_sequence): Now static.
2077         (key_is_end_sequence, key_is_backspace): Remove.
2078         (tui_getc): Now static.
2079
2080 2018-10-19  Tom Tromey  <tom@tromey.com>
2081
2082         * symfile.c (reread_symbols): Clear "static_links".
2083
2084 2018-10-19  Alan Hayward  <alan.hayward@arm.com>
2085
2086         * aarch64-linux-tdep.c (AARCH64_SIGCONTEXT_RESERVED_SIZE): New
2087         define.
2088         (aarch64_linux_sigframe_init): Extra boundary checks.
2089
2090 2018-10-19  Andreas Arnez  <arnez@linux.ibm.com>
2091
2092         * s390-tdep.c (s390_pseudo_register_type): For v0-v15 don't yield
2093         the possibly non-existent tdesc type 'vec128', but the type of raw
2094         register v16 instead.
2095
2096 2018-10-19  Gary Benson <gbenson@redhat.com>
2097
2098         * cli/cli-interp.c (cli_interp::~cli_interp): New function.
2099
2100 2018-10-18  Sergio Durigan Junior  <sergiodj@redhat.com>
2101
2102         PR cli/23785
2103         * cli/cli-dump.c (restore_binary_file): Check if "file" is
2104         NULL.
2105
2106 2018-10-17  Paul Koning  <paul_koning@dell.com>
2107
2108         * charset.c (convert_between_encodings): Fix unsigned overflow.
2109
2110 2018-10-17  John Baldwin  <jhb@FreeBSD.org>
2111
2112         * fbsd-nat.c (fbsd_nat_target::info_proc) Use
2113         fbsd_info_proc_mappings_header and fbsd_info_proc_mappings_entry.
2114         * fbsd-tdep.c (fbsd_vm_map_entry_flags): Mark static.
2115         (fbsd_info_proc_mappings_header, fbsd_info_proc_mappings_entry):
2116         New functions.
2117         (fbsd_core_info_proc_mappings): Use fbsd_info_proc_mappings_header
2118         and fbsd_info_proc_mappings_header.
2119         * fbsd-tdep.h (fbsd_vm_map_entry_flags): Remove.
2120         (fbsd_info_proc_mappings_header, fbsd_info_proc_mappings_entry):
2121         New.
2122
2123 2018-10-17  Joel Brobecker  <brobecker@adacore.com>
2124
2125         * MAINTAINERS (Responsible Maintainers): Add Rainer Orth as
2126         Solaris Maintainer.
2127
2128 2018-10-15  Tom Tromey  <tom@tromey.com>
2129
2130         * tui/tui.c (strcat_to_buf): Remove casts.
2131         * tui/tui-winsource.c (tui_show_source_line)
2132         (tui_set_is_exec_point_at, tui_line_is_displayed): Remove casts.
2133         * tui/tui-wingeneral.c (tui_refresh_win, box_win): Remove casts.
2134         * tui/tui-windata.c (tui_first_data_item_displayed)
2135         (tui_delete_data_content_windows, tui_erase_data_content)
2136         (tui_display_all_data, tui_display_data_from)
2137         (tui_refresh_data_win, tui_vertical_data_scroll): Remove casts.
2138         * tui/tui-win.c (tui_set_win_height)
2139         (make_invisible_and_set_new_height, parse_scrolling_args): Remove
2140         casts.
2141         * tui/tui-win.c (tui_resize_all): Remove casts.
2142         (tui_scroll_backward_command, tui_set_focus)
2143         (tui_set_tab_width_command): Likewise.
2144         * tui/tui-source.c (tui_vertical_source_scroll): Remove cast.
2145         * tui/tui-regs.c (tui_show_register_group): Remove cast.
2146         * tui/tui-layout.c (tui_set_layout_by_name): Remove cast.
2147         * tui/tui-disasm.c (tui_vertical_disassem_scroll): Remove cast.
2148         * tui/tui-data.c (tui_partial_win_by_name, tui_free_win_content):
2149         Remove casts.
2150
2151 2018-10-15  Simon Marchi  <simon.marchi@ericsson.com>
2152
2153         * MAINTAINERS (Responsible Maintainers): Add Alan Hayward as
2154         AArch64/ARM maintainer.
2155
2156 2018-10-11  Gary Benson <gbenson@redhat.com>
2157
2158         * interps.h (interp::m_name): Make private and mutable.
2159         * interps.c (interp::~interp): Free m_name.
2160
2161 2018-10-10  Sergio Durigan Junior  <sergiodj@redhat.com>
2162             Simon Marchi <simark@simark.ca>
2163
2164         * README (`configure' options): Add documentation for new
2165         "--enable-unit-tests" option.
2166         * acinclude.m4: Include "selftest.m4".
2167         * configure: Regenerate.
2168         * configure.ac: Use "GDB_AC_SELFTEST".
2169         * maint.c (maintenance_selftest): Update message informing
2170         that selftests have been disabled.
2171         (maintenance_info_selftests): Likewise.
2172         * selftest.m4: New file.
2173
2174 2018-10-10  Gary Benson <gbenson@redhat.com>
2175
2176         * remote.c (remote_target::remote_send_printf): Add
2177         missing va_end found by Coverity.
2178
2179 2018-10-10  Markus Metzger  <markus.t.metzger@intel.com>
2180
2181         * btrace.c (ftrace_update_function): Add indirect jump heuristic.
2182
2183 2018-10-09  Tom Tromey  <tom@tromey.com>
2184
2185         * configure: Rebuild.
2186         * sanitize.m4 (AM_GDB_UBSAN): Default to no.
2187         * NEWS: Update --enable-ubsan documentation.
2188
2189 2018-10-09  Gary Benson <gbenson@redhat.com>
2190
2191         * dwarf2read.c (create_dwp_hash_table): Fix buffer overrun
2192         found by Coverity.
2193
2194 2018-10-08  Tom Tromey  <tom@tromey.com>
2195
2196         * riscv-fbsd-tdep.c (riscv_fbsd_sigframe_init): Remove unused
2197         variable.
2198         (riscv_fbsd_init_abi): Likewise.
2199
2200 2018-10-08  Weimin Pan  <weimin.pan@oracle.com>
2201         * valops.c (value_struct_elt_for_reference): Rename local variable
2202         to work around the shadowing a previous local warning.
2203
2204 2018-10-08  John Baldwin  <jhb@FreeBSD.org>
2205
2206         * Makefile.in (ALLDEPFILES): Add riscv-fbsd-nat.c.
2207         * NEWS: Mention new FreeBSD/riscv native configuration.
2208         * configure.host: Add riscv*-*-freebsd*.
2209         * configure.nat: Likewise.
2210         * riscv-fbsd-nat.c: New file.
2211
2212 2018-10-08  John Baldwin  <jhb@FreeBSD.org>
2213
2214         * Makefile.in (ALL_TARGET_OBS): Add riscv-fbsd-tdep.o.
2215         (HFILES_NO_SRCDIR): Add riscv-fbsd-tdep.h.
2216         (ALLDEPFILES): Add riscv-fbsd-tdep.c.
2217         * NEWS: Mention new FreeBSD/riscv target.
2218         * configure.tgt: Add riscv*-*-freebsd*.
2219         * riscv-fbsd-tdep.c: New file.
2220         * riscv-fbsd-tdep.h: New file.
2221
2222 2018-10-08  John Baldwin  <jhb@FreeBSD.org>
2223
2224         * regcache.h (struct regcache_map_entry): Note that this type can
2225         be used with traditional frame caches.
2226         * trad-frame.c (trad_frame_set_reg_regmap): New.
2227         * trad-frame.h (trad_frame_set_reg_regmap): New.
2228
2229 2018-10-08  Weimin Pan  <weimin.pan@oracle.com>
2230
2231         PR c++/16841
2232         * valops.c (get_virtual_base_offset): New function.
2233         (value_struct_elt_for_reference): Use it to get virtual base offset
2234         and add it in calculating class member address.
2235
2236 2018-10-08  John Darrington  <john@darrington.wattle.id.au>
2237
2238         * dwarf2read.c (dwarf2_cu) <producer_is_codewarrior>: New field.
2239         (check_producer): Check if the producer is codewarrior.
2240         (producer_is_codewarrior): New function.
2241         (lnp_state_machine::record_line): Ignore is_stmt flag for records
2242         produced by codewarrior.
2243         (dwarf2_cu::dwarf2_cu): Initialize producer_is_codewarrior.
2244
2245 2018-10-06  Tom Tromey  <tom@tromey.com>
2246
2247         PR python/19399:
2248         * python/py-inferior.c: Add "architecture" entry.
2249         (infpy_architecture): New function.
2250
2251 2018-10-06  Tom Tromey  <tom@tromey.com>
2252
2253         PR python/21765:
2254         * python/py-symbol.c (gdbpy_initialize_symbols): Redefine
2255         SYMBOL_VARIABLES_DOMAIN, SYMBOL_FUNCTIONS_DOMAIN,
2256         SYMBOL_TYPES_DOMAIN.  Define SYMBOL_MODULE_DOMAIN,
2257         SYMBOL_COMMON_BLOCK_DOMAIN, SYMBOL_LOC_COMMON_BLOCK.
2258
2259 2018-10-06  Tom Tromey  <tom@tromey.com>
2260
2261         PR build/17077:
2262         * Makefile.in (OPCODES_CFLAGS): Remove "-I$(OPCODES_SRC)/..".
2263         * arc-tdep.c, frv-tdep.c, lm32-tdep.c, mep-tdep.c,
2264         microblaze-tdep.c, or1k-tdep.h: Use ../opcodes, not opcodes, in
2265         #include.
2266
2267 2018-10-06  Tom Tromey  <tom@tromey.com>
2268
2269         * python/py-breakpoint.c (bppy_get_location): Handle a
2270         bp_breakpoint without a location.
2271
2272 2018-10-06  Tom Tromey  <tom@tromey.com>
2273
2274         * python/lib/gdb/function/strfns.py (_MemEq, _StrLen, _StrEq)
2275         (_RegEx): Reformat help text.
2276         * python/lib/gdb/function/caller_is.py (CallerIs, CallerMatches)
2277         (AnyCallerIs, AnyCallerMatches): Reformat help text.
2278         * python/lib/gdb/function/as_string.py (_AsString): Reformat help
2279         text.
2280         * python/lib/gdb/command/xmethods.py (InfoXMethod)
2281         (EnableXMethod, DisableXMethod): Remove help indentation.
2282         Capitalize meta-syntactic variables.
2283         * python/lib/gdb/command/unwinders.py (InfoUnwinder)
2284         (EnableUnwinder, DisableUnwinder): Remove help indentation.
2285         Capitalize meta-syntactic variables.
2286         * python/lib/gdb/command/explore.py (ExploreCommand)
2287         (ExploreValueCommand, ExploreTypeCommand): Reformat help text.
2288         * python/lib/gdb/command/type_printers.py (InfoTypePrinter)
2289         (EnableTypePrinter, DisableTypePrinter): Remove help indentation.
2290         * python/lib/gdb/command/pretty_printers.py (InfoPrettyPrinter):
2291         Remove help indentation.
2292         (EnablePrettyPrinter, DisablePrettyPrinter): Likewise.
2293         * python/lib/gdb/command/frame_filters.py (EnableFrameFilter)
2294         (DisableFrameFilter, SetFrameFilterPriority)
2295         (ShowFrameFilterPriority, InfoFrameFilter): Reword help text.
2296
2297 2018-10-06  Tom Tromey  <tom@tromey.com>
2298
2299         PR tui/28819:
2300         * tui/tui-io.c (gdb_wgetch): New function.
2301         (tui_mld_getc, tui_getc): Use it.
2302
2303 2018-10-05  Tom Tromey  <tom@tromey.com>
2304
2305         * sol-thread.c (sol_thread_target::wait): Rename inner
2306         "save_ptid".
2307
2308 2018-10-04  Tom Tromey  <tom@tromey.com>
2309
2310         * configure: Rebuild.
2311         * warning.m4 (AM_GDB_WARNINGS): Add -Wshadow=local.
2312
2313 2018-10-04  Tom Tromey  <tom@tromey.com>
2314
2315         * guile/scm-frame.c (gdbscm_frame_read_var): Remove inner
2316         declaration of "block".
2317
2318 2018-10-04  Tom Tromey  <tom@tromey.com>
2319
2320         * common/filestuff.c (fdwalk): Remove inner declaration of
2321         "result".
2322
2323 2018-10-04  Tom Tromey  <tom@tromey.com>
2324
2325         * msp430-tdep.c (msp430_push_dummy_call): Rename inner
2326         "structs_addr" and hoist declaration.
2327
2328 2018-10-04  Tom Tromey  <tom@tromey.com>
2329
2330         * linux-tdep.c (linux_make_mappings_corefile_notes): Introduce new
2331         variable "size".
2332
2333 2018-10-04  Tom Tromey  <tom@tromey.com>
2334
2335         * mdebugread.c (parse_partial_symbols): Use std::string.
2336
2337 2018-10-04  Tom Tromey  <tom@tromey.com>
2338
2339         * ctf.c (SET_ARRAY_FIELD): Rename "u32".
2340         * p-valprint.c (pascal_val_print): Split inner "i" variable.
2341         * xtensa-tdep.c (xtensa_push_dummy_call): Declare "i" in loop
2342         header.
2343         * xstormy16-tdep.c (xstormy16_push_dummy_call): Declare "val" in
2344         more inner scope.
2345         * xcoffread.c (read_xcoff_symtab): Rename inner "symbol".
2346         * varobj.c (varobj_update): Rename inner "newobj",
2347         "type_changed".
2348         * valprint.c (generic_emit_char): Rename inner "buf".
2349         * valops.c (find_overload_match): Rename inner "temp".
2350         (value_struct_elt_for_reference): Declare "v" in more inner
2351         scope.
2352         * v850-tdep.c (v850_push_dummy_call): Rename "len".
2353         * unittests/array-view-selftests.c (run_tests): Rename inner
2354         "vec".
2355         * tui/tui-stack.c (tui_show_frame_info): Declare "i" in loop
2356         header.
2357         * tracepoint.c (merge_uploaded_trace_state_variables): Declare
2358         "tsv" in more inner scope.
2359         (print_one_static_tracepoint_marker): Rename inner
2360         "tuple_emitter".
2361         * tic6x-tdep.c (tic6x_analyze_prologue): Declare "inst" lower.
2362         (tic6x_push_dummy_call): Don't redeclare "addr".
2363         * target-float.c: Declare "dto" lower.
2364         * symtab.c (lookup_local_symbol): Rename inner "sym".
2365         (find_pc_sect_line): Rename inner "pc".
2366         * stack.c (print_frame): Don't redeclare "gdbarch".
2367         (return_command): Rename inner "gdbarch".
2368         * s390-tdep.c (s390_prologue_frame_unwind_cache): Renam inner
2369         "sp".
2370         * rust-lang.c (rust_internal_print_type): Declare "i" in loop
2371         header.
2372         * rs6000-tdep.c (ppc_process_record): Rename inner "addr".
2373         * riscv-tdep.c (riscv_push_dummy_call): Declare "info" in inner
2374         scope.
2375         * remote.c (remote_target::update_thread_list): Don't redeclare
2376         "tp".
2377         (remote_target::process_initial_stop_replies): Rename inner
2378         "thread".
2379         (remote_target::remote_parse_stop_reply): Don't redeclare "p".
2380         (remote_target::wait_as): Don't redeclare "stop_reply".
2381         (remote_target::get_thread_local_address): Rename inner
2382         "result".
2383         (remote_target::get_tib_address): Likewise.
2384
2385         * regcache.c (cooked_read_test): Rename "regnum".
2386         * record-btrace.c (cmd_record_btrace_start): Rename inner
2387         "exception".
2388         * ppc-sysv-tdep.c (ppc64_sysv_abi_return_value): Declare "i" in
2389         loop header.
2390         * ppc-linux-tdep.c (ppc_linux_syscall_record): Declare "i" in loop
2391         header.
2392         (ppu2spu_sniffer): Rename inner "buf".
2393         * parse.c (operator_check_standard): Rename inner "type",
2394         "objfile".
2395         * p-valprint.c (pascal_val_print): Introduce new scope for
2396         "low_bound", "high_bound".
2397         * p-exp.y (yylex): Declare "i" in loop header.
2398         * objfiles.c (objfile_relocate1): Declare "i" in loop header.
2399         Lower declaration of "s".
2400         * nios2-tdep.c (nios2_analyze_prologue): Declare "i" in loop
2401         header.
2402         (nios2_push_dummy_call): Rename "len".
2403         * nat/linux-osdata.c (linux_xfer_osdata_cpus): Rename static
2404         "buf".
2405         (linux_xfer_osdata_fds, linux_xfer_osdata_shm)
2406         (linux_xfer_osdata_sem, linux_xfer_osdata_msg)
2407         (linux_xfer_osdata_modules): Likewise.
2408         * mips-tdep.c (mips_eabi_push_dummy_call): Rename outer "len".
2409         (mips_n32n64_push_dummy_call, mips_o32_push_dummy_call)
2410         (mips_o64_push_dummy_call): Likewise.
2411         * microblaze-tdep.c (microblaze_analyze_prologue): Rename inner
2412         "op".
2413         * mi/mi-main.c (list_available_thread_groups): Rename inner
2414         "tuple_emitter".
2415         (mi_cmd_data_read_memory): Rename inner "opts".
2416         * mi/mi-cmd-var.c (varobj_update_one): Rename inner
2417         "tuple_emitter".
2418         * mep-tdep.c (mep_analyze_prologue): Declare "rn" in loop header.
2419         * mdebugread.c (parse_symbol): Rename inner "b".  Declare "f" in
2420         more inner scope.
2421         (parse_partial_symbols): Rename inner "pst", "p", "name"
2422         * main.c (captured_main_1): Rename inner "i"s.
2423         * machoread.c (macho_symfile_read_all_oso): Don't redeclare
2424         "oso2".
2425         * linux-tdep.c (linux_info_proc): Rename inner "filename".
2426         * linespec.c (linespec_lexer_lex_string): Rename inner "p".
2427         * infrun.c (handle_no_resumed): Don't redeclare "thread".
2428         (handle_signal_stop): Rename inner "gdbarch".
2429         (handle_command): Declare "signum" in loop header.
2430         * ia64-tdep.c (ia64_pseudo_register_read): Don't redeclare
2431         "status".
2432         (examine_prologue): Rename inner "sol" and "sof".
2433         (ia64_extract_return_value): Rename inner "val".  Declare another
2434         "val" in a more inner scope.
2435         * hppa-bsd-tdep.c (hppabsd_find_global_pointer): Declare "buf" in
2436         inner scope.
2437         * guile/scm-symbol.c (gdbscm_lookup_symbol): Rename inner
2438         "except".
2439         * findvar.c (default_read_var_value): Don't redeclare "addr".
2440         * f-exp.y (yylex): Declare "i" in loop header.
2441         * eval.c (evaluate_subexp_standard): Don't redeclare "type".
2442         Rename inner "type", "expect_type".
2443         (evaluate_subexp_for_sizeof): Rename inner "pc".
2444         * elfread.c (elf_symfile_read): Rename inner "abfd".
2445         * dwarf2read.c (read_debug_names_from_section): Don't redeclare
2446         "bytes_read".
2447         (process_psymtab_comp_unit_reader): Don't redeclare "gdbarch".
2448         (add_partial_subprogram): Rename inner "lowpc" and "highpc".
2449         (dwarf_decode_line_header): Rename inner "lh".
2450         * dwarf2loc.c (dwarf2_compile_expr_to_ax): Don't redeclare
2451         "offset".  Declare "i" in loop header.
2452         (disassemble_dwarf_expression): Rename inner "addr_size".
2453         * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Rename
2454         inner "result".
2455         (dwarf_expr_context::execute_stack_op): Rename inner "offset".
2456         * dwarf2-frame.c (decode_frame_entry_1): Rename inner "length"s.
2457         * disasm.c (do_mixed_source_and_assembly_deprecated): Rename inner
2458         "inner_list_emitter".
2459         (do_mixed_source_and_assembly): Rename inner "tuple_emitter".
2460         * disasm-selftests.c (print_one_insn_test): Wrap "bplen"
2461         declaration in a block.
2462         * csky-tdep.c (csky_analyze_prologue): Declare "offset" lower.
2463         * cp-valprint.c (cp_print_value_fields): Don't redeclare
2464         "obstack_final_size".
2465         * cp-support.c (inspect_type): Declare "i" in loop header.
2466         * compile/compile.c (compile_instance::insert_symbol_error):
2467         Rename inner "e".
2468         * common/agent.c (agent_run_command): Remove inner "ret"
2469         declaration.
2470         * coffread.c (coff_symfile_read): Rename inner "name".
2471         (coff_symfile_read): Rename inner "abfd".
2472         * cli/cli-utils.c (get_number_trailer): Rename inner "val".
2473         * cli/cli-cmds.c (print_disassembly): Rename inner "low" and
2474         "high".
2475         * c-exp.y (lex_one_token): Move "len" declaration lower.
2476         * breakpoint.c (create_longjmp_master_breakpoint): Don't redeclare
2477         "gdbarch".
2478         (create_exception_master_breakpoint): Likewise.  Don't redeclare
2479         "b".
2480         (watch_command_1): Declare "mark" later.
2481         (clear_command): Don't shadow "a" or "b".
2482         (delete_command): Rename inner "b".
2483         (delete_trace_command): Likewise.
2484         * arm-tdep.c (thumb_process_displaced_32bit_insn): Rename inner
2485         "op".
2486         (arm_gdbarch_init): Remove inner "e_flags".
2487         * arch/arm-get-next-pcs.c (thumb_get_next_pcs_raw): Declare
2488         "offset" in inner blocks.
2489
2490 2018-10-04  Simon Marchi  <simon.marchi@ericsson.com>
2491
2492         * dwarf-index-write.c (file_write): Don't write if the vector is
2493         empty.
2494
2495 2018-10-05  Tom de Vries  <tdevries@suse.de>
2496
2497         * python/py-progspace.c (pspy_solib_name): Fix type mismatch in
2498         PyArg_ParseTuple call.
2499
2500 2018-10-05  Tom de Vries  <tdevries@suse.de>
2501
2502         * python/py-record-btrace.c (recpy_bt_goto): Fix type mismatch in
2503         PyArg_ParseTuple call.
2504
2505 2018-10-04  Joel Brobecker  <brobecker@adacore.com>
2506
2507         * psymtab.c (recursively_search_psymtabs): Reformat parameters
2508         to avoid exceeding 80 characters per line limit.
2509
2510 2018-10-04  Tom Tromey  <tom@tromey.com>
2511
2512         * symfile.c (syms_from_objfile_1, finish_new_objfile)
2513         (reread_symbols): Update.
2514         * complaints.h (clear_complaints): Remove argument.
2515         * complaints.c (enum complaint_series): Remove.
2516         (series): Remove global.
2517         (complaint_internal): Update.
2518         (clear_complaints): Remove argument.
2519
2520 2018-10-04  Tom Tromey  <tom@tromey.com>
2521
2522         * symfile.c (symbol_file_add_with_addrs): Do not print "no
2523         debugging symbols" message if there is a separate debug objfile.
2524
2525 2018-10-04  Tom Tromey  <tom@tromey.com>
2526
2527         PR cli/19551:
2528         * symfile.c (symbol_file_add_with_addrs): Update output.
2529         * psymtab.c (require_partial_symbols): Update output.
2530
2531 2018-10-04  Tom Tromey  <tom@tromey.com>
2532
2533         PR cli/22234:
2534         * complaints.c: Emit \n.
2535
2536 2018-10-04  Tom Tromey  <tom@tromey.com>
2537
2538         * symfile.c (symbol_file_add_with_addrs, symbol_file_clear)
2539         (separate_debug_file_exists, find_separate_debug_file)
2540         (add_symbol_file_command, reread_symbols, allocate_symtab)
2541         (allocate_compunit_symtab): Use filtered printing, not
2542         unfiltered.
2543         * psymtab.c (require_partial_symbols, dump_psymtab)
2544         (allocate_psymtab): Use filtered printing, not unfiltered.
2545
2546 2018-10-04  Tom Tromey  <tom@tromey.com>
2547
2548         * complaints.c (complaint_internal): Correctly check complaint
2549         count.
2550
2551 2018-10-04  Tom Tromey  <tom@tromey.com>
2552
2553         * complaints.h (struct complaints): Remove declaration.
2554         * complaints.c (clear_complaints): Remove an unused variable.
2555
2556 2018-10-04  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2557
2558         * MAINTAINERS (Write After Approval): Add self.
2559
2560 2018-10-03  Tom Tromey  <tom@tromey.com>
2561
2562         * guile/scm-value.c (gdbscm_value_to_string): Initialize
2563         "buffer_contents".
2564         * coffread.c (coff_symtab_read): Initialize "newobj".
2565
2566 2018-10-03  Simon Marchi  <simon.marchi@polymtl.ca>
2567
2568         * dwarf2read.c (read_func_scope): Remove struct keyword in
2569         range-based for.
2570
2571 2018-10-03  Tom Tromey  <tom@tromey.com>
2572
2573         * README: Mention --enable-ubsan.
2574         * NEWS: Mention --enable-ubsan.
2575         * acinclude.m4: Include sanitize.m4.
2576         * configure: Rebuild.
2577         * configure.ac: Call AM_GDB_UBSAN.
2578         * sanitize.m4: New file.
2579
2580 2018-10-03  Tom Tromey  <tom@tromey.com>
2581
2582         * expression.h (enum exp_opcode): Use uint8_t as base type.
2583         * expprint.c (op_name): Handle invalid opcodes.
2584
2585 2018-10-03  Tom Tromey  <tom@tromey.com>
2586
2587         * parse.c (prefixify_expression): Add assert.
2588         (parse_exp_in_context_1): Throw exception if the expression is
2589         empty.
2590
2591 2018-10-03  Tom Tromey  <tom@tromey.com>
2592
2593         * dwarf2read.c (read_signed_leb128): Work in ULONGEST.
2594
2595 2018-10-03  Tom Tromey  <tom@tromey.com>
2596
2597         * c-exp.y (parse_number): Work in unsigned.  Remove casts.
2598
2599 2018-10-03  Tom Tromey  <tom@tromey.com>
2600
2601         * dwarf2read.c (read_subrange_type): Make "negative_mask"
2602         unsigned.
2603
2604 2018-10-03  Tom Tromey  <tom@tromey.com>
2605
2606         * findvar.c (extract_integer): Do work in an unsigned type.
2607
2608 2018-10-03  Tom Tromey  <tom@tromey.com>
2609
2610         * common/enum-flags.h (enum_flags::operator~): Add static assert.
2611         * symfile-add-flags.h (enum symfile_add_flag): Use unsigned as
2612         base type.
2613         * objfile-flags.h (enum objfile_flag): Use unsigned as base type.
2614         * gdbtypes.h (enum type_instance_flag_value): Use unsigned as base
2615         type.
2616         * c-lang.h (enum c_string_type_values): Use unsigned as base
2617         type.
2618         * btrace.h (enum btrace_thread_flag): Use unsigned as base type.
2619
2620 2018-10-03  Tom Tromey  <tom@tromey.com>
2621
2622         * dwarf2-frame.h (dwarf2_frame_state_reg_info)
2623         <~dwarf2_frame_state_reg_info>: Update.
2624         <dwarf2_frame_state_reg_info>: Update.
2625         <alloc_regs>: Add assertion.  Update.
2626         <reg>: Now a std::vector.
2627         <num_regs>: Remove.
2628         <swap>: Update.
2629         * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
2630         (execute_cfa_program_test, dwarf2_frame_cache): Update.
2631
2632 2018-10-03  Tom Tromey  <tom@tromey.com>
2633
2634         * namespace.c (add_using_directive): Don't pass NULL to memcpy.
2635
2636 2018-10-03  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
2637
2638         * tid-parse.c (tid_is_in_list): Fix wrong 'See' comment.
2639
2640 2018-10-02  Tom Tromey  <tom@tromey.com>
2641
2642         * aarch64-linux-tdep.c (aarch64_linux_sigframe_init): Use pulongest.
2643
2644 2018-10-02  John Darrington  <john@darrington.wattle.id.au>
2645
2646         * NEWS: Mention changed commands.
2647         * ser-uds.c: New file.
2648         * configure.ac (SER_HARDWIRE): Add ser-uds.o.
2649         * configure: Regenerate.
2650         * Makefile.in: Add new file.
2651         * serial.c (serial_open): Check if filename is a socket
2652         and lookup the appropriate interface accordingly.
2653
2654 2018-10-01  Alan Hayward  <alan.hayward@arm.com>
2655
2656         * aarch64-linux-tdep.c (AARCH64_SIGCONTEXT_RESERVED_OFFSET): Add
2657         define.
2658         (AARCH64_EXTRA_MAGIC): Likewise.
2659         (AARCH64_FPSIMD_MAGIC): Likewise.
2660         (AARCH64_SVE_MAGIC): Likewise.
2661         (AARCH64_EXTRA_DATAP_OFFSET): Likewise.
2662         (AARCH64_FPSIMD_FPSR_OFFSET): Likewise.
2663         (AARCH64_FPSIMD_FPCR_OFFSET): Likewise.
2664         (AARCH64_FPSIMD_V0_OFFSET): Likewise.
2665         (AARCH64_FPSIMD_VREG_SIZE): Likewise.
2666         (AARCH64_SVE_CONTEXT_VL_OFFSET): Likewise.
2667         (AARCH64_SVE_CONTEXT_REGS_OFFSET): Likewise.
2668         (AARCH64_SVE_CONTEXT_P_REGS_OFFSET): Likewise.
2669         (AARCH64_SVE_CONTEXT_FFR_OFFSET): Likewise.
2670         (AARCH64_SVE_CONTEXT_SIZE): Likewise.
2671         (read_aarch64_ctx): Add function.
2672         (aarch64_linux_sigframe_init): Detect FP registers.
2673
2674 2018-10-01  Alan Hayward  <alan.hayward@arm.com>
2675
2676         * aarch64-tdep.c (AARCH64_Q0_REGNUM): Move to here.
2677         (AARCH64_D0_REGNUM): Likewise.
2678         (AARCH64_S0_REGNUM): Likewise.
2679         (AARCH64_H0_REGNUM): Likewise.
2680         (AARCH64_B0_REGNUM): Likewise.
2681         (AARCH64_SVE_V0_REGNUM): Likewise.
2682         * arch/aarch64.h (AARCH64_Q0_REGNUM): Move from here.
2683         (AARCH64_D0_REGNUM): Likewise.
2684         (AARCH64_S0_REGNUM): Likewise.
2685         (AARCH64_H0_REGNUM): Likewise.
2686         (AARCH64_B0_REGNUM): Likewise.
2687         (AARCH64_SVE_V0_REGNUM): Likewise.
2688
2689 2018-10-01  Gary Benson <gbenson@redhat.com>
2690
2691         * gdb_proc_service.h (gdb_prfpregset_t): Remove typedef.
2692         * proc-service.c (ps_lgetfpregs, ps_lsetfpregs): Use
2693         prfpregset_t instead of gdb_prfpregset_t.
2694         * configure.ac (PRFPREGSET_T_BROKEN): Remove check.
2695         * configure, config.in: Rebuild.
2696
2697 2018-10-01  Gary Benson <gbenson@redhat.com>
2698
2699         * common/gdb_proc_service.h: New file, factored out from...
2700         * gdb_proc_service.h: Moved common code to the above file.
2701         * Makefile.in (HFILES_NO_SRCDIR): Add the above new file.
2702
2703 2018-10-01  Gary Benson <gbenson@redhat.com>
2704
2705         * gdb_proc_service.h: Use elf_gregset_t if prgregset_t is
2706         undefined.  Use elf_fpregset_t if prfpregset_t is undefined.
2707
2708 2018-10-01  Gary Benson <gbenson@redhat.com>
2709
2710         * configure.ac: Check if sys/procfs.h defines elf_fpregset_t.
2711         (AC_CHECK_HEADERS): Check for linux/elf.h.
2712         * configure, config.in: Rebuild.
2713         * gdb_proc_service.h: Include linux/elf.h if sys/procfs.h
2714         doesn't define elf_fpregset_t.
2715
2716 2018-10-01  Gary Benson <gbenson@redhat.com>
2717
2718         * gdb_proc_service.h: Whitespace change.
2719
2720 2018-10-01  Tom Tromey  <tom@tromey.com>
2721
2722         * unittests/scoped_mmap-selftests.c: Don't check HAVE_UNISTD_H.
2723         * unittests/scoped_fd-selftests.c: Don't check HAVE_UNISTD_H.
2724         * common/scoped_fd.h: Don't check HAVE_UNISTD_H.
2725
2726 2018-10-01  Tom Tromey  <tom@tromey.com>
2727
2728         * README: Minor change.
2729
2730 2018-09-30  Pedro Alves  <palves@redhat.com>
2731
2732         * darwin-nat-info.c (darwin_debug_regions_recurse)
2733         (info_mach_exceptions_command): Remove unused local variables.
2734         * darwin-nat.c (darwin_decode_notify_message)
2735         (darwin_nat_target::resume, darwin_nat_target::mourn_inferior)
2736         (darwin_stop_inferior, darwin_setup_exceptions)
2737         (darwin_nat_target::kill, darwin_attach_pid, darwin_ptrace_him)
2738         (darwin_nat_target::attach, darwin_nat_target::detach)
2739         (darwin_read_write_inferior, darwin_read_dyld_info): Remove unused
2740         local variables.
2741         * i386-darwin-nat.c (i386_darwin_dr_set): Remove unused local
2742         variables.
2743
2744 2018-09-29  Tom Tromey  <tom@tromey.com>
2745
2746         * README: Remove some leftover text.
2747
2748 2018-09-29  Tom Tromey  <tom@tromey.com>
2749
2750         * PROBLEMS: Rewrite.
2751         * README: Update.
2752
2753 2018-09-28  John Baldwin  <jhb@FreeBSD.org>
2754
2755         * disasm-selftests.c (print_one_insn_test): Add bfd_arch_riscv to
2756         case with explicit breakpoint kind.
2757         * riscv-tdep.c (show_use_compressed_breakpoints): Remove
2758         'additional_info' and related logic.
2759         (riscv_debug_breakpoints): New variable.
2760         (riscv_breakpoint_kind_from_pc): Use the length of the existing
2761         instruction to determine the breakpoint kind.
2762         (_initialize_riscv_tdep): Add 'set/show debug riscv breakpoints'
2763         flag.  Update description of 'set/show riscv
2764         use-compressed-breakpoints' flag.
2765
2766 2018-09-28  Andrew Burgess  <andrew.burgess@embecosm.com>
2767
2768         (NEWS): Mention changes to frame related commands.
2769         * cli/cli-decode.c (add_cmd_suppress_notification): New function.
2770         (add_prefix_cmd_suppress_notification): New function.
2771         (add_com_suppress_notification): Call
2772         add_cmd_suppress_notification.
2773         * command.h (add_cmd_suppress_notification): Declare.
2774         (add_prefix_cmd_suppress_notification): Declare.
2775         * mi/mi-cmd-stack.c: Add 'safe-ctype.h' include.
2776         (parse_frame_specification): Moved from stack.c, with
2777         simplification to handle a single argument.
2778         (mi_cmd_stack_select_frame): Use parse_frame_specification, the
2779         switch to the selected frame.  Add a header comment.
2780         * stack.c: Remove 'safe-ctype.h' include.
2781         (find_frame_for_function): Add declaration.
2782         (find_frame_for_address): New function.
2783         (parse_frame_specification): Moved into mi/mi-cmd-stack.c.
2784         (frame_selection_by_function_completer): New function.
2785         (info_frame_command): Rename to...
2786         (info_frame_command_core): ...this, and update parameter types.
2787         (select_frame_command): Rename to...
2788         (select_frame_command_core): ...this, and update parameter types.
2789         (frame_command): Rename to...
2790         (frame_command_core): ...this, and update parameter types.
2791         (class frame_command_helper): New class to wrap implementations of
2792         frame related sub-commands.
2793         (frame_apply_cmd_list): New static global.
2794         (frame_cmd_list): Make static.
2795         (select_frame_cmd_list): New global for sub-commands.
2796         (info_frame_cmd_list): New global for sub-commands.
2797         (_initialize_stack): Register sub-commands for 'frame',
2798         'select-frame', and 'info frame'.  Update 'frame apply' commands
2799         to use frame_apply_cmd_list.  Move function local static
2800         frame_apply_list to file static frame_apply_cmd_list for
2801         consistency.
2802         * stack.h (select_frame_command): Delete declarationn.
2803         (select_frame_for_mi): Declare new function.
2804
2805 2018-09-26  Andrew Burgess  <andrew.burgess@embecosm.com>
2806
2807         * riscv-tdep.c (riscv_insn::decode): Decode c.lui.
2808         (riscv_scan_prologue): Split handling of AUIPC, LUI, ADD, ADDI,
2809         and NOP.
2810
2811 2018-09-26  Simon Marchi  <simon.marchi@ericsson.com>
2812
2813         * elf32-nds32.c (elf32_nds32_allocate_dynrelocs): Remove.
2814
2815 2018-09-26  Tom Tromey  <tom@tromey.com>
2816
2817         * valops.c (auto_abandon): Remove dead code.
2818
2819 2018-09-26  Tom Tromey  <tom@tromey.com>
2820
2821         * tui/tui-win.c (WIN_HEIGHT_USAGE): Remove extra ">"s.
2822
2823 2018-09-24  Tom Tromey  <tom@tromey.com>
2824
2825         * common/pathstuff.c (get_standard_cache_dir): Make
2826         "xdg_cache_home" and "home" const.
2827         * top.c (init_history): Make "tmpenv" const.
2828         * main.c (get_init_files): Make "homedir" const.
2829
2830 2018-09-23  Tom Tromey  <tom@tromey.com>
2831
2832         PR python/18852:
2833         * python/py-param.c (get_set_value): Use gdbpy_handle_exception.
2834
2835 2018-09-23  Tom Tromey  <tom@tromey.com>
2836
2837         * python/py-function.c (fnpy_call): Use gdbpy_handle_exception.
2838         * python/py-cmd.c (cmdpy_function): Use gdbpy_handle_exception.
2839         * python/python-internal.h (gdbpy_handle_exception): Declare.
2840         * python/py-utils.c (gdbpy_handle_exception): New function.
2841
2842 2018-09-23  Tom Tromey  <tom@tromey.com>
2843
2844         PR python/17284:
2845         * python/py-type.c (typy_template_argument): Check for negative
2846         argument number.
2847
2848 2018-09-23  Tom Tromey  <tom@tromey.com>
2849
2850         PR python/14062:
2851         * python/python.c (gdbpy_run_events): Do not ignore exceptions.
2852
2853 2018-09-23  Tom Tromey  <tom@tromey.com>
2854
2855         PR python/18170:
2856         * python/py-value.c (valpy_int): Allow conversion from pointer
2857         type.
2858
2859 2018-09-23  Tom Tromey  <tom@tromey.com>
2860
2861         PR python/20126:
2862         * python/py-value.c (valpy_int): Respect type sign.
2863
2864 2018-09-23  Tom Tromey  <tom@tromey.com>
2865
2866         PR python/18352;
2867         * python/py-value.c (valpy_float): Allow conversions from int or
2868         char.
2869         (valpy_int, valpy_long): Allow conversions from float.
2870
2871 2018-09-23  Tom Tromey  <tom@tromey.com>
2872
2873         * ctf.c (ctf_start): Use gdb_fopen_cloexec.
2874         * common/scoped_mmap.c (mmap_file): Use gdb_open_cloexec.
2875
2876 2018-09-23  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2877
2878         * amd64-sol2-tdep.c (amd64_sol2_sigtramp_p): Also recognize
2879         __sighndlr.
2880         * i386-sol2-tdep.c (i386_sol2_sigtramp_p): Likewise.
2881
2882 2018-08-02  Jon Turney  <jon.turney@dronecode.org.uk>
2883
2884         * windows-nat.c (windows_nat_target::wait): Remove a spurious
2885         target_terminal::ours().
2886
2887 2018-09-23  Simon Marchi  <simon.marchi@ericsson.com>
2888
2889         * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): Change type
2890         of vl to ULONGEST.
2891
2892 2018-09-21  Yacov Simhony  <ysimhony@gmail.com>
2893
2894         * breakpoint.c (update_inserted_breakpoint_locations): Remove
2895         redundant condition.
2896
2897 2018-09-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2898
2899         * proc-utils.h (PROC_CTL_WORD_TYPE): Remove.
2900
2901         * procfs.c: Don't check for PR_MODEL_NATIVE definition.
2902         * sparc-sol2-nat.c: Likewise.  Remove Linux, __arch64__ references.
2903         * sol-thread.c (ps_pdmodel): Don't guard definition.
2904
2905         * procfs.c: Fix formatting.
2906
2907         * procfs.c (sysset_t_alloc): Remove.
2908         (create_procinfo): Use XNEW instead of sysset_t_alloc.
2909         (procfs_debug_inferior): Likewise.
2910         (procfs_set_exec_trap): Likewise.
2911         (proc_set_traced_sysentry): Don't allocate argp dynamically.
2912         (proc_set_traced_sysexit): Likewise.
2913
2914         * procfs.c (create_procinfo): Use xsnprintf to fix ARI warning.
2915         (dead_procinfo): Likewise.
2916         (proc_warn): Likewise.
2917         (proc_error): Likewise.
2918         (proc_get_LDT_entry): Likewise.
2919         (do_attach): Likewise.
2920         (procfs_target::pid_to_str): Likewise.
2921         (iterate_over_mappings): Likewise.
2922
2923         * procfs.c (create_procinfo): Fix ARI warning.
2924         (proc_get_status): Likewise.
2925         (proc_stop_process): Likewise.
2926         (proc_run_process): Likewise.
2927         (proc_kill): Likewise.
2928         (proc_get_LDT_entry): Likewise.
2929         (procfs_find_LDT_entry): Likewise.
2930         (proc_update_threads): Likewise.
2931         (proc_iterate_over_threads): Likewise.
2932         (do_attach): Likewise.
2933         (procfs_xfer_memory): Likewise.
2934         (invalidate_cache): Likewise.
2935         (procfs_target::resume): Likewise.
2936         (procfs_init_inferior): Likewise.
2937         (procfs_set_exec_trap): Likewise.
2938         (procfs_target::thread_alive): Likewise.
2939         (procfs_target::pid_to_exec_file): Likewise.
2940         (iterate_over_mappings): Likewise.
2941         (procfs_target::make_corefile_notes): Likewise.
2942         * sol-thread.c (sol_thread_target::thread_alive): Likewise.
2943
2944         * procfs.c (procfs_find_LDT_entry): Silence ARI warning.
2945         (procfs_find_LDT_entry): Likewise.
2946         * sol-thread.c (ps_lgetLDT): Likewise.
2947
2948 2018-09-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2949
2950         PR tdep/17903
2951         * procfs.c (procfs_target): Declare pid_to_exec_file.
2952         (procfs_target::pid_to_exec_file): New.
2953
2954 2018-09-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2955
2956         * auxv.c (default_print_auxv_entry): Reflect AT_SUN_CAP_HW1
2957         renaming.
2958         Handle AT_SUN_EMULATOR, AT_SUN_BRANDNAME, AT_SUN_BRAND_AUX1,
2959         AT_SUN_BRAND_AUX2, AT_SUN_BRAND_AUX3, AT_SUN_CAP_HW2.
2960
2961 2018-09-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2962
2963         * i386-v4-nat.c (regmap, supply_gregset, fill_gregset)
2964         (supply_fpregset, fill_fpregset): Move ...
2965         * i386-sol2-nat.c [PR_MODEL_NATIVE != PR_MODEL_LP64]: ... here.
2966         Remove HAVE_GREGSET_T, HAVE_FPREGET_T guards.
2967         Remove references to ioctl-based procfs.
2968         Include <sys/reg.h>.
2969         Remove PR_MODEL_NATIVE guards.
2970         * configure.nat <sol2, i386> (NATDEPFILES): Remove i386-v4-nat.o.
2971         * Makefile.in (ALLDEPFILES): Remove i386-v4-nat.c.
2972
2973 2018-09-19  Xavier Roirand  <roirand@adacore.com>
2974
2975         PR gdb/20981:
2976         * solib-darwin.c (darwin_get_dyld_bfd): New function.
2977         (darwin_solib_get_all_image_info_addr_at_init): Update call.
2978         (darwin_solib_create_inferior_hook): Handle unrelocated dyld.
2979
2980 2018-09-19  John Baldwin  <jhb@FreeBSD.org>
2981
2982         * fbsd-tdep.c (fbsd_print_sockaddr_in): Style fix.
2983         (fbsd_print_sockaddr_in6): Likewise.
2984
2985 2018-09-19  Richard Bunt  <richard.bunt@arm.com>
2986             Chris January  <chris.january@arm.com>
2987
2988         * eval.c (skip_undetermined_arglist): Skip argument list helper.
2989         (evaluate_subexp_standard): Return a dummy type when
2990         honoring EVAL_SKIP in OP_VAR_VALUE and handle skipping in the
2991         OP_F77_UNDETERMINED_ARGLIST case.
2992         * expression.h (enum noside): Update comment.
2993
2994 2018-09-19  George Vasick <george.vasick@oracle.com>
2995
2996         * solib-svr4.c (svr4_same_1): Also handle amd64 ld.so.1.
2997
2998 2018-09-19  Stefan Teleman <stefan.teleman@oracle.com>
2999             April Chin <april.chin@oracle.com>
3000             Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
3001
3002         * procfs.c (MAX_PROC_NAME_SIZE): Allow for 6-digit PID_MAX and
3003         uint_t lwpid_t.
3004         (create_procinfo): Print pids in /proc without leading zeros.
3005
3006 2018-09-18  Sandra Loosemore  <sandra@codesourcery.com>
3007
3008         * nios2-tdep.c (nios2_gcc_target_options): New.
3009         (nios2_gdb_arch_init): Install new hook.
3010
3011 2018-09-18  Simon Marchi  <simon.marchi@ericsson.com>
3012
3013         * patches/0001-Fix-PR-gdb-23558-Use-system-s-getcwd-when-cross-comp.patch:
3014         New file.
3015         * update-gnulib.sh: Apply patch.
3016         * configure: Re-generate.
3017
3018 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
3019
3020         * infcmd.c (_initialize_infcmd): Remove "running" from "info proc"
3021         description.  Make "info proc" command descriptions more
3022         consistent.
3023
3024 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
3025
3026         * NEWS: Mention 'info proc files' command.
3027
3028 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
3029
3030         * fbsd-nat.c (fbsd_nat_target::info_proc): List open file
3031         descriptors for IP_FILES and IP_ALL.
3032
3033 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
3034
3035         * fbsd-tdep.c (KF_FLAGS, KF_OFFSET, KF_VNODE_TYPE, KF_SOCK_DOMAIN)
3036         (KF_SOCK_TYPE, KF_SOCK_PROTOCOL, KF_SA_LOCAL, KF_SA_PEER)
3037         (KINFO_FILE_TYPE_SOCKET, KINFO_FILE_TYPE_PIPE)
3038         (KINFO_FILE_TYPE_FIFO, KINFO_FILE_TYPE_KQUEUE)
3039         (KINFO_FILE_TYPE_CRYPTO, KINFO_FILE_TYPE_MQUEUE)
3040         (KINFO_FILE_TYPE_SHM, KINFO_FILE_TYPE_SEM, KINFO_FILE_TYPE_PTS)
3041         (KINFO_FILE_TYPE_PROCDESC, KINFO_FILE_FD_TYPE_ROOT)
3042         (KINFO_FILE_FD_TYPE_JAIL, KINFO_FILE_FD_TYPE_TRACE)
3043         (KINFO_FILE_FD_TYPE_CTTY, KINFO_FILE_FLAG_READ)
3044         (KINFO_FILE_FLAG_WRITE, KINFO_FILE_FLAG_APPEND)
3045         (KINFO_FILE_FLAG_ASYNC, KINFO_FILE_FLAG_FSYNC)
3046         (KINFO_FILE_FLAG_NONBLOCK, KINFO_FILE_FLAG_DIRECT)
3047         (KINFO_FILE_FLAG_HASLOCK, KINFO_FILE_FLAG_EXEC)
3048         (KINFO_FILE_VTYPE_VREG, KINFO_FILE_VTYPE_VDIR)
3049         (KINFO_FILE_VTYPE_VCHR, KINFO_FILE_VTYPE_VLNK)
3050         (KINFO_FILE_VTYPE_VSOCK, KINFO_FILE_VTYPE_VFIFO, FBSD_AF_UNIX)
3051         (FBSD_AF_INET, FBSD_AF_INET6, FBSD_SOCK_STREAM, FBSD_SOCK_DGRAM)
3052         (FBSD_SOCK_SEQPACKET, FBSD_IPPROTO_ICMP, FBSD_IPPROTO_TCP)
3053         (FBSD_IPPROTO_UDP, FBSD_IPPROTO_SCTP): New defines.
3054         (struct fbsd_sockaddr_in, struct fbsd_sockaddr_in6)
3055         (struct fbsd_sockaddr_un): New types.
3056         (fbsd_file_fd, fbsd_file_type, fbsd_file_flags, fbsd_ipproto)
3057         (fbsd_print_sockaddr_in, fbsd_print_sockaddr_in6)
3058         (fbsd_info_proc_files_header, fbsd_info_proc_files_entry)
3059         (fbsd_core_info_proc_files): New functions.
3060         (fbsd_core_info_proc): List open file descriptors for IP_FILES and
3061         IP_ALL.
3062         * fbsd-tdep.h (fbsd_info_proc_files_header)
3063         (fbsd_info_proc_files_entry): New.
3064
3065 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
3066
3067         * defs.h (enum info_proc_what) [IP_FILES]: New value.
3068         * infcmd.c (info_proc_cmd_files): New function.
3069         (_initialize_infcmd): Register 'info proc files' command.
3070
3071 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
3072
3073         * gnulib/aclocal-m4-deps.mk: Re-generate.
3074         * gnulib/aclocal.m4: Re-generate.
3075         * gnulib/config.in: Re-generate.
3076         * gnulib/configure: Re-generate.
3077         * gnulib/import/Makefile.am: Re-generate.
3078         * gnulib/import/Makefile.in: Re-generate.
3079         * gnulib/import/m4/gnulib-cache.m4: Re-generate.
3080         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
3081         * gnulib/import/arpa_inet.in.h: New file.
3082         * gnulib/import/inet_ntop.c: New file.
3083         * gnulib/import/m4/arpa_inet_h.m4: New file.
3084         * gnulib/import/m4/inet_ntop.m4: New file.
3085         * gnulib/import/m4/netinet_in_h.m4: New file.
3086         * gnulib/import/m4/socklen.m4: New file.
3087         * gnulib/import/m4/sockpfaf.m4: New file.
3088         * gnulib/import/m4/stdalign.m4: New file.
3089         * gnulib/import/m4/sys_uio_h.m4: New file.
3090         * gnulib/import/netinet_in.in.h: New file.
3091         * gnulib/import/stdalign.in.h: New file.
3092         * gnulib/import/sys_socket.c: New file.
3093         * gnulib/import/sys_socket.in.h: New file.
3094         * gnulib/import/sys_uio.in.h: New file.
3095         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add inet_ntop
3096         module.
3097
3098 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
3099
3100         * gnulib/aclocal-m4-deps.mk: New file.
3101         * gnulib/update-gnulib.sh: Generate "aclocal-m4-deps.mk"
3102         deterministically.
3103
3104 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
3105
3106         * fbsd-tdep.c (fbsd_core_vnode_path): Use KF_PATH instead of
3107         KVE_PATH.
3108
3109 2018-09-18  Tom Tromey  <tom@tromey.com>
3110
3111         * compile/compile-object-load.c (struct
3112         link_hash_table_cleanup_data): Add constructor and destructor.
3113         Use DISABLE_COPY_AND_ASSIGN.
3114         (~link_hash_table_cleanup_data): Rename from
3115         link_hash_table_free.  Now a destructor.
3116         (copy_sections): Use gdb::unique_xmalloc_ptr.  Remove cleanups.
3117
3118 2018-09-18  Tom Tromey  <tom@tromey.com>
3119
3120         * compile/compile-object-run.c (do_module_cleanup): Use delete.
3121         * compile/compile-object-load.c (struct munmap_list): Move to
3122         header file.
3123         (munmap_list::add): Rename from munmap_list_add; rewrite.
3124         (munmap_list::~munmap_list): Rename from munmap_list_free.
3125         (munmap_listp_free_cleanup): Remove.
3126         (compile_object_load): Update.
3127         * compile/compile-object-load.h (struct munmap_list): Move from
3128         compile-object-load.c.  Rewrite.
3129
3130 2018-09-18  Alan Hayward  <alan.hayward@arm.com>
3131
3132         * aarch64-tdep.c (pass_in_v): Use register size.
3133         (aarch64_extract_return_value): Likewise.
3134         (aarch64_store_return_value): Likewise.
3135
3136 2018-09-18  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
3137
3138         * utils.c (dump_core) [HAVE_SETRLIMIT]: Cast RLIM_INFINITY to
3139         rlim_t.
3140
3141 2018-09-17  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
3142
3143         * python/lib/gdb/command/frame_filters.py (EnableFrameFilter):
3144         Fix short help line.
3145
3146 2018-09-17  Tom Tromey  <tom@tromey.com>
3147
3148         PR python/20445:
3149         * configure: Rebuild.
3150         * configure.ac: Conditionally use -DNDEBUG for Python.
3151
3152 2018-09-17  Tom Tromey  <tom@tromey.com>
3153
3154         * configure: Rebuild.
3155         * configure.ac: Use gmp as a library dependency when checking for
3156         mpfr.
3157
3158 2018-09-17  Pedro Alves  <palves@redhat.com>
3159
3160         * python/py-inferior.c (find_inferior_object): Delete.
3161
3162 2018-09-17  Simon Marchi  <simon.marchi@ericsson.com>
3163
3164         * compile/compile-cplus-types.c
3165         (compile_cplus_instance::enter_scope): Don't use new_scope after
3166         std::move.
3167
3168 2018-09-17  Tom Tromey  <tom@tromey.com>
3169
3170         * common/pathstuff.c (get_standard_cache_dir): Use
3171         ~/Library/Caches on macOS.
3172         * common/pathstuff.h (get_standard_cache_dir): Update comment.
3173
3174 2018-09-17  Simon Marchi  <simon.marchi@polymtl.ca>
3175
3176         PR python/23669
3177         * breakpoint.c (commands_cmd_element): New.
3178         (_initialize_breakpoint): Assign commands_cmd_element.
3179         * breakpoint.h (commands_cmd_element): New.
3180         * cli/cli-script.c (while_cmd_element, if_command,
3181         define_cmd_element): New.
3182         (command_name_equals): Remove.
3183         (process_next_line): Compare commands by pointer, not by name.
3184         (_initialize_cli_script): Assign the various cmd_list_element
3185         variables.
3186         * compile/compile.c (compile_cmd_element): New.
3187         (_initialize_compile): Assign compile_cmd_element.
3188         * compile/compile.h (compile_cmd_element): New.
3189         * guile/guile.c (guile_cmd_element): New.
3190         (install_gdb_commands): Assign guile_cmd_element.
3191         * guile/guile.h (guile_cmd_element): New.
3192         * python/python.c (python_cmd_element): New.
3193         (_initialize_python): Assign python_cmd_element.
3194         * python/python.h (python_cmd_element): New.
3195         * tracepoint.c (while_stepping_cmd_element): New.
3196         (_initialize_tracepoint): Assign while_stepping_cmd_element.
3197         * tracepoint.h (while_stepping_cmd_element): New.
3198
3199 2018-09-17  Tom Tromey  <tom@tromey.com>
3200
3201         * infrun.c (save_infcall_suspend_state): Return
3202         infcall_suspend_state_up.
3203         (save_infcall_control_state): Return infcall_control_state_up.
3204         * inferior.h (save_infcall_suspend_state)
3205         (save_infcall_control_state): Declare later.  Return unique
3206         pointers.
3207
3208 2018-09-17  Tom Tromey  <tom@tromey.com>
3209
3210         * infrun.c (struct stop_context): Declare constructor,
3211         destructor, "changed" method.
3212         (stop_context::stop_context): Rename from save_stop_context.
3213         (stop_context::~stop_context): Rename from
3214         release_stop_context_cleanup.
3215         (normal_stop): Update.
3216         (stop_context::changed): Rename from stop_context_changed.  Return
3217         bool.
3218
3219 2018-09-17  Tom Tromey  <tom@tromey.com>
3220
3221         * inferior.h (struct infcall_suspend_state_deleter): New.
3222         (infcall_suspend_state_up): New typedef.
3223         (struct infcall_control_state_deleter): New.
3224         (infcall_control_state_up): New typedef.
3225         (make_cleanup_restore_infcall_suspend_state)
3226         (make_cleanup_restore_infcall_control_state): Don't declare.
3227         * infcall.c (call_function_by_hand_dummy): Update.
3228         * infrun.c (do_restore_infcall_suspend_state_cleanup)
3229         (make_cleanup_restore_infcall_suspend_state): Remove.
3230         (do_restore_infcall_control_state_cleanup)
3231         (make_cleanup_restore_infcall_control_state): Remove.
3232
3233 2018-09-17  Tom Tromey  <tom@tromey.com>
3234
3235         * gdbthread.h (struct thread_control_state): Add initializer.
3236         (class thread_info) <control>: Remove initializer.
3237         * inferior.h (struct inferior_control_state): Add initializer.
3238         (class inferior) <control>: Remove initializer.
3239         (exit_inferior_1): Update.
3240         * infrun.c (struct infcall_control_state): Add constructors.
3241         (save_infcall_control_state): Use new.
3242         (restore_infcall_control_state, discard_infcall_control_state):
3243         Use delete.
3244
3245 2018-09-17  Tom Tromey  <tom@tromey.com>
3246
3247         * infrun.c (struct infcall_suspend_state) <registers>: Now a
3248         unique_ptr.
3249         <siginfo_data>: Now a unique_xmalloc_ptr.
3250         (save_infcall_suspend_state, restore_infcall_suspend_state)
3251         (discard_infcall_suspend_state)
3252         (get_infcall_suspend_state_regcache): Update.
3253
3254 2018-09-17  Tom Tromey  <tom@tromey.com>
3255
3256         * gdbthread.h (struct thread_suspend_state): Add initializers.
3257         (class thread_info) <suspend>: Remove initializer.
3258         * infrun.c (struct infcall_suspend_state): Add initializers.
3259         (save_infcall_suspend_state): Use new.
3260         (discard_infcall_suspend_state): Use delete.
3261
3262 2018-09-16  Tom Tromey  <tom@tromey.com>
3263
3264         * python/python-internal.h (CPYCHECKER_STEALS_REFERENCE_TO_ARG):
3265         Remove.
3266         * python/py-varobj.c (py_varobj_iter_ctor): Change pyiter to
3267         rvalue reference.  Remove CPYCHECKER_STEALS_REFERENCE_TO_ARG.
3268         (py_varobj_iter_new): Likewise.
3269         (py_varobj_get_iterator): Use gdbpy_ref.
3270
3271 2018-09-16  Tom Tromey  <tom@tromey.com>
3272
3273         * python/py-threadevent.c (py_get_event_thread): Simplify.
3274         * python/py-inferior.c (infpy_thread_from_thread_handle):
3275         Return immediately after calling thread_to_thread_object.  Use
3276         Py_RETURN_NONE.
3277         (thread_to_thread_object): Set the exception on a NULL return.
3278
3279 2018-09-16  Simon Marchi  <simon.marchi@polymtl.ca>
3280
3281         * Makefile.in (LIBGDB_OBS): Sort COMMON_OBS.
3282
3283 2018-09-16  Tom Tromey  <tom@tromey.com>
3284
3285         * python/python-internal.h (CPYCHECKER_RETURNS_BORROWED_REF):
3286         Remove.
3287
3288 2018-09-16  Tom Tromey  <tom@tromey.com>
3289
3290         * python/python-internal.h (thread_to_thread_object): Change
3291         return type.
3292         * python/py-inferior.c (thread_to_thread_object): Return a new
3293         reference.
3294         (infpy_thread_from_thread_handle): Update.
3295         * python/py-infthread.c (gdbpy_selected_thread): Update.
3296         * python/py-stopevent.c (create_stop_event_object): Update.
3297         * python/py-threadevent.c (py_get_event_thread): Return a new
3298         reference.
3299         (py_get_event_thread): Update.
3300         * python/py-event.h (py_get_event_thread): Change return type.
3301         * python/py-continueevent.c (create_continue_event_object):
3302         Update.
3303
3304 2018-09-16  Tom Tromey  <tom@tromey.com>
3305
3306         * python/py-progspace.c (pspy_get_objfiles): Update.
3307         * python/python-internal.h (objfile_to_objfile_object): Change
3308         return type.
3309         * python/py-newobjfileevent.c (create_new_objfile_event_object):
3310         Update.
3311         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers):
3312         Update.
3313         * python/python.c (gdbpy_get_current_objfile): Update.
3314         (gdbpy_objfiles): Update.
3315         * python/py-objfile.c (objfpy_get_owner, gdbpy_lookup_objfile):
3316         Update.
3317         (objfile_to_objfile_object): Return a new reference.
3318         * python/py-symtab.c (stpy_get_objfile): Update.
3319         * python/py-prettyprint.c (find_pretty_printer_from_objfiles):
3320         Update.
3321
3322 2018-09-16  Tom Tromey  <tom@tromey.com>
3323
3324         * python/py-inferior.c (infpy_get_progspace): Update.
3325         * python/python-internal.h (pspace_to_pspace_object): Change
3326         return type.
3327         * python/py-newobjfileevent.c
3328         (create_clear_objfiles_event_object): Update.
3329         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers):
3330         Update.
3331         * python/python.c (gdbpy_get_current_progspace): Update.
3332         (gdbpy_progspaces): Update.
3333         * python/py-progspace.c (pspace_to_pspace_object): Return a new
3334         reference.
3335         * python/py-objfile.c (objfpy_get_progspace): Update.
3336         * python/py-prettyprint.c (find_pretty_printer_from_progspace):
3337         Update.
3338
3339 2018-09-16  Tom Tromey  <tom@tromey.com>
3340
3341         * python/lib/gdb/__init__.py (current_progspace, objfiles)
3342         (solib_name, block_for_pc, find_pc_line): New functions.
3343         (execute_unwinders): Update.
3344         * python/py-block.c (gdbpy_block_for_pc): Remove.
3345         * python/py-inferior.c (infpy_get_progspace): New function.
3346         (inferior_object_getset) <progspace>: Add.
3347         * python/py-progspace.c (pspy_objfiles): Rewrite.
3348         (pspy_solib_name, pspy_block_for_pc)
3349         (pspy_find_pc_line, pspy_is_valid): New functions.
3350         (progspace_object_methods): Add entries for solib_name,
3351         block_for_pc, find_pc_line, is_valid.
3352         * python/python-internal.h (gdbpy_block_for_pc)
3353         (build_objfiles_list): Don't declare.
3354         * python/python.c: Don't include solib.h.
3355         (gdbpy_solib_name, gdbpy_find_pc_line)
3356         (gdbpy_get_current_progspace, build_objfiles_list)
3357         (gdbpy_objfiles): Remove.
3358         (GdbMethods) <current_progspace, objfiles, block_for_pc,
3359         solib_name, find_pc_line>: Remove entries.
3360
3361 2018-09-16  Tom Tromey  <tom@tromey.com>
3362
3363         * top.c (new_ui_command): Use GNU style for metasyntactic
3364         variables.
3365         * breakpoint.c (stopat_command): Use GNU style for metasyntactic
3366         variables.
3367         * maint.c (maintenance_translate_address): Remove "<>" around
3368         text.
3369         * interps.c (interpreter_exec_cmd): Use GNU style for
3370         metasyntactic variables.
3371         * nto-procfs.c (nto_procfs_target_info): Use GNU style for
3372         metasyntactic variables.
3373         * tracepoint.c (tfind_range_command): Use GNU style for
3374         metasyntactic variables.
3375         (tfind_outside_command): Likewise.
3376         (_initialize_tracepoint): Likewise.
3377         * remote.c (extended_remote_target::create_inferior): Use GNU
3378         style for metasyntactic variables.
3379         * sparc64-tdep.c (adi_examine_command): Use GNU style for
3380         metasyntactic variables.
3381         (adi_assign_command): Likewise.
3382
3383 2018-09-16  Tom Tromey  <tom@tromey.com>
3384
3385         * disasm.c (show_disassembler_options_sfunc): Use GNU style for
3386         metasyntactic variables.  Print message if no disassembler options
3387         are available.
3388
3389 2018-09-15  Tom Tromey  <tom@tromey.com>
3390
3391         * infcmd.c (get_inferior_args): Return const char *.
3392         * inferior.h (get_inferior_args): Return type now const.
3393         * linux-tdep.c (linux_fill_prpsinfo): Update.
3394         * procfs.c (procfs_target::make_corefile_notes): Update.
3395
3396 2018-09-07  Tom Tromey  <tom@tromey.com>
3397
3398         * python/python.c (execute_gdb_command): Call bpstat_do_actions
3399         inside the TRY.
3400
3401 2018-09-14  Sandra Loosemore  <sandra@codesourcery.com>
3402
3403         * nios2-tdep.c (nios2_type_align): New.
3404         (nios2_gdb_arch_init): Install type_align hook.
3405
3406 2018-09-10  Andrew Burgess  <andrew.burgess@embecosm.com>
3407
3408         * eval.c (fake_method::fake_method): Call xzalloc directly for a
3409         type that is neither object file owned, nor gdbarch owned.
3410         * gdbtypes.c (get_type_gdbarch): Add an assert that returned
3411         gdbarch is non-NULL.
3412         (alloc_type_instance): Allocate non-objfile owned types on the
3413         gdbarch obstack.
3414         (copy_type_recursive): Allocate TYPE_FIELDS and TYPE_RANGE_DATA
3415         using TYPE_ALLOC to ensure memory is allocated on the correct
3416         obstack.
3417         * gdbtypes.h (TYPE_ALLOC): Allocate space on either the objfile
3418         obstack, or the gdbarch obstack.
3419         (TYPE_ZALLOC): Rewrite using TYPE_ALLOC.
3420
3421 2018-09-14  Tom Tromey  <tom@tromey.com>
3422
3423         * infcall.c (call_function_by_hand_dummy): Remove unnecessary
3424         block.
3425
3426 2018-09-14  Tom Tromey  <tom@tromey.com>
3427
3428         * nat/fork-inferior.c (get_startup_shell): Remove "static".
3429
3430 2018-09-13  Tom Tromey  <tom@tromey.com>
3431
3432         * python/py-inferior.c (infpy_thread_from_thread_handle): Now
3433         static.
3434
3435 2018-09-13  Tom Tromey  <tom@tromey.com>
3436
3437         * exec.c (try_open_exec_file): Use std::string.
3438
3439 2018-09-13  Tom Tromey  <tom@tromey.com>
3440
3441         * utils.h (gdb_bfd_errmsg): Return std::string.
3442         * exec.c (exec_file_attach): Update.
3443         * compile/compile-object-load.c (compile_object_load): Update.
3444         * utils.c (gdb_bfd_errmsg): Return std::string.
3445
3446 2018-09-13  Tom Tromey  <tom@tromey.com>
3447
3448         * procfs.c (struct procinfo_deleter): New.
3449         (procinfo_up): New typedef.
3450         (do_destroy_procinfo_cleanup): Remove.
3451         (procfs_target::info_proc): Use procinfo_up.  Remove cleanups.
3452
3453 2018-09-13  Tom Tromey  <tom@tromey.com>
3454
3455         * source.c (add_path): Use gdb::unique_xmalloc_ptr.
3456
3457 2018-09-13  Simon Marchi  <simon.marchi@ericsson.com>
3458 2018-09-13  Tom Tromey  <tom@tromey.com>
3459
3460         * python/py-progspace.c (PSPY_REQUIRE_VALID): New macro.
3461         (pspy_get_objfiles): New function.
3462         (progspace_object_methods): New.
3463         (pspace_object_type): Add tp_methods callback.
3464         * python/python-internal.h (build_objfiles_list): New
3465         declaration.
3466         * python/python.c (build_objfiles_list): New function.
3467         (gdbpy_objfiles): Implement using build_objfiles_list.
3468         * NEWS: Mention the Progspace.objfiles method.
3469
3470 2018-09-13  Simon Marchi  <simon.marchi@ericsson.com>
3471
3472         * python/py-inferior.c (infpy_get_progspace): New function.
3473         (inferior_object_getset): Add progspace property.
3474         * NEWS: Mention the new property.
3475
3476 2018-09-13  Tom Tromey  <tom@tromey.com>
3477
3478         PR rust/23650:
3479         * rust-lang.c (rust_evaluate_subexp): Use field name, not "foo".
3480
3481 2018-09-13  Tom Tromey  <tom@tromey.com>
3482
3483         PR rust/23626:
3484         * rust-lang.c (rust_enum_variant): Now static.
3485         (rust_empty_enum_p): New function.
3486         (rust_print_enum, rust_evaluate_subexp, rust_print_struct_def):
3487         Handle empty enum.
3488
3489 2018-09-13  Simon Marchi  <simon.marchi@ericsson.com>
3490
3491         * python/py-inferior.c (infpy_repr): New.
3492         (inferior_object_type): Register infpy_repr.
3493         * python/py-objfile.c (objfpy_repr): New.
3494         (objfile_object_type): Register objfpy_repr.
3495
3496 2018-09-12  John Baldwin  <jhb@FreeBSD.org>
3497
3498         * fbsd-nat.c (fbsd_nat_target::info_proc): Remove unused variable.
3499
3500 2018-09-12  John Baldwin  <jhb@FreeBSD.org>
3501
3502         * aarch64-fbsd-tdep.h (AARCH64_FBSD_SIZEOF_GREGSET): Fix comment
3503         typo.
3504
3505 2018-09-12  Sergio Durigan Junior  <sergiodj@redhat.com>
3506
3507         * common/common-utils.c: Don't include '<sys/stat.h>'.
3508         (is_regular_file): Move to...
3509         * common/filestuff.c (is_regular_file): ... here.
3510         * common/common-utils.h (is_regular_file): Move to...
3511         * common/filestuff.h (is_regular_file): ... here.
3512
3513 2018-09-12  Simon Marchi  <simon.marchi@ericsson.com>
3514
3515         * skip.c (debug_skip): New variable.
3516         (skiplist_entry::do_skip_file_p): Add debug output.
3517         (skiplist_entry::do_skip_gfile_p): Likewise.
3518         (skiplist_entry::skip_function_p): Likewise.
3519         (_initialize_step_skip): Create debug command.
3520         * NEWS: Mention set/show debug skip.
3521
3522 2018-09-11  Xavier Roirand  <roirand@adacore.com>
3523
3524         * darwin-nat.c (should_disable_startup_with_shell):
3525         New function.
3526         (darwin_nat_target::create_inferior): Add call.
3527
3528 2018-09-11  Xavier Roirand  <roirand@adacore.com>
3529
3530         * darwin-nat.h (struct darwin_thread_info) <gdb_port,
3531         inf_port, msg_state>: Initialize.
3532         (struct darwin_thread_info) <signaled, single_step>: Change
3533         type and initialize.
3534         (struct darwin_thread_info) <event>: Initialize.
3535
3536 2018-09-10  Sergio Durigan Junior  <sergiodj@redhat.com>
3537
3538         PR gdb/23555
3539         PR gdb/23558
3540         * gnulib/import/m4/getcwd-path-max.m4: Add cross-compilation
3541         guesses.
3542
3543 2018-09-10  Sergio Durigan Junior  <sergiodj@redhat.com>
3544
3545         Revert:
3546         2018-08-29  Sergio Durigan Junior  <sergiodj@redhat.com>
3547
3548         PR gdb/23555
3549         PR gdb/23558
3550         * gnulib/aclocal.m4: Regenerate.
3551         * gnulib/config.in: Regenerate.
3552         * gnulib/configure: Regenerate.
3553         * gnulib/import/Makefile.am: Update.
3554         * gnulib/import/Makefile.in: Update.
3555         * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
3556         * gnulib/import/_Noreturn.h: ... this.
3557         * gnulib/import/alloca.in.h: Update.
3558         * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
3559         * gnulib/import/arg-nonnull.h: ... this.
3560         * gnulib/import/assure.h: Update.
3561         * gnulib/import/at-func.c: Update.
3562         * gnulib/import/basename-lgpl.c: Update.
3563         * gnulib/import/extra/snippet/c++defs.h: Rename to...
3564         * gnulib/import/c++defs.h: ... this.
3565         * gnulib/import/canonicalize-lgpl.c: Update.
3566         * gnulib/import/cdefs.h: Update.
3567         * gnulib/import/chdir-long.c: Update.
3568         * gnulib/import/chdir-long.h: Update.
3569         * gnulib/import/cloexec.c: Update.
3570         * gnulib/import/cloexec.h: Update.
3571         * gnulib/import/close.c: Update.
3572         * gnulib/import/closedir.c: Update.
3573         * gnulib/import/config.charset: Update.
3574         * gnulib/import/dirent-private.h: Update.
3575         * gnulib/import/dirent.in.h: Update.
3576         * gnulib/import/dirfd.c: Update.
3577         * gnulib/import/dirname-lgpl.c: Update.
3578         * gnulib/import/dirname.h: Update.
3579         * gnulib/import/dosname.h: Update.
3580         * gnulib/import/dup-safer-flag.c: Update.
3581         * gnulib/import/dup-safer.c: Update.
3582         * gnulib/import/dup.c: Update.
3583         * gnulib/import/dup2.c: Update.
3584         * gnulib/import/errno.in.h: Update.
3585         * gnulib/import/error.c: Update.
3586         * gnulib/import/error.h: Update.
3587         * gnulib/import/exitfail.c: Update.
3588         * gnulib/import/exitfail.h: Update.
3589         * gnulib/import/extra/update-copyright: Update.
3590         * gnulib/import/fchdir.c: Update.
3591         * gnulib/import/fcntl.c: Update.
3592         * gnulib/import/fcntl.in.h: Update.
3593         * gnulib/import/fd-hook.c: Update.
3594         * gnulib/import/fd-hook.h: Update.
3595         * gnulib/import/fd-safer-flag.c: Update.
3596         * gnulib/import/fd-safer.c: Update.
3597         * gnulib/import/fdopendir.c: Update.
3598         * gnulib/import/filename.h: Update.
3599         * gnulib/import/filenamecat-lgpl.c: Update.
3600         * gnulib/import/filenamecat.h: Update.
3601         * gnulib/import/flexmember.h: Update.
3602         * gnulib/import/float+.h: Update.
3603         * gnulib/import/float.c: Update.
3604         * gnulib/import/float.in.h: Update.
3605         * gnulib/import/fnmatch.c: Update.
3606         * gnulib/import/fnmatch.in.h: Update.
3607         * gnulib/import/fnmatch_loop.c: Update.
3608         * gnulib/import/fpucw.h: Update.
3609         * gnulib/import/frexp.c: Update.
3610         * gnulib/import/frexpl.c: Update.
3611         * gnulib/import/fstat.c: Update.
3612         * gnulib/import/fstatat.c: Update.
3613         * gnulib/import/getcwd-lgpl.c: Update.
3614         * gnulib/import/getcwd.c: Update.
3615         * gnulib/import/getdtablesize.c: Update.
3616         * gnulib/import/getlogin_r.c: Update.
3617         * gnulib/import/getprogname.c: Update.
3618         * gnulib/import/getprogname.h: Update.
3619         * gnulib/import/gettext.h: Update.
3620         * gnulib/import/gettimeofday.c: Update.
3621         * gnulib/import/glob-libc.h: Update.
3622         * gnulib/import/glob.c: Update.
3623         * gnulib/import/glob.in.h: Update.
3624         * gnulib/import/glob_internal.h: Update.
3625         * gnulib/import/glob_pattern_p.c: Update.
3626         * gnulib/import/globfree.c: Update.
3627         * gnulib/import/hard-locale.c: Update.
3628         * gnulib/import/hard-locale.h: Update.
3629         * gnulib/import/intprops.h: Update.
3630         * gnulib/import/inttypes.in.h: Update.
3631         * gnulib/import/isnan.c: Update.
3632         * gnulib/import/isnand-nolibm.h: Update.
3633         * gnulib/import/isnand.c: Update.
3634         * gnulib/import/isnanl-nolibm.h: Update.
3635         * gnulib/import/isnanl.c: Update.
3636         * gnulib/import/itold.c: Update.
3637         * gnulib/import/libc-config.h: Update.
3638         * gnulib/import/limits.in.h: Update.
3639         * gnulib/import/localcharset.c: Update.
3640         * gnulib/import/localcharset.h: Update.
3641         * gnulib/import/localtime-buffer.c: Update.
3642         * gnulib/import/localtime-buffer.h: Update.
3643         * gnulib/import/lstat.c: Update.
3644         * gnulib/import/m4/00gnulib.m4: Update.
3645         * gnulib/import/m4/__inline.m4: Update.
3646         * gnulib/import/m4/absolute-header.m4: Update.
3647         * gnulib/import/m4/alloca.m4: Update.
3648         * gnulib/import/m4/builtin-expect.m4: Update.
3649         * gnulib/import/m4/canonicalize.m4: Update.
3650         * gnulib/import/m4/chdir-long.m4: Update.
3651         * gnulib/import/m4/close.m4: Update.
3652         * gnulib/import/m4/closedir.m4: Update.
3653         * gnulib/import/m4/configmake.m4: Update.
3654         * gnulib/import/m4/d-ino.m4: Update.
3655         * gnulib/import/m4/d-type.m4: Update.
3656         * gnulib/import/m4/dirent_h.m4: Update.
3657         * gnulib/import/m4/dirfd.m4: Update.
3658         * gnulib/import/m4/dirname.m4: Update.
3659         * gnulib/import/m4/double-slash-root.m4: Update.
3660         * gnulib/import/m4/dup.m4: Update.
3661         * gnulib/import/m4/dup2.m4: Update.
3662         * gnulib/import/m4/eealloc.m4: Update.
3663         * gnulib/import/m4/environ.m4: Update.
3664         * gnulib/import/m4/errno_h.m4: Update.
3665         * gnulib/import/m4/error.m4: Update.
3666         * gnulib/import/m4/exponentd.m4: Update.
3667         * gnulib/import/m4/exponentl.m4: Update.
3668         * gnulib/import/m4/extensions.m4: Update.
3669         * gnulib/import/m4/extern-inline.m4: Update.
3670         * gnulib/import/m4/fchdir.m4: Update.
3671         * gnulib/import/m4/fcntl-o.m4: Update.
3672         * gnulib/import/m4/fcntl.m4: Update.
3673         * gnulib/import/m4/fcntl_h.m4: Update.
3674         * gnulib/import/m4/fdopendir.m4: Update.
3675         * gnulib/import/m4/filenamecat.m4: Update.
3676         * gnulib/import/m4/flexmember.m4: Update.
3677         * gnulib/import/m4/float_h.m4: Update.
3678         * gnulib/import/m4/fnmatch.m4: Update.
3679         * gnulib/import/m4/fnmatch_h.m4: Update.
3680         * gnulib/import/m4/fpieee.m4: Update.
3681         * gnulib/import/m4/frexp.m4: Update.
3682         * gnulib/import/m4/frexpl.m4: Update.
3683         * gnulib/import/m4/fstat.m4: Update.
3684         * gnulib/import/m4/fstatat.m4: Update.
3685         * gnulib/import/m4/getcwd-abort-bug.m4: Update.
3686         * gnulib/import/m4/getcwd-path-max.m4: Update.
3687         * gnulib/import/m4/getcwd.m4: Update.
3688         * gnulib/import/m4/getdtablesize.m4: Update.
3689         * gnulib/import/m4/getlogin.m4: Update.
3690         * gnulib/import/m4/getlogin_r.m4: Update.
3691         * gnulib/import/m4/getpagesize.m4: Update.
3692         * gnulib/import/m4/getprogname.m4: Update.
3693         * gnulib/import/m4/gettimeofday.m4: Update.
3694         * gnulib/import/m4/glibc21.m4: Update.
3695         * gnulib/import/m4/glob.m4: Update.
3696         * gnulib/import/m4/glob_h.m4: Update.
3697         * gnulib/import/m4/gnulib-cache.m4: Update.
3698         * gnulib/import/m4/gnulib-common.m4: Update.
3699         * gnulib/import/m4/gnulib-comp.m4: Update.
3700         * gnulib/import/m4/gnulib-tool.m4: Update.
3701         * gnulib/import/m4/hard-locale.m4: Update.
3702         * gnulib/import/m4/include_next.m4: Update.
3703         * gnulib/import/m4/inttypes-pri.m4: Update.
3704         * gnulib/import/m4/inttypes.m4: Update.
3705         * gnulib/import/m4/isnand.m4: Update.
3706         * gnulib/import/m4/isnanl.m4: Update.
3707         * gnulib/import/m4/largefile.m4: Update.
3708         * gnulib/import/m4/limits-h.m4: Update.
3709         * gnulib/import/m4/localcharset.m4: Update.
3710         * gnulib/import/m4/locale-fr.m4: Update.
3711         * gnulib/import/m4/locale-ja.m4: Update.
3712         * gnulib/import/m4/locale-zh.m4: Update.
3713         * gnulib/import/m4/localtime-buffer.m4: Update.
3714         * gnulib/import/m4/longlong.m4: Update.
3715         * gnulib/import/m4/lstat.m4: Update.
3716         * gnulib/import/m4/malloc.m4: Update.
3717         * gnulib/import/m4/malloca.m4: Update.
3718         * gnulib/import/m4/math_h.m4: Update.
3719         * gnulib/import/m4/mbrtowc.m4: Update.
3720         * gnulib/import/m4/mbsinit.m4: Update.
3721         * gnulib/import/m4/mbsrtowcs.m4: Update.
3722         * gnulib/import/m4/mbstate_t.m4: Update.
3723         * gnulib/import/m4/memchr.m4: Update.
3724         * gnulib/import/m4/memmem.m4: Update.
3725         * gnulib/import/m4/mempcpy.m4: Update.
3726         * gnulib/import/m4/memrchr.m4: Update.
3727         * gnulib/import/m4/mkdir.m4: Update.
3728         * gnulib/import/m4/mkstemp.m4: Update.
3729         * gnulib/import/m4/mmap-anon.m4: Update.
3730         * gnulib/import/m4/mode_t.m4: Update.
3731         * gnulib/import/m4/msvc-inval.m4: Update.
3732         * gnulib/import/m4/msvc-nothrow.m4: Update.
3733         * gnulib/import/m4/multiarch.m4: Update.
3734         * gnulib/import/m4/nocrash.m4: Update.
3735         * gnulib/import/m4/off_t.m4: Update.
3736         * gnulib/import/m4/onceonly.m4: Update.
3737         * gnulib/import/m4/open-cloexec.m4: Update.
3738         * gnulib/import/m4/open.m4: Update.
3739         * gnulib/import/m4/openat.m4: Update.
3740         * gnulib/import/m4/opendir.m4: Update.
3741         * gnulib/import/m4/pathmax.m4: Update.
3742         * gnulib/import/m4/rawmemchr.m4: Update.
3743         * gnulib/import/m4/readdir.m4: Update.
3744         * gnulib/import/m4/readlink.m4: Update.
3745         * gnulib/import/m4/realloc.m4: Update.
3746         * gnulib/import/m4/rename.m4: Update.
3747         * gnulib/import/m4/rewinddir.m4: Update.
3748         * gnulib/import/m4/rmdir.m4: Update.
3749         * gnulib/import/m4/save-cwd.m4: Update.
3750         * gnulib/import/m4/secure_getenv.m4: Update.
3751         * gnulib/import/m4/setenv.m4: Update.
3752         * gnulib/import/m4/signal_h.m4: Update.
3753         * gnulib/import/m4/ssize_t.m4: Update.
3754         * gnulib/import/m4/stat-time.m4: Update.
3755         * gnulib/import/m4/stat.m4: Update.
3756         * gnulib/import/m4/std-gnu11.m4: Update.
3757         * gnulib/import/m4/stdbool.m4: Update.
3758         * gnulib/import/m4/stddef_h.m4: Update.
3759         * gnulib/import/m4/stdint.m4: Update.
3760         * gnulib/import/m4/stdio_h.m4: Update.
3761         * gnulib/import/m4/stdlib_h.m4: Update.
3762         * gnulib/import/m4/strchrnul.m4: Update.
3763         * gnulib/import/m4/strdup.m4: Update.
3764         * gnulib/import/m4/strerror.m4: Update.
3765         * gnulib/import/m4/string_h.m4: Update.
3766         * gnulib/import/m4/strstr.m4: Update.
3767         * gnulib/import/m4/strtok_r.m4: Update.
3768         * gnulib/import/m4/sys_socket_h.m4: Update.
3769         * gnulib/import/m4/sys_stat_h.m4: Update.
3770         * gnulib/import/m4/sys_time_h.m4: Update.
3771         * gnulib/import/m4/sys_types_h.m4: Update.
3772         * gnulib/import/m4/tempname.m4: Update.
3773         * gnulib/import/m4/time_h.m4: Update.
3774         * gnulib/import/m4/unistd-safer.m4: Update.
3775         * gnulib/import/m4/unistd_h.m4: Update.
3776         * gnulib/import/m4/warn-on-use.m4: Update.
3777         * gnulib/import/m4/wchar_h.m4: Update.
3778         * gnulib/import/m4/wchar_t.m4: Update.
3779         * gnulib/import/m4/wctype_h.m4: Update.
3780         * gnulib/import/m4/wint_t.m4: Update.
3781         * gnulib/import/malloc.c: Update.
3782         * gnulib/import/malloc/scratch_buffer.h: Update.
3783         * gnulib/import/malloc/scratch_buffer_grow.c: Update.
3784         * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
3785         * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
3786         * gnulib/import/malloca.c: Update.
3787         * gnulib/import/malloca.h: Update.
3788         * gnulib/import/malloca.valgrind: Update.
3789         * gnulib/import/math.in.h: Update.
3790         * gnulib/import/mbrtowc.c: Update.
3791         * gnulib/import/mbsinit.c: Update.
3792         * gnulib/import/mbsrtowcs-impl.h: Update.
3793         * gnulib/import/mbsrtowcs-state.c: Update.
3794         * gnulib/import/mbsrtowcs.c: Update.
3795         * gnulib/import/memchr.c: Update.
3796         * gnulib/import/memmem.c: Update.
3797         * gnulib/import/mempcpy.c: Update.
3798         * gnulib/import/memrchr.c: Update.
3799         * gnulib/import/mkdir.c: Update.
3800         * gnulib/import/mkstemp.c: Update.
3801         * gnulib/import/msvc-inval.c: Update.
3802         * gnulib/import/msvc-inval.h: Update.
3803         * gnulib/import/msvc-nothrow.c: Update.
3804         * gnulib/import/msvc-nothrow.h: Update.
3805         * gnulib/import/open.c: Update.
3806         * gnulib/import/openat-die.c: Update.
3807         * gnulib/import/openat-priv.h: Update.
3808         * gnulib/import/openat-proc.c: Update.
3809         * gnulib/import/openat.c: Update.
3810         * gnulib/import/openat.h: Update.
3811         * gnulib/import/opendir.c: Update.
3812         * gnulib/import/pathmax.h: Update.
3813         * gnulib/import/pipe-safer.c: Update.
3814         * gnulib/import/rawmemchr.c: Update.
3815         * gnulib/import/readdir.c: Update.
3816         * gnulib/import/readlink.c: Update.
3817         * gnulib/import/realloc.c: Update.
3818         * gnulib/import/ref-add.sin: Update.
3819         * gnulib/import/ref-del.sin: Update.
3820         * gnulib/import/rename.c: Update.
3821         * gnulib/import/rewinddir.c: Update.
3822         * gnulib/import/rmdir.c: Update.
3823         * gnulib/import/same-inode.h: Update.
3824         * gnulib/import/save-cwd.c: Update.
3825         * gnulib/import/save-cwd.h: Update.
3826         * gnulib/import/scratch_buffer.h: Update.
3827         * gnulib/import/secure_getenv.c: Update.
3828         * gnulib/import/setenv.c: Update.
3829         * gnulib/import/signal.in.h: Update.
3830         * gnulib/import/stat-time.c: Update.
3831         * gnulib/import/stat-time.h: Update.
3832         * gnulib/import/stat-w32.c: Update.
3833         * gnulib/import/stat-w32.h: Update.
3834         * gnulib/import/stat.c: Update.
3835         * gnulib/import/stdbool.in.h: Update.
3836         * gnulib/import/stddef.in.h: Update.
3837         * gnulib/import/stdint.in.h: Update.
3838         * gnulib/import/stdio.in.h: Update.
3839         * gnulib/import/stdlib.in.h: Update.
3840         * gnulib/import/str-two-way.h: Update.
3841         * gnulib/import/strchrnul.c: Update.
3842         * gnulib/import/strdup.c: Update.
3843         * gnulib/import/streq.h: Update.
3844         * gnulib/import/strerror-override.c: Update.
3845         * gnulib/import/strerror-override.h: Update.
3846         * gnulib/import/strerror.c: Update.
3847         * gnulib/import/string.in.h: Update.
3848         * gnulib/import/stripslash.c: Update.
3849         * gnulib/import/strnlen1.c: Update.
3850         * gnulib/import/strnlen1.h: Update.
3851         * gnulib/import/strstr.c: Update.
3852         * gnulib/import/strtok_r.c: Update.
3853         * gnulib/import/sys_stat.in.h: Update.
3854         * gnulib/import/sys_time.in.h: Update.
3855         * gnulib/import/sys_types.in.h: Update.
3856         * gnulib/import/tempname.c: Update.
3857         * gnulib/import/tempname.h: Update.
3858         * gnulib/import/time.in.h: Update.
3859         * gnulib/import/unistd--.h: Update.
3860         * gnulib/import/unistd-safer.h: Update.
3861         * gnulib/import/unistd.in.h: Update.
3862         * gnulib/import/unsetenv.c: Update.
3863         * gnulib/import/verify.h: Update.
3864         * gnulib/import/extra/snippet/warn-on-use.h: Update.
3865         * gnulib/import/wchar.in.h: Update.
3866         * gnulib/import/wctype.in.h: Update.
3867         * gnulib/import/xalloc-oversized.h: Update.
3868         * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
3869         "53e2c179f26a890fa6685af4b6c1397ee370433b".
3870
3871 2018-09-10  Simon Marchi  <simon.marchi@ericsson.com>
3872
3873         * record-btrace.c (get_thread_current_frame): Remove
3874         old_inferior_ptid.
3875
3876 2018-09-10  Jerome Guitton  <guitton@adacore.com>
3877
3878         * ada-lang.c (ada_value_struct_elt): Call ada_to_fixed_type
3879         with check_tag to 1 if and only if the type is tagged and the
3880         component being searched cannot been found in the current
3881         view. Otherwise, always call ada_to_fixed_type with
3882         check_tag to 0.
3883
3884 2018-09-10  Xavier Roirand  <roirand@adacore.com>
3885
3886         * ada-lang.c (ada_is_access_to_unconstrained_array): Remove static
3887         declaration.
3888         * ada-lang.h: add ada_is_access_to_unconstrained_array prototype.
3889         * ada-varobj.c (ada_varobj_get_number_of_children,
3890         ada_varobj_describe_child, ada_value_is_changeable_p): Cleanup code.
3891
3892 2018-09-10  Xavier Roirand  <roirand@adacore.com>
3893
3894         * ada-valprint.c (ada_value_print): Use type instead of
3895         enclosing type.
3896
3897 2018-09-10  Xavier Roirand  <roirand@adacore.com>
3898
3899         * ada-lang.c (ada_value_subscript): Handle case when parameter is
3900         an array of access to unconstrained array.
3901
3902 2018-09-10  Xavier Roirand  <roirand@adacore.com>
3903
3904         * ada-lang.c (ada_is_access_to_unconstrained_array): New function.
3905         (ada_check_typedef): Use it.
3906
3907 2018-09-10  Xavier Roirand  <roirand@adacore.com>
3908
3909         * ada-varobj.c (ada_varobj_describe_struct_child)
3910         (ada_varobj_describe_child): Handle union case like struct one.
3911
3912 2018-09-10  Tom Tromey  <tom@tromey.com>
3913
3914         PR python/18380:
3915         * python/python.c (_initialize_python): Make example in "python"
3916         help work in Python 3.
3917
3918 2018-09-10  Eli Zaretskii  <eliz@gnu.org>
3919
3920         * Makefile.in (transformed_name): Use INSTALL_SCRIPT instead of
3921         INSTALL_PROGRAM to install gdb-add-index.sh.  Don't append
3922         $(EXEEXT) to the script, as it is not a program.
3923
3924 2018-09-09  Simon Marchi  <simon.marchi@ericsson.com>
3925
3926         * python/py-prettyprint.c (pretty_print_one_value): Return
3927         gdbpy_ref<>.
3928         (print_string_repr): Adjust.
3929         (apply_varobj_pretty_printer): Return gdbpy_ref<>.
3930         * python/python-internal.h (apply_varobj_pretty_printer): Return
3931         gdbpy_ref<>.
3932         * varobj.c (varobj_value_get_print_value): Adjust.
3933
3934 2018-09-08  Tom Tromey  <tom@tromey.com>
3935
3936         PR python/16047:
3937         * python/py-prettyprint.c (pretty_print_one_value): Check for
3938         to_string method.
3939
3940 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
3941
3942         * ada-lang.c (resolve_subexp): Pass correct OPLEN in call to
3943         replace_operator_with_call.
3944
3945 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
3946
3947         * ada-lang.c (ada_value_cast): Remove unnecessary parentheses.
3948
3949 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
3950
3951         * ada-typeprint.c (print_range): Print the bounds using TYPE
3952         rather than its TYPE_TARGET_TYPE.
3953
3954 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
3955
3956         * ada-lang.c (ada_to_fixed_value): Minor reformatting in
3957         call to ada_to_fixed_value_create.
3958
3959 2018-09-08  Jerome Guitton  <guitton@adacore.com>
3960
3961         * ada-lang.c (ada_decode): strip dot prefix in symbol name.
3962
3963 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
3964
3965         * ada-lang.c (ada_exception_sal): Replace gdb_assert calls
3966         by calls to error.
3967
3968 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
3969
3970         * ada-lang.c (ada_unhandled_exception_name_addr_from_raise):
3971         Move update of loop variable "fi".
3972
3973 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
3974
3975         * ada-lang.c (value_assign_to_component): In the case of
3976         big-endian targets, extract the bits of the given VAL
3977         using an src_offset of zero if container is not a scalar.
3978
3979 2018-09-06  Simon Ser  <contact@emersion.fr>
3980
3981         PR gdb/23105
3982         * fbsd-nat.c (fbsd_nat_target::xfer_partial): Add support for
3983         TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
3984         * fbsd-tdep.c (fbsd_make_note_desc): New.
3985         (fbsd_make_corefile_notes): Write NT_PROCSTAT_AUXV,
3986         NT_PROCSTAT_VMMAP and NT_PROCSTAT_PS_STRINGS notes.
3987         * target.h (enum target_object) Add FreeBSD-specific
3988         TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
3989
3990 2018-09-06  Simon Marchi  <simon.marchi@ericsson.com>
3991
3992         * compile/compile-c.h (generate_c_for_variable_locations):
3993         Change reference to pointer.
3994         * compile/compile-c-support.c (compile_program) <compute>:
3995         Likewise.
3996         * compile/compile-c-symbols.c (generate_vla_size): Likewise.
3997         (generate_c_for_for_one_variable): Likewise
3998         (generate_c_for_variable_locations): Likewise
3999         * compile/compile-c-types.c (compile_c_instance::convert_type):
4000         Likewise
4001         * compile/compile-cplus-symbols.c (convert_one_symbol):
4002         std::move the scope passed to enter_scope.
4003         * compile/compile-cplus-types.c
4004         (compile_cplus_instance::enter_scope): Make parameter
4005         rvalue-reference.
4006         (compile_cplus_instance::new_scope): Change reference to
4007         pointer.
4008         (compile_cplus_instance::convert_type): Likewise
4009         (compile_cplus_convert_typedef): std::move the scope passed to
4010         enter_scope.
4011         (compile_cplus_convert_struct_or_union): Likewise.
4012         (compile_cplus_convert_enum): Likewise.
4013         (compile_cplus_convert_namespace): Likewise.
4014         * compile/compile-cplus.h (compile_cplus_instance)
4015         <enter_scope>: Make parameter rvalue-reference.
4016         * compile/compile-internal.h (compile_instance)
4017         <get_cached_type>: Likewise
4018         * compile/compile-loc2c.c (push): Likewise
4019         (pushf): Likewise
4020         (unary): Likewise
4021         (binary): Likewise
4022         (print_label): Likewise
4023         (pushf_register_address): Likewise
4024         (pushf_register): Likewise
4025         (do_compile_dwarf_expr_to_c): Likewise
4026         (compile_dwarf_expr_to_c): Likewise
4027         (compile_dwarf_bounds_to_c): Likewise
4028         * compile/compile.c (compile_instance::get_cached_type):
4029         Likewise
4030         * compile/compile.h (compile_dwarf_expr_to_c): Likewise.
4031         (compile_dwarf_bounds_to_c): Likewise
4032         * dwarf2loc.c (locexpr_generate_c_location): Likewise.
4033         (dwarf2_compile_property_to_c): Likewise
4034         * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise
4035         * symtab.h (struct symbol_computed_ops) <generate_c_location>:
4036         Likewise
4037
4038 2018-09-06  Simon Marchi  <simon.marchi@ericsson.com>
4039
4040         * tui/tui-data.h (struct tui_win_element) <highlight>: Remove.
4041         * tui/tui-data.c (init_content_element): Don't initialize it.
4042
4043 2018-09-06  Simon Marchi  <simon.marchi@ericsson.com>
4044
4045         * tui/tui-data.h (struct tui_win_info)
4046         <detail::opaque>: Remove.
4047         * tui/tui-data.c (init_win_info): Remove assignment.
4048
4049 2018-09-05  Tom Tromey  <tom@tromey.com>
4050
4051         * warning.m4 (AM_GDB_WARNINGS): Add -Wformat when testing
4052         -Wformat-nonliteral.
4053         * target-float.c (host_float_ops<T>::to_string)
4054         (host_float_ops<T>::from_string): Use
4055         DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
4056         * configure: Rebuild.
4057
4058 2018-09-05  Simon Marchi  <simon.marchi@ericsson.com>
4059
4060         * printcmd.c (printf_c_string): Use
4061         DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
4062         (printf_wide_c_string, printf_pointer, ui_printf): Likewise.
4063
4064 2018-09-05  Tom Tromey  <tom@tromey.com>
4065
4066         * cli/cli-cmds.c (shell_escape, edit_command): Remove cast.
4067
4068 2018-09-05  Tom de Vries  <tdevries@suse.de>
4069
4070         * dwarf2loc.c (sect_variable_value): Call indirect_synthetic_pointer
4071         with resolve_abstract_p == true.
4072         (indirect_synthetic_pointer): Add resolve_abstract_p parameter,
4073         defaulting to false. Propagate resolve_abstract_p to
4074         dwarf2_fetch_die_loc_sect_off.
4075         * dwarf2loc.h (dwarf2_fetch_die_loc_sect_off): Add resolve_abstract_p
4076         parameter, defaulting to false.
4077         * dwarf2read.c (read_variable): Add variable to abstract_to_concrete.
4078         (dwarf2_fetch_die_loc_sect_off): Add and handle resolve_abstract_p
4079         parameter.
4080         * dwarf2read.h (struct die_info): Forward-declare.
4081         (die_info_ptr): New typedef.
4082         (struct dwarf2_per_objfile): Add abstract_to_concrete field.
4083
4084 2018-09-05  Joel Brobecker  <brobecker@adacore.com>
4085
4086         GDB 8.2 released.
4087
4088 2018-09-04  Sergio Durigan Junior  <sergiodj@redhat.com>
4089             Pedro Alves  <palves@redhat.com>
4090
4091         * gnulib/Makefile.in (aclocal_m4_deps): Move to
4092         "aclocal-m4-deps.mk".  Include file here.
4093         $(srcdir)/aclocal.m4: Add "configure.ac".
4094         * gnulib/aclocal-m4-deps.mk: New file.
4095         * gnulib/update-gnulib.sh: Automatically update
4096         "aclocal-m4-deps.mk".
4097
4098 2018-09-04  Tom Tromey  <tom@tromey.com>
4099
4100         * configure: Rebuild.
4101         * configure.ac: Remove multi-ice code.
4102
4103 2018-09-04  Tom Tromey  <tom@tromey.com>
4104
4105         * Makefile.in (GDB_WARN_CFLAGS_NO_DEFS): Remove.
4106         (ada-exp.o): Update.
4107
4108 2018-09-04  Tom Tromey  <tom@tromey.com>
4109
4110         * Makefile.in (printcmd.o, target-float.o): Remove.
4111         (GDB_WARN_CFLAGS_NO_FORMAT): Remove.
4112
4113 2018-09-04  Tom Tromey  <tom@tromey.com>
4114
4115         * gnulib/Makefile.in: Remove obsolete comment.
4116         * Makefile.in: Remove obsolete comment.
4117
4118 2018-09-04  Andrew Burgess  <andrew.burgess@embecosm.com>
4119
4120         * riscv-tdep.c (riscv_frame_cache): Fix ARI warning, don't end a
4121         line with '+'.
4122
4123 2018-09-03  Andrew Burgess  <andrew.burgess@embecosm.com>
4124
4125         * riscv-tdep.c: Add 'prologue-value.h' include.
4126         (struct riscv_unwind_cache): New struct.
4127         (riscv_debug_unwinder): New global.
4128         (riscv_scan_prologue): Update arguments, capture register details
4129         from prologue scan.
4130         (riscv_skip_prologue): Reformat arguments line, move end of
4131         prologue calculation into riscv_scan_prologue.
4132         (riscv_frame_cache): Update return type, create
4133         riscv_unwind_cache, scan the prologue, and fill in remaining cache
4134         details.
4135         (riscv_frame_this_id): Use frame id computed in riscv_frame_cache.
4136         (riscv_frame_prev_register): Use the trad_frame within the
4137         riscv_unwind_cache.
4138         (_initialize_riscv_tdep): Add 'set/show debug riscv unwinder'
4139         flag.
4140
4141 2018-09-03  Andrew Burgess  <andrew.burgess@embecosm.com>
4142
4143         * trad-frame.h (trad_frame_set_realreg): Declare.
4144         (trad_frame_set_addr): Declare.
4145         * trad-frame.c (trad_frame_set_realreg): Define new function.
4146         (trad_frame_set_addr): Define new function.
4147         (trad_frame_set_reg_realreg): Use new function.
4148         (trad_frame_set_reg_addr): Use new function.
4149
4150 2018-09-01  Keith Seitz  <keiths@redhat.com>
4151
4152         * compile/compile-cplus-types.c (compile_cplus_debug_output_1): Use
4153         pulongest instead of "%lld".
4154         * compile/compile-cplus-symbols.c (gcc_cplus_convert_symbol): Remove
4155         ATTRIBUTE_UNUSED.
4156
4157 2018-08-31  Tom Tromey  <tom@tromey.com>
4158
4159         * dwarf2read.c (dwarf2_add_field): Set the TYPE_LENGTH of the
4160         variant part type.
4161
4162 2018-08-31  Pedro Alves  <palves@redhat.com>
4163
4164         * gdbarch.h: Regenerate.
4165
4166 2018-08-31  Pedro Alves  <palves@redhat.com>
4167
4168         * gdbarch.sh (have_nonsteppable_watchpoint): Add comment.
4169         * target.h (Hardware watchpoint interfaces): Describe
4170         continuable/steppable/non-steppable watchpoints.
4171         * gdbarch.h, gdbarch.c: Regenerate.
4172
4173 2018-08-31  Pedro Alves  <palves@redhat.com>
4174
4175         * nto-procfs.c (nto_procfs_target::have_continuable_watchpoint):
4176         Delete.
4177         * s390-linux-nat.c
4178         (s390_linux_nat_target::have_continuable_watchpoint): Delete.
4179         * target.h (target_ops::have_continuable_watchpoint): Delete.
4180         (target_have_continuable_watchpoint): Delete.
4181         * x86-nat.h (x86_nat_target::have_continuable_watchpoint): Delete.
4182         * target-delegates.c: Regenerate.
4183
4184 2018-08-31  Sergio Durigan Junior  <sergiodj@redhat.com>
4185
4186         * gnulib/Makefile.in (aclocal_m4_deps): Update according to
4187         the files present in "gnulib/import/m4/".
4188
4189 2018-08-30  Andrew Burgess  <andrew.burgess@embecosm.com>
4190
4191         * riscv-tdep.c (riscv_insn::decode): Decode c.addi4spn, c.sd,
4192         c.sw, c.swsp, and c.sdsp.
4193
4194 2018-08-30  Andrew Burgess  <andrew.burgess@embecosm.com>
4195
4196         * riscv-tdep.c (struct riscv_inferior_data): Delete.
4197         (riscv_read_misa_reg): Don't cache value read into inferior data.
4198         (riscv_new_inferior_data): Delete.
4199         (riscv_inferior_data_cleanup): Delete.
4200         (riscv_inferior_data): Delete.
4201         (riscv_invalidate_inferior_data): Delete.
4202         (_initialize_riscv_tdep): Remove initialisation of inferior data.
4203
4204 2018-08-30  Simon Marchi  <simon.marchi@ericsson.com>
4205
4206         * compile/compile-cplus-types.c
4207         (compile_cplus_instance::leave_scope): Take the address of scope
4208         object.
4209         (compile_cplus_instance::convert_qualified_base): Compare quals
4210         to 0.
4211
4212 2018-08-30  Keith Seitz  <keiths@redhat.com>
4213
4214         * compile/compile-cplus-types.c (compile_cplus_instance::enter_scope):
4215         Use "%s" and host_address_to_string instead of "%p" in printf.
4216
4217 2018-08-29  Keith Seitz  <keiths@redhat.com>
4218
4219         * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Add compile-cplus-symbols.c
4220         and compile-cplus-types.c.
4221         (HFILES_NO_SRCDIR): Add gcc-cp-plugin.h.
4222         * c-lang.c (cplus_language_defn): Set C++ compile functions.
4223         * c-lang.h (cplus_get_compile_context, cplus_compute_program):
4224         Declare.
4225         * compile/compile-c-support.c: Include compile-cplus.h.
4226         (load_libcompile): Templatize.
4227         (get_compile_context): "New" function.
4228         (c_get_compile_context): Use get_compile_context.
4229         (cplus_get_compile_context): New function.
4230         (cplus_push_user_expression, cplus_pop_user_expression)
4231         (cplus_add_code_header, cplus_add_input, cplus_compile_program)
4232         (cplus_compute_program): Define new structs/functions.
4233         * compile/compile-cplus-symmbols.c: New file.
4234         * compile/compile-cplus-types.c: New file.
4235         * compile/compile-cplus.h: New file.
4236         * compile/compile-internal.h (debug_compile_oracle, GCC_TYPE_NONE):
4237         Declare.
4238         * compile/compile-object-load.c (get_out_value_type): Use
4239         strncmp_iw when comparing symbol names.
4240         (compile_object_load): Add mst_bss and mst_data.
4241         * compile/compile.c (_initialize_compile): Remove
4242         -Wno-implicit-function-declaration from `compile_args'.
4243         * compile/gcc-cp-plugin.h: New file.
4244         * NEWS: Mention C++ compile support and new debug options.
4245
4246 2018-08-29  Keith Seitz  <keiths@redhat.com>
4247
4248         * linespec.c (collect_info::add_symbol): Make virtual.
4249         (struct symbol_searcher_collect_info): New struct.
4250         (symbol_searcher::find_all_symbols): New method.
4251         * symtab.h (class symbol_searcher): New class.
4252
4253 2018-08-29  Keith Seitz  <keiths@redhat.com>
4254
4255         * linespec.c (struct linespec) <function_symbols, label_symbols>:
4256         Change to vector of block_symbol.  Update all users.
4257         (struct collect_info) <symbols>: Likewise.
4258         (collect_info::add_symbol): Take block_symbol as argument.
4259         Update all callers.
4260         (decode_compound_collector) <m_symbols>: Change type to vector
4261         of block_symbol.  Update all users.
4262         (decode_compound_collector::operator ()): Change parameter type
4263         to block_symbol.
4264         (find_method, find_function_symbols, find_linespec_symbols)
4265         (find_label_symbols_in_block, find_label_symbols): Change symbol
4266         vectors to block_symbol vectors.
4267         * symtab.h (symbol_found_callback_ftype): Change parameter type to
4268         block_symbol.
4269
4270 2018-08-29  Keith Seitz  <keiths@redhat.com>
4271
4272         * linespec.c (symbolp): Remove typedef and VEC definitions.
4273         (bound_minimal_symbol_d): Likewise.
4274
4275 2018-08-29  Keith Seitz  <keiths@redhat.com>
4276
4277         * linespec.c (decode_compound_collector::decode_compound_collector):
4278         Remove initialization for `m_symtabs'.
4279         (decode_compound_collector::release_symbols): Change return type
4280         to std::vector.  Update all callers.
4281         (class decode_compound_collector) <m_symbols>: Change type to
4282         std::vector.
4283         (lookup_prefix_sym): Change return type to std::vector.  Update all
4284         callers.
4285         (compare_symbols): Remove.
4286         (std_compare_symbols): Rename to `compare_symbols'.
4287         (find_method): Change `sym_classes' parameter to std::vector.
4288         Update all callers.  Use std::sort to sort sym_classes.
4289         (find_linespec_symbols): Remove cleanup.
4290
4291 2018-08-29  Keith Seitz  <keiths@redhat.com>
4292
4293         * linespec.c (struct linespec) <minimal_symbols>: Change type to
4294         std::vector.  Update all users.
4295         (convert_linespec_to_sals): Use std::sort to sort minimal symbols.
4296         (struct collect_info) <minimal_symbols>: Likewise.
4297         (compare_msymbols): Return bool.  Change parameters to const
4298         bound_minimal_symbol references.
4299         (find_method, find_function_symbols, find_linespec_symbols): Change
4300         `minsyms' parameter to std::vector.  Update all callers.
4301
4302 2018-08-29  Keith Seitz  <keiths@redhat.com>
4303
4304         * linespec.c (struct linespec) <label_symbols>: Change type to
4305         std::vector.  Update all users.
4306         (find_label_symbols_in_block): Change `result' parameter to
4307         std::vector.  Update all callers.
4308         (find_label_symbols): Return std::vector.  Update all callers.
4309
4310 2018-08-29  Keith Seitz  <keiths@redhat.com>
4311
4312         * linespec.c (struct linespec) <function_symbols>: Change type to
4313         std::vector.  Update all users.
4314         (struct collect_info) <function_symbols>: Likewise.
4315         (convert_linespec_to_sals): Use std::sort to sort function_symbols.
4316         (std_compare_symbols): New function.
4317         (find_method, find_function_symbols, find_linespec_symbols)
4318         (find_label_symbols_in_block): Change `symbols' parameter to
4319         std::vector.  Update all callers.
4320         (find_label_symbols): Likewise for `function_symbols' and
4321         `label_funcs_ret'.
4322
4323 2018-08-29  Keith Seitz  <keiths@redhat.com>
4324
4325         * linespec.c (symtab_vector_up): Define.
4326         (struct linespec) <file_symtabs>: Change type to std::vector *.
4327         Update all uses.
4328         (struct collect_info) <file_symtabs>: Likewise.
4329         (collect_symtabs_from_filename): Return symtab_vector_up.
4330         Update all callers.
4331         (decode_objc): Remove cleanup.
4332         (symtab_collector::symtab_collector): Initialize `m_symtabs'.
4333         (symtab_collector::release_symtabs): Return symtab_vector_up.
4334         Update all callers.
4335         (class symtab_collector) <m_symtabs>: Change type to symtab_vector_up.
4336         Update all users.
4337         (collect_symtabs_from_filename, symtabs_from_filename): Return
4338         symtab_vector_up.  Update all callers.
4339
4340 2018-08-29  Tom Tromey  <tom@tromey.com>
4341
4342         * csky-tdep.c (csky_analyze_prologue): Use
4343         core_addr_to_string_nz.
4344
4345 2018-08-29  Tom Tromey  <tom@tromey.com>
4346
4347         * windows-nat.c (struct xlate_exception) <them>: Change type to
4348         DWORD.
4349         (xlate): Fix formatting.  Remove last entry.
4350         (struct xlate_exception, xlate): Comment out.
4351         (windows_nat_target::resume): Use ranged for.
4352
4353 2018-08-29  Jim Wilson  <jimw@sifive.com>
4354
4355         * riscv-linux-nat.c: Include elf/common.h instead of elf.h.
4356         (riscv_linux_nat_target::fetch_registers): Use NT_FPREGSET instead
4357         of NT_PRFPREG.
4358         (riscv_linux_nat_target::store_registers): Likewise.
4359
4360 2018-08-29  Sergio Durigan Junior  <sergiodj@redhat.com>
4361
4362         PR gdb/23555
4363         PR gdb/23558
4364         * gnulib/aclocal.m4: Regenerate.
4365         * gnulib/config.in: Regenerate.
4366         * gnulib/configure: Regenerate.
4367         * gnulib/import/Makefile.am: Update.
4368         * gnulib/import/Makefile.in: Update.
4369         * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
4370         * gnulib/import/_Noreturn.h: ... this.
4371         * gnulib/import/alloca.in.h: Update.
4372         * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
4373         * gnulib/import/arg-nonnull.h: ... this.
4374         * gnulib/import/assure.h: Update.
4375         * gnulib/import/at-func.c: Update.
4376         * gnulib/import/basename-lgpl.c: Update.
4377         * gnulib/import/extra/snippet/c++defs.h: Rename to...
4378         * gnulib/import/c++defs.h: ... this.
4379         * gnulib/import/canonicalize-lgpl.c: Update.
4380         * gnulib/import/cdefs.h: Update.
4381         * gnulib/import/chdir-long.c: Update.
4382         * gnulib/import/chdir-long.h: Update.
4383         * gnulib/import/cloexec.c: Update.
4384         * gnulib/import/cloexec.h: Update.
4385         * gnulib/import/close.c: Update.
4386         * gnulib/import/closedir.c: Update.
4387         * gnulib/import/config.charset: Update.
4388         * gnulib/import/dirent-private.h: Update.
4389         * gnulib/import/dirent.in.h: Update.
4390         * gnulib/import/dirfd.c: Update.
4391         * gnulib/import/dirname-lgpl.c: Update.
4392         * gnulib/import/dirname.h: Update.
4393         * gnulib/import/dosname.h: Update.
4394         * gnulib/import/dup-safer-flag.c: Update.
4395         * gnulib/import/dup-safer.c: Update.
4396         * gnulib/import/dup.c: Update.
4397         * gnulib/import/dup2.c: Update.
4398         * gnulib/import/errno.in.h: Update.
4399         * gnulib/import/error.c: Update.
4400         * gnulib/import/error.h: Update.
4401         * gnulib/import/exitfail.c: Update.
4402         * gnulib/import/exitfail.h: Update.
4403         * gnulib/import/extra/update-copyright: Update.
4404         * gnulib/import/fchdir.c: Update.
4405         * gnulib/import/fcntl.c: Update.
4406         * gnulib/import/fcntl.in.h: Update.
4407         * gnulib/import/fd-hook.c: Update.
4408         * gnulib/import/fd-hook.h: Update.
4409         * gnulib/import/fd-safer-flag.c: Update.
4410         * gnulib/import/fd-safer.c: Update.
4411         * gnulib/import/fdopendir.c: Update.
4412         * gnulib/import/filename.h: Update.
4413         * gnulib/import/filenamecat-lgpl.c: Update.
4414         * gnulib/import/filenamecat.h: Update.
4415         * gnulib/import/flexmember.h: Update.
4416         * gnulib/import/float+.h: Update.
4417         * gnulib/import/float.c: Update.
4418         * gnulib/import/float.in.h: Update.
4419         * gnulib/import/fnmatch.c: Update.
4420         * gnulib/import/fnmatch.in.h: Update.
4421         * gnulib/import/fnmatch_loop.c: Update.
4422         * gnulib/import/fpucw.h: Update.
4423         * gnulib/import/frexp.c: Update.
4424         * gnulib/import/frexpl.c: Update.
4425         * gnulib/import/fstat.c: Update.
4426         * gnulib/import/fstatat.c: Update.
4427         * gnulib/import/getcwd-lgpl.c: Update.
4428         * gnulib/import/getcwd.c: Update.
4429         * gnulib/import/getdtablesize.c: Update.
4430         * gnulib/import/getlogin_r.c: Update.
4431         * gnulib/import/getprogname.c: Update.
4432         * gnulib/import/getprogname.h: Update.
4433         * gnulib/import/gettext.h: Update.
4434         * gnulib/import/gettimeofday.c: Update.
4435         * gnulib/import/glob-libc.h: Update.
4436         * gnulib/import/glob.c: Update.
4437         * gnulib/import/glob.in.h: Update.
4438         * gnulib/import/glob_internal.h: Update.
4439         * gnulib/import/glob_pattern_p.c: Update.
4440         * gnulib/import/globfree.c: Update.
4441         * gnulib/import/hard-locale.c: Update.
4442         * gnulib/import/hard-locale.h: Update.
4443         * gnulib/import/intprops.h: Update.
4444         * gnulib/import/inttypes.in.h: Update.
4445         * gnulib/import/isnan.c: Update.
4446         * gnulib/import/isnand-nolibm.h: Update.
4447         * gnulib/import/isnand.c: Update.
4448         * gnulib/import/isnanl-nolibm.h: Update.
4449         * gnulib/import/isnanl.c: Update.
4450         * gnulib/import/itold.c: Update.
4451         * gnulib/import/libc-config.h: Update.
4452         * gnulib/import/limits.in.h: Update.
4453         * gnulib/import/localcharset.c: Update.
4454         * gnulib/import/localcharset.h: Update.
4455         * gnulib/import/localtime-buffer.c: Update.
4456         * gnulib/import/localtime-buffer.h: Update.
4457         * gnulib/import/lstat.c: Update.
4458         * gnulib/import/m4/00gnulib.m4: Update.
4459         * gnulib/import/m4/__inline.m4: Update.
4460         * gnulib/import/m4/absolute-header.m4: Update.
4461         * gnulib/import/m4/alloca.m4: Update.
4462         * gnulib/import/m4/builtin-expect.m4: Update.
4463         * gnulib/import/m4/canonicalize.m4: Update.
4464         * gnulib/import/m4/chdir-long.m4: Update.
4465         * gnulib/import/m4/close.m4: Update.
4466         * gnulib/import/m4/closedir.m4: Update.
4467         * gnulib/import/m4/configmake.m4: Update.
4468         * gnulib/import/m4/d-ino.m4: Update.
4469         * gnulib/import/m4/d-type.m4: Update.
4470         * gnulib/import/m4/dirent_h.m4: Update.
4471         * gnulib/import/m4/dirfd.m4: Update.
4472         * gnulib/import/m4/dirname.m4: Update.
4473         * gnulib/import/m4/double-slash-root.m4: Update.
4474         * gnulib/import/m4/dup.m4: Update.
4475         * gnulib/import/m4/dup2.m4: Update.
4476         * gnulib/import/m4/eealloc.m4: Update.
4477         * gnulib/import/m4/environ.m4: Update.
4478         * gnulib/import/m4/errno_h.m4: Update.
4479         * gnulib/import/m4/error.m4: Update.
4480         * gnulib/import/m4/exponentd.m4: Update.
4481         * gnulib/import/m4/exponentl.m4: Update.
4482         * gnulib/import/m4/extensions.m4: Update.
4483         * gnulib/import/m4/extern-inline.m4: Update.
4484         * gnulib/import/m4/fchdir.m4: Update.
4485         * gnulib/import/m4/fcntl-o.m4: Update.
4486         * gnulib/import/m4/fcntl.m4: Update.
4487         * gnulib/import/m4/fcntl_h.m4: Update.
4488         * gnulib/import/m4/fdopendir.m4: Update.
4489         * gnulib/import/m4/filenamecat.m4: Update.
4490         * gnulib/import/m4/flexmember.m4: Update.
4491         * gnulib/import/m4/float_h.m4: Update.
4492         * gnulib/import/m4/fnmatch.m4: Update.
4493         * gnulib/import/m4/fnmatch_h.m4: Update.
4494         * gnulib/import/m4/fpieee.m4: Update.
4495         * gnulib/import/m4/frexp.m4: Update.
4496         * gnulib/import/m4/frexpl.m4: Update.
4497         * gnulib/import/m4/fstat.m4: Update.
4498         * gnulib/import/m4/fstatat.m4: Update.
4499         * gnulib/import/m4/getcwd-abort-bug.m4: Update.
4500         * gnulib/import/m4/getcwd-path-max.m4: Update.
4501         * gnulib/import/m4/getcwd.m4: Update.
4502         * gnulib/import/m4/getdtablesize.m4: Update.
4503         * gnulib/import/m4/getlogin.m4: Update.
4504         * gnulib/import/m4/getlogin_r.m4: Update.
4505         * gnulib/import/m4/getpagesize.m4: Update.
4506         * gnulib/import/m4/getprogname.m4: Update.
4507         * gnulib/import/m4/gettimeofday.m4: Update.
4508         * gnulib/import/m4/glibc21.m4: Update.
4509         * gnulib/import/m4/glob.m4: Update.
4510         * gnulib/import/m4/glob_h.m4: Update.
4511         * gnulib/import/m4/gnulib-cache.m4: Update.
4512         * gnulib/import/m4/gnulib-common.m4: Update.
4513         * gnulib/import/m4/gnulib-comp.m4: Update.
4514         * gnulib/import/m4/gnulib-tool.m4: Update.
4515         * gnulib/import/m4/hard-locale.m4: Update.
4516         * gnulib/import/m4/include_next.m4: Update.
4517         * gnulib/import/m4/inttypes-pri.m4: Update.
4518         * gnulib/import/m4/inttypes.m4: Update.
4519         * gnulib/import/m4/isnand.m4: Update.
4520         * gnulib/import/m4/isnanl.m4: Update.
4521         * gnulib/import/m4/largefile.m4: Update.
4522         * gnulib/import/m4/limits-h.m4: Update.
4523         * gnulib/import/m4/localcharset.m4: Update.
4524         * gnulib/import/m4/locale-fr.m4: Update.
4525         * gnulib/import/m4/locale-ja.m4: Update.
4526         * gnulib/import/m4/locale-zh.m4: Update.
4527         * gnulib/import/m4/localtime-buffer.m4: Update.
4528         * gnulib/import/m4/longlong.m4: Update.
4529         * gnulib/import/m4/lstat.m4: Update.
4530         * gnulib/import/m4/malloc.m4: Update.
4531         * gnulib/import/m4/malloca.m4: Update.
4532         * gnulib/import/m4/math_h.m4: Update.
4533         * gnulib/import/m4/mbrtowc.m4: Update.
4534         * gnulib/import/m4/mbsinit.m4: Update.
4535         * gnulib/import/m4/mbsrtowcs.m4: Update.
4536         * gnulib/import/m4/mbstate_t.m4: Update.
4537         * gnulib/import/m4/memchr.m4: Update.
4538         * gnulib/import/m4/memmem.m4: Update.
4539         * gnulib/import/m4/mempcpy.m4: Update.
4540         * gnulib/import/m4/memrchr.m4: Update.
4541         * gnulib/import/m4/mkdir.m4: Update.
4542         * gnulib/import/m4/mkstemp.m4: Update.
4543         * gnulib/import/m4/mmap-anon.m4: Update.
4544         * gnulib/import/m4/mode_t.m4: Update.
4545         * gnulib/import/m4/msvc-inval.m4: Update.
4546         * gnulib/import/m4/msvc-nothrow.m4: Update.
4547         * gnulib/import/m4/multiarch.m4: Update.
4548         * gnulib/import/m4/nocrash.m4: Update.
4549         * gnulib/import/m4/off_t.m4: Update.
4550         * gnulib/import/m4/onceonly.m4: Update.
4551         * gnulib/import/m4/open-cloexec.m4: Update.
4552         * gnulib/import/m4/open.m4: Update.
4553         * gnulib/import/m4/openat.m4: Update.
4554         * gnulib/import/m4/opendir.m4: Update.
4555         * gnulib/import/m4/pathmax.m4: Update.
4556         * gnulib/import/m4/rawmemchr.m4: Update.
4557         * gnulib/import/m4/readdir.m4: Update.
4558         * gnulib/import/m4/readlink.m4: Update.
4559         * gnulib/import/m4/realloc.m4: Update.
4560         * gnulib/import/m4/rename.m4: Update.
4561         * gnulib/import/m4/rewinddir.m4: Update.
4562         * gnulib/import/m4/rmdir.m4: Update.
4563         * gnulib/import/m4/save-cwd.m4: Update.
4564         * gnulib/import/m4/secure_getenv.m4: Update.
4565         * gnulib/import/m4/setenv.m4: Update.
4566         * gnulib/import/m4/signal_h.m4: Update.
4567         * gnulib/import/m4/ssize_t.m4: Update.
4568         * gnulib/import/m4/stat-time.m4: Update.
4569         * gnulib/import/m4/stat.m4: Update.
4570         * gnulib/import/m4/std-gnu11.m4: Update.
4571         * gnulib/import/m4/stdbool.m4: Update.
4572         * gnulib/import/m4/stddef_h.m4: Update.
4573         * gnulib/import/m4/stdint.m4: Update.
4574         * gnulib/import/m4/stdio_h.m4: Update.
4575         * gnulib/import/m4/stdlib_h.m4: Update.
4576         * gnulib/import/m4/strchrnul.m4: Update.
4577         * gnulib/import/m4/strdup.m4: Update.
4578         * gnulib/import/m4/strerror.m4: Update.
4579         * gnulib/import/m4/string_h.m4: Update.
4580         * gnulib/import/m4/strstr.m4: Update.
4581         * gnulib/import/m4/strtok_r.m4: Update.
4582         * gnulib/import/m4/sys_socket_h.m4: Update.
4583         * gnulib/import/m4/sys_stat_h.m4: Update.
4584         * gnulib/import/m4/sys_time_h.m4: Update.
4585         * gnulib/import/m4/sys_types_h.m4: Update.
4586         * gnulib/import/m4/tempname.m4: Update.
4587         * gnulib/import/m4/time_h.m4: Update.
4588         * gnulib/import/m4/unistd-safer.m4: Update.
4589         * gnulib/import/m4/unistd_h.m4: Update.
4590         * gnulib/import/m4/warn-on-use.m4: Update.
4591         * gnulib/import/m4/wchar_h.m4: Update.
4592         * gnulib/import/m4/wchar_t.m4: Update.
4593         * gnulib/import/m4/wctype_h.m4: Update.
4594         * gnulib/import/m4/wint_t.m4: Update.
4595         * gnulib/import/malloc.c: Update.
4596         * gnulib/import/malloc/scratch_buffer.h: Update.
4597         * gnulib/import/malloc/scratch_buffer_grow.c: Update.
4598         * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
4599         * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
4600         * gnulib/import/malloca.c: Update.
4601         * gnulib/import/malloca.h: Update.
4602         * gnulib/import/malloca.valgrind: Update.
4603         * gnulib/import/math.in.h: Update.
4604         * gnulib/import/mbrtowc.c: Update.
4605         * gnulib/import/mbsinit.c: Update.
4606         * gnulib/import/mbsrtowcs-impl.h: Update.
4607         * gnulib/import/mbsrtowcs-state.c: Update.
4608         * gnulib/import/mbsrtowcs.c: Update.
4609         * gnulib/import/memchr.c: Update.
4610         * gnulib/import/memmem.c: Update.
4611         * gnulib/import/mempcpy.c: Update.
4612         * gnulib/import/memrchr.c: Update.
4613         * gnulib/import/mkdir.c: Update.
4614         * gnulib/import/mkstemp.c: Update.
4615         * gnulib/import/msvc-inval.c: Update.
4616         * gnulib/import/msvc-inval.h: Update.
4617         * gnulib/import/msvc-nothrow.c: Update.
4618         * gnulib/import/msvc-nothrow.h: Update.
4619         * gnulib/import/open.c: Update.
4620         * gnulib/import/openat-die.c: Update.
4621         * gnulib/import/openat-priv.h: Update.
4622         * gnulib/import/openat-proc.c: Update.
4623         * gnulib/import/openat.c: Update.
4624         * gnulib/import/openat.h: Update.
4625         * gnulib/import/opendir.c: Update.
4626         * gnulib/import/pathmax.h: Update.
4627         * gnulib/import/pipe-safer.c: Update.
4628         * gnulib/import/rawmemchr.c: Update.
4629         * gnulib/import/readdir.c: Update.
4630         * gnulib/import/readlink.c: Update.
4631         * gnulib/import/realloc.c: Update.
4632         * gnulib/import/ref-add.sin: Update.
4633         * gnulib/import/ref-del.sin: Update.
4634         * gnulib/import/rename.c: Update.
4635         * gnulib/import/rewinddir.c: Update.
4636         * gnulib/import/rmdir.c: Update.
4637         * gnulib/import/same-inode.h: Update.
4638         * gnulib/import/save-cwd.c: Update.
4639         * gnulib/import/save-cwd.h: Update.
4640         * gnulib/import/scratch_buffer.h: Update.
4641         * gnulib/import/secure_getenv.c: Update.
4642         * gnulib/import/setenv.c: Update.
4643         * gnulib/import/signal.in.h: Update.
4644         * gnulib/import/stat-time.c: Update.
4645         * gnulib/import/stat-time.h: Update.
4646         * gnulib/import/stat-w32.c: Update.
4647         * gnulib/import/stat-w32.h: Update.
4648         * gnulib/import/stat.c: Update.
4649         * gnulib/import/stdbool.in.h: Update.
4650         * gnulib/import/stddef.in.h: Update.
4651         * gnulib/import/stdint.in.h: Update.
4652         * gnulib/import/stdio.in.h: Update.
4653         * gnulib/import/stdlib.in.h: Update.
4654         * gnulib/import/str-two-way.h: Update.
4655         * gnulib/import/strchrnul.c: Update.
4656         * gnulib/import/strdup.c: Update.
4657         * gnulib/import/streq.h: Update.
4658         * gnulib/import/strerror-override.c: Update.
4659         * gnulib/import/strerror-override.h: Update.
4660         * gnulib/import/strerror.c: Update.
4661         * gnulib/import/string.in.h: Update.
4662         * gnulib/import/stripslash.c: Update.
4663         * gnulib/import/strnlen1.c: Update.
4664         * gnulib/import/strnlen1.h: Update.
4665         * gnulib/import/strstr.c: Update.
4666         * gnulib/import/strtok_r.c: Update.
4667         * gnulib/import/sys_stat.in.h: Update.
4668         * gnulib/import/sys_time.in.h: Update.
4669         * gnulib/import/sys_types.in.h: Update.
4670         * gnulib/import/tempname.c: Update.
4671         * gnulib/import/tempname.h: Update.
4672         * gnulib/import/time.in.h: Update.
4673         * gnulib/import/unistd--.h: Update.
4674         * gnulib/import/unistd-safer.h: Update.
4675         * gnulib/import/unistd.in.h: Update.
4676         * gnulib/import/unsetenv.c: Update.
4677         * gnulib/import/verify.h: Update.
4678         * gnulib/import/extra/snippet/warn-on-use.h: Update.
4679         * gnulib/import/wchar.in.h: Update.
4680         * gnulib/import/wctype.in.h: Update.
4681         * gnulib/import/xalloc-oversized.h: Update.
4682         * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
4683         "53e2c179f26a890fa6685af4b6c1397ee370433b".
4684
4685 2018-08-16  Gary Benson <gbenson@redhat.com>
4686
4687         PR gdb/13000:
4688         * gdb/main.c (captured_main_1): Exit with nonzero status
4689         in batch mode if the last command to be executed failed.
4690         * NEWS: Mention the above.
4691
4692 2018-08-29  Simon Marchi  <simon.marchi@ericsson.com>
4693
4694         * csky-tdep.c (csky_memory_insert_breakpoint): Remove newline at
4695         end of warning message.
4696
4697 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
4698
4699         PR gdb/22943:
4700         * aarch64-tdep.c (is_hfa_or_hva): Remove function.
4701         (aarch64_extract_return_value): Use
4702         aapcs_is_vfp_call_or_return_candidate.
4703         (aarch64_return_in_memory): Likewise.
4704         (aarch64_store_return_value): Likewise.
4705
4706 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
4707
4708         * aarch64-tdep.c
4709         (aapcs_is_vfp_call_or_return_candidate): Make static
4710         (pass_in_v_or_stack): Remove function.
4711         (pass_in_v_vfp_candidate): New function.
4712         (aarch64_push_dummy_call): Check for float register candidates.
4713
4714 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
4715
4716         * aarch64-tdep.c (HA_MAX_NUM_FLDS): New macro.
4717         (aapcs_is_vfp_call_or_return_candidate_1): New function.
4718         (aapcs_is_vfp_call_or_return_candidate): Likewise.
4719
4720 2018-08-28  Simon Marchi  <simon.marchi@polymtl.ca>
4721
4722         PR build/23399
4723         * common/agent.c (IPA_SYM_STRUCT_NAME): Define.
4724         (struct ipa_sym_addresses): Rename to...
4725         (struct ipa_sym_addresses_common): ... this.
4726         * common/agent.h (IPA_SYM): Use IPA_SYM_STRUCT_NAME.
4727
4728 2018-08-28  Tom Tromey  <tom@tromey.com>
4729
4730         * c-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
4731         (token_fifo): Now a std::vector.
4732         (yylex, c_parse): Update.
4733         * d-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
4734         (token_fifo): Now a std::vector.
4735         (yylex, d_parse): Update.
4736         * go-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
4737         (token_fifo): Now a std::vector.
4738         (yylex, go_parse): Update.
4739
4740 2018-08-28  Simon Marchi  <simon.marchi@ericsson.com>
4741
4742         * parser-defs.h (struct type_stack) <elements>: Change type to
4743         std::vector<union type_stack_elt>.
4744         <depth, size>: Remove.
4745         * parse.c (parse_exp_in_context_1): Adjust.
4746         (type_stack_reserve): Remove.
4747         (check_type_stack_depth): Remove.
4748         (insert_into_type_stack): Adjust to std::vector.
4749         (insert_type): Likewise.
4750         (push_type): Likewise.
4751         (push_type_int): Likewise.
4752         (insert_type_address_space): Likewise.
4753         (pop_type): Likewise.
4754         (pop_type_int): Likewise.
4755         (pop_typelist): Likewise.
4756         (pop_type_stack): Likewise.
4757         (append_type_stack): Likewise.
4758         (push_type_stack): Likewise.
4759         (get_type_stack): Likewise.
4760         (type_stack_cleanup): Likewise.
4761         (push_typelist): Likewise.
4762         (follow_types): Likewise.
4763         (_initialize_parse): Likewise.
4764
4765 2018-08-28  Hafiz Abid Qadeer  <abidh@codesourcery.com>
4766
4767         * NEWS: Mention csky target.
4768
4769 2018-08-28  Jiangshuai Li  <jiangshuai_li@c-sky.com>
4770             Hafiz Abid Qadeer  <abidh@codesourcery.com>
4771             Don Breazeal  <donb@codesourcery.com>
4772
4773         * csky-linux-tdep.c: New file.
4774         * csky-tdep.c: Likewise.
4775         * csky-tdep.h: Likewise.
4776         * Makefile.in (ALL_TARGET_OBS): Add csky-linux-tdep.o and
4777         csky-tdep.o.
4778         (HFILES_NO_SRCDIR): Add csky-tdep.h.
4779         (ALLDEPFILES): Add csky-linux-tdep.c and csky-tdep.c
4780         * configure.tgt: Add csky support.
4781
4782 2018-08-27  Jan Vrany  <jan.vrany@fit.cvut.cz>
4783
4784         * python/py-framefilter.c (py_print_frame): Print frame architecture
4785         when printing on an MI output.
4786
4787 2018-08-27  Tom Tromey  <tom@tromey.com>
4788
4789         PR build/23087:
4790         * configure: Rebuild.
4791         * warning.m4 (AM_GDB_WARNINGS): Remove -Wno-narrowing.
4792
4793 2018-08-27  Tom Tromey  <tom@tromey.com>
4794
4795         * aarch64-linux-tdep.c
4796         (aarch64_linux_iterate_over_regset_sections) <sve_regmap>: Add
4797         casts to int.
4798
4799 2018-08-27  Tom Tromey  <tom@tromey.com>
4800
4801         * ppc64-tdep.c (insn_d, insn_ds, insn_xfx): Add casts to
4802         unsigned.
4803         (ppc64_standard_linkage1, ppc64_standard_linkage2)
4804         (ppc64_standard_linkage3, ppc64_standard_linkage4)
4805         (ppc64_standard_linkage5, ppc64_standard_linkage6)
4806         (ppc64_standard_linkage7, ppc64_standard_linkage8): Add casts to
4807         unsigned.
4808
4809 2018-08-27  Tom Tromey  <tom@tromey.com>
4810
4811         * xtensa-tdep.h (XTREG_END): Add cast to unsigned.
4812         (XTENSA_GDBARCH_TDEP_INSTANTIATE): Likewise.
4813
4814 2018-08-27  Tom Tromey  <tom@tromey.com>
4815
4816         * tramp-frame.h (TRAMP_SENTINEL_INSN): Redefine.
4817         * tilegx-linux-tdep.c (tilegx_linux_rt_sigframe): Use
4818         ULONGEST_MAX.
4819         * tic6x-linux-tdep.c (tic6x_linux_rt_sigreturn_tramp_frame): Use
4820         ULONGEST_MAX.
4821         * sparc64-linux-tdep.c (sparc64_linux_rt_sigframe): Use
4822         ULONGEST_MAX.
4823         * sparc-linux-tdep.c (sparc32_linux_sigframe)
4824         (sparc32_linux_rt_sigframe): Use ULONGEST_MAX.
4825         * ppc-nbsd-tdep.c (ppcnbsd_sigtramp, ppcnbsd2_sigtramp): Use
4826         ULONGEST_MAX.
4827         * ppc-linux-tdep.c (ppc32_linux_sigaction_tramp_frame)
4828         (ppc64_linux_sigaction_tramp_frame)
4829         (ppc32_linux_sighandler_tramp_frame)
4830         (ppc64_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
4831         * nios2-linux-tdep.c (nios2_r1_linux_rt_sigreturn_tramp_frame)
4832         (nios2_r2_linux_rt_sigreturn_tramp_frame): Use ULONGEST_MAX.
4833         * mn10300-linux-tdep.c (am33_linux_sigframe)
4834         (am33_linux_rt_sigframe): Use ULONGEST_MAX.
4835         * mips64-obsd-tdep.c (mips64obsd_sigframe): Use ULONGEST_MAX.
4836         * mips-linux-tdep.c (mips_linux_o32_sigframe)
4837         (mips_linux_o32_rt_sigframe, mips_linux_n32_rt_sigframe)
4838         (mips_linux_n64_rt_sigframe, micromips_linux_o32_sigframe)
4839         (micromips_linux_o32_rt_sigframe, micromips_linux_n32_rt_sigframe)
4840         (micromips_linux_n64_rt_sigframe): Use ULONGEST_MAX.
4841         * mips-fbsd-tdep.c (mips_fbsd_sigframe, mipsn32_fbsd_sigframe)
4842         (mips64_fbsd_sigframe): Use ULONGEST_MAX.
4843         * microblaze-linux-tdep.c
4844         (microblaze_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
4845         * i386-nbsd-tdep.c (i386nbsd_sigtramp_sc16, i386nbsd_sigtramp_sc2)
4846         (i386nbsd_sigtramp_si2, i386nbsd_sigtramp_si31)
4847         (i386nbsd_sigtramp_si4): Use ULONGEST_MAX.
4848         * hppa-nbsd-tdep.c (hppanbsd_sigtramp_si4): Use ULONGEST_MAX.
4849         * common/common-types.h (ULONGEST_MAX): New define.
4850         (CORE_ADDR_MAX): Fix formatting.
4851         * bfin-linux-tdep.c (bfin_linux_sigframe): Use ULONGEST_MAX.
4852         * arm-obsd-tdep.c (armobsd_sigframe): Use ULONGEST_MAX.
4853         * arm-linux-tdep.c (arm_linux_sigreturn_tramp_frame)
4854         (arm_linux_rt_sigreturn_tramp_frame)
4855         (arm_eabi_linux_sigreturn_tramp_frame)
4856         (arm_eabi_linux_rt_sigreturn_tramp_frame)
4857         (thumb2_eabi_linux_sigreturn_tramp_frame)
4858         (thumb2_eabi_linux_rt_sigreturn_tramp_frame)
4859         (arm_linux_restart_syscall_tramp_frame)
4860         (arm_kernel_linux_restart_syscall_tramp_frame): Use ULONGEST_MAX.
4861         * arm-fbsd-tdep.c (arm_fbsd_sigframe): Use ULONGEST_MAX.
4862         * aarch64-linux-tdep.c (aarch64_linux_rt_sigframe): Use
4863         ULONGEST_MAX.
4864         * aarch64-fbsd-tdep.c (aarch64_fbsd_sigframe): Use ULONGEST_MAX.
4865
4866 2018-08-27  Tom Tromey  <tom@tromey.com>
4867
4868         * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Use
4869         CORE_ADDR_MAX.
4870         * mips-tdep.c (mips_deal_with_atomic_sequence)
4871         (micromips_deal_with_atomic_sequence): Use CORE_ADDR_MAX.
4872         * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw)
4873         (arm_deal_with_atomic_sequence_raw): Use CORE_ADDR_MAX.
4874         * alpha-tdep.c (alpha_deal_with_atomic_sequence): Use
4875         CORE_ADDR_MAX.
4876         * aarch64-tdep.c (aarch64_software_single_step): Use
4877         CORE_ADDR_MAX.
4878
4879 2018-08-27  Tom Tromey  <tom@tromey.com>
4880
4881         * linespec.c (complete_linespec_component): Add cast to "char".
4882         * completer.c (completion_tracker::build_completion_result): Add
4883         cast to "char".
4884
4885 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
4886
4887         * solist.h (struct solist, struct target_so_ops): Fix
4888         indentation.
4889
4890 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
4891
4892         * ada-tasks.c (ada_task_info_s): Remove typedef.
4893         (DEF_VEC_O(ada_task_info_s)): Remove.
4894         (struct ada_tasks_inferior_data): Initialize fields.
4895         <task_list>: Make an std::vector.
4896         (get_ada_tasks_inferior_data): Allocate with new.
4897         (ada_get_task_number): Adjust.
4898         (get_task_number_from_id): Likewise.
4899         (valid_task_id): Likewise.
4900         (ada_get_task_info_from_ptid): Likewise.
4901         (iterate_over_live_ada_tasks): Likewise.
4902         (add_ada_task): Likewise.
4903         (read_known_tasks): Likewise.
4904         (ada_build_task_list): Likewise.
4905         (print_ada_task_info): Likewise.
4906         (info_task): Likewise.
4907         (task_command_1): Likewise.
4908
4909 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
4910
4911         * ada-lang.c (add_angle_brackets): Return std::string.
4912
4913 2018-08-25  Simon Marchi  <simon.marchi@polymtl.ca>
4914
4915         * python/py-threadevent.c (py_get_event_thread): Initialize
4916         pythread.
4917
4918 2018-08-24  Pedro Alves  <palves@redhat.com>
4919
4920         * python/py-bpevent.c (create_breakpoint_event_object): Use
4921         copy-initialization.
4922         * python/py-continueevent.c (emit_continue_event): Use
4923         copy-initialization.
4924         * python/py-exitedevent.c (create_exited_event_object): Return a
4925         gdbpy_ref<>.
4926         (emit_exited_event): Use copy-initialization.
4927         * python/py-inferior.c (python_new_inferior)
4928         (python_inferior_deleted, add_thread_object): Use
4929         copy-initialization.
4930         * python/py-infevents.c (create_inferior_call_event_object)
4931         (create_register_changed_event_object)
4932         (create_memory_changed_event_object): Return a gdbpy_ref<>.
4933         (emit_inferior_call_event, emit_memory_changed_event)
4934         (emit_register_changed_event): Use copy-initialization.
4935         * python/py-newobjfileevent.c (create_new_objfile_event_object):
4936         Return a gdbpy_ref<>.
4937         (emit_new_objfile_event): Use copy-initialization.
4938         (create_clear_objfiles_event_object): Return a gdbpy_ref<>.
4939         (emit_clear_objfiles_event): Use copy-initialization.
4940         * python/py-signalevent.c (create_signal_event_object): Use
4941         copy-initialization.
4942         * python/py-threadevent.c (create_thread_event_object): Use
4943         copy-initialization.
4944
4945 2018-08-24  Pedro Alves  <palves@redhat.com>
4946             Simon Marchi  <simon.marchi@ericsson.com>
4947
4948         PR gdb/23379
4949         * python/py-continueevent.c: Include "gdbthread.h".
4950         (create_continue_event_object): Add intro comment.  Add 'ptid'
4951         parameter.  Use it to find thread to pass to
4952         create_thread_event_object.
4953         (emit_continue_event): Pass PTID down to
4954         create_continue_event_object.
4955         * python/py-event.h (py_get_event_thread): Declare.
4956         (create_thread_event_object): Remove default from 'thread'
4957         parameter.
4958         * python/py-stopevent.c (create_stop_event_object): Use
4959         py_get_event_thread.
4960         * python/py-threadevent.c (get_event_thread): Rename to ...
4961         (py_get_event_thread): ... this, make extern, add 'ptid' parameter
4962         and use it to find the thread.
4963         (create_thread_event_object): Assert that THREAD isn't null.
4964         Don't find the event thread here.
4965
4966 2018-08-23  Kevin Buettner  <kevinb@redhat.com>
4967
4968         * block.h (blockrange, blockranges): New struct declarations.
4969         (struct block): Add new field named `ranges'.
4970         (BLOCK_RANGES, BLOCK_NRANGES, BLOCK_RANGE, BLOCK_CONTIGUOUS_P)
4971         (BLOCK_RANGE_START, BLOCK_RANGE_END, BLOCK_ENTRY_PC): New
4972         macros for accessing ranges in struct block.
4973         (make_blockranges): New declaration.
4974         block.c (make_blockranges): New function.
4975         * dwarf2read.c (dwarf2_record_block_ranges): Fill in BLOCK_RANGES
4976         for block.
4977         * symtab.h (find_pc_partial_function): Add new parameter `block'.
4978         * blockframe.c (cache_pc_function_block): New static global.
4979         (clear_pc_function_cache): Clear cache_pc_function_block.
4980         (find_pc_partial_function): Move comment to symtab.h.  Add
4981         support for non-contiguous blocks.
4982         * cli/cli-cmds.c (block.h): Include.
4983         (print_disassembly): Handle printing of non-contiguous blocks.
4984         (disassemble_current_function): Likewise.
4985         (disassemble_command): Likewise.
4986
4987         * ax-gdb.c (gen_var_ref): Use BLOCK_ENTRY_PC in place of
4988         BLOCK_START.
4989         * blockframe.c (get_pc_function_start): Likewise.
4990         * compile/compile-c-symbols.c (convert_one_symbol): Likewise.
4991         (gcc_symbol_address): Likewise.
4992         * compile/compile-object-run.c (compile_object_run): Likewise.
4993         * compile/compile.c (get_expr_block_and_pc): Likewise.
4994         * dwarf2loc.c (dwarf2_find_location_expression): Likewise.
4995         (func_addr_to_tail_call_list): Likewise.
4996         * findvar.c (default_read_var_value): Likewise.
4997         * inline-frame.c (inline_frame_this_id): Likewise.
4998         (skip-inline_frames): Likewise.
4999         * infcmd.c (until_next_command): Likewise.
5000         * linespec.c (convert_linespec_to_sals): Likewise.
5001         * parse.c (parse_exp_in_context_1): Likewise.
5002         * printcmd.c (build_address_symbolic): likewise.
5003         (info_address_command): Likewise.
5004         symtab.c (find_function_start_sal): Likewise.
5005         (skip_prologue_sal): Likewise.
5006         (find_function_alias_target): Likewise.
5007         (find_gnu_ifunc): Likewise.
5008         * stack.c (find_frame_funname): Likewise.
5009         * symtab.c (fixup_symbol_section): Likewise.
5010         (find_function_start_sal): Likewise.
5011         (skip_prologue_sal): Likewsie.
5012         (find_function_alias_target): Likewise.
5013         (find_gnu_ifunc): Likewise.
5014         * tracepoint.c (info_scope_command): Likewise.
5015         * value.c (value_fn_field): Likewise.
5016
5017         * infrun.c (fill_in_stop_func): Use find_function_entry_range_from_pc
5018         in place of find_pc_partial_function.
5019         * blockframe.c (find_function_entry_range_from_pc): New function.
5020         * symtab.h (find_function_entry_range_from_pc): Declare and document.
5021         * objfiles.c (objfile_relocate1): Relocate start and end addresses
5022         for each range in a block.
5023
5024
5025 2018-08-23  Xavier Roirand  <roirand@adacore.com>
5026
5027         * machoread.c (macho_symfile_read_all_oso): Remove uneeded
5028         incrementation.
5029
5030 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
5031
5032         * solib-svr4.c (read_program_headers_from_bfd): Return
5033         gdb::optional<gdb::byte_vector>.
5034         (svr4_exec_displacement): Adjust.
5035
5036 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
5037
5038         * solib-svr4.c (read_program_header): Return
5039         gdb::optional<gdb::byte_vector>, remove p_sect_size param.
5040         (find_program_interpreter): Return
5041         gdb::optional<gdb::byte_vector>.
5042         (scan_dyntag_auxv): Adjust.
5043         (enable_break): Adjust.
5044         (svr4_exec_displacement): Adjust.
5045
5046 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
5047
5048         * inf-child.h (inf_child_target) <terminal_save_inferior>: New.
5049         * inf-child.c (inf_child_target::terminal_save_inferior): New.
5050
5051 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
5052
5053         * guile/scm-string.c (gdbscm_scm_from_printf): Use
5054         string_vprintf.
5055         * guile/scm-utils.c (gdbscm_printf): Likewise.
5056         * serial.c (serial_printf): Likewise.
5057         * xml-support.c (gdb_xml_parser::vdebug): Likewise.
5058
5059 2018-08-22  Jan Vrany  <jan.vrany@fit.cvut.cz>
5060
5061         * stack.c (print_frame): Print frame architecture when printing on
5062         an MI output.
5063         * NEWS: Mention new "arch" attribute in frame output.
5064
5065 2018-08-21  Alan Hayward  <alan.hayward@arm.com>
5066
5067         * arch/aarch64.h (aarch64_regnum): Update comment.
5068
5069 2018-08-21  Alan Hayward  <alan.hayward@arm.com>
5070
5071         * NEWS: Add SVE to 8.2 section.
5072
5073 2018-08-21  Pedro Alves  <palves@redhat.com>
5074
5075         * guile/scm-utils.c (gdbscm_parse_function_args_1): New, factored
5076         out from gdbscm_parse_function_args.
5077         (gdbscm_parse_function_args): Rework to use gdbscm_wrap and
5078         gdbscm_parse_function_args_1.
5079
5080 2018-08-21  Simon Marchi  <simon.marchi@ericsson.com>
5081
5082         PR gdb/17816
5083         * m32c-tdep.c (m32c_decode_srcdest4): Remove unnecessary ternary
5084         operator.
5085
5086 2018-08-19  Simon Marchi  <simon.marchi@polymtl.ca>
5087
5088         * solib-svr4.c (svr4_exec_displacement): Fix formatting.
5089
5090 2018-08-19  Michael Spang  <spang@google.com>
5091
5092         PR gdb/11786
5093         * solib-svr4.c (svr4_exec_displacement): Ignore memsz fields
5094         for PT_TLS segments.
5095
5096 2018-08-18  Kevin Buettner  <kevinb@redhat.com>
5097
5098         * dwarf2expr.h (struct dwarf_expr_context): Add virtual method
5099         dwarf_variable_value.
5100         * dwarf2-frame.c (class dwarf_expr_executor):
5101         Add override for dwarf_variable_value.
5102         * dwarf2loc.c (class dwarf_evaluate_loc_desc): Likewise.
5103         (class symbol_needs_eval_context): Likewise.
5104         (indirect_synthetic_pointer): Add forward declaration.
5105         (sect_variable_value): New function.
5106         (dwarf2_compile_expr_to_ax): Add case for DW_OP_GNU_variable_value.
5107         * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Add case
5108         for DW_OP_GNU_variable_value.
5109
5110 2018-08-16  Tom Tromey  <tom@tromey.com>
5111
5112         * top.c (read_command_file): Update.
5113         (command_line_input): Remove "repeat" argument.
5114         * ada-lang.c (get_selections): Update.
5115         * linespec.c (decode_line_2): Update.
5116         * defs.h (command_line_input): Remove argument.
5117         * cli/cli-script.c (read_next_line): Update.
5118         * python/py-gdb-readline.c: Update.
5119
5120 2018-08-17  Tom Tromey  <tom@tromey.com>
5121
5122         * cli/cli-script.c (read_next_line): Pass 0 as repeat argument to
5123         command_line_input.
5124
5125 2018-08-15  Tom Tromey  <tom@tromey.com>
5126
5127         * aarch64-linux-tdep.c (aarch64_linux_core_read_vq): Use pulongest.
5128
5129 2018-08-14  Jan Vrany  <jan.vrany@fit.cvut.cz>
5130
5131         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Add -a option.
5132         If used, use find_pc_partial_function to find address range
5133         to disassemble.
5134         * mi/mi-main.c (mi_cmd_list_features): Report
5135         "data-disassemble-a-option" feature.
5136         * NEWS: Mention new -data-disassemble option -a.
5137
5138 2018-08-13  Tom Tromey  <tom@tromey.com>
5139
5140         * common/common-defs.h (_FORTIFY_SOURCE): Define.
5141
5142 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
5143
5144         * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): New function.
5145         (aarch64_linux_collect_sve_regset): Likewise.
5146         (aarch64_linux_iterate_over_regset_sections): Check for SVE.
5147         * regcache.h (regcache_map_entry_size): New function.
5148
5149 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
5150
5151         * aarch64-linux-tdep.c (SVE_HEADER_SIZE_LENGTH): Add define.
5152         (SVE_HEADER_MAX_SIZE_LENGTH): Likewise.
5153         (SVE_HEADER_VL_LENGTH): Likewise.
5154         (SVE_HEADER_MAX_VL_LENGTH): Likewise.
5155         (SVE_HEADER_FLAGS_LENGTH): Likewise.
5156         (SVE_HEADER_RESERVED_LENGTH): Likewise.
5157         (SVE_HEADER_SIZE_OFFSET): Likewise.
5158         (SVE_HEADER_MAX_SIZE_OFFSET): Likewise.
5159         (SVE_HEADER_VL_OFFSET): Likewise.
5160         (SVE_HEADER_MAX_VL_OFFSET): Likewise.
5161         (SVE_HEADER_FLAGS_OFFSET): Likewise.
5162         (SVE_HEADER_RESERVED_OFFSET): Likewise.
5163         (SVE_HEADER_SIZE): Likewise.
5164         (aarch64_linux_core_read_vq): Add function.
5165         (aarch64_linux_core_read_description): Check for SVE section.
5166
5167 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
5168
5169         * aarch64-fbsd-tdep.c
5170         (aarch64_fbsd_iterate_over_regset_sections): Add supply_size and
5171         collect_size.
5172         * aarch64-linux-tdep.c
5173         (aarch64_linux_iterate_over_regset_sections): Likewise.
5174         * alpha-linux-tdep.c
5175         (alpha_linux_iterate_over_regset_sections):
5176         * alpha-nbsd-tdep.c
5177         (alphanbsd_iterate_over_regset_sections): Likewise.
5178         * amd64-fbsd-tdep.c
5179         (amd64fbsd_iterate_over_regset_sections): Likewise.
5180         * amd64-linux-tdep.c
5181         (amd64_linux_iterate_over_regset_sections): Likewise.
5182         * arm-bsd-tdep.c
5183         (armbsd_iterate_over_regset_sections): Likewise.
5184         * arm-fbsd-tdep.c
5185         (arm_fbsd_iterate_over_regset_sections): Likewise.
5186         * arm-linux-tdep.c
5187         (arm_linux_iterate_over_regset_sections): Likewise.
5188         * corelow.c (get_core_registers_cb): Likewise.
5189         (core_target::fetch_registers): Likewise.
5190         * fbsd-tdep.c (fbsd_collect_regset_section_cb): Likewise.
5191         * frv-linux-tdep.c (frv_linux_iterate_over_regset_sections): Likewise.
5192         * gdbarch.h (void): Regenerate.
5193         * gdbarch.sh: Add supply_size and collect_size.
5194         * hppa-linux-tdep.c (hppa_linux_iterate_over_regset_sections): Likewise.
5195         * hppa-nbsd-tdep.c (hppanbsd_iterate_over_regset_sections): Likewise.
5196         * hppa-obsd-tdep.c (hppaobsd_iterate_over_regset_sections): Likewise.
5197         * i386-fbsd-tdep.c (i386fbsd_iterate_over_regset_sections): Likewise.
5198         * i386-linux-tdep.c (i386_linux_iterate_over_regset_sections): Likewise.
5199         * i386-tdep.c (i386_iterate_over_regset_sections): Likewise.
5200         * ia64-linux-tdep.c (ia64_linux_iterate_over_regset_sections): Likewise.
5201         * linux-tdep.c (linux_collect_regset_section_cb): Likewise.
5202         * m32r-linux-tdep.c (m32r_linux_iterate_over_regset_sections): Likewise.
5203         * m68k-bsd-tdep.c (m68kbsd_iterate_over_regset_sections): Likewise.
5204         * m68k-linux-tdep.c (m68k_linux_iterate_over_regset_sections): Likewise.
5205         * mips-fbsd-tdep.c (mips_fbsd_iterate_over_regset_sections): Likewise.
5206         * mips-linux-tdep.c (mips_linux_iterate_over_regset_sections): Likewise.
5207         * mips-nbsd-tdep.c (mipsnbsd_iterate_over_regset_sections): Likewise.
5208         * mips64-obsd-tdep.c (mips64obsd_iterate_over_regset_sections):
5209         Likewise.
5210         * mn10300-linux-tdep.c (am33_iterate_over_regset_sections): Likewise.
5211         * nios2-linux-tdep.c (nios2_iterate_over_regset_sections): Likewise.
5212         * ppc-fbsd-tdep.c (ppcfbsd_iterate_over_regset_sections): Likewise.
5213         * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections): Likewise.
5214         * ppc-nbsd-tdep.c (ppcnbsd_iterate_over_regset_sections): Likewise.
5215         * ppc-obsd-tdep.c (ppcobsd_iterate_over_regset_sections): Likewise.
5216         * riscv-linux-tdep.c (riscv_linux_iterate_over_regset_sections):
5217         Likewise.
5218         * rs6000-aix-tdep.c (rs6000_aix_iterate_over_regset_sections): Likewise.
5219         * s390-linux-tdep.c (s390_iterate_over_regset_sections): Likewise.
5220         * score-tdep.c (score7_linux_iterate_over_regset_sections): Likewise.
5221         * sh-tdep.c (sh_iterate_over_regset_sections): Likewise.
5222         * sparc-tdep.c (sparc_iterate_over_regset_sections): Likewise.
5223         * tilegx-linux-tdep.c (tilegx_iterate_over_regset_sections): Likewise.
5224         * vax-tdep.c (vax_iterate_over_regset_sections): Likewise.
5225         * xtensa-tdep.c (xtensa_iterate_over_regset_sections): Likewise.
5226
5227 2018-08-10  Simon Marchi  <simon.marchi@ericsson.com>
5228
5229         * nat/linux-osdata.c (commandline_from_pid): Replace xstrprintf
5230         with string_printf.
5231
5232 2018-08-10  Keith Seitz  <keiths@redhat.com>
5233
5234         * compile/compile-c-support.c (add_code_header, add_code_footer):
5235         Move into policy class.
5236         (c_push_user_expression, pop_user_expression_nop)
5237         (c_add_code_header, c_add_code_footer, c_add_input): New policy class.
5238         (compile_program): New host class.
5239         (c_compile_program): New typedef.
5240         (c_compute_porgram): Use c_compile_program.
5241
5242 2018-08-10  Keith Seitz  <keiths@redhat.com>
5243
5244         * compile/compile-internal.h (compile_instance::~compile_instance):
5245         Remove calls to htab_delete.
5246         <m_type_map, m_symbol_err_map>: Switch type to htab_up.
5247         * compile.c (compile_instance::compile_instance): Initialize
5248         htab unique pointers.
5249         (compile_instance::get_cached_type, compile_instance::insert_type)
5250         (compile_instance::error_symbol_once): Update for unique_ptr.
5251
5252 2018-08-10  Keith Seitz  <keiths@redhat.com>
5253
5254         * compile/compile-c-symbols.c (struct symbol_error)
5255         (hash_symbol_error, eq_symbol_error, del_symbol_error)
5256         (compile_instance::insert_symbol_error)
5257         (compile_instance::error_symbol_once): Move to ...
5258         * compile/compile.c: ... here.
5259
5260 2018-08-10  Keith Seitz  <keiths@redhat.com>
5261
5262         * compile/compile-c-support.c (c_get_compile_context): Use `new'
5263         instead of `new_compile_instance'.
5264         * compile/compile-c-symbols.c (compile_instance::insert_symbol_error):
5265         Update description.
5266         If the symbol error map is not initialized, create it.
5267         (generate_c_for_for_one_symbol): Do not check/initialize
5268         the symbol error map.
5269         * compile/compile-c-types.c (compile_c_instance): Make a class.
5270         Update all callers.
5271         (compile_instance::compile_instance): Initialize the type cache.
5272         (get_cached_type): New function.
5273         (insert_type): Update description.
5274         (compile_c_instance::m_default_cflags): Define.
5275         (convert_type): Update description.  Use get_cached_type.
5276         (delete_instance): Moved to destructor.
5277         (new_compile_instance): Moved to constructor.
5278         * compile/compile-c.h (compile_c_instance): Make class inheriting
5279         from compile_instance.
5280         <base>: Remove field.
5281         <type_map, symbol_err_map>: Move to base class.
5282         <c_plugin>: Rename to `m_plugin' and remove pointer type.
5283         * compile/compile-internal.h (compile_instance): Make class.
5284         <type_map_t, symbol_err_map_t>: Define.
5285         <fe>: Rename to `m_gcc_fe'.
5286         <scope, block, gcc_target_options>: Add `m_' prefix.
5287         <m_type_map, m_symbol_err_map>: New fields, moved from
5288         compile_c_instance.
5289         <destroy>: Remove.
5290         (convert_type, new_compile_instance): Remove.
5291         * compile/compile.c (cleanup_compile_instance): Remove.
5292         (compile_to_object): Use unique_ptr to eliminate cleanups.
5293         (compile_instance::set_print_callback, compile_instance::version)
5294         (compile_instance::set_verbose)
5295         (compile_instance::set_driver_filename)
5296         (compile_instance::set_triplet_regexp)
5297         (compile_instance::set_arguments)
5298         (compile_instance::set_source_file)
5299         (compile_instance::compile): Define.
5300
5301 2018-08-10  Keith Seitz  <keiths@redhat.com>
5302
5303         * Makefile.in (HFILES_NO_SRCDIR): Add compile/gcc-c-plugin.h.
5304         * compile/compile-c-types.c: Define GCC_METHODN macros and include
5305         gcc-c-fe.def to define C plugin.
5306         (delete_instance): Delete `c_plugin'.
5307         (new_compile_instance): Initialize `c_plugin'.
5308         * compile/compile-c.h: Include gcc_c_plugin.h.
5309         (struct compile_c_instance) <c_plugin>: New member.
5310         * gcc-c-plugin.h: New file.
5311         Update all callers with API change.
5312
5313 2018-08-10  Keith Seitz  <keiths@redhat.com>
5314
5315         * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Move header files ...
5316         (HFILES_NO_SRCDIR): ... to here.
5317         Add compile-internal.h and compile-c.h.
5318         * compile/compile-c-support.c: Include compile-c.h.
5319         * compile/compile-c-symbols.c: Include compile-c.h.
5320         (generate_c_for_variable_locations): Update comment.
5321         * compile/compile-c-types.c: Include compile-c.h.
5322         * compile/compile-c.h: New file -- moved C language declarations
5323         from other files here.
5324         * compile/compile-internal.h: Do not include hashtab.h or
5325         common/enum-flags.h.
5326         (gcc_qualifiers_flags, struct compile_c_instance, C_CTX)
5327         (gcc_convert_symbol, gcc_symbol_address)
5328         (generate_c_for_variable_locations, c_get_mode_for_size)
5329         (c_get_range_decl_name): Definitions moved to compile-c.h.
5330         * compile/compile-loc2c.c: Include compile-c.h.
5331
5332 2018-08-10  Keith Seitz  <keiths@redhat.com>
5333
5334         * compile/compile-c-symbols.c (symbol_substitution_name): Rename to ...
5335         (c_symbol_substitution_name): ... this.
5336         Update all callers.
5337
5338 2018-08-10  Keith Seitz  <keiths@redhat.com>
5339
5340         * compile/compile-c-support.c (c_compute_program): Use
5341         unique_xmalloc_ptr to eliminate cleanup.
5342         * compile/compile-c-symbols.c (generate_c_for_variable_locations):
5343         Return a unique_xmalloc_ptr and eliminate cleanup.
5344         * compile/compile-internal.h (generate_c_for_variable_locations):
5345         Return unique_xmalloc_ptr and update description.
5346
5347 2018-08-10  Alan Hayward  <alan.hayward@arm.com>
5348
5349         * corelow.c (core_target::get_core_register_section): Rename
5350         min_size to section_min_size.
5351
5352 2018-08-09  Jim Wilson  <jimw@sifive.com>
5353
5354         * Makefile.in (ALL_TARGET_OBS): Add riscv-linux-tdep.c.
5355         (ALLDEPFILES): Add riscv-linux-nat.c, and riscv-linux-tdep.c.
5356         * NEWS: Mention new GNU/Linux RISC-V target.
5357         * configure.host: Add riscv*-*-linux*.
5358         * configure.nat: Add riscv*.
5359         * configure.tgt: Add riscv*-*-linux*.
5360         * riscv-linux-nat.c: New file.
5361         * riscv-linux-tdep.c: New file.
5362
5363 2018-08-09  Andrew Burgess  <andrew.burgess@embecosm.com>
5364
5365         * infrun.c (resume): Make static, add forward declaration.
5366         (proceed): Update header comment.
5367         * infrun.h (resume): Delete declaration.
5368
5369 2018-08-09  Tom Tromey  <tom@tromey.com>
5370
5371         * riscv-tdep.h: Minor formatting fixes.
5372
5373 2018-08-09  Simon Marchi  <simon.marchi@ericsson.com>
5374
5375         * common/scoped_mmap.c (mmap_file): Silence ARI warning.
5376         * dwarf-index-cache.c (create_dir_and_check): Likewise.
5377         (test_mkdir_recursive): Likewise.
5378         * dwarf-index-write.c (write_psymtabs_to_index): Likewise.
5379
5380 2018-08-09  Andrew Burgess  <andrew.burgess@embecosm.com>
5381
5382         * valarith.c (value_subscripted_rvalue): If an array is not in
5383         memory, and we don't know the upper bound, then we can't know that
5384         the requested element exists or not.
5385
5386 2018-08-08  Simon Marchi  <simon.marchi@ericsson.com>
5387
5388         * target.c (str_comma_list_concat_elem): Fix typo in comment.
5389         (target_options_to_string): Add comment.
5390
5391 2018-08-08  Tom Tromey  <tom@tromey.com>
5392
5393         * unittests/scoped_mmap-selftests.c: Check result of "write".
5394
5395 2018-08-08  Jim Wilson  <jimw@sifive.com>
5396
5397         * riscv-tdep.c (enum opcode): Add jump, branch, lr, and sc opcodes.
5398         (decode_register_index_short): New.
5399         (decode_j_type_insn, decode_cj_type_insn): New.
5400         (decode_b_type_insn, decode_cb_type_insn): New.
5401         (riscv_insn::decode): Add support for jumps, branches, lr, and sc.  New
5402         local xlen.  Check xlen when decoding ambiguous compressed insns.  In
5403         compressed decode, use is_c_lui_insn instead of is_lui_insn, and
5404         is_c_sw_insn instead of is_sw_insn.
5405         (riscv_next_pc, riscv_next_pc_atomic_sequence): New.
5406         (riscv_software_single_step): New.
5407         * riscv-tdep.h (riscv_software_single_step): Declare.
5408
5409         * riscv-tdep.c (riscv_isa_xlen): Drop static.
5410         * riscv-tdep.h (riscv_isa_xlen): Add extern declaration.
5411
5412 2018-08-08  Andrew Burgess  <andrew.burgess@embecosm.com>
5413
5414         PR gdb/18050:
5415         * target.c (dispose_inferior): Don't dispose of inferiors that are
5416         already killed.
5417
5418 2018-08-08  Szabolcs Nagy  <szabolcs.nagy@arm.com>
5419
5420         * remote.c (remote_target::download_tracepoint): Change char* to
5421         const char*.
5422
5423 2018-08-07  Simon Marchi  <simon.marchi@polymtl.ca>
5424
5425         * target.h (target_options_to_string): Return an std::string.
5426         * target.c (str_comma_list_concat_elem): Return void, use
5427         std::string.
5428         (do_option): Likewise.
5429         (target_options_to_string): Return an std::string.
5430         * linux-nat.c (linux_nat_target::wait): Adjust.
5431         * target-debug.h (target_debug_print_options): Adjust.
5432
5433 2018-08-07  Tom Tromey  <tom@tromey.com>
5434
5435         * Makefile.in (CPPFLAGS): New variable.
5436         (INTERNAL_CPPFLAGS): Use it.
5437
5438 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
5439
5440         * NEWS: Mention the index cache.
5441
5442 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
5443
5444         * common/pathstuff.h (get_standard_cache_dir): New.
5445         * common/pathstuff.c (get_standard_cache_dir): New.
5446         * build-id.h (build_id_to_string): New.
5447         * dwarf-index-common.h (INDEX4_SUFFIX, INDEX5_SUFFIX,
5448         DEBUG_STR_SUFFIX): Move to here.
5449         * dwarf-index-write.c (INDEX4_SUFFIX, INDEX5_SUFFIX,
5450         DEBUG_STR_SUFFIX): Move from there.
5451         (write_psymtabs_to_index): Make non-static, add basename
5452         parameter.  Write to temporary files, rename when done.
5453         (save_gdb_index_command): Adjust call to
5454         write_psymtabs_to_index.
5455         * dwarf2read.h (dwarf2_per_objfile) <index_cache_res>: New
5456         field.
5457         * dwarf2read.c (dwz_file) <index_cache_res>: New field.
5458         (get_gdb_index_contents_from_cache): New.
5459         (get_gdb_index_contents_from_cache_dwz): New.
5460         (dwarf2_initialize_objfile): Read index from cache.
5461         (dwarf2_build_psymtabs): Save to index.
5462         * dwarf-index-cache.h: New file.
5463         * dwarf-index-cache.c: New file.
5464         * dwarf-index-write.h: New file.
5465
5466 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
5467
5468         * gnulib/aclocal.m4: Re-generate.
5469         * gnulib/config.in: Re-generate.
5470         * gnulib/configure: Re-generate.
5471         * gnulib/import/Makefile.am: Re-generate.
5472         * gnulib/import/Makefile.in: Re-generate.
5473         * gnulib/import/m4/gnulib-cache.m4: Re-generate.
5474         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
5475         * gnulib/import/m4/mkdir.m4: New file.
5476         * gnulib/import/mkdir.c: New file.
5477         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkdir
5478         module.
5479
5480 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
5481
5482         * Makefile.in (COMMON_SFILES): Add common/scoped_mmap.c.
5483         * common/scoped_mmap.c: New file.
5484         * common/scoped_mmap.h (destroy): New method.
5485         (~scoped_mmap, reset): Use destroy.
5486         (scoped_mmap): New move constructor.
5487         (mmap_file): New declaration.
5488         * unittests/scoped_mmap-selftests.c (test_normal,
5489         test_invalid_filename, run_tests): New functions.
5490         (_initialize_scoped_mmap_selftests): Register selftest.
5491
5492 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
5493
5494         * dwarf2read.c (read_gdb_index_from_section): Rename to...
5495         (read_gdb_index_from_buffer): ... this.  Remove section
5496         parameter, add buffer parameter.
5497         (get_gdb_index_contents_ftype,
5498         get_gdb_index_contents_dwz_ftype): New typedefs.
5499         (dwarf2_read_gdb_index): Add callback parameters to get the
5500         index contents.
5501         (get_gdb_index_contents_from_section): New.
5502         (dwarf2_initialize_objfile): Update call to
5503         dwarf2_read_gdb_index.
5504
5505 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
5506
5507         * common/filestuff.h (gdb_fopen_cloexec): New overload.
5508         (gdb_open_cloexec): Likewise.
5509         * nat/linux-osdata.c (command_from_pid): Use string_printf.
5510         (commandline_from_pid): Likewise.
5511         (linux_xfer_osdata_threads): Likewise.
5512         (linux_xfer_osdata_fds): Likewise.
5513         * ada-lang.c (is_package_name): Likewise.
5514         * auxv.c (procfs_xfer_auxv): Likewise.
5515         * breakpoint.c (print_one_breakpoint_location): Use
5516         uiout::field_fmt.
5517         (print_one_catch_solib): Use string_printf.
5518         * coff-pe-read.c (add_pe_exported_sym): Likewise.
5519         (add_pe_forwarded_sym): Likewise.
5520         * dwarf2read.c (create_type_unit_group): Likewise.
5521         (build_error_marker_type): Likewise.
5522         * infcall.c (get_function_name): Likewise.
5523         * valprint.c (print_converted_chars_to_obstack): Likewise.
5524         * xtensa-tdep.c (xtensa_register_type): Likewise.
5525
5526 2018-08-06  Simon Marchi  <simon.marchi@ericsson.com>
5527
5528         * remote.c (remote_target::download_tracepoint): Fix format
5529         string errors.
5530
5531 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
5532
5533         * tracefile.c: Include common/byte-vector.h.
5534         (trace_save): Change type of buf to gdb::byte_vector.  Initialize
5535         with trace_regblock_size if needed.  Update uses of buf.
5536
5537 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
5538
5539         * tracepoint.h (collection_list) <m_regs_mask>: Change type to
5540         std::vector<unsigned char>.
5541         * tracepoint.c (collection_list::collection_list): Remove
5542         m_regs_mask initializer from initializer list.  Resize
5543         m_regs_mask using the largest remote register number.
5544         (collection_list::add_remote_register): Remove size check on
5545         m_regs_mask.  Use at to access element.
5546         (collection_list::stringify): Change type of temp_buf to
5547         gdb::char_vector.  Update uses of temp_buf.  Resize if needed to
5548         stringify the register mask.  Use pack_hex_byte for the register
5549         mask.
5550
5551 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
5552
5553         * tracepoint.h (class collection_list) <add_register>: Remove.
5554         <add_remote_register, add_ax_registers, add_local_register>:
5555         Declare.
5556         <add_memrange>: Add scope parameter.
5557         * tracepoint.c (encode_actions_1): Likewise.
5558         (collection_list::add_register): Rename to ...
5559         (collection_list::add_remote_register): ... this.  Update
5560         comment.
5561         (collection_list::add_ax_registers, add_local_register): New
5562         methods.
5563         (collection_list::add_memrange): Add scope parameter.  Call
5564         add_local_register instead of add_register.
5565         (finalize_tracepoint_aexpr): New function.
5566         (collection_list::collect_symbol): Update calls to add_memrange.
5567         Call add_local_register instead of add_register.  Call
5568         add_ax_registers.  Call finalize_tracepoint_aexpr.
5569         (encode_actions_1): Get remote regnos for $reg action.  Call
5570         add_remote_register, add_ax_registers, and add_local_register.
5571         Update call to add_memrange.  Call finalize_tracepoint_aexpr.
5572         (validate_actionline): Call finalize_tracepoint_aexpr.
5573
5574 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
5575
5576         * remote.c (remote_target::download_tracepoint): Remove BUF_SIZE.
5577         Replace array buf with gdb::char_vector buf, of size
5578         get_remote_packet_size ().  Replace references to buf and
5579         BUF_SIZE to buf.data () and buf.size ().  Replace strcpy, strcat
5580         and xsnprintf with snprintf.  Raise errors if the buffer is too
5581         small.
5582
5583 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
5584
5585         * remote.c (remote_target::download_tracepoint): Fix the has_more
5586         predicate in the QTDP action list iteration.
5587
5588 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
5589
5590         * remote.c (remote_target::download_tracepoint): Fix indentation
5591         in for block.
5592
5593 2018-08-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
5594
5595         * proc-api.c (_initialize_proc_api): Remove c, unused.
5596         * procfs.c (procfs_init_inferior): Remove signals, unused.
5597         (procfs_target::make_corefile_notes): Remove old_chain, fpregs,
5598         unused.
5599
5600 2018-08-06  Sergey Korolev  <s.korolev@ndmsystems.com>
5601             Andrew Burgess  <andrew.burgess@embecosm.com>
5602
5603         * linux-nat.c (linux_nat_target::follow_fork): Avoid using
5604         'W_STOPCODE (0)' as this could be ambiguous.
5605
5606 2018-08-03  Sergio Durigan Junior  <sergiodj@redhat.com>
5607
5608         * ser-tcp.c (net_open): Fix thinko when deciding whether to
5609         disable TCP's Nagle algorithm (use "ai_protocol" instead of
5610         "ai_socktype").
5611
5612 2018-08-02  Tom Tromey  <tom@tromey.com>
5613
5614         PR symtab/16842.
5615         * dwarf2read.c (read_func_scope): Set symtab on template parameter
5616         symbols.
5617         (process_structure_scope): Likewise.
5618
5619 2018-08-02  Xavier Roirand  <roirand@adacore.com>
5620
5621         PR gdb/22629:
5622         * darwin-nat.c (darwin_kill_inferior): Fix handling of
5623         kill inferior.
5624
5625 2018-08-02  Tom Tromey  <tom@tromey.com>
5626
5627         * darwin-nat.c (find_inferior_task_it, darwin_find_thread)
5628         (darwin_suspend_inferior, darwin_resume_inferior)
5629         (darwin_decode_notify_message, darwin_resume_inferior_threads)
5630         (darwin_check_new_threads): Check result of get_darwin_inferior.
5631
5632 2018-07-31  Joel Brobecker  <brobecker@adacore.com>
5633
5634         GDB 8.1.1 released.
5635
5636 2018-07-31  Jan Vrany  <jan.vrany@fit.cvut.cz>
5637
5638         * varobj.c (varobj_get_path_expr_parent): Report an error if
5639         parent is a dynamic varobj.
5640
5641 2018-07-31  Simon Marchi  <simon.marchi@ericsson.com>
5642
5643         * gnulib/aclocal.m4: Re-generate.
5644         * gnulib/config.in: Re-generate.
5645         * gnulib/configure: Re-generate.
5646         * gnulib/import/Makefile.in: Re-generate.
5647         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
5648         * gnulib/import/m4/onceonly.m4: Re-generate.
5649
5650 2018-07-31  Simon Marchi  <simon.marchi@ericsson.com>
5651
5652         * target-descriptions.c (struct xml_test_tdesc): New.
5653         (xml_tdesc): Change type to std::vector<xml_test_tdesc>.
5654         (record_xml_tdesc): Update.
5655         (maintenance_check_xml_descriptions): Update.
5656         * target-descriptions.h (record_xml_tdesc): Update comment.
5657
5658 2018-07-30  Andrew Burgess  <andrew.burgess@embecosm.com>
5659
5660         * eval.c (evaluate_subexp_for_sizeof): Check for array type before
5661         checking array bounds are defined.
5662
5663 2018-07-30  Tom Tromey  <tom@tromey.com>
5664
5665         * nat/linux-osdata.c (pid_pgid_entry::operator<): Fix
5666         irreflexivity violation.
5667
5668 2018-07-30  Tom Tromey  <tom@tromey.com>
5669
5670         * cli/cli-decode.c (lookup_cmd): Remove lint code.
5671         * value.c (unpack_long): Remove lint code.
5672         * valops.c (value_ind): Remove lint code.
5673         * valarith.c (value_x_binop, value_x_unop, value_equal)
5674         (value_pos): Remove lint code.
5675
5676 2018-07-28  Tom de Vries  <tdevries@suse.de>
5677
5678         * eval.c (evaluate_subexp_for_sizeof): Interpret size of dynamic type
5679         with undefined upper bound as <optimized out>.
5680
5681 2018-07-27  Sergio Durigan Junior  <sergiodj@redhat.com>
5682
5683         * gcore.in: Rename variable "name" to "prefix".  Expand
5684         "usage" text.
5685
5686 2018-07-14  Jon Turney  <jon.turney@dronecode.org.uk>
5687
5688         * windows-nat.c (windows_nat_target::create_inferior): Update to
5689         call close() in global namespace.
5690
5691 2018-07-26  Tom Tromey  <tom@tromey.com>
5692
5693         * dwarf-index-write.c (add_address_entry): Don't add objfile
5694         offsets.
5695         * dbxread.c (find_stab_function): Rename from
5696         find_stab_function_addr.  Return a bound_minimal_symbol.
5697         (read_dbx_symtab): Use raw_text_low, raw_text_high.
5698         Don't add objfile offsets.
5699         (end_psymtab): Use raw_text_low, raw_text_high,
5700         MSYMBOL_VALUE_RAW_ADDRESS.
5701         (read_ofile_symtab): Update.
5702         (process_one_symbol): Update.
5703         * dwarf2read.c (create_addrmap_from_index): Don't add objfile
5704         offsets.
5705         (dw2_relocate): Remove.
5706         (dw2_find_pc_sect_symtab): Bias PC by the text offset before
5707         searching addrmap.
5708         (dwarf2_gdb_index_functions, dwarf2_debug_names_functions):
5709         Update.
5710         (process_psymtab_comp_unit_reader, add_partial_symbol)
5711         (add_partial_subprogram, dwarf2_ranges_read): Update.
5712         (load_partial_dies): Update.
5713         (add_address_entry): Don't add objfile offsets.
5714         (dwarf2_build_include_psymtabs): Update.
5715         (create_addrmap_from_aranges): Don't add objfile offsets.
5716         (dw2_find_pc_sect_compunit_symtab): Update.
5717         * mdebugread.c (parse_symbol): Don't add objfile offsets.
5718         (parse_lines): Remove 'pst' parameter, replace with 'textlow'.
5719         Update.
5720         (parse_partial_symbols): Don't add objfile offsets.  Use
5721         raw_text_low, raw_text_high.  Update.
5722         (handle_psymbol_enumerators, psymtab_to_symtab_1): Update.
5723         * objfiles.c (objfile_relocate1): Don't relocate psymtabs_addrmap
5724         or call 'relocate' quick function.  Clear psymbol_map.
5725         * psympriv.h (struct partial_symbol) <address>: Add section
5726         offset.
5727         <set_unrelocated_address>: Rename from set_address.
5728         <raw_text_low, raw_text_high>: New methods.
5729         <text_low, text_high>: Add objfile parameter.
5730         (add_psymbol_to_bcache): Add 'section' parameter.  Call
5731         set_unrelocated_address.
5732         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
5733         (find_pc_psymbol): Update.
5734         (fixup_psymbol_section, relocate_psymtabs): Remove.
5735         (dump_psymtab, psym_functions): Update.
5736         (add_psymbol_to_bcache, add_psymbol_to_list): Add 'section'
5737         parameter.
5738         (maintenance_info_psymtabs, maintenance_check_psymtabs): Update.
5739         (start_psymtab_common): Update.
5740         * symfile-debug.c (debug_qf_relocate): Remove.
5741         (debug_sym_quick_functions): Update.
5742         * symfile.h (struct quick_symbol_functions) <relocate>: Remove.
5743         * xcoffread.c (scan_xcoff_symtab): Don't add objfile offsets.
5744         Update.
5745
5746 2018-07-26  Tom Tromey  <tromey@redhat.com>
5747
5748         * dbxread.c (end_psymtab): Use text_high_valid and
5749         text_low_valid.
5750         * mdebugread.c (parse_partial_symbols): Use text_low_valid.
5751         (psymtab_to_symtab_1): Use text_high_valid and text_low_valid.
5752         * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
5753         Update comment.
5754         <text_low_valid, text_high_valid>: New fields.
5755         <set_text_low, set_text_high>: Update.
5756         * xcoffread.c (scan_xcoff_symtab): Use text_low_valid.
5757
5758 2018-07-26  Tom Tromey  <tom@tromey.com>
5759
5760         * dbxread.c (read_dbx_symtab, end_psymtab, read_ofile_symtab):
5761         Update.
5762         * dwarf2read.c (dwarf2_create_include_psymtab): Don't initialize
5763         textlow and texthigh fields.
5764         (process_psymtab_comp_unit_reader, dwarf2_build_include_psymtabs):
5765         Update.
5766         * mdebugread.c (parse_lines, parse_partial_symbols)
5767         (psymtab_to_symtab_1): Update.
5768         * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
5769         Rename fields.  Update comment.  Now private.
5770         <text_low, text_high, set_text_low, set_text_high>: New methods.
5771         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
5772         (find_pc_sect_psymbol, relocate_psymtabs, dump_psymtab)
5773         (start_psymtab_common, maintenance_info_psymtabs)
5774         (maintenance_check_psymtabs): Update.
5775         * xcoffread.c (xcoff_end_psymtab): Don't initialize textlow and
5776         texthigh fields.
5777         (scan_xcoff_symtab): Update.
5778
5779 2018-07-26  Tom Tromey  <tromey@redhat.com>
5780
5781         * psympriv.h (struct partial_symbol) <unrelocated_address,
5782         address, set_address>: New methods.
5783         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymbol)
5784         (fixup_psymbol_section, relocate_psymtabs): Update.
5785         (print_partial_symbols): Add 'objfile' parameter.  Update.
5786         (dump_psymtab, add_psymbol_to_bcache, psym_fill_psymbol_map):
5787         Update.
5788
5789 2018-07-26  Tom Tromey  <tom@tromey.com>
5790
5791         * dwarf-index-write.c (write_psymbols, debug_names::insert)
5792         (debug_names::write_psymbols): Update.
5793         * psympriv.h (struct partial_symbol): Derive from
5794         general_symbol_info.
5795         <obj_section>: New method.
5796         (PSYMBOL_DOMAIN, PSYMBOL_CLASS): Remove.n
5797         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
5798         (find_pc_sect_psymbol, fixup_psymbol_section)
5799         (match_partial_symbol, lookup_partial_symbol, relocate_psymtabs)
5800         (print_partial_symbols, recursively_search_psymtabs)
5801         (compare_psymbols, psymbol_hash, psymbol_compare)
5802         (add_psymbol_to_bcache, maintenance_check_psymtabs)
5803         (psymbol_name_matches, psym_fill_psymbol_map): Update.
5804
5805 2018-07-26  Tom Tromey  <tromey@redhat.com>
5806
5807         * dbxread.c (end_psymtab): Remove dead code.
5808
5809 2018-07-26  Andrew Burgess  <andrew.burgess@embecosm.com>
5810
5811         * dwarf2-frame-tailcall.c (tailcall_frame_sniffer): Exit early if
5812         DWARF unwinders are disabled.
5813         * dwarf2-frame.c: Add dwarf2read.h include.
5814         (dwarf2_frame_sniffer): Exit early if DWARF unwinders are
5815         disabled.
5816         (dwarf2_frame_unwinders_enabled_p): Define.
5817         (show_dwarf_unwinders_enabled_p): New function.
5818         (_initialize_dwarf2_frame): Register switch to control DWARF
5819         unwinder use.
5820         * dwarf2-frame.h (dwarf2_frame_unwinders_enabled_p): Declare.
5821         * dwarf2read.c (set_dwarf_cmdlist): Remove static keyword.
5822         (show_dwarf_cmdlist): Remove static keyword.
5823         * dwarf2read.h (set_dwarf_cmdlist): Declare.
5824         (show_dwarf_cmdlist): Declare.
5825         * NEWS: Document new feature.
5826
5827 2018-07-26  Tom de Vries  <tdevries@suse.de>
5828
5829         PR breakpoints/23366
5830         * infcmd.c (info_program_command): Handle ptid == minus_one_ptid.
5831
5832 2018-07-26  Tom de Vries  <tdevries@suse.de>
5833
5834         * dwarf2read.c (read_subrange_type): Warn if DW_AT_upper_bound or
5835         DW_AT_count can't be translated to a dynamic prop.
5836
5837 2018-07-25  Tom de Vries  <tdevries@suse.de>
5838
5839         * dwarf2loc.c (dwarf2_locexpr_baton_eval): Wrap ctx.eval call in
5840         try/catch.
5841
5842 2018-07-25  Jan Vrany  <jan.vrany@fit.cvut.cz>
5843
5844         * breakpoint.c (enable_disable_bp_num_loc): Notify observers.
5845
5846 2018-07-25  Joel Brobecker  <brobecker@adacore.com>
5847
5848         * MAINTAINERS (Global Maintainers): Add Tom Tromey.
5849
5850 2018-07-24  Keith Seitz  <keiths@redhat.comt
5851
5852         PR symtab/23010
5853         * dwarf2read.c (dw2_add_symbol_to_list): New function.
5854         (fixup_go_packaging, new_symbol): Use dw2_add_symbol_to_list
5855         instead of add_symbol_to_list.
5856         (read_file_scope): Call prepare_one_comp_unit before reading
5857         any other DIEs.
5858
5859 2018-07-24  Simon Marchi  <simon.marchi@ericsson.com>
5860
5861         * common/scoped_mmap.h (class scoped_mmap): Fix indentation.
5862
5863 2018-07-24  Tom Tromey  <tom@tromey.com>
5864
5865         * utils.c (malloc, realloc, free): Don't declare.
5866         * configure, config.in: Rebuild.
5867         * configure.ac: Don't check for declarations of free, malloc, or
5868         realloc.
5869
5870 2018-07-22  Simon Marchi  <simon.marchi@polymtl.ca>
5871
5872         * aarch64-linux-nat.c
5873         (aarch64_linux_nat_target::stopped_data_address): Remove unused
5874         variable.
5875         * arm-linux-nat.c (fetch_regs): Likewise.
5876         (store_regs): Likewise.
5877         (fetch_vfp_regs): Likewise.
5878         (store_vfp_regs): Likewise.
5879         (arm_linux_nat_target::insert_hw_breakpoint): Likewise.
5880         (arm_linux_nat_target::remove_hw_breakpoint): Likewise.
5881         (arm_linux_nat_target::insert_watchpoint): Likewise.
5882         (arm_linux_nat_target::remove_watchpoint): Likewise.
5883         * mips-linux-nat.c (mips_linux_nat_target::insert_watchpoint):
5884         Likewise.
5885         * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs):
5886         Likewise.
5887         * ppc-linux-nat.c (fetch_register): Likewise.
5888         (fetch_all_gp_regs): Likewise.
5889         (fetch_ppc_registers): Likewise.
5890         (store_all_gp_regs): Likewise.
5891         (store_ppc_registers): Likewise.
5892         (hwdebug_insert_point): Likewise.
5893         (can_use_watchpoint_cond_accel): Likewise.
5894         * remote-sim.c (gdb_os_write_stdout): Likewise.
5895
5896 2018-07-22  Simon Marchi  <simon.marchi@polymtl.ca>
5897             Tom Tromey  <tom@tromey.com>
5898
5899         * warning.m4 (AM_GDB_WARNINGS): Add -Wunused-variable and special
5900         test for it.
5901         * configure: Rebuild.
5902
5903 2018-07-22  Tom Tromey  <tom@tromey.com>
5904
5905         * regformats/regdat.sh: Define xmltarget_${name} inside
5906         #ifndef IN_PROCESS_AGENT.
5907
5908 2018-07-22  Tom Tromey  <tom@tromey.com>
5909
5910         * value.c (value_fetch_lazy_bitfield): Remove unused variable.
5911
5912 2018-07-22  Tom Tromey  <tom@tromey.com>
5913
5914         * symfile.c (reread_symbols): Notify iter, not objfile.
5915
5916 2018-07-22  Tom Tromey  <tom@tromey.com>
5917
5918         * ravenscar-thread.c (ravenscar_thread_target::store_registers):
5919         Use arch_ops.
5920         (ravenscar_thread_target::prepare_to_store): Likewise.
5921
5922 2018-07-22  Tom Tromey  <tom@tromey.com>
5923
5924         * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Remove
5925         unused variable.  Call value_fetch_lazy when needed.
5926         * guile/scm-pretty-print.c (gdbscm_apply_val_pretty_printer):
5927         Remove unused variable.  Call value_fetch_lazy when needed.
5928
5929 2018-07-22  Tom Tromey  <tom@tromey.com>
5930
5931         * m32c-tdep.c (mark_dma): Return void.
5932         (make_regs): Remove unused declarations.
5933
5934 2018-07-22  Tom Tromey  <tom@tromey.com>
5935
5936         * guile/scm-cmd.c (gdbscm_dont_repeat): Call
5937         cmdscm_get_valid_command_smob_arg_unsafe for effect.
5938         * guile/scm-block.c (gdbscm_make_block_syms_iter): Call
5939         bkscm_get_valid_block_smob_arg_unsafe for effect.
5940
5941 2018-07-22  Tom Tromey  <tom@tromey.com>
5942
5943         * bfin-tdep.c (bfin_push_dummy_call): Use arg_type, not
5944         value_type.
5945
5946 2018-07-22  Tom Tromey  <tom@tromey.com>
5947
5948         * windows-nat.c (saved_context): Conditionally define.
5949         * remote.c (remote_target::remote_btrace_maybe_reopen):
5950         Conditionally declare "warned".
5951         * inflow.c (sigquit_ours): Conditionally define.
5952         (new_tty): Move "tty" declaration inside #if.
5953         * guile/guile.c (guile_datadir): Conditionally define.
5954         * charset.c (set_be_le_names): Move some declarations inside #if.
5955         * btrace.c (parse_xml_btrace): Move "errcode" declaration inside
5956         #if.
5957         (parse_xml_btrace_conf): Likewise.
5958
5959 2018-07-22  Tom Tromey  <tom@tromey.com>
5960
5961         * spu-tdep.c (spu_get_overlay_table): Remove unused variable.
5962
5963 2018-07-22  Tom Tromey  <tom@tromey.com>
5964
5965         * guile/scm-value.c (gdbscm_value_call): Remove unused variables.
5966         * guile/scm-math.c (vlscm_unop_gdbthrow, vlscm_binop_gdbthrow)
5967         (vlscm_convert_typed_value_from_scheme): Remove unused variable.
5968         * buildsym-legacy.c (get_macro_table): Remove unused variable.
5969         * stack.c (frame_apply_level_command): Remove unused variable.
5970         * tic6x-tdep.c (tic6x_push_dummy_call): Remove unused variable.
5971         * sparc64-tdep.c (adi_examine_command): Remove unused variable.
5972         * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Remove
5973         unused variable.
5974         * nios2-tdep.c (nios2_push_dummy_call): Remove unused variable.
5975         * mep-tdep.c (mep_push_dummy_call): Remove unused variable.
5976         * ada-lang.c (ada_lookup_symbol_list_worker): Remove unused
5977         variable.
5978         * amd64-tdep.c (amd64_supply_xsave): Remove unused variable.
5979         * arm-tdep.c (arm_record_data_proc_misc_ld_str): Remove unused
5980         variable.
5981         * breakpoint.c (check_no_tracepoint_commands, update_watchpoint):
5982         Remove unused variable.
5983         * cli/cli-script.c (recurse_read_control_structure): Remove unused
5984         variable.
5985         * common/tdesc.c (print_xml_feature::visit): Remove unused
5986         variable.
5987         * compile/compile-object-load.c (store_regs): Remove unused
5988         variables.
5989         * complaints.c (clear_complaints): Remove unused variable.
5990         * corelow.c (core_target_open): Remove unused variable.
5991         * fbsd-tdep.c (fbsd_core_info_proc_status): Remove unused
5992         variable.
5993         * guile/scm-frame.c (gdbscm_frame_read_var): Remove unused
5994         variable.
5995         * guile/scm-symtab.c (stscm_print_sal_smob): Remove unused
5996         variable.
5997         * guile/scm-type.c (gdbscm_field_baseclass_p): Remove unused
5998         variable.
5999         * guile/scm-utils.c (gdbscm_parse_function_args): Remove unused
6000         variable.
6001         * hppa-tdep.c (hppa_stub_frame_unwind_cache): Remove unused
6002         variable.
6003         * ia64-tdep.c (examine_prologue): Remove unused variable.
6004         * infcall.c (run_inferior_call): Remove unused variable.
6005         * inferior.c (exit_inferior): Remove unused variable.
6006         * infrun.c (infrun_thread_ptid_changed): Remove unused variable.
6007         * linespec.c (decode_line_2): Remove unused variable.
6008         * linux-nat.c (super_close): Remove.
6009         * linux-tdep.c (linux_info_proc): Remove unused variable.
6010         * mi/mi-main.c (mi_execute_command): Remove unused variable.
6011         * microblaze-linux-tdep.c (microblaze_linux_sigtramp_cache):
6012         Remove unused variable.
6013         * parse.c (find_minsym_type_and_address): Remove unused variable.
6014         * printcmd.c (info_symbol_command, printf_floating): Remove unused
6015         variable.
6016         * python/py-breakpoint.c (bppy_set_commands): Remove unused
6017         variable.
6018         * python/py-unwind.c (unwind_infopy_dealloc): Remove unused
6019         variables.
6020         * record-btrace.c (record_btrace_target::store_registers): Remove
6021         unused variable.
6022         (cmd_show_record_btrace_cpu): Remove unused variable.
6023         * riscv-tdep.c (riscv_register_reggroup_p)
6024         (riscv_push_dummy_call, riscv_return_value): Remove unused
6025         variable.
6026         * rust-exp.y (literal): Remove unused variable.
6027         * rust-lang.c (rust_evaluate_subexp) <OP_RUST_ARARAY>: Remove
6028         unused variable.
6029         <STRUCTOP_ANONYMOUS>: Likewise.
6030         * s390-linux-tdep.c (s390_linux_init_abi_31)
6031         (s390_linux_init_abi_64): Remove unused variable.
6032         * ser-ming2.c (ser_windows_read_prim, pipe_select_thread)
6033         (file_select_thread, net_windows_open, _initialize_ser_windows):
6034         Remove unused variables.
6035         * symtab.c (find_pc_sect_line): Remove unused variable.
6036         * target-memory.c (compute_garbled_blocks): Remove unused
6037         variable.
6038         (target_write_memory_blocks): Remove unused variable.
6039         * target.c (target_stack::unpush): Remove unused variables.
6040         * tracepoint.c (start_tracing, all_tracepoint_actions)
6041         (merge_uploaded_trace_state_variables)
6042         (print_one_static_tracepoint_marker): Remove unused variable.
6043         * unittests/basic_string_view/element_access/char/1.cc (test01):
6044         Remove unused variable.
6045         * windows-nat.c (windows_continue, windows_add_all_dlls)
6046         (do_initial_windows_stuff, windows_nat_target::create_inferior):
6047         Remove unused variables.
6048
6049 2018-07-21  Simon Marchi  <simon.marchi@polymtl.ca>
6050
6051         * arm-tdep.c (arm_gdbarch_init): Declare attr_arch and
6052         attr_profile in HAVE_ELF.
6053         * rs6000-tdep.c (bfd_uses_spe_extensions): Declare vector_abi in
6054         HAVE_ELF.
6055
6056 2018-07-20  Simon Marchi  <simon.marchi@polymtl.ca>
6057
6058         * frame.c (frame_register_unwind): Change parameter name.
6059         (frame_unwind_register): Likewise.
6060         (frame_unwind_register_value): Likewise.
6061         (frame_unwind_register_signed): Likewise.
6062         (frame_unwind_register_unsigned): Likewise.
6063         * frame.h (frame_register_unwind): Likewise.
6064         (frame_unwind_register): Likewise.
6065         (frame_unwind_register_value): Likewise.
6066         (frame_unwind_register_signed): Likewise.
6067         (frame_unwind_register_unsigned): Likewise.
6068         (frame_unwind_arch): Likewise.
6069
6070 2018-07-20  Maciej W. Rozycki  <macro@mips.com>
6071
6072         * MAINTAINERS: Update my e-mail address, downgrade to MIPS I-IV
6073         ISA maintenance.
6074
6075 2018-07-20  Maciej W. Rozycki  <macro@mips.com>
6076
6077         * mips-linux-nat.c (mips_linux_nat_target::read_description):
6078         Call `get_ptrace_pid' rather than extracting the ptrace PID by
6079         hand.
6080
6081 2018-07-20  Keith Seitz  <keiths@redhat.com>
6082
6083         * buildsym.h (struct buildsym_compunit) <m_objfile, m_subfiles,
6084         m_main_subfile, m_comp_dir, m_producer, m_debugformat,
6085         m_compunit_symtab, m_language>: Add "m_" prefix.
6086         Update all uses.
6087         * buildsym.c: Update all uses.
6088
6089 2018-07-20  Tom Tromey  <tom@tromey.com>
6090
6091         * buildsym-legacy.h (record_line): Don't use record_line_ftype.
6092         * buildsym.h (record_line_ftype): Remove typedef.
6093
6094 2018-07-20  Tom Tromey  <tom@tromey.com>
6095
6096         * buildsym-legacy.h (augment_type_symtab): Don't declare.
6097         (end_expandable_symtab): Likewise.
6098         (end_symtab_get_static_block): Likewise.
6099         (end_symtab_from_static_block): Likewise.
6100         * buildsym-legacy.c (augment_type_symtab): Remove.
6101         (end_expandable_symtab): Remove.
6102         (end_symtab_get_static_block): Remove.
6103         (end_symtab_from_static_block): Remove.
6104
6105 2018-07-20  Tom Tromey  <tom@tromey.com>
6106
6107         * dwarf2read.c: Include buildsym.h.
6108         (struct dwarf2_cu) <builder>: New method.
6109         (fixup_go_packaging): Update.
6110         (process_full_comp_unit, process_full_type_unit): Update.  Don't
6111         use scoped_free_pendings.
6112         (using_directives): Add "cu" parameter, remove "language".
6113         (read_import_statement, setup_type_unit_groups, )
6114         (read_func_scope, read_lexical_block_scope)
6115         (dwarf2_record_block_ranges, read_namespace): Update.
6116         (lnp_state_machine::lnp_state_machine): Add cu parameter.
6117         (lnp_state_machine::handle_end_sequence): Update.
6118         (class lnp_state_machine) <m_cu>: New member.
6119         <m_record_line_callback>: Remove.
6120         <m_currently_recording_lines>: New member.
6121         (lnp_state_machine::handle_set_file): Update.
6122         (noop_record_line): Remove.
6123         (dwarf_record_line_p): Add cu parameter.
6124         (dwarf_record_line_1, dwarf_finish_line): Likewise.
6125         (lnp_state_machine::record_line)
6126         (lnp_state_machine::lnp_state_machine)
6127         (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
6128         (dwarf_decode_lines): Update.
6129         (dwarf2_start_subfile): Add cu parameter.
6130         (dwarf2_start_symtab, new_symbol): Update.
6131         (macro_start_file, dwarf_decode_macro_bytes): Add cu parameter.
6132         Remove dwarf2_per_objfile parameter.
6133         (dwarf_decode_macros): Update.
6134
6135 2018-07-20  Tom Tromey  <tom@tromey.com>
6136
6137         * stabsread.c (define_symbol): Update.
6138         * buildsym-legacy.h (get_buildsym_compunit): Declare.
6139         * dwarf2read.c (new_symbol): Update.
6140         * cp-support.h (cp_scan_for_anonymous_namespaces): Update.
6141         * cp-namespace.c: Include buildsym.h.
6142         (cp_scan_for_anonymous_namespaces): Add "compunit" parameter.
6143         * buildsym-legacy.c (get_buildsym_compunit): New function.
6144
6145 2018-07-20  Tom Tromey  <tom@tromey.com>
6146
6147         * xcoffread.c: Include buildsym-legacy.h.
6148         * windows-nat.c: Include buildsym-legacy.h.
6149         * stabsread.c: Include buildsym-legacy.h.
6150         * mdebugread.c: Include buildsym-legacy.h.
6151         * buildsym-legacy.h: New file.
6152         * buildsym-legacy.c: New file, from buildsym.c.
6153         * go32-nat.c: Include buildsym-legacy.h.
6154         * dwarf2read.c: Include buildsym-legacy.h.
6155         * dbxread.c: Include buildsym-legacy.h.
6156         * cp-namespace.c: Include buildsym-legacy.h.
6157         * coffread.c: Include buildsym-legacy.h.
6158         * buildsym.h: Move some contents to buildsym-legacy.h.
6159         * buildsym.c: Include buildsym-legacy.h.  Move many functions to
6160         buildsym-legacy.c.
6161         * Makefile.in (HFILES_NO_SRCDIR): Add buildsym-legacy.h.
6162
6163 2018-07-20  Tom Tromey  <tom@tromey.com>
6164
6165         * buildsym.h (struct buildsym_compunit): Move from buildsym.c.
6166         * buildsym.c (struct buildsym_compunit): Move to buildsym.h.
6167         (buildsym_compunit::buildsym_compunit)
6168         (buildsym_compunit::~buildsym_compunit)
6169         (buildsym_compunit::get_macro_table): Define.
6170
6171 2018-07-20  Tom Tromey  <tom@tromey.com>
6172
6173         * buildsym.c (reset_symtab_globals): Remove.
6174         (buildsym_compunit::end_symtab_from_static_block): Update.
6175         (buildsym_compunit::augment_type_symtab): Update.
6176         (end_symtab_from_static_block): Call free_buildsym_compunit.
6177         (augment_type_symtab, end_symtab, end_expandable_symtab):
6178         Likewise.
6179
6180 2018-07-20  Tom Tromey  <tom@tromey.com>
6181
6182         * arch-utils.c: Do not include buildsym.h.
6183         * mipsread.c: Do not include buildsym.h.
6184         * machoread.c: Do not include buildsym.h.
6185         * elfread.c: Do not include buildsym.h.
6186
6187 2018-07-20  Tom Tromey  <tom@tromey.com>
6188
6189         * buildsym.c (buildsym_compunit::buildsym_compunit): Do more
6190         initialization.
6191         (buildsym_compunit): Add new constructor.
6192         (struct buildsym_compunit) <get_last_source_file, finish_block,
6193         record_block_range, start_subfile, patch_subfile_names,
6194         push_subfile, pop_subfile, record_line, get_compunit_symtab,
6195         set_last_source_start_addr, get_last_source_start_addr,
6196         get_local_using_directives, set_local_using_directives,
6197         get_global_using_directives, outermost_context_p,
6198         get_current_context_stack, get_context_stack_depth,
6199         get_current_subfile, get_local_symbols, get_file_symbols,
6200         get_global_symbols, record_debugformat, record_producer,
6201         push_context, pop_context, end_symtab_get_static_block,
6202         end_symtab_from_static_block, end_symtab, end_expandable_symtab>:
6203         New public methods.
6204         <record_pending_block, finish_block_internal, make_blockvector,
6205         watch_main_source_file_lossage, end_symtab_with_blockvector>: New
6206         private methods.
6207         Update all users.
6208
6209 2018-05-22  Tom Tromey  <tom@tromey.com>
6210
6211         * buildsym.c (record_pending_block): Move earlier.  Remove objfile
6212         parameter.
6213         (finish_block_internal): Update.
6214
6215 2018-07-20  Tom Tromey  <tom@tromey.com>
6216
6217         * buildsym.c (record_pending_block): Move earlier.  Remove objfile
6218         parameter.
6219         (finish_block_internal): Update.
6220
6221 2018-07-20  Tom Tromey  <tom@tromey.com>
6222
6223         * buildsym.h (EXTERN): Don't define or undef.
6224         * buildsym.c (EXTERN): Don't define.
6225
6226 2018-07-20  Tom Tromey  <tom@tromey.com>
6227
6228         * buildsym.c: Remove TODO comment.
6229
6230 2018-07-20  Tom Tromey  <tom@tromey.com>
6231
6232         * coffread.c (coff_symtab_read): Update.
6233         * xcoffread.c (xcoff_psymtab_to_symtab_1): Update.
6234         (xcoff_new_init): Update.
6235         * mipsread.c (mipscoff_new_init): Update.
6236         * mdebugread.c (mdebug_build_psymtabs): Update.
6237         * elfread.c (elf_new_init): Update.
6238         * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
6239         Update.
6240         * dbxread.c (dbx_new_init, dbx_psymtab_to_symtab_1)
6241         (coffstab_build_psymtabs, elfstab_build_psymtabs)
6242         (stabsect_build_psymtabs): Update.
6243         * buildsym.h (buildsym_init): Don't declare.
6244         * buildsym.c: Update comment.
6245         (prepare_for_building): Remove.
6246         (start_symtab, restart_symtab): Update.
6247         (reset_symtab_globals): Update comment.
6248         (buildsym_init): Remove.
6249
6250 2018-07-20  Tom Tromey  <tom@tromey.com>
6251
6252         * xcoffread.c (read_xcoff_symtab, process_xcoff_symbol): Update.
6253         * stabsread.c (patch_block_stabs, define_symbol, read_type)
6254         (read_enum_type, common_block_start, common_block_end)
6255         (cleanup_undefined_types_1, finish_global_stabs): Update.
6256         * mdebugread.c (psymtab_to_symtab_1): Update.
6257         * dwarf2read.c (fixup_go_packaging, read_func_scope)
6258         (read_lexical_block_scope, new_symbol): Update.
6259         * dbxread.c (process_one_symbol): Update.
6260         * coffread.c (coff_symtab_read, process_coff_symbol)
6261         (coff_read_enum_type): Update.
6262         * buildsym.h (file_symbols, global_symbols, local_symbols): Don't
6263         declare.
6264         (get_local_symbols, get_file_symbols, get_global_symbols): New
6265         functions.
6266         * buildsym.c (~buildsym_compunit): Clean up m_file_symbols and
6267         m_global_symbols.
6268         <m_file_symbols, m_local_symbols, m_global_symbols>: New members.
6269         (~scoped_free_pendings): Update.
6270         (finish_block, prepare_for_building, reset_symtab_globals)
6271         (end_symtab_get_static_block, end_symtab_with_blockvector)
6272         (augment_type_symtab, push_context): Update.
6273         (get_local_symbols, get_file_symbols, get_global_symbols): New
6274         functions.
6275         (buildsym_init): Update.
6276
6277 2018-07-20  Tom Tromey  <tom@tromey.com>
6278
6279         * dwarf2read.c (process_full_comp_unit): Do not set list_in_scope.
6280         (process_full_type_unit): Likewise.
6281         (dwarf2_start_symtab): Set list_in_scope.
6282
6283 2018-07-20  Tom Tromey  <tom@tromey.com>
6284
6285         * dwarf2read.c (process_psymtab_comp_unit_reader)
6286         (build_type_psymtabs_reader): Do not set list_in_scope.
6287
6288 2018-07-20  Tom Tromey  <tom@tromey.com>
6289
6290         * buildsym.c (free_pendings): Remove.
6291         (add_symbol_to_list, scoped_free_pendings)
6292         (finish_block_internal, buildsym_init): Update.
6293
6294 2018-07-20  Tom Tromey  <tom@tromey.com>
6295
6296         * xcoffread.c (read_xcoff_symtab): Update.
6297         * dwarf2read.c (read_func_scope, read_lexical_block_scope):
6298         Update.
6299         * dbxread.c (process_one_symbol): Update.
6300         * coffread.c (coff_symtab_read): Update.
6301         * buildsym.h (finish_block): Update.
6302         * buildsym.c (finish_block): Remove "listhead" argument.
6303         (end_symtab_get_static_block): Update.
6304
6305 2018-07-20  Tom Tromey  <tom@tromey.com>
6306
6307         * buildsym.h (class scoped_free_pendings): Remove constructor.
6308         * buildsym.c (struct buildsym_compunit) <free_pending_blocks>: New
6309         method.
6310         <m_pending_block_obstack, m_pending_blocks>: New members.
6311         (pending_block_obstack, pending_blocks): Remove.
6312         (scoped_free_pendings::scoped_free_pendings): Default.
6313         (~scoped_free_pendings): Update.
6314         (free_pending_blocks): Remove.
6315         (finish_block_internal, record_pending_block, make_blockvector)
6316         (end_symtab_get_static_block, augment_type_symtab, push_context)
6317         (buildsym_init): Update.
6318
6319 2018-07-20  Tom Tromey  <tom@tromey.com>
6320
6321         * buildsym.c (struct buildsym_compunit) <m_pending_addrmap,
6322         m_pending_addrmap_obstack, m_pending_addrmap_interesting>: New
6323         members.
6324         (pending_addrmap, pending_addrmap_obstack)
6325         (pending_addrmap_interesting): Remove.
6326         (scoped_free_pendings, record_block_range, make_blockvector)
6327         (prepare_for_building, reset_symtab_globals, buildsym_init):
6328         Update.
6329
6330 2018-07-20  Tom Tromey  <tom@tromey.com>
6331
6332         * xcoffread.c (process_linenos): Update.
6333         * stabsread.c (define_symbol, read_type, read_enum_type): Update.
6334         * mdebugread.c (psymtab_to_symtab_1): Update.
6335         * dwarf2read.c (setup_type_unit_groups)
6336         (lnp_state_machine::handle_set_file, dwarf_record_line_p)
6337         (lnp_state_machine::record_line, dwarf_decode_lines): Update.
6338         * dbxread.c (process_one_symbol): Update.
6339         * coffread.c (coff_symtab_read, enter_linenos)
6340         (process_coff_symbol): Update.
6341         * buildsym.h (current_subfile): Don't declare.
6342         (get_current_subfile): Declare.
6343         * buildsym.c (struct buildsym_compunit) <m_current_subfile>: New
6344         member.
6345         (start_subfile, free_buildsym_compunit, push_subfile)
6346         (prepare_for_building, start_symtab): Update.
6347         (get_current_subfile): New function.
6348
6349 2018-07-20  Tom Tromey  <tom@tromey.com>
6350
6351         * coffread.c (coff_symtab_read): Update.
6352         * xcoffread.c (read_xcoff_symtab): Update.
6353         * dwarf2read.c (new_symbol): Update.
6354         (read_func_scope, read_lexical_block_scope): Update.
6355         * dbxread.c (process_one_symbol): Update.
6356         * buildsym.h (context_stack, context_stack_depth): Don't declare.
6357         (outermost_context_p): Remove macro.
6358         (outermost_context_p, get_current_context_stack)
6359         (get_context_stack_depth): Declare.
6360         (pop_context): Return struct context_stack.
6361         * buildsym.c (struct buildsym_compunit) <m_context_stack: New
6362         member.
6363         (context_stack_size): Remove.
6364         (INITIAL_CONTEXT_STACK_SIZE): Remove.
6365         (prepare_for_building, end_symtab_get_static_block)
6366         (augment_type_symtab, push_context): Update.
6367         (pop_context): Return struct context_stack.
6368         (outermost_context_p, get_current_context_stack)
6369         (get_context_stack_depth): New functions.
6370         (buildsym_init): Update.
6371
6372 2018-07-20  Tom Tromey  <tom@tromey.com>
6373
6374         * rust-exp.y: Now a pure parser.  Update all rules.
6375         (%union): Move earlier.
6376         (current_parser, work_obstack): Remove globals.
6377         (rust_parser, ~rust_parser): Update.
6378         (class rust_parser) <copy_name, concat3, crate_name, super_name,
6379         lex_character, lex_number, lex_string, lex_identifier,
6380         rust_lookup_type, convert_params_to_types, convert_ast_to_type,
6381         convert_name, convert_params_to_expression,
6382         convert_ast_to_expression, ast_basic_type, ast_operation,
6383         ast_compound_assignment, rust_op, ast_literal, ast_dliteral,
6384         ast_structop, ast_structop_anonymous, ast_unary, ast_cast,
6385         ast_call_ish, ast_path, ast_string, ast_struct, ast_range,
6386         ast_array_type, ast_slice_type, ast_reference_type,
6387         ast_pointer_type, ast_function_type, ast_tuple_type>: New methods.
6388         (rust_parse): Update.
6389         (rustyyerror, rustyylex): Add parser parameter.
6390         (rust_lex_test_one, rust_lex_int_test, rust_lex_exception_test)
6391         (rust_lex_stringish_test, rust_lex_test_sequence)
6392         (rust_lex_test_trailing_dot, rust_lex_test_completion)
6393         (rust_lex_test_push_back, rust_lex_tests): Update.
6394
6395 2018-07-19  Pedro Alves  <palves@redhat.com>
6396
6397         * guile/guile-internal.h (gdbscm_scm_to_c_string): Now returns a
6398         gdb::unique_xmalloc_ptr.
6399         * guile/scm-breakpoint.c (gdbscm_set_breakpoint_condition_x):
6400         Adjust to use dbscm_wrap and gdb::unique_xmalloc_ptr.
6401         * guile/scm-exception.c (gdbscm_exception_message_to_string): Use
6402         copy-initialization.
6403         * guile/scm-pretty-print.c (ppscm_print_children): Use
6404         gdb::unique_xmalloc_ptr instead of cleanups.
6405         (gdbscm_apply_val_pretty_printer): Remove cleanups.
6406         * guile/scm-string.c (gdbscm_scm_to_c_string): Now returns a
6407         gdb::unique_xmalloc_ptr.
6408         * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
6409         Adjust to use gdb::unique_xmalloc_ptr.
6410         * guile/scm-utils.c (extract_arg): Adjust.
6411         * guile/scm-value.c (gdbscm_value_field): Adjust to use
6412         gdb::unique_xmalloc_ptr instead of a cleanup.
6413
6414 2018-07-19  Tom Tromey  <tom@tromey.com>
6415
6416         * utils.c (do_value_free_to_mark)
6417         (make_cleanup_value_free_to_mark): Remove.
6418         * utils.h (make_cleanup_value_free_to_mark): Remove.
6419
6420 2018-07-19  Pedro Alves  <palves@redhat.com>
6421
6422         * guile/guile-internal.h (gdbscm_wrap): Really make 'args' a
6423         forwarding reference.
6424
6425 2018-07-18  Pedro Alves  <palves@redhat.com>
6426
6427         * guile/guile.c (gdbscm_execute_gdb_command): Adjust to use
6428         gdbscm_wrap.  Use gdb::unique_xmalloc_ptr<char> instead of a
6429         cleanup.
6430
6431 2018-07-18  Pedro Alves  <palves@redhat.com>
6432
6433         * guile/guile-internal.h: Add comment about mixing GDB and Scheme
6434         exceptions.
6435         (GDBSCM_HANDLE_GDB_EXCEPTION_WITH_CLEANUPS): Delete.
6436         (gdbscm_wrap): New.
6437         * guile/scm-frame.c (gdbscm_frame_read_register): Use xfree
6438         directly instead of a cleanup.
6439         * guile/scm-math.c (vlscm_unop_gdbthrow): New, factored out from ...
6440         (vlscm_unop): ... this.  Reimplement using gdbscm_wrap.
6441         (vlscm_binop_gdbthrow): New, factored out from ...
6442         (vlscm_binop): ... this.  Reimplement using gdbscm_wrap.
6443         (vlscm_rich_compare): Use gdbscm_wrap.
6444         * guile/scm-symbol.c (gdbscm_lookup_symbol): Use xfree directly
6445         instead of a cleanup.
6446         (gdbscm_lookup_global_symbol): Use xfree directly instead of a
6447         cleanup.
6448         * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
6449         Use xfree directly instead of a cleanup.
6450         * guile/scm-value.c (gdbscm_make_value, gdbscm_make_lazy_value):
6451         Adjust to use gdbscm_wrap and scoped_value_mark.
6452         (gdbscm_value_optimized_out_p): Adjust to use gdbscm_wrap.
6453         (gdbscm_value_address, gdbscm_value_dereference)
6454         (gdbscm_value_referenced_value): Adjust to use gdbscm_wrap and
6455         scoped_value_mark.
6456         (gdbscm_value_dynamic_type): Use scoped_value_mark.
6457         (vlscm_do_cast, gdbscm_value_field): Adjust to use gdbscm_wrap and
6458         scoped_value_mark.
6459         (gdbscm_value_subscript, gdbscm_value_call): Adjust to use
6460         gdbscm_wrap and scoped_value_mark.
6461         (gdbscm_value_to_string): Use xfree directly instead of a
6462         cleanup.  Move 'buffer' unique_ptr to TRY scope.
6463         (gdbscm_value_to_lazy_string): Use xfree directly instead of a
6464         cleanup.  Move 'buffer' unique_ptr to TRY scope.  Use
6465         scoped_value_mark.
6466         (gdbscm_value_fetch_lazy_x): Use gdbscm_wrap.
6467         (gdbscm_parse_and_eval): Adjust to use gdbscm_wrap and
6468         scoped_value_mark.
6469         (gdbscm_history_ref, gdbscm_history_append_x): Adjust to use
6470         gdbscm_wrap.
6471
6472 2018-07-18  Tom de Vries  <tdevries@suse.de>
6473
6474         * findvar.c (default_read_var_value): Also resolve dynamic type for
6475         LOC_OPTIMIZED_OUT vars.
6476
6477 2018-07-18  Maciej W. Rozycki  <macro@mips.com>
6478
6479         * mips-tdep.c (micromips_next_pc): Add SYSCALL instruction
6480         decoding.
6481
6482 2018-07-17  Tom Tromey  <tom@tromey.com>
6483
6484         * guile/scm-param.c (pascm_set_func, pascm_show_func)
6485         (compute_enum_list, pascm_set_param_value_x)
6486         (gdbscm_parameter_value): Update.
6487         * guile/guile-internal.h (gdbscm_scm_to_string): Update.
6488         (gdbscm_scm_to_host_string): Update.
6489         * guile/scm-math.c (vlscm_convert_typed_value_from_scheme):
6490         Update.
6491         * guile/scm-cmd.c (cmdscm_add_completion): Update.
6492         * guile/scm-pretty-print.c (ppscm_print_string_repr): Update.
6493         * guile/scm-string.c (gdbscm_scm_to_string): Return
6494         unique_xmalloc_ptr.
6495         (gdbscm_scm_to_host_string): Likewise.
6496
6497 2018-07-17  Tom Tromey  <tom@tromey.com>
6498
6499         * guile/guile.c (gdbscm_eval_from_control_command): Update.
6500         * guile/guile-internal.h (gdbscm_safe_eval_string): Update.
6501         * guile/scm-objfile.c (gdbscm_execute_objfile_script): Update.
6502         * guile/scm-safe-call.c (gdbscm_safe_eval_string): Return
6503         unique_xmalloc_ptr.
6504
6505 2018-07-17  Tom Tromey  <tom@tromey.com>
6506
6507         * guile/scm-param.c (pascm_signal_setshow_error): Update.
6508         * guile/guile-internal.h (gdbscm_exception_message_to_string):
6509         Update.
6510         * guile/scm-cmd.c (cmdscm_function): Update.
6511         * guile/scm-pretty-print.c
6512         (ppscm_print_exception_unless_memory_error): Update.
6513         * guile/scm-exception.c (gdbscm_exception_message_to_string):
6514         Return unique_xmalloc_ptr.
6515
6516 2018-07-17  Tom Tromey  <tom@tromey.com>
6517
6518         * guile/scm-pretty-print.c (ppscm_make_pp_type_error_exception):
6519         Use string_printf.
6520
6521 2018-07-17  Jim Wilson  <jimw@sifive.com>
6522
6523         * riscv-tdep.c (riscv_has_feature): Delete comment that refers to
6524         set_gdbarch_decr_pc_after_break.  Call riscv_read_misa_reg always.
6525         (riscv_gdbarch_init): Delete local has_compressed_isa.  Delete now
6526         unecessary braces after EF_RISCV_RVC test.  Delete call to
6527         set_gdbarch_decr_pc_after_break.
6528
6529         * riscv-tdep.h (DECLARE_CSR): Use RISCV_FIRST_CSR_REGNUM instead of
6530         RISCV_LAST_FP_REGNUM + 1.
6531         (RSICV_CSR_LEGACY_MISA_REGNUM): Add RISCV_FIRST_CSR_REGNUM.
6532
6533 2018-07-17  Tom Tromey  <tom@tromey.com>
6534
6535         * configure.ac: Remove --disable-gdbcli.
6536         * configure: Rebuild.
6537         * Makefile.in (SUBDIR_CLI_DEPS, SUBDIR_CLI_LDFLAGS)
6538         (SUBDIR_CLI_CFLAGS): Remove.
6539         (SFILES): Use SUBDIR_CLI_SRCS.
6540         (COMMON_OBS): Use SUBDIR_CLI_OBS.
6541
6542 2018-07-17  Tom Tromey  <tom@tromey.com>
6543
6544         PR gdb/18624:
6545         * coffread.c (coff_symtab_read): Use scoped_free_pendings.
6546
6547 2018-07-16  Jim Wilson  <jimw@sifive.com>
6548
6549         * riscv-tdep.c (riscv_gdbarch_init): Call gdbarch_init_osabi.
6550
6551 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
6552
6553         * ia64-libunwind-tdep.c (libunwind_frame_cache): Remove unused
6554         variable.
6555         (libunwind_frame_sniffer): Likewise.
6556         (libunwind_frame_prev_register): Likewise.
6557         (libunwind_sigtramp_frame_sniffer): Likewise.
6558         * ia64-tdep.c (ia64_access_reg): Likewise.
6559         (ia64_access_rse_reg): Likewise.
6560         (ia64_libunwind_sigtramp_frame_this_id): Likewise.
6561         * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Likewise.
6562
6563 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
6564
6565         * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Add cast.
6566
6567 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
6568
6569         * remote-sim.c (gdbsim_target::close,
6570         gdbsim_target::mourn_inferior): Remove unused variables.
6571
6572 2018-07-16  Simon Marchi  <simon.marchi@polymtl.ca>
6573
6574         * ia64-tdep.c (ktab_buf): New global.
6575         (getunwind_table): Return a gdb::optional<gdb::byte_vector>.
6576         (get_kernel_table): Adjust.
6577
6578 2018-07-16  Tom Tromey  <tom@tromey.com>
6579
6580         * xcoffread.c (read_xcoff_symtab): Use outermost_context_p.
6581         * dwarf2read.c (using_directives, new_symbol): Use
6582         outermost_context_p.
6583         * dbxread.c (process_one_symbol): Use outermost_context_p.
6584         * coffread.c (coff_symtab_read): Use outermost_context_p.
6585
6586 2018-07-16  Tom Tromey  <tom@tromey.com>
6587
6588         * dwarf2read.c (using_directives, read_func_scope)
6589         (read_lexical_block_scope): Update.
6590         * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
6591         * buildsym.h (local_using_directives, global_using_directives):
6592         Don't declare.
6593         (get_local_using_directives, set_local_using_directives)
6594         (get_global_using_directives): Declare.
6595         * buildsym.c (struct buildsym_compunit) <m_local_using_directives,
6596         m_global_using_directives>: New members.
6597         (finish_block_internal, prepare_for_building)
6598         (reset_symtab_globals, end_symtab_get_static_block)
6599         (push_context): Update.
6600         (get_local_using_directives, set_local_using_directives)
6601         (get_global_using_directives): New functions.
6602         (buildsym_init): Update.
6603
6604 2018-07-16  Tom Tromey  <tom@tromey.com>
6605
6606         * xcoffread.c (xcoff_initial_scan): Don't call
6607         free_pending_blocks.
6608         * dbxread.c (dbx_symfile_read): Don't call free_pending_blocks.
6609         * buildsym.h (class scoped_free_pendings): Add constructor.
6610         (free_pending_blocks): Don't declare.
6611         * buildsym.c (scoped_free_pendings::scoped_free_pendings): New.
6612         (free_pending_blocks): Now static.
6613
6614 2018-07-16  Tom Tromey  <tom@tromey.com>
6615
6616         * buildsym.h (push_subfile, pop_subfile): Update declarations.
6617         * buildsym.c (struct buildsym_compunit) <m_subfile_stack>: New
6618         member.
6619         (struct subfile_stack): Remove.
6620         (subfile_stack): Remove.
6621         (push_subfile, pop_subfile, buildsym_init): Update.
6622
6623 2018-07-16  Tom Tromey  <tom@tromey.com>
6624
6625         * buildsym.c (push_subfile): Use gdb_assert.
6626         (pop_subfile): Use gdb_assert.
6627
6628 2018-07-16  Tom Tromey  <tom@tromey.com>
6629
6630         * buildsym.h (merge_symbol_lists): Remove.
6631         * buildsym.c (merge_symbol_lists): Remove.
6632
6633 2018-07-16  Tom Tromey  <tom@tromey.com>
6634
6635         * stabsread.c (scan_file_globals): Update comment.
6636         * stabsread.h (scan_file_globals): Move from buildsym.h.
6637         * buildsym.h (scan_file_globals): Move to stabsread.h.
6638
6639 2018-07-16  Tom Tromey  <tom@tromey.com>
6640
6641         * xcoffread.c (xcoff_new_init): Update.
6642         * mipsread.c (mipscoff_new_init): Update.
6643         * mdebugread.c (mdebug_build_psymtabs): Update.
6644         * elfread.c (elf_new_init): Update.
6645         * dbxread.c (dbx_new_init, coffstab_build_psymtabs)
6646         (elfstab_build_psymtabs, stabsect_build_psymtabs): Update.
6647         * buildsym.h (buildsym_new_init): Don't declare.
6648         * buildsym.c (buildsym_new_init): Remove.
6649
6650 2018-07-16  Tom Tromey  <tom@tromey.com>
6651
6652         * stabsread.h (within_function): Move from buildsym.h.
6653         * stabsread.c (start_stabs): Clear within_function.
6654         * coffread.c (coff_start_symtab): Clear within_function.
6655         * buildsym.h (within_function): Move to stabsread.h.
6656         * buildsym.c (prepare_for_building): Update.
6657
6658 2018-07-16  Tom Tromey  <tom@tromey.com>
6659
6660         * stabsread.h (processing_gcc_compilation): Move from buildsym.h.
6661         * dwarf2read.c (dwarf2_start_symtab): Don't set
6662         processing_gcc_compilation.
6663         * buildsym.h (processing_gcc_compilation): Move to stabsread.h.
6664
6665 2018-07-16  Tom Tromey  <tom@tromey.com>
6666
6667         * stabsread.h (HASHSIZE, hashname, symnum, next_symbol_text)
6668         (next_symbol_text_func): Move from buildsym.h.
6669         * stabsread.c (hashname): Move from buildsym.c.
6670         * buildsym.h (HASHSIZE, symnum, next_symbol_text)
6671         (next_symbol_text_func, hashname): Move to stabsread.h.
6672         * buildsym.c: Don't include bcache.h
6673         (hashname): Move to stasbread.c.
6674
6675 2018-07-16  Tom Tromey  <tom@tromey.com>
6676
6677         * buildsym.h (context_stack_size): Don't declare.
6678         * buildsym.c (context_stack_size): New global.
6679
6680 2018-07-16  Tom Tromey  <tom@tromey.com>
6681
6682         * dbxread.c (processing_acc_compilation): New global.
6683         * buildsym.h (processing_acc_compilation): Don't declare.
6684
6685 2018-07-16  Tom Tromey  <tom@tromey.com>
6686
6687         * xcoffread.c (aix_process_linenos, complete_symtab): Update.
6688         * dbxread.c (read_ofile_symtab): Update.
6689         * coffread.c (coff_start_symtab, coff_end_symtab): Update.
6690         * buildsym.h (last_source_start_addr): Remove.
6691         (set_last_source_start_addr, get_last_source_start_addr):
6692         Declare.
6693         * buildsym.c (buildsym_compunit::buildsym_compunit): Add last_addr
6694         parameter.
6695         (struct buildsym_compunit) <m_last_source_start_addr>: New
6696         member.
6697         (prepare_for_building): Remove start_addr parameter.
6698         (start_symtab, restart_symtab, end_symtab_get_static_block)
6699         (end_symtab_with_blockvector): Update.
6700         (set_last_source_start_addr, get_last_source_start_addr): New
6701         functions.
6702
6703 2018-07-16  Tom Tromey  <tom@tromey.com>
6704
6705         * buildsym.c (struct buildsym_compunit) <m_have_line_numbers>: New
6706         member.
6707         (have_line_numbers): Remove.
6708         (record_line, prepare_for_building, end_symtab_get_static_block)
6709         (augment_type_symtab): Update.
6710
6711 2018-07-16  Tom Tromey  <tom@tromey.com>
6712
6713         * buildsym.c (~buildsym_compunit): Free the macro table.
6714         (struct buildsym_compunit) <get_macro_table, release_macros>: New
6715         methods.
6716         <m_pending_macros>: New member.
6717         (pending_macros): Remove.
6718         (~scoped_free_pendings, get_macro_table, prepare_for_building)
6719         (reset_symtab_globals, end_symtab_get_static_block)
6720         (end_symtab_with_blockvector, augment_type_symtab)
6721         (buildsym_init): Update.
6722
6723 2018-07-16  Tom Tromey  <tom@tromey.com>
6724
6725         * buildsym.c (buildsym_compunit::buildsym_compunit): Add name
6726         parameter.
6727         (buildsym_compunit::set_last_source_file): New method.
6728         <m_last_source_file>: New member.
6729         (prepare_for_building): Remove "name" parameter.
6730         (start_symtab, restart_symtab, reset_symtab_globals): Update.
6731         (last_source_file): Remove.
6732         (set_last_source_file, get_last_source_file): Update.
6733
6734 2018-07-16  Tom Tromey  <tom@tromey.com>
6735
6736         * buildsym.c (prepare_for_building): Add assert.
6737
6738 2018-07-16  Tom Tromey  <tom@tromey.com>
6739
6740         * buildsym.c (~buildsym_compunit): Update.
6741         (struct buildsym_compunit) <comp_unit>: Now a unique_xmalloc_ptr.
6742         (start_subfile, patch_subfile_names)
6743         (end_symtab_with_blockvector): Update.
6744
6745 2018-07-16  Tom Tromey  <tom@tromey.com>
6746
6747         * buildsym.c (struct buildsym_compunit): Add constructor,
6748         destructor, initializers.
6749         (start_buildsym_compunit): Remove.
6750         (free_buildsym_compunit): Use "delete".
6751         (start_symtab, restart_symtab): Use "new".
6752
6753 2018-07-13  Simon Marchi  <simon.marchi@polymtl.ca>
6754
6755         * symfile.c (set_objfile_default_section_offset): Remove struct
6756         keyword.
6757
6758 2018-07-14  Stafford Horne  <shorne@gmail.com>
6759
6760         * (Responsible Maintainers): Add myself as or1k maintainer.
6761
6762 2018-07-13  Tom Tromey  <tom@tromey.com>
6763
6764         * symfile.c (set_objfile_default_section_offset): Use extra braces
6765         around initializer.
6766
6767 2018-07-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6768
6769         * s390-tdep.c (s390_displaced_step_fixup): Adjust PC for a
6770         non-branching basr.
6771
6772 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
6773
6774         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6775         unittests/cli-utils-selftests.c
6776         * unittests/cli-utils-selftests.c: New file.
6777
6778 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
6779
6780         * NEWS: Mention new commands. Mention change to 'thread apply'.
6781
6782 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
6783
6784         * thread.c (thr_try_catch_cmd): New function.
6785         (thread_apply_all_command): Handle qcs flags.
6786         (thread_apply_command): Handle qcs flags.
6787         (taas_command): New function.
6788         (tfaas_command): New function.
6789         (_initialize_thread): Update to setup the new commands 'taas
6790         and 'tfaas'. Change doc string for 'thread apply'.
6791
6792 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
6793
6794         * stack.c: (trailing_outermost_frame): New function, mostly
6795         extracted from backtrace_command_1.
6796         (leading_innermost_frame): New function.
6797         (backtrace_command_1): Update to call trailing_outermost_frame.
6798         (frame_apply_command_count): New function.
6799         (frame_apply_level_command): New function.
6800         (frame_apply_all_command): New function.
6801         (frame_apply_command): New function.
6802         (faas_command): New function.
6803         (frame_cmd_list): New variable.
6804         (_initialize_stack): Update to setup the new commands 'frame apply'
6805         and 'faas'.
6806
6807 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
6808
6809         * cli-utils.c (number_or_range_parser::get_number): Only handle
6810         numbers or convenience var as numbers.
6811         (parse_flags): New function.
6812         (parse_flags_qcs): New function.
6813         (number_or_range_parser::finished): Ensure parsing end is detected
6814         before end of string.
6815         * cli-utils.h (parse_flags): New function.
6816         (parse_flags_qcs): New function.
6817         (number_or_range_parser): Remove m_finished bool.
6818         (number_or_range_parser::skip_range): Set m_in_range to false.
6819
6820 2018-07-12  Sergio Durigan Junior  <sergiodj@redhat.com>
6821
6822         * ser-tcp.c (try_connect): Declare 'ioarg' as 'u_long' if building
6823         on Windows.
6824
6825 2018-07-11  Sergio Durigan Junior  <sergiodj@redhat.com>
6826             Jan Kratochvil  <jan.kratochvil@redhat.com>
6827             Paul Fertser  <fercerpav@gmail.com>
6828             Tsutomu Seki  <sekiriki@gmail.com>
6829             Pedro Alves  <palves@redhat.com>
6830
6831         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6832         'unittests/parse-connection-spec-selftests.c'.
6833         (COMMON_SFILES): Add 'common/netstuff.c'.
6834         (HFILES_NO_SRCDIR): Add 'common/netstuff.h'.
6835         * NEWS (Changes since GDB 8.2): Mention IPv6 support.
6836         * common/netstuff.c: New file.
6837         * common/netstuff.h: New file.
6838         * ser-tcp.c: Include 'netstuff.h' and 'wspiapi.h'.
6839         (wait_for_connect): Update comment.  New parameter
6840         'gdb::optional<int> sock' instead of 'struct serial *scb'.
6841         Use 'sock' directly instead of 'scb->fd'.
6842         (try_connect): New function, with code from 'net_open'.
6843         (net_open): Rewrite main loop to deal with multiple
6844         sockets/addresses.  Handle IPv6-style hostnames; implement
6845         support for IPv6 connections.
6846         * unittests/parse-connection-spec-selftests.c: New file.
6847
6848 2018-07-11  Pedro Alves  <palves@redhat.com>
6849
6850         PR gdb/23377
6851         * remote.c (remote_target::remote_detach_pid): Call
6852         set_current_process.
6853
6854 2018-07-11  Pedro Alves  <palves@redhat.com>
6855
6856         * h8300-tdep.c (h8300_gdbarch_init): Remove
6857         set_gdbarch_ecoff_reg_to_regnum calls.
6858
6859 2018-07-11  Sergio Durigan Junior  <sergiodj@redhat.com>
6860
6861         PR c++/23373
6862         * c-typeprint.c (c_type_print_base_struct_union): Don't print
6863         offsets/sizes for static members of a class/struct.
6864
6865 2018-07-11  Alan Hayward  <alan.hayward@arm.com>
6866
6867         * target-descriptions.c (tdesc_register_bitsize): Rename.
6868         * target-descriptions.h (tdesc_register_bitsize): Likewise.
6869         * rs6000-tdep.c (rs6000_gdbarch_init): Use new name.
6870         * aarch64-tdep.c (aarch64_get_tdesc_vq): Convert size.
6871
6872 2018-07-10  Tom Tromey  <tom@tromey.com>
6873
6874         * breakpoint.c (moribund_locations): Now static and a
6875         std::vector.
6876         (breakpoint_init_inferior, moribund_breakpoint_here_p)
6877         (build_bpstat_chain, update_global_location_list)
6878         (breakpoint_retire_moribund): Update.
6879         * breakpoint.h (bp_location_p): Remove typedef.  Don't declare
6880         VEC.
6881
6882 2018-07-10  Andrew Burgess  <andrew.burgess@embecosm.com>
6883
6884         * riscv-tdep.c (riscv_is_fp_regno_p): New function.
6885         (riscv_register_reggroup_p): Use new function, remove unneeded
6886         parenthesis.
6887         (riscv_push_dummy_call): Extend assert to compare against xlen or
6888         flen based on register type.
6889
6890 2018-07-10  Andrew Burgess  <andrew.burgess@embecosm.com>
6891
6892         * riscv-tdep.c (riscv_print_arg_location): Use TYPE_SAFE_NAME.
6893
6894 2018-07-09  Andrew Burgess  <andrew.burgess@embecosm.com>
6895
6896         * remote.c (show_hardware_watchpoint_limit): New function.
6897         (show_hardware_watchpoint_length_limit): New function.
6898         (show_hardware_breakpoint_limit): New function.
6899         (_initialize_remote): Use add_setshow_zuinteger_unlimited_cmd
6900         where appropriate, update help text.
6901
6902 2018-07-09  Tom Tromey  <tom@tromey.com>
6903
6904         * Makefile.in (CDEPS): Don't mention XM_CDEPS.
6905         (CLIBS): Don't mention NAT_CLIBS.
6906
6907 2018-07-09  Tom Tromey  <tom@tromey.com>
6908
6909         * Makefile.in (ADD_FILES, ADD_DEPS): Remove.
6910         (LIBGDB_OBS, clean mostlyclean): Update.
6911         (gdb$(EXEEXT), insight$(EXEEXT)): Update.
6912
6913 2018-07-09  Tom Tromey  <tom@tromey.com>
6914
6915         * Makefile.in (%.c: %.y): Use ECHO_YACC.
6916         (%.c: %.l): Use ECHO_LEX.  Just fail if flex not available.
6917         * silent-rules.mk (ECHO_YACC, ECHO_LEX): New variables.
6918
6919 2018-07-09  Tom Tromey  <tom@tromey.com>
6920
6921         * Makefile.in (ALLDEPFILES): Remove exec.c.
6922         (COMMON_OBS): Remove exec.o.
6923         (COMMON_SFILES): Add exec.c.
6924
6925 2018-07-09  Tom Tromey  <tom@tromey.com>
6926
6927         * Makefile.in (LINT, LINTFLAGS, LINTFILES, lint): Remove.
6928
6929 2018-07-09  Tom Tromey  <tom@tromey.com>
6930
6931         * Makefile.in (clean mostlyclean): Remove stamp-version.
6932         (version.c): Depend on stamp-version.
6933         (stamp-version): New rule, from version.c rule.
6934
6935 2018-07-09  Tom Tromey  <tom@tromey.com>
6936
6937         * Makefile.in (init.c): Depend on stamp-init.
6938         (stamp-init): New rule, from init.c rule.
6939         (clean mostlyclean): Remove stamp-init.
6940
6941 2018-07-09  Tom Tromey  <tom@tromey.com>
6942
6943         * Makefile.in (INIT_FILES): Remove CONFIG_SRCS,
6944         SUBDIR_GCC_COMPILE_SRCS.
6945
6946 2018-07-09  Tom Tromey  <tom@tromey.com>
6947
6948         * Makefile.in (init.c): Remove some unused sed rules.
6949
6950 2018-07-09  Tom Tromey  <tom@tromey.com>
6951
6952         * Makefile.in (TSOBS): Remove.
6953         (INIT_FILES): Update.
6954         (LIBGDB_OBS): Update.
6955         (COMMON_SFILES): Add inflow.c.
6956         (SFILES): Remove inflow.c.
6957
6958 2018-07-07  Jan Kratochvil  <jan.kratochvil@redhat.com>
6959
6960         * contrib/gdb-add-index.sh ($dwarf5): New, use it.
6961
6962 2018-07-07  Simon Marchi  <simon.marchi@polymtl.ca>
6963
6964         * ia64-libunwind-tdep.c (get_reg_name, get_fpreg_name,
6965         get_saveloc_name, is_signal_frame_name, step_name,
6966         init_remote_name, create_addr_space_name,
6967         destroy_addr_space_name, search_unwind_table_name,
6968         find_dyn_list_name): Constify.
6969
6970 2018-07-05  Simon Marchi  <simon.marchi@polymtl.ca>
6971
6972         * darwin-nat.c (darwin_pthread_kill): New function.
6973         (darwin_resume_thread): Use darwin_pthread_kill.
6974
6975 2018-07-05  Tom de Vries  <tdevries@suse.de>
6976
6977         * macroexp.c (macro_buffer) <operator=>: New member function.
6978
6979 2018-07-04  Tom Tromey  <tom@tromey.com>
6980
6981         * darwin-nat.c (darwin_attach_pid): Use exit_inferior.
6982
6983 2018-07-04  Simon Marchi  <simon.marchi@polymtl.ca>
6984
6985         * common/common-defs.h (HAVE_USEFUL_SBRK): Define.
6986         * main.c: Use HAVE_USEFUL_SBRK instead of HAVE_SBRK.
6987         * maint.c: Likewise.
6988         * top.c: Likewise.
6989
6990 2018-07-04  Joel Brobecker  <brobecker@adacore.com>
6991
6992         * NEWS: Create a new section for the next release branch.
6993         Rename the section of the current branch, now that it has
6994         been cut.
6995
6996 2018-07-04  Joel Brobecker  <brobecker@adacore.com>
6997
6998         GDB 8.2 branch created (1b919490e8ba30bf1d6941df0ed112b0e557017e):
6999         * version.in: Bump version to 8.2.50.DATE-git.
7000
7001 2018-07-04  Vyacheslav Barinov  <v.barinov@samsung.com>
7002             Pedro Alves  <palves@redhat.com>
7003
7004         * linux-nat.c (linux_init_ptrace): Rename to ...
7005         (linux_init_ptrace_procfs): ... this.  Call
7006         linux_proc_init_warnings.
7007         (linux_nat_target::post_attach)
7008         (linux_nat_target::post_startup_inferior): Adjust.
7009         * nat/linux-procfs.c (linux_proc_init_warnings): Define function.
7010         * nat/linux-procfs.h (linux_proc_init_warnings): Declare function.
7011
7012 2018-07-04  Tom de Vries  <tdevries@suse.de>
7013
7014         * dwarf2read.c (error_check_comp_unit_head): Move dwarf version
7015         check ...
7016         (read_comp_unit_head): ... here.
7017
7018 2018-07-03  Tom Tromey  <tom@tromey.com>
7019
7020         * tracepoint.c (process_tracepoint_on_disconnect, start_tracing)
7021         (stop_tracing, tstatus_command)
7022         (find_matching_tracepoint_location, merge_uploaded_tracepoints)
7023         (print_one_static_tracepoint_marker): Update.
7024         * breakpoint.c (static_tracepoints_here, all_tracepoints): Return
7025         std::vector.
7026         * breakpoint.h (breakpoint_p): Remove typedef.  Don't declare
7027         VEC.
7028         (all_tracepoints, static_tracepoints_here): Return std::vector.
7029
7030 2018-07-03  Tom Tromey  <tom@tromey.com>
7031
7032         * common/ptid.c (ptid_equal): Remove.
7033         * common/ptid.h (ptid_equal): Don't declare.
7034         * ada-tasks.c: Update.
7035         * breakpoint.c: Update.
7036         * common/agent.c: Update.
7037         * corelow.c: Update.
7038         * darwin-nat-info.c: Update.
7039         * darwin-nat.c: Update.
7040         * dcache.c: Update.
7041         * dtrace-probe.c: Update.
7042         * dummy-frame.c: Update.
7043         * fbsd-nat.c: Update.
7044         * frame.c: Update.
7045         * gdbthread.h: Update.
7046         * gnu-nat.c: Update.
7047         * go32-nat.c: Update.
7048         * inf-loop.c: Update.
7049         * inf-ptrace.c: Update.
7050         * infcall.c: Update.
7051         * infcmd.c: Update.
7052         * inflow.c: Update.
7053         * infrun.c: Update.
7054         * linux-fork.c: Update.
7055         * linux-nat.c: Update.
7056         * linux-thread-db.c: Update.
7057         * mi/mi-cmd-var.c: Update.
7058         * mi/mi-interp.c: Update.
7059         * mi/mi-main.c: Update.
7060         * nto-procfs.c: Update.
7061         * ppc-linux-tdep.c: Update.
7062         * procfs.c: Update.
7063         * python/py-inferior.c: Update.
7064         * python/py-record-btrace.c: Update.
7065         * python/py-record.c: Update.
7066         * ravenscar-thread.c: Update.
7067         * regcache.c: Update.
7068         * remote-sim.c: Update.
7069         * remote.c: Update.
7070         * sol-thread.c: Update.
7071         * solib.c: Update.
7072         * target.c: Update.
7073         * tui/tui-stack.c: Update.
7074         * varobj.c: Update.
7075         * windows-nat.c: Update.
7076         * windows-tdep.c: Update.
7077
7078 2018-07-03  Tom Tromey  <tom@tromey.com>
7079
7080         * common/ptid.c (ptid_match): Remove.
7081         * common/ptid.h (ptid_match): Don't declare.
7082         * fbsd-nat.c: Update.
7083         * infcmd.c: Update.
7084         * infrun.c: Update.
7085         * linux-nat.c: Update.
7086         * record-btrace.c: Update.
7087         * regcache.c: Update.
7088         * remote.c: Update.
7089
7090 2018-07-03  Tom Tromey  <tom@tromey.com>
7091
7092         * common/ptid.c (ptid_tid_p): Remove.
7093         * common/ptid.h (ptid_tid_p): Don't declare.
7094         * sol-thread.c: Update.
7095
7096 2018-07-03  Tom Tromey  <tom@tromey.com>
7097
7098         * common/ptid.c (ptid_lwp_p): Remove.
7099         * common/ptid.h (ptid_lwp_p): Don't declare.
7100         * fbsd-nat.c: Update.
7101         * linux-nat.c: Update.
7102         * nat/linux-procfs.c: Update.
7103         * nat/x86-linux-dregs.c: Update.
7104         * sol-thread.c: Update.
7105
7106 2018-07-03  Tom Tromey  <tom@tromey.com>
7107
7108         * common/ptid.c (ptid_is_pid): Remove.
7109         * common/ptid.h (ptid_is_pid): Don't declare.
7110         * infrun.c: Update.
7111         * linux-nat.c: Update.
7112         * mi/mi-interp.c: Update.
7113         * remote.c: Update.
7114         * thread.c: Update.
7115
7116 2018-07-03  Tom Tromey  <tom@tromey.com>
7117
7118         * common/ptid.c (ptid_get_tid): Remove.
7119         * common/ptid.h (ptid_get_tid): Don't declare.
7120         * ada-tasks.c: Update.
7121         * aix-thread.c: Update.
7122         * bsd-uthread.c: Update.
7123         * darwin-nat.c: Update.
7124         * fbsd-nat.c: Update.
7125         * i386-darwin-nat.c: Update.
7126         * infrun.c: Update.
7127         * linux-tdep.c: Update.
7128         * nto-procfs.c: Update.
7129         * ppc-ravenscar-thread.c: Update.
7130         * python/py-infthread.c: Update.
7131         * ravenscar-thread.c: Update.
7132         * sol-thread.c: Update.
7133         * sparc-ravenscar-thread.c: Update.
7134         * windows-nat.c: Update.
7135
7136 2018-07-03  Tom Tromey  <tom@tromey.com>
7137
7138         * common/ptid.c (ptid_get_lwp): Remove.
7139         * common/ptid.h (ptid_get_lwp): Don't declare.
7140         * aarch64-linux-nat.c: Update.
7141         * ada-tasks.c: Update.
7142         * aix-thread.c: Update.
7143         * amd64-linux-nat.c: Update.
7144         * arm-linux-nat.c: Update.
7145         * corelow.c: Update.
7146         * fbsd-nat.c: Update.
7147         * fbsd-tdep.c: Update.
7148         * gnu-nat.c: Update.
7149         * i386-cygwin-tdep.c: Update.
7150         * i386-gnu-nat.c: Update.
7151         * i386-linux-nat.c: Update.
7152         * ia64-linux-nat.c: Update.
7153         * inf-ptrace.c: Update.
7154         * infrun.c: Update.
7155         * linux-fork.c: Update.
7156         * linux-nat.c: Update.
7157         * linux-tdep.c: Update.
7158         * linux-thread-db.c: Update.
7159         * mips-linux-nat.c: Update.
7160         * nat/aarch64-linux-hw-point.c: Update.
7161         * nat/aarch64-linux.c: Update.
7162         * nat/linux-btrace.c: Update.
7163         * nat/linux-osdata.c: Update.
7164         * nat/linux-procfs.c: Update.
7165         * nat/x86-linux-dregs.c: Update.
7166         * obsd-nat.c: Update.
7167         * ppc-fbsd-nat.c: Update.
7168         * ppc-linux-nat.c: Update.
7169         * procfs.c: Update.
7170         * python/py-infthread.c: Update.
7171         * ravenscar-thread.c: Update.
7172         * remote.c: Update.
7173         * s390-linux-nat.c: Update.
7174         * sol-thread.c: Update.
7175         * sol2-tdep.c: Update.
7176         * spu-linux-nat.c: Update.
7177         * x86-linux-nat.c: Update.
7178         * xtensa-linux-nat.c: Update.
7179
7180 2018-07-03  Tom Tromey  <tom@tromey.com>
7181
7182         * common/ptid.c (ptid_get_pid): Remove.
7183         * common/ptid.h (ptid_get_pid): Don't declare.
7184         * aarch64-linux-nat.c: Update.
7185         * ada-lang.c: Update.
7186         * aix-thread.c: Update.
7187         * alpha-bsd-nat.c: Update.
7188         * amd64-fbsd-nat.c: Update.
7189         * amd64-linux-nat.c: Update.
7190         * arm-linux-nat.c: Update.
7191         * arm-nbsd-nat.c: Update.
7192         * auxv.c: Update.
7193         * break-catch-syscall.c: Update.
7194         * breakpoint.c: Update.
7195         * bsd-uthread.c: Update.
7196         * corelow.c: Update.
7197         * ctf.c: Update.
7198         * darwin-nat.c: Update.
7199         * fbsd-nat.c: Update.
7200         * fbsd-tdep.c: Update.
7201         * gcore.c: Update.
7202         * gnu-nat.c: Update.
7203         * hppa-nbsd-nat.c: Update.
7204         * hppa-obsd-nat.c: Update.
7205         * i386-fbsd-nat.c: Update.
7206         * ia64-linux-nat.c: Update.
7207         * inf-ptrace.c: Update.
7208         * infcmd.c: Update.
7209         * inferior.c: Update.
7210         * inferior.h: Update.
7211         * inflow.c: Update.
7212         * infrun.c: Update.
7213         * linux-fork.c: Update.
7214         * linux-nat.c: Update.
7215         * linux-tdep.c: Update.
7216         * linux-thread-db.c: Update.
7217         * m68k-bsd-nat.c: Update.
7218         * mi/mi-interp.c: Update.
7219         * mi/mi-main.c: Update.
7220         * mips-linux-nat.c: Update.
7221         * mips-nbsd-nat.c: Update.
7222         * mips64-obsd-nat.c: Update.
7223         * nat/aarch64-linux-hw-point.c: Update.
7224         * nat/aarch64-linux.c: Update.
7225         * nat/linux-btrace.c: Update.
7226         * nat/linux-osdata.c: Update.
7227         * nat/linux-procfs.c: Update.
7228         * nat/x86-linux-dregs.c: Update.
7229         * nto-procfs.c: Update.
7230         * obsd-nat.c: Update.
7231         * ppc-linux-nat.c: Update.
7232         * ppc-nbsd-nat.c: Update.
7233         * ppc-obsd-nat.c: Update.
7234         * proc-service.c: Update.
7235         * procfs.c: Update.
7236         * python/py-inferior.c: Update.
7237         * python/py-infthread.c: Update.
7238         * ravenscar-thread.c: Update.
7239         * record.c: Update.
7240         * remote-sim.c: Update.
7241         * remote.c: Update.
7242         * rs6000-nat.c: Update.
7243         * s390-linux-nat.c: Update.
7244         * sh-nbsd-nat.c: Update.
7245         * sol-thread.c: Update.
7246         * sparc-nat.c: Update.
7247         * sparc64-tdep.c: Update.
7248         * spu-linux-nat.c: Update.
7249         * spu-tdep.c: Update.
7250         * target-debug.h: Update.
7251         * target.c: Update.
7252         * thread.c: Update.
7253         * tid-parse.c: Update.
7254         * tracefile-tfile.c: Update.
7255         * vax-bsd-nat.c: Update.
7256         * windows-nat.c: Update.
7257         * x86-linux-nat.c: Update.
7258         * x86-nat.c: Update.
7259
7260 2018-07-03  Tom Tromey  <tom@tromey.com>
7261
7262         * common/ptid.c (pid_to_ptid): Remove.
7263         * common/ptid.h (pid_to_ptid): Don't declare.
7264         * aix-thread.c: Update.
7265         * arm-linux-nat.c: Update.
7266         * common/ptid.c: Update.
7267         * common/ptid.h: Update.
7268         * corelow.c: Update.
7269         * ctf.c: Update.
7270         * darwin-nat.c: Update.
7271         * fbsd-nat.c: Update.
7272         * fork-child.c: Update.
7273         * gnu-nat.c: Update.
7274         * go32-nat.c: Update.
7275         * inf-ptrace.c: Update.
7276         * infcmd.c: Update.
7277         * inferior.c: Update.
7278         * infrun.c: Update.
7279         * linux-fork.c: Update.
7280         * linux-nat.c: Update.
7281         * nat/aarch64-linux-hw-point.c: Update.
7282         * nat/fork-inferior.c: Update.
7283         * nat/x86-linux-dregs.c: Update.
7284         * nto-procfs.c: Update.
7285         * obsd-nat.c: Update.
7286         * procfs.c: Update.
7287         * progspace.c: Update.
7288         * remote.c: Update.
7289         * rs6000-nat.c: Update.
7290         * s390-linux-nat.c: Update.
7291         * sol-thread.c: Update.
7292         * spu-linux-nat.c: Update.
7293         * target.c: Update.
7294         * top.c: Update.
7295         * tracefile-tfile.c: Update.
7296         * windows-nat.c: Update.
7297
7298 2018-07-03  Tom Tromey  <tom@tromey.com>
7299
7300         * common/ptid.h (ptid_build): Don't declare.
7301         * common/ptid.c (ptid_build): Remove.
7302         * aix-thread.c: Update.
7303         * bsd-kvm.c: Update.
7304         * bsd-uthread.c: Update.
7305         * common/agent.c: Update.
7306         * common/ptid.c: Update.
7307         * common/ptid.h: Update.
7308         * corelow.c: Update.
7309         * darwin-nat.c: Update.
7310         * fbsd-nat.c: Update.
7311         * gnu-nat.c: Update.
7312         * linux-fork.c: Update.
7313         * linux-nat.c: Update.
7314         * linux-thread-db.c: Update.
7315         * nat/linux-osdata.c: Update.
7316         * nat/linux-procfs.c: Update.
7317         * nto-procfs.c: Update.
7318         * obsd-nat.c: Update.
7319         * proc-service.c: Update.
7320         * procfs.c: Update.
7321         * ravenscar-thread.c: Update.
7322         * remote-sim.c: Update.
7323         * remote.c: Update.
7324         * sol-thread.c: Update.
7325         * target.c: Update.
7326         * windows-nat.c: Update.
7327
7328 2018-07-03  Tom Tromey  <tom@tromey.com>
7329
7330         * infrun.c (follow_exec): Use exit_inferior_silent.
7331         * inferior.c (exit_inferior_num_silent): Remove.
7332         * inferior.h (exit_inferior_num_silent): Don't declare.
7333
7334 2018-07-03  Tom Tromey  <tom@tromey.com>
7335
7336         PR cli/23340:
7337         * darwin-nat.c (darwin_attach_pid): Reset inferior and
7338         inferior_ptid on error.
7339
7340 2018-07-02  Maciej W. Rozycki  <macro@mips.com>
7341             Simon Marchi  <simon.marchi@polymtl.ca>
7342
7343         PR tdep/8282
7344         * disasm.h (gdb_disassembler): Add
7345         `m_disassembler_options_holder'. member
7346         * disasm.c (get_all_disassembler_options): New function.
7347         (gdb_disassembler::gdb_disassembler): Use it.
7348         (gdb_buffered_insn_length_init_dis): Likewise.
7349         (gdb_buffered_insn_length): Adjust accordingly.
7350         (set_disassembler_options): Handle options with arguments.
7351         (show_disassembler_options_sfunc): Likewise.  Add a leading new
7352         line if showing options with descriptions.
7353         (disassembler_options_completer): Adapt to using the
7354         `disasm_options_and_args_t' structure.
7355         * mips-tdep.c (mips_disassembler_options): New variable.
7356         (mips_disassembler_options_o32): Likewise.
7357         (mips_disassembler_options_n32): Likewise.
7358         (mips_disassembler_options_n64): Likewise.
7359         (gdb_print_insn_mips): Don't set `disassembler_options'.
7360         (gdb_print_insn_mips_n32, gdb_print_insn_mips_n64): Remove
7361         functions.
7362         (mips_gdbarch_init): Always set `gdbarch_print_insn' to
7363         `gdb_print_insn_mips'.  Set `gdbarch_disassembler_options',
7364         `gdbarch_disassembler_options_implicit' and
7365         `gdbarch_valid_disassembler_options'.
7366         * arm-tdep.c (_initialize_arm_tdep): Adapt to using the
7367         `disasm_options_and_args_t' structure.
7368         * gdbarch.sh (disassembler_options_implicit): New `gdbarch'
7369         method.
7370         (valid_disassembler_options): Switch from `disasm_options_t' to
7371         the `disasm_options_and_args_t' structure.
7372         * NEWS: Document `set disassembler-options' support for the MIPS
7373         target.
7374         * gdbarch.h: Regenerate.
7375         * gdbarch.c: Regenerate.
7376
7377 2018-07-02  Sebastian Huber  <sebastian.huber@embedded-brains.de>
7378
7379         * riscv-tdep.c (riscv_register_aliases): Swap "fp" and "s0" entries.
7380
7381 2018-06-29  Joel Brobecker  <brobecker@adacore.com>
7382
7383         * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Add missing
7384         parameter in call to amd64_target_description.
7385         * amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise.
7386         * amd64-fbsd-tdep.c (amd64fbsd_core_read_description)
7387         (amd64fbsd_init_abi): Likewise.
7388         * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
7389         * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
7390         * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
7391         * amd64-fbsd-nat.c (amd64_fbsd_nat_target): Likewise.
7392
7393 2018-06-29  Pedro Alves  <palves@redhat.com>
7394
7395         * gdb/amd64-tdep.h (amd64_create_target_description): Add
7396         "segments" parameter.
7397         * gdb/amd64-tdep.c (amd64_none_init_abi, amd64_x32_none_init_abi)
7398         (_initialize_amd64_tdep): Update call to
7399         amd64_create_target_description.
7400         (amd64_target_description): Add "segments" parameter.  Adjust
7401         the implementation to use it.
7402         * gdb/amd64-linux-tdep.c (amd64_linux_read_description): Update
7403         call to amd64_create_target_description.
7404         * gdb/amd64-windows-tdep.c (amd64_windows_init_abi): Likewise.
7405         * gdb/arch/amd64.h (amd64_create_target_description): Add
7406         "segments" register.
7407         * gdb/arch/amd64.c (amd64_create_target_description): Add
7408         "segments" parameter.  Call create_feature_i386_64bit_segments
7409         only if SEGMENTS is true.
7410         * gdb/gdbserver/win32-i386-low.c (i386_arch_setup): Update
7411         call to amd64_create_target_description.
7412
7413 2018-06-29  Pedro Alves  <palves@redhat.com>
7414
7415         * thread.c (thread_target_id_str): New, factored out from ...
7416         (print_thread_info_1): ... here.  Use it to compute the max
7417         "Target Id" column width.
7418
7419 2018-06-29  Pedro Alves  <palves@redhat.com>
7420
7421         * remote.c (remote_target::extra_thread_info): Delete
7422         'display_buf' and 'n' locals.  from the cache, regardless of
7423         packet mechanims is in use.  Use cache for qThreadExtra and qP
7424         methods too.
7425
7426 2018-06-29  Pedro Alves  <palves@redhat.com>
7427
7428         * blockframe.c (find_pc_sect_containing_function): New function.
7429         * breakpoint.c (print_breakpoint_location): Don't call
7430         find_pc_sect_function.
7431         * linespec.c (create_sals_line_offset): Record the location's
7432         symbol in the sal.
7433         * linespec.c (convert_address_location_to_sals): Fill in sal's
7434         symbol with find_pc_sect_containing_function.
7435         * symtab.c (find_function_start_sal): Rename to ...
7436         (find_function_start_sal_1): ... this.
7437         (find_function_start_sal): Reimplement as wrapper around
7438         find_function_start_sal_1, and use
7439         find_pc_sect_containing_function to fill in the sal's symbol.
7440         (find_function_start_sal(symbol*, bool)): Adjust.
7441         * symtab.h (find_pc_function, find_pc_sect_function): Adjust
7442         comments.
7443         (find_pc_sect_containing_function): Declare.
7444
7445 2018-06-29  Pedro Alves  <palves@redhat.com>
7446
7447         * inline-frame.c (stopped_by_user_bp_inline_frame): Return
7448         true if the the location has no symbol.
7449
7450 2018-06-28  Tom Tromey  <tom@tromey.com>
7451
7452         * NEWS: Mention --enable-codesign.
7453         * silent-rules.mk (ECHO_SIGN): New variable.
7454         * configure.ac: Add --enable-codesign.
7455         * configure: Rebuild.
7456         * Makefile.in (CODESIGN, CODESIGN_CERT): New variables.
7457         (gdb$(EXEEXT)): Optionally invoke codesign.
7458
7459 2018-06-28  Pedro Alves  <palves@redhat.com>
7460
7461         * gdbthread.h (struct thread_suspend_state) <stop_pc>: Extend
7462         comments.
7463         (switch_to_thread_no_regs): Adjust comment.
7464         * infcmd.c (stop_pc): Delete.
7465         (post_create_inferior, info_program_command): Replace references
7466         to stop_pc with references to thread_info->suspend.stop_pc.
7467         * inferior.h (stop_pc): Delete declaration.
7468         * infrun.c (proceed, handle_syscall_event, fill_in_stop_func)
7469         (handle_inferior_event_1, handle_signal_stop)
7470         (process_event_stop_test, keep_going_stepped_thread)
7471         (handle_step_into_function, handle_step_into_function_backward)
7472         (print_stop_location): Replace references to stop_pc with
7473         references to thread_info->suspend.stop_pc.
7474         (struct infcall_suspend_state) <stop_pc>: Delete field.
7475         (save_infcall_suspend_state, restore_infcall_suspend_state):
7476         Remove references to inf_stat->stop_pc.
7477         * linux-fork.c (fork_load_infrun_state): Likewise.
7478         * record-btrace.c (record_btrace_set_replay): Likewise.
7479         * record-full.c (record_full_goto_entry): Likewise.
7480         * remote.c (print_one_stopped_thread): Likewise.
7481         * target.c (target_resume): Extend comment.
7482         * thread.c (set_executing_thread): New.
7483         (set_executing): Use it.
7484         (switch_to_thread_no_regs, switch_to_no_thread, switch_to_thread):
7485         Remove references to stop_pc.
7486
7487 2018-06-28  Pedro Alves  <palves@redhat.com>
7488
7489         * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>:
7490         Moving fetching stop_pc until after ecs->event_thread is refreshed.
7491
7492 2018-06-28  Tom Tromey  <tom@tromey.com>
7493
7494         * coffread.c (coff_symfile_finish): Update.
7495         * xcoffread.c (xcoff_symfile_finish): Update.
7496         * elfread.c (elf_symfile_finish): Update.
7497         * symfile.h (dwarf2_free_objfile): Don't declare.
7498         * dwarf2read.c (_initialize_dwarf2_read): Use
7499         register_objfile_data_with_cleanup.
7500         (dwarf2_free_objfile): Now static.  Change signature.
7501
7502 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
7503
7504         * symfile.c (add_symbol_file_command, _initialize_symfile): Add
7505         option "-o" to add-symbol-file-load to add an offset to each
7506         section's load address.
7507         * symfile.c (set_objfile_default_section_offset): New function.
7508
7509 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
7510
7511         * symfile.c (add_symbol_file_command): Make sure that sections
7512         with the same name are sorted in the same order.
7513
7514 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
7515
7516         * symfile.c (add_symbol_file_command, _initialize_symfile): Do not
7517         require the second argument.  If omitted, load sections at the
7518         addresses specified in the file.
7519
7520 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
7521
7522         * symfile.c (symbol_file_command, symbol_file_add_main_1)
7523         (_initialize_symfile): Add option "-o" to symbol-file to add an
7524         offset to each section of the symbol file.
7525
7526 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
7527
7528         * MAINTAINERS (Write After Approval): Add Petr Tesarik.
7529
7530 2018-06-27  Tom Tromey  <tom@tromey.com>
7531
7532         * stack.c (_initialize_stack): Update "func" help text.
7533
7534 2018-06-27  Tom Tromey  <tom@tromey.com>
7535
7536         * python/py-unwind.c (unwind_info_object) <saved_regs>: Now a
7537         std::vector.
7538         (unwind_infopy_str, pyuw_create_unwind_info)
7539         (unwind_infopy_add_saved_register, pyuw_sniffer)
7540         (unwind_infopy_dealloc, unwind_infopy_add_saved_register):
7541         Update.
7542         (struct saved_reg): Add constructor.
7543         <value>: Now a gdbpy_ref<>.
7544
7545 2018-06-27  Tom Tromey  <tom@tromey.com>
7546
7547         * machoread.c (macho_symfile_read): Define "symbol_table" earlier.
7548
7549 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
7550
7551         * gdb-gdb.py.in: Format using autopep8.
7552
7553 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
7554
7555         * gdb-gdb.py.in (CoreAddrPrettyPrinter): New class.
7556         (type_lookup_function): Recognize CORE_ADDR values.
7557
7558 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
7559
7560         * gdb-gdb.py.in (StructMainTypePrettyPrinter) <to_string>: Don't
7561         print tag_name.
7562
7563 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
7564
7565         * gdb-gdb.py.in (TypeFlag) <__cmp__>: Remove.
7566         <__lt__>: Add.
7567
7568 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
7569
7570         * gdb-gdb.py: Move to...
7571         * gdb-gdb.py.in: ... here.
7572         * configure.ac (AC_CONFIG_FILES): Add gdb-gdb.py.
7573         * Makefile.in (all): Add gdb-gdb.gdb and gdb-gdb.py as
7574         dependencies.
7575         (distclean): Remove gdb-gdb.py when cleaning.
7576         (gdb-gdb.py, gdb-gdb.gdb): New rules.
7577         * configure: Re-generate.
7578
7579 2018-06-27  Pedro Alves  <palves@redhat.com>
7580
7581         * proc-service.c (get_ps_regcache): New.
7582         (ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
7583         (ps_lsetfpregs): Use it.
7584
7585 2018-06-27  Omair Javaid  <omair.javaid@linaro.org>
7586
7587         PR gdb/21695
7588         * dwarf2read.c (lnp_state_machine::check_line_address): Update
7589         declaration.
7590         (dwarf_decode_lines_1): Adjust.
7591
7592 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
7593
7594         * fbsd-nat.h (class fbsd_nat_target) <find_memory_regions>: Add
7595         override.
7596         <info_proc>: Likewise.
7597
7598 2018-06-26  Joel Brobecker  <brobecker@adacore.com>
7599
7600         * windows-nat.c (do_windows_fetch_inferior_registers): Rename
7601         to windows_fetch_one_register, and only handle the case of
7602         fetching one register.  Move the code that reloads the context
7603         and iterates over all registers if R is negative to...
7604         (windows_nat_target::fetch_registers): ... here.
7605         (do_windows_store_inferior_registers): Rename to
7606         windows_store_one_register, and only handle the case of storing
7607         one register.  Move the code that handles the case where r is
7608         negative to...
7609         (windows_nat_target::store_registers) ... here.
7610
7611 2018-06-26  Tom Tromey  <tom@tromey.com>
7612
7613         PR rust/22574:
7614         * typeprint.c (whatis_exp): Allow ptype/o for Rust.
7615         * rust-lang.c (rust_print_struct_def): Add podata parameter.
7616         Update.
7617         (rust_internal_print_type): Add podata parameter.
7618         (rust_print_type): Update.
7619
7620 2018-06-26  Tom Tromey  <tom@tromey.com>
7621
7622         * typeprint.h (struct print_offset_data) <update, finish,
7623         maybe_print_hole>: New methods.
7624         <indentation>: New constant.
7625         * typeprint.c (print_offset_data::indentation): Define.
7626         (print_offset_data::maybe_print_hole, print_offset_data::update)
7627         (print_offset_data::finish): Move from c-typeprint.c and rename.
7628         * c-typeprint.c (OFFSET_SPC_LEN): Remove.
7629         (print_spaces_filtered_with_print_options): Update.
7630         (c_print_type_union_field_offset, maybe_print_hole)
7631         (c_print_type_struct_field_offset): Move to typeprint.c and
7632         rename.
7633         (c_type_print_base_struct_union): Update.
7634
7635 2018-06-25  Pedro Alves  <palves@redhat.com>
7636
7637         * gdbthread.h (thread_info_ref, delete_thread)
7638         (delete_thread_silent, first_thread_of_inferior)
7639         (any_thread_of_inferior, switch_to_thread)
7640         (enable_thread_stack_temporaries)
7641         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
7642         (get_last_thread_stack_temporary)
7643         (value_in_thread_stack_temporaries, can_access_registers_thread):
7644         Spell out "struct thread_info" instead of just "thread_info".
7645         * inferior.h (notice_new_inferior): Likewise.
7646
7647 2018-06-25  Pedro Alves  <palves@redhat.com>
7648
7649         * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
7650         pass thread_info pointer to delete_thread.
7651         (windows_nat_target::detach): Pass inferior pointer to
7652         detach_inferior.
7653         * aix-thread.c (sync_threadlists): Pass thread_info pointer to
7654         delete_thread.
7655         * bsd-kvm.c (bsd_kvm_target::close): Use discard_all_inferiors.
7656         * darwin-nat.c (darwin_check_new_threads): Use find_thread_ptid
7657         and pass a thread_info pointer to delete_thread.
7658         * fbsd-nat.c (fbsd_nat_target::wait): Use find_thread_ptid and
7659         pass thread_info pointer to delete_thread.
7660         * go32-nat.c (go32_nat_target::mourn_inferior): Remove
7661         delete_thread_silent call.
7662         * procfs.c (procfs_target::detach): Pass inferior pointer to
7663         detach_inferior.
7664         (procfs_target::wait): Pass thread_info pointer to delete_thread.
7665         * remote-sim.c (gdbsim_target::mourn_inferior): Remove
7666         delete_thread_silent call.
7667         * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
7668         pass thread_info pointer to delete_thread.
7669         (windows_nat_target::detach): Pass inferior pointer to
7670         delete_inferior.
7671
7672 2018-06-22  Alan Hayward  <alan.hayward@arm.com>
7673
7674         * regcache.c (readable_regcache::read_part): Fix asserts.
7675         (reg_buffer::raw_collect_part): New function.
7676         (regcache::write_part): Fix asserts.
7677         (reg_buffer::raw_supply_part): New function.
7678         (regcache::transfer_regset_register): New helper function.
7679         (regcache::transfer_regset): Call new functions.
7680         (regcache_supply_regset): Use gdb_byte*.
7681         (regcache::supply_regset): Likewise.
7682         (regcache_collect_regset): Likewise.
7683         (regcache::collect_regset): Likewise.
7684         * regcache.h (reg_buffer::raw_collect_part): New declaration.
7685         (reg_buffer::raw_supply_part): Likewise.
7686         (regcache::transfer_regset_register): Likewise.
7687         (regcache::transfer_regset): Use gdb_byte*.
7688
7689 2018-06-22  Alan Hayward  <alan.hayward@arm.com>
7690
7691         * nat/aarch64-sve-linux-ptrace.h (HAS_SVE_STATE): Use &.
7692
7693 2018-06-21  Pedro Alves  <palves@redhat.com>
7694
7695         * ada-lang.h (ada_get_task_number): Take a thread_info pointer
7696         instead of a ptid_t.  All callers adjusted.
7697         * ada-tasks.c (ada_get_task_number): Likewise.  All callers
7698         adjusted.
7699         (print_ada_task_info, display_current_task_id, task_command_1):
7700         Adjust.
7701         * breakpoint.c (watchpoint_in_thread_scope): Adjust to use
7702         inferior_thread.
7703         (breakpoint_kind): Adjust.
7704         (remove_breakpoints_pid): Rename to ...
7705         (remove_breakpoints_inf): ... this.  Adjust to take an inferior
7706         pointer.  All callers adjusted.
7707         (bpstat_clear_actions): Use inferior_thread.
7708         (get_bpstat_thread): New.
7709         (bpstat_do_actions): Use it.
7710         (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust
7711         to take a thread_info pointer.  All callers adjusted.
7712         (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint)
7713         (breakpoint_re_set_thread): Use inferior_thread.
7714         * breakpoint.h (struct inferior): Forward declare.
7715         (bpstat_stop_status): Update.
7716         (remove_breakpoints_pid): Delete.
7717         (remove_breakpoints_inf): New.
7718         * bsd-uthread.c (bsd_uthread_target::wait)
7719         (bsd_uthread_target::update_thread_list): Use find_thread_ptid.
7720         * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch)
7721         (maint_btrace_packet_history_cmd)
7722         (maint_btrace_clear_packet_history_cmd): Adjust.
7723         (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use
7724         inferior_thread.
7725         * cli/cli-interp.c: Include "inferior.h".
7726         * common/refcounted-object.h (struct
7727         refcounted_object_ref_policy): New.
7728         * compile/compile-object-load.c: Include gdbthread.h.
7729         (store_regs): Use inferior_thread.
7730         * corelow.c (core_target::close): Use current_inferior.
7731         (core_target_open): Adjust to use first_thread_of_inferior and use
7732         the current inferior.
7733         * ctf.c (ctf_target::close): Adjust to use current_inferior.
7734         * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ...
7735         <thread>: ... this new field.  All references adjusted.
7736         (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor):
7737         Take a thread_info pointer instead of a ptid_t.
7738         * dummy-frame.h (dummy_frame_push, dummy_frame_pop)
7739         (dummy_frame_discard, register_dummy_frame_dtor): Take a
7740         thread_info pointer instead of a ptid_t.
7741         * elfread.c: Include "inferior.h".
7742         (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop):
7743         Use inferior_thread.
7744         * eval.c (evaluate_subexp): Likewise.
7745         * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use
7746         inferior_thread.
7747         * gdb_proc_service.h (struct thread_info): Forward declare.
7748         (struct ps_prochandle) <ptid>: Delete, replaced by ...
7749         <thread>: ... this new field.  All references adjusted.
7750         * gdbarch.h, gdbarch.c: Regenerate.
7751         * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a
7752         'thread' parameter.  All implementations and callers adjusted.
7753         * gdbthread.h (thread_info) <set_running>: New method.
7754         (delete_thread, delete_thread_silent): Take a thread_info pointer
7755         instead of a ptid.
7756         (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete.
7757         (first_thread_of_process): Delete, replaced by ...
7758         (first_thread_of_inferior): ... this new function.  All callers
7759         adjusted.
7760         (any_live_thread_of_process): Delete, replaced by ...
7761         (any_live_thread_of_inferior): ... this new function.  All callers
7762         adjusted.
7763         (switch_to_thread, switch_to_no_thread): Declare.
7764         (is_executing): Delete.
7765         (enable_thread_stack_temporaries): Update comment.
7766         <enable_thread_stack_temporaries>: Take a thread_info pointer
7767         instead of a ptid_t.  Incref the thread.
7768         <~enable_thread_stack_temporaries>: Decref the thread.
7769         <m_ptid>: Delete
7770         <m_thr>: New.
7771         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
7772         (get_last_thread_stack_temporary)
7773         (value_in_thread_stack_temporaries, can_access_registers_thread):
7774         Take a thread_info pointer instead of a ptid_t.  All callers
7775         adjusted.
7776         * infcall.c (get_call_return_value): Use inferior_thread.
7777         (run_inferior_call): Work with thread pointers instead of ptid_t.
7778         (call_function_by_hand_dummy): Work with thread pointers instead
7779         of ptid_t.  Use thread_info_ref.
7780         * infcmd.c (proceed_thread_callback): Access thread's state
7781         directly.
7782         (ensure_valid_thread, ensure_not_running): Use inferior_thread,
7783         access thread's state directly.
7784         (continue_command): Use inferior_thread.
7785         (info_program_command): Use find_thread_ptid and access thread
7786         state directly.
7787         (proceed_after_attach_callback): Use thread state directly.
7788         (notice_new_inferior): Take a thread_info pointer instead of a
7789         ptid_t.  All callers adjusted.
7790         (exit_inferior): Take an inferior pointer instead of a pid.  All
7791         callers adjusted.
7792         (exit_inferior_silent): New.
7793         (detach_inferior): Delete.
7794         (valid_gdb_inferior_id, pid_to_gdb_inferior_id)
7795         (gdb_inferior_id_to_pid, in_inferior_list): Delete.
7796         (detach_inferior_command, kill_inferior_command): Use
7797         find_inferior_id instead of valid_gdb_inferior_id and
7798         gdb_inferior_id_to_pid.
7799         (inferior_command): Use inferior and thread pointers.
7800         * inferior.h (struct thread_info): Forward declare.
7801         (notice_new_inferior): Take a thread_info pointer instead of a
7802         ptid_t.  All callers adjusted.
7803         (detach_inferior): Delete declaration.
7804         (exit_inferior, exit_inferior_silent): Take an inferior pointer
7805         instead of a pid.  All callers adjusted.
7806         (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
7807         (valid_gdb_inferior_id): Delete.
7808         * infrun.c (follow_fork_inferior, proceed_after_vfork_done)
7809         (handle_vfork_child_exec_or_exit, follow_exec): Adjust.
7810         (struct displaced_step_inferior_state) <pid>: Delete, replaced by
7811         ...
7812         <inf>: ... this new field.
7813         <step_ptid>: Delete, replaced by ...
7814         <step_thread>: ... this new field.
7815         (get_displaced_stepping_state): Take an inferior pointer instead
7816         of a pid.  All callers adjusted.
7817         (displaced_step_in_progress_any_inferior): Adjust.
7818         (displaced_step_in_progress_thread): Take a thread pointer instead
7819         of a ptid_t.  All callers adjusted.
7820         (displaced_step_in_progress, add_displaced_stepping_state): Take
7821         an inferior pointer instead of a pid.  All callers adjusted.
7822         (get_displaced_step_closure_by_addr): Adjust.
7823         (remove_displaced_stepping_state): Take an inferior pointer
7824         instead of a pid.  All callers adjusted.
7825         (displaced_step_prepare_throw, displaced_step_prepare)
7826         (displaced_step_fixup): Take a thread pointer instead of a ptid_t.
7827         All callers adjusted.
7828         (start_step_over): Adjust.
7829         (infrun_thread_ptid_changed): Remove bit updating ptids in the
7830         displaced step queue.
7831         (do_target_resume): Adjust.
7832         (fetch_inferior_event): Use inferior_thread.
7833         (context_switch, get_inferior_stop_soon): Take an
7834         execution_control_state pointer instead of a ptid_t.  All callers
7835         adjusted.
7836         (switch_to_thread_cleanup): Delete.
7837         (stop_all_threads): Use scoped_restore_current_thread.
7838         * inline-frame.c: Include "gdbthread.h".
7839         (inline_state) <inline_state>: Take a thread pointer instead of a
7840         ptid_t.  All callers adjusted.
7841         <ptid>: Delete, replaced by ...
7842         <thread>: ... this new field.
7843         (find_inline_frame_state): Take a thread pointer instead of a
7844         ptid_t.  All callers adjusted.
7845         (skip_inline_frames, step_into_inline_frame)
7846         (inline_skipped_frames, inline_skipped_symbol): Take a thread
7847         pointer instead of a ptid_t.  All callers adjusted.
7848         * inline-frame.h (skip_inline_frames, step_into_inline_frame)
7849         (inline_skipped_frames, inline_skipped_symbol): Likewise.
7850         * linux-fork.c (delete_checkpoint_command): Adjust to use thread
7851         pointers directly.
7852         * linux-nat.c (get_detach_signal): Likewise.
7853         * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter.
7854         (thread_db_notice_clone): Adjust.
7855         (thread_db_find_new_threads_silently)
7856         (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take
7857         a thread pointer instead of a ptid_t.  All callers adjusted.
7858         * mi/mi-cmd-var.c: Include "inferior.h".
7859         (mi_cmd_var_update_iter): Update to use thread pointers.
7860         * mi/mi-interp.c (mi_new_thread): Update to use the thread's
7861         inferior directly.
7862         (mi_output_running_pid, mi_inferior_count): Delete, bits factored
7863         out to ...
7864         (mi_output_running): ... this new function.
7865         (mi_on_resume_1): Adjust to use it.
7866         (mi_user_selected_context_changed): Adjust to use inferior_thread.
7867         * mi/mi-main.c (proceed_thread): Adjust to use thread pointers
7868         directly.
7869         (interrupt_thread_callback): : Adjust to use thread and inferior
7870         pointers.
7871         * proc-service.c: Include "gdbthread.h".
7872         (ps_pglobal_lookup): Adjust to use the thread's inferior directly.
7873         * progspace-and-thread.c: Include "inferior.h".
7874         * progspace.c: Include "inferior.h".
7875         * python/py-exitedevent.c (create_exited_event_object): Adjust to
7876         hold a reference to an inferior_object.
7877         * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use
7878         inferior_thread.
7879         * python/py-inferior.c (struct inferior_object): Give the type a
7880         tag name instead of a typedef.
7881         (python_on_normal_stop): No need to check if the current thread is
7882         listed.
7883         (inferior_to_inferior_object): Change return type to
7884         inferior_object.  All callers adjusted.
7885         (find_thread_object): Delete, bits factored out to ...
7886         (thread_to_thread_object): ... this new function.
7887         * python/py-infthread.c (create_thread_object): Use
7888         inferior_to_inferior_object.
7889         (thpy_is_stopped): Use thread pointer directly.
7890         (gdbpy_selected_thread): Use inferior_thread.
7891         * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete
7892         field, replaced with ...
7893         <thread>: ... this new field.  All users adjusted.
7894         (btpy_insn_or_gap_new): Drop const.
7895         (btpy_list_new): Take a thread pointer instead of a ptid_t.  All
7896         callers adjusted.
7897         * python/py-record.c: Include "gdbthread.h".
7898         (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
7899         a ptid_t.  All callers adjusted.
7900         (gdbpy_current_recording): Use inferior_thread.
7901         * python/py-record.h (recpy_record_object) <ptid>: Delete
7902         field, replaced with ...
7903         <thread>: ... this new field.  All users adjusted.
7904         (recpy_element_object) <ptid>: Delete
7905         field, replaced with ...
7906         <thread>: ... this new field.  All users adjusted.
7907         (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
7908         a ptid_t.  All callers adjusted.
7909         * python/py-threadevent.c: Include "gdbthread.h".
7910         (get_event_thread): Use thread_to_thread_object.
7911         * python/python-internal.h (struct inferior_object): Forward
7912         declare.
7913         (find_thread_object, find_inferior_object): Delete declarations.
7914         (thread_to_thread_object, inferior_to_inferior_object): New
7915         declarations.
7916         * record-btrace.c: Include "inferior.h".
7917         (require_btrace_thread): Use inferior_thread.
7918         (record_btrace_frame_sniffer)
7919         (record_btrace_tailcall_frame_sniffer): Use inferior_thread.
7920         (get_thread_current_frame): Use scoped_restore_current_thread and
7921         switch_to_thread.
7922         (get_thread_current_frame): Use thread pointer directly.
7923         (record_btrace_replay_at_breakpoint): Use thread's inferior
7924         pointer directly.
7925         * record-full.c: Include "inferior.h".
7926         * regcache.c: Include "gdbthread.h".
7927         (get_thread_arch_regcache): Use the inferior's address space
7928         directly.
7929         (get_thread_regcache, registers_changed_thread): New.
7930         * regcache.h (get_thread_regcache(thread_info *thread)): New
7931         overload.
7932         (registers_changed_thread): New.
7933         (remote_target) <remote_detach_1>: Swap order of parameters.
7934         (remote_add_thread): <remote_add_thread>: Return the new thread.
7935         (get_remote_thread_info(ptid_t)): New overload.
7936         (remote_target::remote_notice_new_inferior): Use thread pointers
7937         directly.
7938         (remote_target::process_initial_stop_replies): Use
7939         thread_info::set_running.
7940         (remote_target::remote_detach_1, remote_target::detach)
7941         (extended_remote_target::detach): Adjust.
7942         * stack.c (frame_show_address): Use inferior_thread.
7943         * target-debug.h (target_debug_print_thread_info_pp): New.
7944         * target-delegates.c: Regenerate.
7945         * target.c (default_thread_address_space): Delete.
7946         (memory_xfer_partial_1): Use current_inferior.
7947         (target_detach): Use current_inferior.
7948         (target_thread_address_space): Delete.
7949         (generic_mourn_inferior): Use current_inferior.
7950         * target.h (struct target_ops) <thread_address_space>: Delete.
7951         (target_thread_address_space): Delete.
7952         * thread.c (init_thread_list): Use ALL_THREADS_SAFE.  Use thread
7953         pointers directly.
7954         (delete_thread_1, delete_thread, delete_thread_silent): Take a
7955         thread pointer instead of a ptid_t.  Adjust all callers.
7956         (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete.
7957         (first_thread_of_process): Delete, replaced by ...
7958         (first_thread_of_inferior): ... this new function.  All callers
7959         adjusted.
7960         (any_thread_of_process): Rename to ...
7961         (any_thread_of_inferior): ... this, and take an inferior pointer.
7962         (any_live_thread_of_process): Rename to ...
7963         (any_live_thread_of_inferior): ... this, and take an inferior
7964         pointer.
7965         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
7966         (value_in_thread_stack_temporaries)
7967         (get_last_thread_stack_temporary): Take a thread pointer instead
7968         of a ptid_t.  Adjust all callers.
7969         (thread_info::set_running): New.
7970         (validate_registers_access): Use inferior_thread.
7971         (can_access_registers_ptid): Rename to ...
7972         (can_access_registers_thread): ... this, and take a thread
7973         pointer.
7974         (print_thread_info_1): Adjust to compare thread pointers instead
7975         of ptids.
7976         (switch_to_no_thread, switch_to_thread): Make extern.
7977         (scoped_restore_current_thread::~scoped_restore_current_thread):
7978         Use m_thread pointer directly.
7979         (scoped_restore_current_thread::scoped_restore_current_thread):
7980         Use inferior_thread.
7981         (thread_command): Use thread pointer directly.
7982         (thread_num_make_value_helper): Use inferior_thread.
7983         * top.c (execute_command): Use inferior_thread.
7984         * tui/tui-interp.c: Include "inferior.h".
7985         * varobj.c (varobj_create): Use inferior_thread.
7986         (value_of_root_1): Use find_thread_global_id instead of
7987         global_thread_id_to_ptid.
7988
7989 2018-06-21  Alan Hayward  <alan.hayward@arm.com>
7990
7991         * regcache.c (readable_regcache::read_part): Avoid memcpy when
7992         possible.
7993         (regcache::write_part): Likewise.
7994         (readable_regcache::cooked_read_part): Update comment.
7995         (readable_regcache::cooked_write_part): Likewise.
7996         * regcache.h: (readable_regcache::read_part): Likewise.
7997         (regcache::write_part): Likewise.
7998
7999 2018-06-21  Richard Bunt  <richard.bunt@arm.com>
8000             Dirk Schubert  <dirk.schubert@arm.com>
8001
8002         * aarch64-linux-nat.c (post_attach): New.
8003         (aarch64_linux_nat_target::post_attach): Override post_attach to
8004         record the number of hardware debug registers.
8005
8006 2018-06-20  Tom Tromey  <tom@tromey.com>
8007
8008         * python/py-param.c (add_setshow_generic): Make parameters const.
8009         (parmpy_init): Update.
8010
8011 2018-06-20  Simon Marchi  <simon.marchi@polymtl.ca>
8012
8013         * regcache.h (regcache_cooked_read_ftype): Rename to...
8014         (register_read_ftype): ...this, change type to function_view.
8015         (class reg_buffer) <save>: Remove src parameter.
8016         (readonly_detached_regcache) <readonly_detached_regcache>: Make
8017         parameter non-const in first overload.  Remove src parameter in
8018         second overload.
8019         * regcache.c (do_cooked_read): Remove.
8020         (readonly_detached_regcache::readonly_detached_regcache): Make
8021         parameter non-const, adjust call to other constructor.
8022         (reg_buffer::save): Remove src parameter.
8023         * frame.c (do_frame_register_read): Remove.
8024         (frame_save_as_regcache): Use lambda function.
8025         * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
8026         parameter to ppu2spu_data *.
8027         (ppu2spu_sniffer): Use lambda function.
8028
8029 2018-06-20  Simon Marchi  <simon.marchi@polymtl.ca>
8030
8031         * record-full.c (record_full_target::insert_breakpoint): Remove
8032         "struct" keyword, add const.
8033
8034 2018-06-19  Simon Marchi  <simon.marchi@ericsson.com>
8035
8036         * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
8037         PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
8038         * configure.ac: Remove AC_PREREQ, add missing quoting.
8039         * gnulib/configure.ac: Modernize usage of
8040         AC_INIT/AM_INIT_AUTOMAKE.  Remove AC_PREREQ.
8041         * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
8042         (AUTOMAKE_VERSION): Bump to 1.15.1.
8043         * configure: Re-generate.
8044         * config.in: Re-generate.
8045         * aclocal.m4: Re-generate.
8046         * gnulib/aclocal.m4: Re-generate.
8047         * gnulib/config.in: Re-generate.
8048         * gnulib/configure: Re-generate.
8049         * gnulib/import/Makefile.in: Re-generate.
8050
8051 2018-06-19  Pedro Alves  <palves@redhat.com>
8052
8053         * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
8054         (lookup_minimal_symbol_by_pc_section): ... here with
8055         gdb_assert_not_reached added.
8056
8057 2018-06-19  Pedro Alves  <palves@redhat.com>
8058
8059         * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
8060         parameter with a block parameter.  Compare location's block symbol
8061         with the frame's block instead of addresses.
8062         (skip_inline_frames): Pass the current block instead of the
8063         frame's address.  Break out as soon as we determine the frame
8064         should not be skipped.
8065
8066 2018-06-18  Tom Tromey  <tom@tromey.com>
8067
8068         * solib-aix.c (solib_aix_get_section_offsets): Return
8069         unique_xmalloc_ptr.
8070         (solib_aix_solib_create_inferior_hook): Update.
8071
8072 2018-06-18  Tom Tromey  <tom@tromey.com>
8073
8074         * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
8075
8076 2018-06-18  Tom Tromey  <tom@tromey.com>
8077
8078         * solib-frv.c (frv_relocate_main_executable): Use
8079         unique_xmalloc_ptr.
8080         * solib-dsbt.c (dsbt_relocate_main_executable): Use
8081         unique_xmalloc_ptr.
8082
8083 2018-06-18  Tom Tromey  <tom@tromey.com>
8084
8085         * objfiles.h (inhibit_section_map_updates): Update.
8086         (resume_section_map_updates, resume_section_map_updates_cleanup):
8087         Remove.
8088         * solib-svr4.c (svr4_handle_solib_event): Update.
8089         * objfiles.c (inhibit_section_map_updates): Return
8090         scoped_restore_tmpl<int>.
8091         (resume_section_map_updates, resume_section_map_updates_cleanup):
8092         Remove.
8093
8094 2018-06-18  Tom Tromey  <tom@tromey.com>
8095
8096         * valprint.h (read_string): Update.
8097         * valprint.c (read_string): Change type of "buffer".
8098         (val_print_string): Update.
8099         * python/py-value.c (valpy_string): Update.
8100         * language.h (struct language_defn) <la_get_string>: Change
8101         type of "buffer".
8102         (default_get_string, c_get_string): Update.
8103         * language.c (default_get_string): Change type of "buffer".
8104         * guile/scm-value.c (gdbscm_value_to_string): Update.
8105         * c-lang.c (c_get_string): Change type of "buffer".
8106
8107 2018-06-18  Tom Tromey  <tom@tromey.com>
8108
8109         * ser-mingw.c (struct pipe_state_destroyer): New.
8110         (pipe_state_up): New typedef.
8111         (cleanup_pipe_state): Remove.
8112         (pipe_windows_open): Use pipe_state_up.  Don't release argv.
8113
8114 2018-06-18  Tom Tromey  <tom@tromey.com>
8115
8116         * rust-lang.h (rust_yyerror): Don't declare.
8117         * rust-lang.c (rust_language_defn): Update.
8118         * rust-exp.y (yyerror): Now static.
8119         * parse.c (parse_exp_in_context_1): Update.
8120         * p-lang.h (p_yyerror): Don't declare.
8121         * p-lang.c (p_language_defn): Update.
8122         * p-exp.y (yyerror): Now static.
8123         * opencl-lang.c (opencl_language_defn): Update.
8124         * objc-lang.c (objc_language_defn): Update.
8125         * m2-lang.h (m2_yyerror): Don't declare.
8126         * m2-lang.c (m2_language_defn): Update.
8127         * m2-exp.y (yyerror): Now static.
8128         * language.h (struct language_defn) <la_error>: Remove.
8129         * language.c (unk_lang_error): Remove.
8130         (unknown_language_defn, auto_language_defn): Remove.
8131         * go-lang.h (go_yyerror): Don't declare.
8132         * go-lang.c (go_language_defn): Update.
8133         * go-exp.y (yyerror): Now static.
8134         * f-lang.h (f_yyerror): Don't declare.
8135         * f-lang.c (f_language_defn): Update.
8136         * f-exp.y (yyerror): Now static.
8137         * d-lang.h (d_yyerror): Don't declare.
8138         * d-lang.c (d_language_defn): Update.
8139         * d-exp.y (yyerror): Now static.
8140         * c-lang.h (c_yyerror): Don't declare.
8141         * c-lang.c (c_language_defn, cplus_language_defn)
8142         (asm_language_defn, minimal_language_defn): Update.
8143         * c-exp.y (yyerror): Now static.
8144         * ada-lang.h (ada_yyerror): Don't declare.
8145         * ada-lang.c (ada_language_defn): Update.
8146         * ada-exp.y (yyerror): Now static.
8147
8148 2018-06-18  Alan Hayward  <alan.hayward@arm.com>
8149
8150         * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
8151         (store_sveregs_to_thread): Likewise.
8152         (aarch64_linux_fetch_inferior_registers): Check for SVE.
8153         (aarch64_linux_store_inferior_registers): Likewise.
8154         * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
8155         function.
8156         (aarch64_sve_regs_copy_to_regcache): Likewise.
8157         (aarch64_sve_regs_copy_from_regcache): Likewise.
8158         * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
8159         declaration.
8160         (aarch64_sve_regs_copy_to_regcache): Likewise.
8161         (aarch64_sve_regs_copy_from_regcache): Likewise.
8162         (sve_context): Structure from Linux headers.
8163         (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
8164         (SVE_SIG_ZREG_SIZE): Likewise.
8165         (SVE_SIG_PREG_SIZE): Likewise.
8166         (SVE_SIG_FFR_SIZE): Likewise.
8167         (SVE_SIG_REGS_OFFSET): Likewise.
8168         (SVE_SIG_ZREGS_OFFSET): Likewise.
8169         (SVE_SIG_ZREG_OFFSET): Likewise.
8170         (SVE_SIG_ZREGS_SIZE): Likewise.
8171         (SVE_SIG_PREGS_OFFSET): Likewise.
8172         (SVE_SIG_PREG_OFFSET): Likewise.
8173         (SVE_SIG_PREGS_SIZE): Likewise.
8174         (SVE_SIG_FFR_OFFSET): Likewise.
8175         (SVE_SIG_REGS_SIZE): Likewise.
8176         (SVE_SIG_CONTEXT_SIZE): Likewise.
8177         (SVE_PT_REGS_MASK): Likewise.
8178         (SVE_PT_REGS_FPSIMD): Likewise.
8179         (SVE_PT_REGS_SVE): Likewise.
8180         (SVE_PT_VL_INHERIT): Likewise.
8181         (SVE_PT_VL_ONEXEC): Likewise.
8182         (SVE_PT_REGS_OFFSET): Likewise.
8183         (SVE_PT_FPSIMD_OFFSET): Likewise.
8184         (SVE_PT_FPSIMD_SIZE): Likewise.
8185         (SVE_PT_SVE_ZREG_SIZE): Likewise.
8186         (SVE_PT_SVE_PREG_SIZE): Likewise.
8187         (SVE_PT_SVE_FFR_SIZE): Likewise.
8188         (SVE_PT_SVE_FPSR_SIZE): Likewise.
8189         (SVE_PT_SVE_FPCR_SIZE): Likewise.
8190         (__SVE_SIG_TO_PT): Likewise.
8191         (SVE_PT_SVE_OFFSET): Likewise.
8192         (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
8193         (SVE_PT_SVE_ZREG_OFFSET): Likewise.
8194         (SVE_PT_SVE_ZREGS_SIZE): Likewise.
8195         (SVE_PT_SVE_PREGS_OFFSET): Likewise.
8196         (SVE_PT_SVE_PREG_OFFSET): Likewise.
8197         (SVE_PT_SVE_PREGS_SIZE): Likewise.
8198         (SVE_PT_SVE_FFR_OFFSET): Likewise.
8199         (SVE_PT_SVE_FPSR_OFFSET): Likewise.
8200         (SVE_PT_SVE_FPCR_OFFSET): Likewise.
8201         (SVE_PT_SVE_SIZE): Likewise.
8202         (SVE_PT_SIZE): Likewise.
8203         (HAS_SVE_STATE): New define.
8204
8205 2018-06-18  Alan Hayward  <alan.hayward@arm.com>
8206
8207         * nat/aarch64-sve-linux-sigcontext.h: New file.
8208         * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
8209         new files.
8210         (SVE_VQ_MIN): Likewise.
8211         (SVE_VQ_MAX): Likewise.
8212         (SVE_VL_MIN): Likewise.
8213         (SVE_VL_MAX): Likewise.
8214         (SVE_NUM_ZREGS): Likewise.
8215         (SVE_NUM_PREGS): Likewise.
8216         (sve_vl_valid): Likewise.
8217         (struct user_sve_header): Likewise.
8218
8219 2018-06-16  Andrew Burgess  <andrew.burgess@embecosm.com>
8220             Richard Bunt <Richard.Bunt@arm.com>
8221
8222         * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
8223         was requested by GDB.
8224
8225 2018-06-15  Tom de Vries  <tdevries@suse.de>
8226
8227         * MAINTAINERS (Write After Approval): Add Tom de Vries.
8228
8229 2018-06-14  Simon Marchi  <simon.marchi@polymtl.ca>
8230
8231         * gnulib/update-gnulib.sh: Print expected versions of
8232         autoconf/aclocal.
8233
8234 2018-06-14  Simon Marchi  <simon.marchi@ericsson.com>
8235
8236         * arch-utils.c (default_type_align): Use type_length_units.
8237         * gdbtypes.c (type_align): Use type_length_units.
8238
8239 2018-06-14  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
8240
8241         * cli/cli-script.c (_initialize_cli_script): Fix online documentation
8242         of 'define' command.
8243
8244 2018-06-14  Tom de Vries  <tdevries@suse.de>
8245
8246         PR cli/22573
8247         * infcmd.c (print_return_value_1): Use get_user_print_options instead of
8248         get_no_prettyformat_print_options.
8249
8250 2018-06-13  Simon Marchi  <simon.marchi@ericsson.com>
8251
8252         * sparc-nat.h: Include target.h.
8253         * sparc64-linux-nat.c (class sparc64_linux_nat_target)
8254         <fetch_registers>: Remove this argument in function call.
8255         <store_registers>: Remove this argument in function call, remove
8256         extra semicolon.
8257         <low_forget_process>: Call sparc64_forget_process instead of
8258         sparc_forget_process.
8259
8260 2018-06-13  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
8261
8262         * procfs.c (_initialize_procfs): Use add_inf_child_target.
8263         (procfs_target::make_corefile_notes): Adjust to new
8264         target_read_alloc return type.
8265
8266 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
8267             Stephen Roberts  <stephen.roberts@arm.com>
8268
8269         PR gdb/22882
8270         * infrun.c (fetch_inferior_event): If GDB is not proceeding then
8271         run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
8272         Move should_notify_stop local into more inner scope.
8273
8274 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
8275             Stephen Roberts  <stephen.roberts@arm.com>
8276
8277         PR gdb/22882
8278         * infrun.c (resume_1): Add call to mark_async_event_handler.
8279
8280 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
8281
8282         * infrun.c (do_target_wait): Change old version of $pc printed.
8283
8284 2018-06-11  Simon Marchi  <simon.marchi@ericsson.com>
8285
8286         * dwarf2read.c (read_index_from_section): Rename to...
8287         (read_gdb_index_from_section): ... this, update all callers.
8288         (dwarf2_read_index): Rename to...
8289         (dwarf2_read_gdb_index): ... this, update all callers.
8290
8291 2018-06-11  John David Anglin  <danglin@gcc.gnu.org>
8292
8293         * hppa-linux-nat.c
8294         (hppa_linux_nat_target::fetch_inferior_registers): Rename to
8295         hppa_linux_nat_target::fetch_registers.
8296
8297 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
8298
8299         * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
8300         * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
8301         (AARCH64_DWARF_SVE_FFR): Likewise.
8302         (AARCH64_DWARF_SVE_P0): Likewise.
8303         (AARCH64_DWARF_SVE_Z0): Likewise.
8304
8305 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
8306
8307         * common/common-regcache.h (raw_compare): New function.
8308         * regcache.c (regcache::raw_compare): Likewise.
8309         * regcache.h (regcache::raw_compare): New declaration.
8310
8311 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
8312
8313         * common/common-regcache.h (reg_buffer_common): New structure.
8314         * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
8315         (reg_buffer::raw_supply): Likewise.
8316         (reg_buffer::raw_supply_integer): Likewise.
8317         (reg_buffer::raw_supply_zeroed): Likewise.
8318         (reg_buffer::raw_collect): Likewise.
8319         (reg_buffer::raw_collect_integer): Likewise.
8320         * regcache.h (reg_buffer::invalidate): Move from detached_regcache.
8321         (reg_buffer::raw_supply): Likewise.
8322         (reg_buffer::raw_supply_integer): Likewise.
8323         (reg_buffer::raw_supply_zeroed): Likewise.
8324         (reg_buffer::raw_collect): Likewise.
8325         (reg_buffer::raw_collect_integer): Likewise.
8326
8327 2018-06-10  Tom Tromey  <tom@tromey.com>
8328
8329         * remote.c (stop_reply_p): Remove typedef.  Don't declare queue.
8330         (class remote_state) <stop_reply_queue>: Now std::vector.
8331         (remote_state::~remote_state)
8332         (remote_target::stop_reply_queue_length): Update.
8333         (struct queue_iter_param, remove_child_of_pending_fork)
8334         (struct check_pending_event_prevents_wildcard_vcont_callback_data)
8335         (check_pending_event_prevents_wildcard_vcont_callback)
8336         (remove_stop_reply_for_inferior)
8337         (remove_stop_reply_of_remote_state)
8338         (remote_notif_remove_once_on_match)
8339         (stop_reply_match_ptid_and_ws)
8340         (remote_kill_child_of_pending_fork): Remove.
8341         (remote_target::remove_new_fork_children)
8342         (remote_target::check_pending_events_prevent_wildcard_vcont)
8343         (remote_target::discard_pending_stop_replies)
8344         (remote_target::discard_pending_stop_replies_in_queue)
8345         (remote_target::remote_notif_remove_queued_reply)
8346         (remote_target::queued_stop_reply)
8347         (remote_target::push_stop_reply, remote_target::peek_stop_reply)
8348         (remote_target::wait, remote_target::kill_new_fork_children)
8349         (remote_target::async): Update.
8350
8351 2018-06-10  Tom Tromey  <tom@tromey.com>
8352
8353         * record-full.c (record_full_arch_list_cleanups): Remove.
8354         (record_full_message): Use try/catch.
8355         (record_full_wait_cleanups): Remove.
8356         (record_full_wait_1): Use try/catch.
8357         (record_full_restore): Likewise.
8358
8359 2018-06-10  Tom Tromey  <tom@tromey.com>
8360
8361         * record-full.c (record_full_breakpoint_p): Remove typedef.  Don't
8362         declare VEC.  Add constructor.
8363         <in_target_beneath>: Now bool.
8364         (record_full_breakpoints): Now a std::vector, static.
8365         (record_full_sync_record_breakpoints)
8366         (record_full_init_record_breakpoints)
8367         (record_full_target::insert_breakpoint)
8368         (record_full_target::remove_breakpoint): Update.  Don't use XNEW.
8369
8370 2018-06-10  Simon Marchi  <simon.marchi@polymtl.ca>
8371
8372         * dwarf2read.c (process_cu_includes): Remove struct keyword.
8373         * serial.c (serial_interface_lookup): Remove struct keyword.
8374
8375 2018-06-10  Tom Tromey  <tom@tromey.com>
8376
8377         * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
8378         method.
8379         * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
8380         a method.
8381         * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
8382         method.
8383         * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
8384         "beneath" as a method.
8385         * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
8386         Use "beneath" as a method.
8387
8388 2018-06-10  Tom Tromey  <tom@tromey.com>
8389
8390         * tracefile.c (struct trace_file_writer_deleter): New.
8391         <operator()>: Rename from trace_file_writer_xfree.
8392         (trace_file_writer_up): New typedef.
8393         (tsave_command, trace_save_tfile, trace_save_ctf): Update.
8394
8395 2018-06-09  Simon Marchi  <simon.marchi@ericsson.com>
8396
8397         * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
8398         <m_registers, m_register_status>: Change type to
8399         std::unique_ptr.
8400         * regcache.c (reg_buffer::reg_buffer): Use new instead of
8401         XCNEWVEC.
8402
8403 2018-06-09  Simon Marchi  <simon.marchi@ericsson.com>
8404
8405         * common/common-regcache.h (enum register_status): Add
8406         underlying type "signed char".
8407         * regcache.h (reg_buffer) <m_register_status>: Change type to
8408         register_status *.
8409         * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
8410         register_status instead of signed char.
8411         (reg_buffer::save): Use REG_UNKNOWN instead of 0.
8412         (reg_buffer::get_register_status): Remove cast.
8413         (readable_regcache::raw_read): Remove cast.
8414         (readable_regcache::cooked_read): Remove cast.
8415
8416 2018-06-09  Tom Tromey  <tom@tromey.com>
8417
8418         * source.c (reverse_search_command, forward_search_command): Use
8419         scoped_fd.
8420
8421 2018-06-09  Tom Tromey  <tom@tromey.com>
8422
8423         * serial.c (serial_ops_p): Remove typedef.  Don't declare VEC.
8424         (serial_ops_list): Now static, std::vector.
8425         (serial_interface_lookup, serial_add_interface): Update.
8426
8427 2018-06-09  Tom Tromey  <tom@tromey.com>
8428
8429         * dwarf2read.c (process_cu_includes): Update.
8430         (process_full_comp_unit): Update.
8431         * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
8432         std::vector.
8433
8434 2018-06-08  Paul Koning  <paul_koning@dell.com>
8435
8436         PR gdb/23252
8437
8438         * python/python.c (do_start_initialization):
8439         Avoid call to internal Python API.
8440         (init__gdb_module): New function.
8441
8442 2018-06-08  Gary Benson <gbenson@redhat.com>
8443
8444         * linux-thread-db.c (valprint.h): New include.
8445         (struct check_thread_db_info): New structure.
8446         (check_thread_db_on_load, tdb_testinfo): New static globals.
8447         (check_thread_db, check_thread_db_callback): New functions.
8448         (try_thread_db_load_1): Run integrity checks if requested.
8449         (maintenance_check_libthread_db): New function.
8450         (_initialize_thread_db): Register "maint check libthread-db"
8451         and "maint set/show check-libthread-db".
8452         * NEWS: Mention the above new commands.
8453
8454 2018-06-08  Tom Tromey  <tom@tromey.com>
8455
8456         * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
8457         now a method.
8458
8459 2018-06-08  Tom Tromey  <tom@tromey.com>
8460
8461         * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
8462
8463 2018-06-08  Tom Tromey  <tom@tromey.com>
8464
8465         * common/btrace-common.h (struct btrace_data): Add constructor,
8466         destructor, move assignment operator.
8467         <empty, clear, fini>: New methods.
8468         <format>: Initialize.
8469         (btrace_data_init, btrace_data_fini, btrace_data_clear)
8470         (btrace_data_empty): Don't declare.
8471         * common/btrace-common.c (btrace_data_init): Remove.
8472         (btrace_data::fini): Rename from btrace_data_fini.
8473         (btrace_data::empty): Rename from btrace_data_empty.
8474         (btrace_data::clear): Rename from btrace_data_clear.  Return
8475         bool.
8476         * btrace.h (make_cleanup_btrace_data): Don't declare.
8477         * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
8478         (parse_xml_btrace): Update.
8479         (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
8480         (maint_btrace_clear_packet_history_cmd): Update.
8481
8482 2018-06-07  Pedro Alves  <palves@redhat.com>
8483
8484         * target.h (target_ops) <beneath>: Now a method.  All references
8485         updated.
8486         (class target_stack): New.
8487         * target.c (g_target_stack): New.
8488         (g_current_top_target): Delete.
8489         (current_top_target): Get the top target out of g_target_stack.
8490         (target_stack::push, target_stack::unpush): New.
8491         (push_target, unpush_target): Reimplement.
8492         (target_is_pushed): Reimplement in terms of g_target_stack.
8493         (target_ops::beneath, target_stack::find_beneath): New.
8494
8495 2018-06-07  Pedro Alves  <palves@redhat.com>
8496
8497         * target.h (find_target_beneath): Delete declaration.
8498         * target.c (find_target_beneath): Delete definition.
8499         * aix-thread.c: All callers of find_target_beneath adjusted to
8500         call target_ops::beneath instead.
8501         * bsd-uthread.c: Likewise.
8502         * linux-thread-db.c: Likewise.
8503         * ravenscar-thread.c: Likewise.
8504         * sol-thread.c: Likewise.
8505         * spu-multiarch.c: Likewise.
8506
8507 2018-06-07  Pedro Alves  <palves@redhat.com>
8508
8509         * target.h (target_ops) <beneath>: Now a method.  All references
8510         updated.
8511         (target_ops) <m_beneath>: New.
8512         * target.c (target_ops::beneath): New.
8513         * corelow.c: Adjust all references to target_ops::beneath.
8514         * linux-thread-db.c: Likewise.
8515         * make-target-delegates: Likewise.
8516         * record-btrace.c: Likewise.
8517         * record-full.c: Likewise.
8518         * remote.c: Likewise.
8519         * target.c: Likewise.
8520         * target-delegates.c: Regenerate.
8521
8522 2018-06-07  Pedro Alves  <palves@redhat.com>
8523
8524         * target.h (target_stack): Delete.
8525         (current_top_target): Declare function.
8526         * target.c (target_stack): Delete.
8527         (g_current_top_target): New.
8528         (current_top_target): New function.
8529         * auxv.c: Use current_top_target instead of target_stack
8530         throughout.
8531         * avr-tdep.c: Likewise.
8532         * breakpoint.c: Likewise.
8533         * corefile.c: Likewise.
8534         * elfread.c: Likewise.
8535         * eval.c: Likewise.
8536         * exceptions.c: Likewise.
8537         * frame.c: Likewise.
8538         * gdbarch-selftests.c: Likewise.
8539         * gnu-v3-abi.c: Likewise.
8540         * ia64-tdep.c: Likewise.
8541         * ia64-vms-tdep.c: Likewise.
8542         * infcall.c: Likewise.
8543         * infcmd.c: Likewise.
8544         * infrun.c: Likewise.
8545         * linespec.c: Likewise.
8546         * linux-tdep.c: Likewise.
8547         * minsyms.c: Likewise.
8548         * ppc-linux-nat.c: Likewise.
8549         * ppc-linux-tdep.c: Likewise.
8550         * procfs.c: Likewise.
8551         * regcache.c: Likewise.
8552         * remote.c: Likewise.
8553         * rs6000-tdep.c: Likewise.
8554         * s390-linux-nat.c: Likewise.
8555         * s390-tdep.c: Likewise.
8556         * solib-aix.c: Likewise.
8557         * solib-darwin.c: Likewise.
8558         * solib-dsbt.c: Likewise.
8559         * solib-spu.c: Likewise.
8560         * solib-svr4.c: Likewise.
8561         * solib-target.c: Likewise.
8562         * sparc-tdep.c: Likewise.
8563         * sparc64-tdep.c: Likewise.
8564         * spu-tdep.c: Likewise.
8565         * symfile.c: Likewise.
8566         * symtab.c: Likewise.
8567         * target-descriptions.c: Likewise.
8568         * target-memory.c: Likewise.
8569         * target.c: Likewise.
8570         * target.h: Likewise.
8571         * tracefile-tfile.c: Likewise.
8572         * tracepoint.c: Likewise.
8573         * valops.c: Likewise.
8574         * valprint.c: Likewise.
8575         * value.c: Likewise.
8576         * windows-tdep.c: Likewise.
8577         * mi/mi-main.c: Likewise.
8578
8579 2018-06-07  Tom Tromey  <tom@tromey.com>
8580
8581         * valprint.h (build_address_symbolic): Declare.
8582         * printcmd.c (print_address_symbolic): Update.
8583         (build_address_symbolic): Change "name" and "filename" to
8584         std::string.
8585         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
8586         Update.
8587         * defs.h (build_address_symbolic): Remove declaration.
8588
8589 2018-06-07  Alan Hayward  <alan.hayward@arm.com>
8590
8591         * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
8592         (aarch64_vnv_type): Add function.
8593         (aarch64_pseudo_register_name): Add V regs for SVE.
8594         (aarch64_pseudo_register_type): Likewise.
8595         (aarch64_pseudo_register_reggroup_p): Likewise.
8596         (aarch64_pseudo_read_value_2): Use V0 offset for SVE
8597         (aarch64_pseudo_read_value): Add V regs for SVE.
8598         (aarch64_pseudo_write_2): Use V0 offset for SVE
8599         (aarch64_pseudo_write): Add V regs for SVE.
8600         * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
8601
8602 2018-06-06  Sergio Durigan Junior  <sergiodj@redhat.com>
8603
8604         * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
8605         (sve_vl_from_vq): Likewise.
8606
8607 2018-06-05  Tom Tromey  <tom@tromey.com>
8608
8609         * cli/cli-cmds.c (show_version): Update.
8610         * top.c (print_gdb_version): Add "interactive" parameter.
8611         Update.
8612         * main.c (captured_main_1): Update.
8613         * top.h (print_gdb_version): Add "interactive" parameter and a
8614         comment.
8615
8616 2018-06-05  David Malcolm  <dmalcolm@redhat.com>
8617
8618         * common/enum-flags.h: Add trailing semicolon to example in
8619         comment.
8620
8621 2018-06-05  Tom Tromey  <tom@tromey.com>
8622
8623         PR cli/12326:
8624         * NEWS: Add entry about pager.
8625         * utils.c (pagination_disabled_for_command): New global.
8626         (prompt_for_continue): Allow "c" response to prompt.
8627         (reinitialize_more_filter): Clear
8628         pagination_disabled_for_command.
8629         (fputs_maybe_filtered): Check pagination_disabled_for_command.
8630
8631 2018-06-04  Tom Tromey  <tom@tromey.com>
8632
8633         * ada-lang.h (ada_lookup_symbol_list): Update.
8634         * ada-lang.c (resolve_subexp): Update.
8635         (symbols_are_identical_enums): Change type of syms.  Remove nsyms
8636         parameter.
8637         (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
8638         (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
8639         results parameter to std::vector.
8640         (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
8641         Update.
8642         * ada-exp.y (block_lookup): Update.
8643         (select_possible_type_sym): Change type of syms.  Remove nsyms
8644         parameter.
8645         (write_var_or_type, write_name_assoc): Update.
8646
8647 2018-06-04  Joel Brobecker  <brobecker@adacore.com>
8648
8649         * windows-nat.c (windows_nat_target::xfer_partial): Return
8650         TARGET_XFER_E_IO if we need to delegate to the target beneath
8651         but BENEATH is NULL.
8652
8653 2018-06-04  Simon Marchi  <simon.marchi@ericsson.com>
8654
8655         * Makefile.in (config.status): Add configure.nat as a
8656         dependency.
8657
8658 2018-06-04  Tom Tromey  <tom@tromey.com>
8659
8660         * cp-name-parser.y (cpname_state): Add method declarations.
8661         (HANDLE_QUAL): Update.
8662         (cpname_state::d_grab, cpname_state::fill_comp)
8663         (cpname_state::make_operator, cpname_state::make_dtor)
8664         (cpname_state::make_builtin_type, cpname_state::make_name)
8665         (cpname_state::d_qualify, cpname_state::d_int_type)
8666         (cpname_state::d_unary, cpname_state::d_binary): Now methods.
8667         (%union): Move earlier.
8668
8669 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
8670
8671         * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
8672
8673 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
8674
8675         * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
8676         (aarch64_pseudo_write_1): Likewise.
8677         (aarch64_pseudo_read_value): Use helper.
8678         (aarch64_pseudo_write): Likewise.
8679
8680 2018-06-04  Pedro Alves  <palves@redhat.com>
8681
8682         * darwin-nat.c (darwin_ops): Delete.
8683         (darwin_attach_pid): Use get_native_target.
8684
8685 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
8686
8687         * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
8688         * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
8689
8690 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
8691
8692         * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
8693         * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
8694         (aarch64_gdbarch_init): Check for SVE.
8695         * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
8696
8697 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
8698
8699         * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
8700         * aarch64-tdep.h (aarch64_read_description): Likewise.
8701         * arch/aarch64.c (aarch64_create_target_description): Likewise.
8702         * arch/aarch64.h (aarch64_create_target_description): Likewise.
8703         * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
8704         * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
8705         * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
8706
8707 2018-06-02  Simon Marchi  <simon.marchi@ericsson.com>
8708
8709         * value.c (value_fetch_lazy_bitfield): New.
8710         (value_fetch_lazy_memory): New.
8711         (value_fetch_lazy_register): New.
8712         (value_fetch_lazy): Factor out to smaller functions.
8713
8714 2018-06-01  Tom Tromey  <tom@tromey.com>
8715
8716         * cp-name-parser.y (backslashable, represented): Now const.
8717
8718 2018-06-01  Tom Tromey  <tom@tromey.com>
8719
8720         * cp-name-parser.y: Include parser-defs.h.
8721         (parser_fprintf): Remove declaration.
8722
8723 2018-06-01  Tom Tromey  <tom@tromey.com>
8724
8725         * cp-name-parser.y: Use %pure-parser, %lex-param, and
8726         %parse-param.
8727         (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
8728         (global_result): Remove globals.
8729         (struct cpname_state): New.
8730         (yyparse): Don't declare.
8731         (yylex, yyerror): Move declarations after %union.
8732         (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
8733         (make_name): Add state parameter.
8734         Update all callers.
8735         (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
8736         parameter.
8737         (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
8738         Update.
8739         (yylex): Add lvalp, state parameters.
8740         (yyerror): Add state parameter.
8741         (cp_demangled_name_to_comp): Update.
8742
8743 2018-06-01  Tom Tromey  <tom@tromey.com>
8744
8745         * cp-name-parser.y (parser_fprintf): Declare.
8746         (GDB_YY_REMAP_PREFIX): Define.
8747         Include yy-remap.h.  Don't redefine yy* identifiers.
8748
8749 2018-06-01  Tom Tromey  <tom@tromey.com>
8750
8751         * python/py-type.c (typy_legacy_template_argument): Update.
8752         * cp-support.h (cp_demangled_name_to_comp): Update.
8753         * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
8754         parameter to be a "std::string *".
8755         (main): Update.
8756
8757 2018-06-01  H.J. Lu  <hongjiu.lu@intel.com>
8758
8759         * ada-lex.l: Include "diagnostics.h" instead of
8760         "common/diagnostics.h".
8761         * unittests/environ-selftests.c: Likewise.
8762         * common/diagnostics.h: Moved to ../include.
8763
8764 2018-06-01  Joel Brobecker  <brobecker@adacore.com>
8765
8766         * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
8767         to language_mode_manual while calling breakpoint_re_set_one.
8768
8769 2018-06-01  Tom Tromey  <tom@tromey.com>
8770
8771         * valops.c (value_cast_structs, destructor_name_p): Update.
8772         * symtab.c (gdb_mangle_name): Update.
8773         * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
8774         Update.
8775         * p-valprint.c (pascal_object_is_vtbl_ptr_type)
8776         (pascal_object_print_value_fields, pascal_object_print_value):
8777         Update.
8778         * p-typeprint.c (pascal_type_print_derivation_info): Update.
8779         * linespec.c (find_methods): Update.
8780         * gdbtypes.h (type_name_no_tag): Remove.
8781         (type_name_or_error): Rename from type_name_no_tag_or_error.
8782         * gdbtypes.c (type_name_no_tag): Remove.
8783         (type_name_or_error): Rename from type_name_no_tag_or_error.
8784         (lookup_struct_elt_type, check_typedef): Update.
8785         * expprint.c (print_subexp_standard): Update.
8786         * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
8787         * d-namespace.c (d_lookup_nested_symbol): Update.
8788         * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
8789         (cp_print_class_member): Update.
8790         * cp-namespace.c (cp_lookup_nested_symbol): Update.
8791         * completer.c (add_struct_fields): Update.
8792         * c-typeprint.c (cp_type_print_derivation_info)
8793         (c_type_print_varspec_prefix, c_type_print_base_struct_union):
8794         Update.
8795         * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
8796         (ada_prefer_type, ada_is_exception_sym): Update.
8797
8798 2018-06-01  Tom Tromey  <tom@tromey.com>
8799
8800         * valops.c (enum_constant_from_type, value_namespace_elt)
8801         (value_maybe_namespace_elt): Update.
8802         * valarith.c (find_size_for_pointer_math): Update.
8803         * target-descriptions.c (make_gdb_type): Update.
8804         * symmisc.c (print_symbol): Update.
8805         * stabsread.c (define_symbol, read_type)
8806         (complain_about_struct_wipeout, add_undefined_type)
8807         (cleanup_undefined_types_1): Update.
8808         * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
8809         (rust_range_type_p, val_print_struct, rust_print_struct_def)
8810         (rust_internal_print_type, rust_composite_type)
8811         (rust_evaluate_funcall, rust_evaluate_subexp)
8812         (rust_inclusive_range_type_p): Update.
8813         * python/py-type.c (typy_get_tag): Update.
8814         * p-typeprint.c (pascal_type_print_base): Update.
8815         * mdebugread.c (parse_symbol, parse_type): Update.
8816         * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
8817         Update.
8818         * guile/scm-type.c (gdbscm_type_tag): Update.
8819         * go-lang.c (sixg_string_p): Update.
8820         * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
8821         Update.
8822         * gdbtypes.h (struct main_type) <tag_name>: Remove.
8823         (TYPE_TAG_NAME): Remove.
8824         * gdbtypes.c (type_name_no_tag): Simplify.
8825         (check_typedef, check_types_equal, recursive_dump_type)
8826         (copy_type_recursive, arch_composite_type): Update.
8827         * f-typeprint.c (f_type_print_base): Update.  Print "Type" prefix
8828         in summary mode when needed.
8829         * eval.c (evaluate_funcall): Update.
8830         * dwarf2read.c (fixup_go_packaging, read_structure_type)
8831         (process_structure_scope, read_enumeration_type)
8832         (read_namespace_type, read_module_type, determine_prefix): Update.
8833         * cp-support.c (inspect_type): Update.
8834         * coffread.c (process_coff_symbol, decode_base_type): Update.
8835         * c-varobj.c (c_is_path_expr_parent): Update.
8836         * c-typeprint.c (c_type_print_base_struct_union): Update.
8837         (c_type_print_base_1): Update.  Print struct/class/union/enum in
8838         summary when using C language.
8839         * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
8840         (gen_maybe_namespace_elt): Update.
8841         * ada-lang.c (ada_type_name): Simplify.
8842         (empty_record, ada_template_to_fixed_record_type_1)
8843         (template_to_static_fixed_type)
8844         (to_record_with_fixed_variant_part, ada_check_typedef): Update.
8845
8846 2018-06-01  Tom Tromey  <tom@tromey.com>
8847
8848         * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
8849         c_print_type.
8850         * c-typeprint.c (c_print_type_1): Add "language" parameter.
8851         (c_print_type): Update.
8852         (c_print_type): New overload.
8853         (c_type_print_varspec_prefix, c_type_print_args)
8854         (c_type_print_varspec_suffix, c_print_type_no_offsets)
8855         (c_type_print_base_struct_union, c_type_print_base_1)
8856         (cp_type_print_method_args): Add "language" parameter.
8857         (c_type_print_base): Update.
8858         * c-lang.h (c_print_type): Add new overload.
8859
8860 2018-06-01  Tom Tromey  <tom@tromey.com>
8861
8862         * typeprint.h (c_type_print_varspec_suffix): Don't declare.
8863         * c-typeprint.c (c_type_print_varspec_suffix): Now static.
8864
8865 2018-06-01  Alan Hayward  <alan.hayward@arm.com>
8866
8867         * aarch64-tdep.c (aarch64_sve_register_names): New const
8868         var.
8869         * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
8870         (AARCH64_SVE_Z_REGS_NUM): New define.
8871         (AARCH64_SVE_P_REGS_NUM): Likewise.
8872         (AARCH64_SVE_NUM_REGS): Likewise.
8873
8874 2018-05-31  Uros Bizjak  <ubizjak@gmail.com>
8875
8876         * nat/linux-ptrace.h [__alpha__]
8877         (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
8878         definitions.
8879
8880 2018-05-31  Maciej W. Rozycki  <macro@mips.com>
8881
8882         * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
8883         the endianness selected.
8884         * NEWS: Document `set endian auto' mode operation update.
8885
8886 2018-05-31  Alan Hayward  <alan.hayward@arm.com>
8887
8888         * Makefile.in: Add new header.
8889         * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
8890         (sve_vl_from_vg): Likewise.
8891         (sve_vq_from_vl): Likewise.
8892         (sve_vl_from_vq): Likewise.
8893         (sve_vq_from_vg): Likewise.
8894         (sve_vg_from_vq): Likewise.
8895         * configure.nat: Add new c file.
8896         * nat/aarch64-sve-linux-ptrace.c: New file.
8897         * nat/aarch64-sve-linux-ptrace.h: New file.
8898
8899 2018-05-31  Alan Hayward  <alan.hayward@arm.com>
8900
8901         * aarch64-linux-nat.c (aarch64_linux_read_description):
8902         Add parmeter zero.
8903         * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
8904         Likewise.
8905         * aarch64-tdep.c (tdesc_aarch64_list): Add.
8906         (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
8907         (aarch64_gdbarch_init): Add parmeter zero.
8908         * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
8909         * arch/aarch64.c (aarch64_create_target_description): Check VQ.
8910         * arch/aarch64.h (aarch64_create_target_description): Add VQ.
8911         parmeter.
8912         * doc/gdb.texinfo: Describe SVE feature
8913         * features/aarch64-sve.c: New file.
8914
8915 2018-05-31  Omair Javaid  <omair.javaid@linaro.org>
8916
8917         PR gdb/23210
8918         * gdbarch.sh (significant_addr_bit): Default to zero when
8919         not set by target architecture.
8920         * gdbarch.c: Re-generated.
8921         * utils.c (address_significant): Update.
8922
8923 2018-05-30  Joel Brobecker  <brobecker@adacore.com>
8924
8925         * stack.c (func_command): Remove trailing newline in call to error.
8926
8927 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
8928
8929         * regcache.h (regcache_raw_collect): Remove, update callers to
8930         use regcache::raw_collect.
8931         * regcache.c (regcache_raw_collect): Remove.
8932
8933 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
8934
8935         * regcache.h (regcache_raw_supply): Remove, update callers to
8936         use detached_regcache::raw_supply.
8937         * regcache.c (regcache_raw_supply): Remove.
8938
8939 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
8940
8941         * regcache.h (regcache_cooked_write_part): Remove, update
8942         callers to use regcache::cooked_write_part.
8943         * regcache.c (regcache_cooked_write_part): Remove.
8944
8945 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
8946
8947         * regcache.h (regcache_cooked_read_part): Remove, update callers
8948         to use readable_regcache::cooked_read_part.
8949         * regcache.c (regcache_cooked_read_part): Remove.
8950
8951 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
8952
8953         * regcache.h (regcache_cooked_read_value): Remove, update
8954         callers to use readable_regcache::cooked_read_value.
8955         * regcache.c (regcache_cooked_read_value): Remove.
8956
8957 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
8958
8959         * regcache.h (regcache_cooked_write): Remove, update callers to
8960         use regcache::cooked_write.
8961         * regcache.c (regcache_cooked_write): Remove.
8962
8963 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
8964
8965         * regcache.h (regcache_invalidate): Remove, update callers to
8966         use detached_regcache::invalidate instead.
8967         * regcache.c (regcache_invalidate): Remove.
8968
8969 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
8970
8971         * regcache.h (regcache_raw_write_part): Remove, update callers
8972         to use regcache::raw_write_part instead.
8973         * regcache.c (regcache_raw_write_part): Remove.
8974
8975 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
8976
8977         * regcache.h (regcache_raw_read_part): Remove, update callers to
8978         use readable_regcache::raw_read_part instead.
8979         * regcache.c (regcache_raw_read_part): Remove.
8980
8981 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
8982
8983         * regcache.h (regcache_cooked_read): Remove, update callers to
8984         use readable_regcache::cooked_read instead.
8985         * regcache.c (regcache_cooked_read): Remove.
8986
8987 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
8988
8989         * regcache.h (regcache_raw_write): Remove, update callers to use
8990         regcache::raw_write instead.
8991         * regcache.c (regcache_raw_write): Remove.
8992
8993 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
8994
8995         * regcache.h (regcache_raw_read): Remove, update callers to use
8996         readable_regcache::raw_read instead.
8997         * regcache.c (regcache_raw_read): Remove.
8998
8999 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
9000
9001         * regcache.h (regcache_raw_update): Remove, update callers to
9002         use readable_regcache::raw_update instead.
9003         * regcache.c (regcache_raw_update): Remove.
9004
9005 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
9006
9007         * regcache.h (regcache_register_status): Remove, update callers
9008         to use reg_buffer::get_register_status directly instead.
9009         * regcache.c (regcache_register_status): Remove.
9010
9011 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
9012
9013         * regcache.h (regcache_get_ptid): Remove, update all callers to
9014         call regcache::ptid instead.
9015         * regcache.c (regcache_get_ptid): Remove.
9016
9017 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
9018
9019         * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
9020
9021 2018-05-30  Pedro Alves  <palves@redhat.com>
9022
9023         * common/common-exceptions.h (exception_rethrow): Use
9024         ATTRIBUTE_NORETURN.
9025
9026 2018-05-29  Simon Marchi  <simon.marchi@polymtl.ca>
9027
9028         * breakpoint.c (print_solib_event, check_status_catch_solib):
9029         Remove struct keyword in range-based for loops.
9030         * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
9031         * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
9032         Likewise.
9033         * linespec.c (find_superclass_methods, search_minsyms_for_name):
9034         Likewise.
9035         * symfile.c (addr_info_make_relative): Likewise.
9036         * thread.c (value_in_thread_stack_temporaries): Likewise.
9037
9038 2018-06-12  Weimin Pan  <weimin.pan@oracle.com>
9039
9040         PR gdb/16841
9041         * valops.c (value_struct_elt_for_reference): Call check_typedef on
9042         aggregate type to get its real type before accessing it.
9043
9044 2018-05-29  Weimin Pan  <weimin.pan@oracle.com>
9045
9046         * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
9047         * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
9048         * coff-pe-read.c (add_pe_forwarded_sym): Replace
9049         lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
9050         * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
9051         * jit.c (jit_breakpoint_re_set_internal): Likewise.
9052         * printcmd.c (info_address_command): Likewise.
9053
9054 2018-05-29  Tom Tromey  <tom@tromey.com>
9055
9056         * windows-nat.c (handle_exception): Update fall-through comment.
9057
9058 2018-05-29  Tom Tromey  <tom@tromey.com>
9059
9060         * progspace.h (so_list_ptr): Remove typedef.  Don't declare VEC.
9061         (struct program_space) <added_solibs>: Now a std::vector.
9062         * breakpoint.c (print_solib_event): Update.
9063         (check_status_catch_solib): Update.
9064         * progspace.c (clear_program_space_solib_cache): Update.
9065         * solib.c (update_solib_list): Update.
9066
9067 2018-05-29  Tom Tromey  <tom@tromey.com>
9068
9069         * python/py-type.c (typy_richcompare): Update.
9070         * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
9071         * gdbtypes.h (types_deeply_equal): Return bool.
9072         (types_equal): Likewise.
9073         * gdbtypes.c (type_equality_entry_d): Remove typedef.  Don't
9074         declare VEC.
9075         (check_types_equal): Change worklist to std::vector.  Return
9076         bool.
9077         (struct type_equality_entry): Add constructor.
9078         (compare_maybe_null_strings): Return bool.
9079         (check_types_worklist): Return bool.  Change worklist to
9080         std::vector.
9081         (types_deeply_equal): Use std::vector.
9082         (types_equal): Return bool.
9083         (compare_maybe_null_strings): Simplify.
9084
9085 2018-05-29  Tom Tromey  <tom@tromey.com>
9086
9087         * record-btrace.c (tp_t): Remove typedef.  Don't declare VEC.
9088
9089 2018-05-29  Tom Tromey  <tom@tromey.com>
9090
9091         * objc-lang.h: Don't include cp-support.h.
9092         * common/gdb_vecs.h (const_char_ptr): Remove typedef.  Don't
9093         declare VEC.
9094
9095 2018-05-27  Tom Tromey  <tom@tromey.com>
9096
9097         * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
9098
9099 2018-05-25  Tom Tromey  <tom@tromey.com>
9100
9101         * value.c (value::location): Initialize.
9102
9103 2018-05-25  Tom Tromey  <tom@tromey.com>
9104
9105         * dbxread.c (init_bincl_list): Remove.
9106         (bincl_list): Now a std::vector.
9107         (bincls_allocated, next_bincl): Remove.
9108         (free_bincl_list, do_free_bincl_list_cleanup)
9109         (make_cleanup_free_bincl_list): Remove.
9110         (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
9111         unique_xmalloc_ptr.
9112         (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
9113         (struct header_file_location): Add constructor.
9114         (add_bincl_to_list): Remove.
9115
9116 2018-05-25  Tom Tromey  <tom@tromey.com>
9117
9118         * tui/tui.c (tui_enable): Update.
9119         * mi/mi-interp.c (mi_interp::init): Update.
9120         * interps.h (class interp) <name>: New method.
9121         <m_name>: Rename from name.
9122         (~scoped_restore_interp): Update.
9123         * interps.c (interp::interp): Update.
9124         (interp_add, interp_set, interp_lookup_existing)
9125         (current_interp_named_p): Update.
9126
9127 2018-05-25  Tom Tromey  <tom@tromey.com>
9128
9129         * interps.c (interp_name): Remove.
9130         * mi/mi-interp.c (mi_interp::init): Update.
9131         * interps.h (interp_name): Remove.
9132         (~scoped_restore_interp): Update.
9133         * tui/tui.c (tui_enable): Update.
9134
9135 2018-05-25  Tom Tromey  <tom@tromey.com>
9136
9137         * utils.c (fputs_maybe_filtered): Update.
9138         * linespec.c (decode_line_full): Update.
9139         * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
9140         (mi_print_breakpoint_for_event, mi_solib_loaded)
9141         (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
9142         (mi_user_selected_context_changed): Update.
9143         * mi/mi-main.c (mi_execute_command): Update.
9144         * cli/cli-script.c (execute_control_command): Update.
9145         * python/python.c (execute_gdb_command): Update.
9146         * solib.c (info_sharedlibrary_command): Update.
9147         * interps.c (interp_ui_out): Remove.
9148         * interps.h (interp_ui_out): Remove.
9149
9150 2018-05-25  Tom Tromey  <tom@tromey.com>
9151
9152         * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
9153         * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
9154         * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
9155
9156 2018-05-25  Tom Tromey  <tom@tromey.com>
9157
9158         * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
9159         * interps.c (interp_exec): Use scoped_restore.
9160
9161 2018-05-25  Tom Tromey  <tom@tromey.com>
9162
9163         * remote.c (remote_target::remote_file_get): Use
9164         gdb::byte_vector.
9165         (remote_target::remote_file_put): Likewise.
9166
9167 2018-05-25  Tom Tromey  <tom@tromey.com>
9168
9169         * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
9170         a std::string.
9171         (get_pe_section_index, add_pe_exported_sym): Update.
9172         (read_pe_exported_syms): Use gdb::def_vector.
9173
9174 2018-05-25  Tom Tromey  <tom@tromey.com>
9175
9176         * frame.c (remove_prev_frame): Remove.
9177         (get_prev_frame_if_no_cycle): Use TRY/CATCH.
9178
9179 2018-05-25  Maciej W. Rozycki  <macro@mips.com>
9180
9181         * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
9182         Remove prototypes.
9183         * mips-linux-nat.c (supply_fpregset): Always call
9184         `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
9185         (fill_fpregset): Always call `mips64_fill_fpregset' rather than
9186         `mips_fill_fpregset'.
9187         * mips-linux-tdep.c (mips_supply_fpregset)
9188         (mips_supply_fpregset_wrapper, mips_fill_fpregset)
9189         (mips_fill_fpregset_wrapper): Remove functions.
9190         (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
9191         (mips_linux_fpregset): Remove variable.
9192         (mips_linux_iterate_over_regset_sections): Use
9193         `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
9194         (mips_linux_o32_sigframe_init): Remove comment.
9195
9196 2018-05-25  Pedro Alves  <palves@redhat.com>
9197
9198         * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
9199         (struct readahead_cache, struct packet_reg, struct
9200         remote_arch_state, class remote_state): Move higher up in the
9201         file.
9202         (remote_target::m_remote_state): Now an object instead of a pointer.
9203         (remote_target::get_remote_state): Adjust.
9204
9205 2018-05-24  Andrew Burgess  <andrew.burgess@embecosm.com>
9206
9207         * stack.c (select_and_print_frame): Delete.
9208         (struct function_bounds): Move struct within function.
9209         (func_command): Most content moved into new function
9210         find_frame_for_function, use new function, print result, add
9211         function comment.
9212         (find_frame_for_function): New function, now returns a result.
9213
9214 2018-05-24  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
9215
9216         * stack.c (iterate_over_block_arg_vars): Fix comment.
9217         (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
9218
9219 2018-05-24  Andrew Burgess  <andrew.burgess@embecosm.com>
9220
9221         PR gdb/23203
9222         * frame.c
9223         (scoped_restore_selected_frame::scoped_restore_selected_frame):
9224         Define.
9225         (scoped_restore_selected_frame::~scoped_restore_selected_frame):
9226         Define.
9227         * frame.h (class scoped_restore_selected_frame): New class.
9228         * stack.c (print_frame_local_vars): Remove catching and rethrowing
9229         of any exception, use scoped_restore_selected_frame to restore the
9230         frame instead.
9231
9232 2018-05-24  Pedro Alves  <palves@redhat.com>
9233
9234         * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
9235         override.
9236
9237 2018-05-23  Tom Tromey  <tom@tromey.com>
9238
9239         * complaints.c (struct complaints): Remove.
9240         (symfile_complaint_book): Remove.
9241         (series): New global.
9242         (complaint_internal): Update.
9243         (clear_complaints): Update.
9244
9245 2018-05-23  Tom Tromey  <tom@tromey.com>
9246
9247         * complaints.c (counters): New global.
9248         (struct complain): Remove.
9249         (struct complaints) <root>: Remove.
9250         (complaint_sentinel): Remove.
9251         (symfile_complaint_book): Update.
9252         (find_complaint) Remove.
9253         (complaint_internal, clear_complaints): Update.
9254
9255 2018-05-23  Tom Tromey  <tom@tromey.com>
9256
9257         * complaints.c (struct complain) <file, line>: Remove.
9258         (find_complaint): Remove file, line parameters.
9259         (complaint_internal): Update.
9260
9261 2018-05-23  Tom Tromey  <tom@tromey.com>
9262
9263         * complaints.c (vcomplaint): Remove.
9264         (complaint_internal) Merge in contents of vcomplaint.
9265
9266 2018-05-23  Tom Tromey  <tom@tromey.com>
9267
9268         * complaints.c (struct complaints) <explanation>: Remove.
9269         (symfile_explanations): Remove.
9270         (symfile_complaint_book): Update.
9271         (vcomplaint): Update.
9272         (struct explanation): Remove.
9273
9274 2018-05-23  Tom Tromey  <tom@tromey.com>
9275
9276         * complaints.c (symfile_complaints): Remove.
9277         (complaint_internal): Remove "complaints" parameter.
9278         (clear_complaints, vcomplaint): Remove "c" parameter.
9279         (get_complaints): Remove.
9280         * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
9281         (dwarf2_debug_line_missing_file_complaint)
9282         (dwarf2_debug_line_missing_end_sequence_complaint)
9283         (dwarf2_complex_location_expr_complaint)
9284         (dwarf2_const_value_length_mismatch_complaint)
9285         (dwarf2_section_buffer_overflow_complaint)
9286         (dwarf2_macro_malformed_definition_complaint)
9287         (dwarf2_invalid_attrib_class_complaint)
9288         (create_addrmap_from_index, dw2_symtab_iter_next)
9289         (dw2_expand_marked_cus)
9290         (dw2_debug_names_iterator::find_vec_in_debug_names)
9291         (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
9292         (create_debug_type_hash_table, init_cutu_and_read_dies)
9293         (partial_die_parent_scope, add_partial_enumeration)
9294         (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
9295         (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
9296         (read_import_statement, read_file_scope, create_dwo_cu_reader)
9297         (create_cus_hash_table, create_dwp_hash_table)
9298         (inherit_abstract_dies, read_func_scope, read_call_site_scope)
9299         (dwarf2_rnglists_process, dwarf2_ranges_process)
9300         (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
9301         (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
9302         (handle_struct_member_die, process_structure_scope)
9303         (read_array_type, read_common_block, read_module_type)
9304         (read_tag_pointer_type, read_typedef, read_base_type)
9305         (read_subrange_type, load_partial_dies, partial_die_info::read)
9306         (partial_die_info::read, partial_die_info::read)
9307         (partial_die_info::read, read_checked_initial_length_and_offset)
9308         (dwarf2_string_attr, read_formatted_entries)
9309         (dwarf_decode_line_header)
9310         (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
9311         (new_symbol, dwarf2_const_value_attr, lookup_die_type)
9312         (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
9313         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
9314         (get_signatured_type, get_DW_AT_signature_type)
9315         (decode_locdesc, file_file_name, consume_improper_spaces)
9316         (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
9317         (dwarf_decode_macro_bytes, dwarf_decode_macros)
9318         (dwarf2_symbol_mark_computed, set_die_type)
9319         (read_attribute_value): Update.
9320         * stap-probe.c (handle_stap_probe, get_stap_base_address):
9321         Update.
9322         * dbxread.c (unknown_symtype_complaint)
9323         (lbrac_mismatch_complaint, repeated_header_complaint)
9324         (set_namestring, function_outside_compilation_unit_complaint)
9325         (read_dbx_symtab, process_one_symbol): Update.
9326         * gdbtypes.c (stub_noname_complaint): Update.
9327         * windows-nat.c (handle_unload_dll): Update.
9328         * coffread.c (coff_symtab_read, enter_linenos, decode_type)
9329         (decode_base_type): Update.
9330         * xcoffread.c (bf_notfound_complaint, ef_complaint)
9331         (eb_complaint, record_include_begin, record_include_end)
9332         (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
9333         (process_xcoff_symbol, read_symbol)
9334         (function_outside_compilation_unit_complaint)
9335         (scan_xcoff_symtab): Update.
9336         * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
9337         * buildsym.c (finish_block_internal, make_blockvector)
9338         (end_symtab_get_static_block, augment_type_symtab): Update.
9339         * dtrace-probe.c (dtrace_process_dof)
9340         (dtrace_static_probe_ops::get_probes): Update.
9341         * complaints.h (struct complaint): Don't declare.
9342         (symfile_complaints): Remove.
9343         (complaint_internal): Remove "complaints" parameter.
9344         (complaint): Likewise.
9345         (clear_complaints): Likewise.
9346         * symfile.c (syms_from_objfile_1, finish_new_objfile)
9347         (reread_symbols): Update.
9348         * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
9349         (dwarf2_frame_cache, decode_frame_entry): Update.
9350         * dwarf2loc.c (dwarf_reg_to_regnum): Update.
9351         * objc-lang.c (lookup_objc_class, lookup_child_selector)
9352         (info_selectors_command): Update.
9353         * macrotab.c (macro_include, check_for_redefinition)
9354         (macro_undef): Update.
9355         * objfiles.c (filter_overlapping_sections): Update.
9356         * stabsread.c (invalid_cpp_abbrev_complaint)
9357         (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
9358         (define_symbol, error_type, read_type, rs6000_builtin_type)
9359         (stabs_method_name_from_physname, read_member_functions)
9360         (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
9361         (attach_fields_to_type, complain_about_struct_wipeout)
9362         (read_range_type, read_args, common_block_start)
9363         (common_block_end, cleanup_undefined_types_1, scan_file_globals):
9364         Update.
9365         * mdebugread.c (index_complaint, unknown_ext_complaint)
9366         (basic_type_complaint, bad_tag_guess_complaint)
9367         (bad_rfd_entry_complaint, unexpected_type_code_complaint)
9368         (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
9369         (parse_procedure, parse_lines)
9370         (function_outside_compilation_unit_complaint)
9371         (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
9372         (bad_tag_guess_complaint, reg_value_complaint): Update.
9373         * cp-support.c (demangled_name_complaint): Update.
9374         * macroscope.c (sal_macro_scope): Update.
9375         * dwarf-index-write.c (class debug_names): Update.
9376
9377 2018-05-23  Tom Tromey  <tom@tromey.com>
9378
9379         * complaints.c (clear_complaints): Remove "noisy" parameter.
9380         * complaints.h (clear_complaints): Update.
9381         * symfile.c (syms_from_objfile_1, finish_new_objfile)
9382         (reread_symbols): Update.
9383
9384 2018-05-23  Tom Tromey  <tom@tromey.com>
9385
9386         * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
9387         SUBSEQUENT_MESSAGE.
9388         (vcomplaint, clear_complaints): Update.
9389         (symfile_explanations): Remove some messages.
9390
9391 2018-05-23  Tom Tromey  <tom@tromey.com>
9392
9393         * complaints.c (internal_complaint): Remove.
9394         * complaints.h (internal_complaint): Remove.
9395
9396 2018-05-22  Maciej W. Rozycki  <macro@mips.com>
9397
9398         * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
9399
9400 2018-05-22  Pedro Alves  <palves@redhat.com>
9401
9402         * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
9403         (remote_fileio_badfd, remote_fileio_return_errno)
9404         (remote_fileio_return_success, remote_fileio_func_open)
9405         (remote_fileio_func_open, remote_fileio_func_close)
9406         (remote_fileio_func_read, remote_fileio_func_write)
9407         (remote_fileio_func_lseek, remote_fileio_func_rename)
9408         (remote_fileio_func_unlink, remote_fileio_func_stat)
9409         (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
9410         (remote_fileio_func_isatty, remote_fileio_func_system): Add
9411         remote_target parameter.
9412         (remote_fio_func_map) <func>: Add remote_target parameter.
9413         (do_remote_fileio_request, remote_fileio_request):
9414         * remote-fileio.h (remote_fileio_request):
9415         * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
9416         remote_target parameter.
9417         (remote_notif_process, handle_notification): Adjust to pass down
9418         the remote.
9419         (remote_notif_state_allocate): Add remote_target parameter.  Save
9420         it.
9421         * remote-notif.h (struct remote_target): Forward declare.
9422         (struct notif_client) <parse, ack, can_get_pending_events>: Add
9423         remote_target parameter.
9424         (struct remote_notif_state) <remote>: New field.
9425         (remote_notif_ack, remote_notif_parse): Add remote_target
9426         parameter.
9427         (remote_notif_state_allocate, remote_notif_state_allocate): Add
9428         remote_target parameter.
9429         * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
9430         (threads_listing_context, rmt_thread_action, protocol_feature)
9431         (packet_reg, stop_reply, stop_reply_p, enum packet_support)
9432         (packet_result, struct threads_listing_context, remote_state):
9433         Move definitions and declarations higher up.
9434         (remote_target) <~remote_target>: Declare.
9435         (remote_download_command_source, remote_file_put, remote_file_get)
9436         (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
9437         (remote_hostio_pread_vFile, remote_hostio_send_command)
9438         (remote_hostio_set_filesystem, remote_hostio_open)
9439         (remote_hostio_close, remote_hostio_unlink, remote_state)
9440         (get_remote_state, get_remote_packet_size, get_memory_packet_size)
9441         (get_memory_write_packet_size, get_memory_read_packet_size)
9442         (append_pending_thread_resumptions, remote_detach_1)
9443         (append_resumption, remote_resume_with_vcont)
9444         (add_current_inferior_and_thread, wait_ns, wait_as)
9445         (process_stop_reply, remote_notice_new_inferior)
9446         (process_initial_stop_replies, remote_add_thread)
9447         (btrace_sync_conf, remote_btrace_maybe_reopen)
9448         (remove_new_fork_children, kill_new_fork_children)
9449         (discard_pending_stop_replies, stop_reply_queue_length)
9450         (check_pending_events_prevent_wildcard_vcont)
9451         (discard_pending_stop_replies_in_queue, stop_reply)
9452         (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
9453         (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
9454         (remote_interrupt_as, remote_interrupt_ns)
9455         (remote_get_noisy_reply, remote_query_attached)
9456         (remote_add_inferior, remote_current_thread, get_current_thread)
9457         (set_thread, set_general_thread, set_continue_thread)
9458         (set_general_process, write_ptid)
9459         (remote_unpack_thread_info_response, remote_get_threadinfo)
9460         (parse_threadlist_response, remote_get_threadlist)
9461         (remote_threadlist_iterator, remote_get_threads_with_ql)
9462         (remote_get_threads_with_qxfer)
9463         (remote_get_threads_with_qthreadinfo, extended_remote_restart)
9464         (get_offsets, remote_check_symbols, remote_supported_packet)
9465         (remote_query_supported, remote_packet_size)
9466         (remote_serial_quit_handler, remote_detach_pid)
9467         (remote_vcont_probe, remote_resume_with_hc)
9468         (send_interrupt_sequence, interrupt_query)
9469         (remote_notif_get_pending_events, fetch_register_using_p)
9470         (send_g_packet, process_g_packet, fetch_registers_using_g)
9471         (store_register_using_P, store_registers_using_G)
9472         (set_remote_traceframe, check_binary_download)
9473         (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
9474         (remote_xfer_live_readonly_partial, remote_read_bytes)
9475         (remote_send_printf, remote_flash_write, readchar)
9476         (remote_serial_write, putpkt, putpkt_binary, skip_frame)
9477         (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
9478         (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
9479         (extended_remote_disable_randomization, extended_remote_run)
9480         (send_environment_packet, extended_remote_environment_support)
9481         (extended_remote_set_inferior_cwd, remote_write_qxfer)
9482         (remote_read_qxfer, push_stop_reply, vcont_r_supported)
9483         (packet_command): Now methods of ...
9484         (remote_target): ... this class.
9485         (m_remote_state) <remote_target>: New field.
9486         (struct remote_state) <stop_reply_queue,
9487         remote_async_inferior_event_token, wait_forever_enabled_p>: New
9488         fields.
9489         (remote_state::remote_state): Allocate stop_reply_queue.
9490         (remote_state): Delete global.
9491         (get_remote_state_raw): Delete.
9492         (remote_target::get_remote_state): Allocate m_remote_state on
9493         demand.
9494         (get_current_remote_target): New.
9495         (remote_ops, extended_remote_ops): Delete.
9496         (wait_forever_enabled_p, remote_async_inferior_event_token):
9497         Delete, moved to struct remote_state.
9498         (remote_target::close): Delete self.  Destruction bits split to
9499         ...
9500         (remote_target::~remote_target): ... this.
9501         (show_memory_packet_size): Adjust to use
9502         get_current_remote_target.
9503         (struct protocol_feature) <func>: Add remote_target parameter.
9504         All callers adjusted.
9505         (curr_quit_handler_target): New.
9506         (remote_serial_quit_handler): Reimplement.
9507         (remote_target::open_1): Adjust to use get_current_remote_target.
9508         Heap-allocate remote_target/extended_remote_target instances.
9509         (vcont_builder::vcont_builder): Add remote_target parameter, and
9510         save it in m_remote.  All callers adjusted.
9511         (vcont_builder::m_remote): New field.
9512         (vcont_builder::restart, vcont_builder::flush)
9513         (vcont_builder::push_action): Use it.
9514         (remote_target::commit_resume): Use it.
9515         (struct queue_iter_param) <remote>: New field.
9516         (remote_target::remove_new_fork_children): Fill in 'remote' field.
9517         (check_pending_event_prevents_wildcard_vcont_callback_data): New.
9518         (check_pending_event_prevents_wildcard_vcont_callback)
9519         (remote_target::check_pending_events_prevent_wildcard_vcont)
9520         (remote_target::discard_pending_stop_replies)
9521         (remote_target::discard_pending_stop_replies_in_queue)
9522         (remote_target::remote_notif_remove_queued_reply): Fill in
9523         'remote' field.
9524         (remote_notif_get_pending_events): New.
9525         (remote_target::readchar, remote_target::remote_serial_write):
9526         Save/restore curr_quit_handler_target.
9527         (putpkt): New.
9528         (kill_new_fork_children): Fill in 'remote' field.
9529         (packet_command): Use get_current_remote_target, defer to
9530         remote_target method of same name.
9531         (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
9532         parameter, and save it in m_remote.  All callers adjusted.
9533         (scoped_remote_fd::release): Use m_remote.
9534         (scoped_remote_fd::m_remote): New field.
9535         (remote_file_put, remote_file_get, remote_file_delete): Use
9536         get_current_remote_target, defer to remote_target method of same
9537         name.
9538         (remote_btrace_reset): Add remote_state paremeter.  Update all
9539         callers.
9540         (remote_async_inferior_event_handler). Pass down 'data'.
9541         (remote_new_objfile): Use get_current_remote_target.
9542         (remote_target::vcont_r_supported): New.
9543         (set_range_stepping): Use get_current_remote_target and
9544         remote_target::vcont_r_supported.
9545         (_initialize_remote): Don't allocate 'remote_state' and
9546         'stop_reply_queue' globals.
9547         * remote.h (struct remote_target): Forward declare.
9548         (getpkt, putpkt, remote_notif_get_pending_events): Add
9549         'remote_target' parameter.
9550
9551 2018-05-22  Pedro Alves  <palves@redhat.com>
9552
9553         * remote.c (vcont_builder): Now a class.  Make all data members
9554         private.
9555         (vcont_builder) <vcont_builder, restart, flush, push_action>:
9556         Declare methods.
9557         (vcont_builder_restart): Rename to ...
9558         (vcont_builder::restart): ... this.
9559         (vcont_builder_flush): Rename to ...
9560         (vcont_builder::flush): ... this.
9561         (vcont_builder_push_action): Rename to ...
9562         (vcont_builder::push_action): ... this.
9563         (remote_target::commit_resume): Adjust.
9564
9565 2018-05-22  Pedro Alves  <palves@redhat.com>
9566
9567         * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
9568         (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
9569         (get_fixed_memory_packet_size): New.
9570         (get_memory_packet_size): Use it.
9571         (set_memory_packet_size): Don't override the config size with
9572         DEFAULT_MAX_MEMORY_PACKET_SIZE.
9573         (show_memory_packet_size): Use get_fixed_memory_packet_size.
9574         Don't refer to get_memory_packet_size if not connected to a remote
9575         target.  Show "(default)" if configured size is 0.
9576
9577 2018-05-22  Pedro Alves  <palves@redhat.com>
9578
9579         * remote.c (remote_target::mourn_inferior): Move
9580         discard_pending_stop_replies call here from ...
9581         (_initialize_remote): ... here.
9582
9583 2018-05-22  Pedro Alves  <palves@redhat.com>
9584
9585         * remote.c (compare_section_command): Remove set_general_process
9586         call.
9587
9588 2018-05-22  Pedro Alves  <palves@redhat.com>
9589
9590         * remote.c (struct packet_reg, struct remote_arch_state):
9591         Move higher up in the file.
9592         (remote_state) <m_arch_states>: Store remote_arch_state values
9593         instead of remote_arch_state pointers.
9594         (remote_state::get_remote_arch_state): Adjust.
9595
9596 2018-05-22  Pedro Alves  <palves@redhat.com>
9597
9598         * remote.c: Include <unordered_map>.
9599         (remote_state): Now a class.
9600         (remote_state) <get_remote_arch_state>: Declare method.
9601         <get_remote_arch_state>: New field.
9602         (remote_arch_state) <remote_arch_state>: Declare ctor.
9603         <regs>: Now a unique_ptr.
9604         (remote_gdbarch_data_handle): Delete.
9605         (get_remote_arch_state): Delete.
9606         (remote_state::get_remote_arch_state): New.
9607         (get_remote_state): Adjust to call remote_state's
9608         get_remote_arch_state method.
9609         (init_remote_state): Delete, bits factored out to ...
9610         (remote_arch_state::remote_arch_state): ... this new method.
9611         (get_remote_packet_size, get_memory_packet_size)
9612         (process_g_packet, remote_target::fetch_registers)
9613         (remote_target::prepare_to_store, store_registers_using_G)
9614         (remote_target::store_registers, remote_target::get_trace_status):
9615         Adjust to call remote_state's method.
9616         (_initialize_remote): Remove reference to
9617         remote_gdbarch_data_handle.
9618
9619 2018-05-22  Pedro Alves  <palves@redhat.com>
9620
9621         * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
9622         pread>: New method declarations.
9623         (remote_target::open_1): Adjust.
9624         (readahead_cache_invalidate): Rename to ...
9625         (readahead_cache::invalidate): ... this, and adjust to be a class
9626         method.
9627         (readahead_cache_invalidate_fd): Rename to ...
9628         (readahead_cache::invalidate_fd): ... this, and adjust to be a
9629         class method.
9630         (remote_hostio_pwrite): Adjust.
9631         (remote_hostio_pread_from_cache): Rename to ...
9632         (readahead_cache::pread): ... this, and adjust to be a class
9633         method.
9634         (remote_hostio_close): Adjust.
9635
9636 2018-05-22  Pedro Alves  <palves@redhat.com>
9637
9638         * remote.c (remote_hostio_close_cleanup): Delete.
9639         (class scoped_remote_fd): New.
9640         (remote_file_put, remote_file_get): Use it.
9641
9642 2018-05-22  Pedro Alves  <palves@redhat.com>
9643
9644         (struct vCont_action_support): Use bool and initialize all fields.
9645         (struct readahead_cache): Initialize all fields.
9646         (remote_state): Use bool and initialize all fields.
9647         (remote_state::remote_state, remote_state::~remote_state): New.
9648         (new_remote_state): Delete.
9649         (_initialize_remote): Use new to allocate remote_state.
9650
9651 2018-05-22  Pedro Alves  <palves@redhat.com>
9652             張俊芝  <zjz@zjz.name>
9653
9654         PR gdb/22973
9655         * c-exp.y: Include "c-support.h".
9656         (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
9657         of tolower.  Use c_ident_is_alpha to scan names.
9658         * c-lang.c: Include "c-support.h".
9659         (convert_ucn, convert_octal, convert_hex, convert_escape): Use
9660         ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
9661         * c-support.h: New file, with bits factored out from ...
9662         * cp-name-parser.y: ... this file.
9663         Include "c-support.h".
9664         (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
9665         c-support.h and renamed.
9666         (symbol_end, yylex): Adjust.
9667
9668 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
9669
9670         * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
9671         parameter type to CORE_ADDR.
9672         * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
9673         parameter type in declaration to CORE_ADDR.
9674         * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
9675         target_auxv_search to get AT_HWCAP and use the result to get the
9676         target description.
9677         * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
9678         to CORE_ADDR. Remove the cast of the return value to unsigned
9679         long. Fix error predicate of target_auxv_search.
9680         (ppc_linux_nat_target::read_description): Change the type of the
9681         hwcap variable to CORE_ADDR.
9682
9683 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
9684
9685         * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
9686         if the size of fpscr is larger than 32 bits.
9687
9688 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
9689
9690         * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
9691         (ppc32_linux_vsxregmap): New global.
9692         (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
9693         regcache_supply_regset, and regcache_collect_regset.
9694         * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
9695         * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
9696         (fetch_vsx_register, store_vsx_register): Remove.
9697         (fetch_vsx_registers): Add regno parameter. Get regset using
9698         ppc_linux_vsxregset. Use regset to supply registers.
9699         (store_vsx_registers): Add regno parameter. Get regset using
9700         ppc_linux_vsxregset. Use regset to collect registers.
9701         (fetch_register): Call fetch_vsx_registers instead of
9702         fetch_vsx_register.
9703         (store_register): Call store_vsx_registers instead of
9704         store_vsx_register.
9705         (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
9706         new regno parameter.
9707         (store_ppc_registers): Call store_vsx_registers with -1 for the
9708         new regno parameter.
9709         * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
9710         (ppc_collect_vsxregset): Remove.
9711
9712 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
9713
9714         * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
9715         offset fields.
9716         * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
9717         for vector register offset fields.
9718         (ppc64_fbsd_reg_offsets): Likewise.
9719         * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
9720         to vector register offset fields.
9721         * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
9722         to vector register offset fields.
9723         * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
9724         vector register offset fields.
9725         * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
9726         initializers for vector register offset fields.
9727         (rs6000_aix64_reg_offsets): Likewise.
9728         * rs6000-tdep.c (ppc_vrreg_offset): Remove.
9729         (ppc_supply_vrregset): Remove.
9730         (ppc_collect_vrregset): Remove.
9731         * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
9732         (ppc_linux_vrregset) : New function.
9733         (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
9734         (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
9735         (ppc32_linux_vrregset): Remove.
9736         (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
9737         and use result instead of ppc32_linux_vrregset.
9738         (ppc32_linux_reg_offsets): Remove initializers for vector register
9739         offset fields.
9740         (ppc64_linux_reg_offsets): Likewise.
9741         * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
9742         * ppc-linux-nat.c: Include regset.h.
9743         (gdb_vrregset_t): Adjust comment to account for little-endian
9744         mode.
9745         (supply_vrregset, fill_vrregset): Remove.
9746         (fetch_altivec_register, store_altivec_register): Remove.
9747         (fetch_altivec_registers): Add regno parameter. Get regset using
9748         ppc_linux_vrregset. Use regset to supply registers.
9749         (store_altivec_registers): Add regno parameter. Get regset using
9750         ppc_linux_vrregset. Use regset to collect registers.
9751         (fetch_register): Call fetch_altivec_registers instead of
9752         fetch_altivec_register.
9753         (store_register): Call store_altivec_registers instead of
9754         store_altivec_register.
9755         (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
9756         the new regno parameter.
9757         (store_ppc_registers): Call store_altivec_registers with -1 for
9758         the new regno parameter.
9759
9760 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
9761
9762         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
9763         (PPC_LINUX_SIZEOF_VSXREGSET): Define.
9764         * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
9765         (gdb_vrregset_t): Change array type size to
9766         PPC_LINUX_SIZEOF_VRREGSET.
9767         (gdb_vsxregset_t): Change array type size to
9768         PPC_LINUX_SIZEOF_VSXREGSET.
9769         * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
9770         Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
9771         PPC_LINUX_SIZEOF_VSXREGSET.
9772
9773 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
9774
9775         * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
9776         * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
9777         nat/ppc-linux.c.
9778         (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
9779         ppc_linux_target_wordsize with tid.
9780         (ppc_linux_nat_target::read_description): Call ppc_linux_target
9781         wordsize with tid.
9782         * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
9783         (ppc64_64bit_inferior_p): Add static and inline specifiers.
9784         (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
9785         tid parameter. Remove static specifier.
9786         * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
9787         (ppc_linux_target_wordsize): New declaration.
9788
9789 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
9790
9791         * arch/ppc-linux-common.c: New file.
9792         * arch/ppc-linux-common.h: New file.
9793         * arch/ppc-linux-tdesc.h: New file.
9794         * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
9795         * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
9796         (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
9797         arch/ppc-linux-tdesc.h.
9798         * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
9799         arch/ppc-linux-tdesc.h.
9800         (ppc_linux_nat_target::read_description): Remove target
9801         description matching code. Fill a ppc_linux_features struct and
9802         call ppc_linux_match_description with it. Move comment about ISA
9803         2.05 to ppc-linux-common.c.
9804         * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
9805         arch/ppc-linux-tdesc.h.
9806         (ppc_linux_core_read_description): Remove target description
9807         matching code. Fill a ppc_linux_features struct and call
9808         ppc_linux_match_description with it.
9809         * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
9810         (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
9811         (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
9812         (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
9813         (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
9814         (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
9815         (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
9816         (tdesc_powerpc_e500l): Remove.
9817
9818 2018-05-22  Joel Brobecker  <brobecker@adacore.com>
9819
9820         * ada-lang.c (catch_assert_command): Pass empty string instead
9821         of NULL for excep_string argument.
9822
9823 2018-05-22  Maciej W. Rozycki  <macro@mips.com>
9824
9825         * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
9826         the width of the requested register exceeds the width of the
9827         `ptrace' data type.
9828
9829 2018-05-21  Tom Tromey  <tom@tromey.com>
9830
9831         * printcmd.c (output_command): Remove.
9832         (output_command_const): Rename to output_command.
9833         * valprint.h (output_command): Rename from output_command_const.
9834         * tracepoint.c (trace_dump_actions): Call output_command.
9835
9836 2018-05-21  Tom Tromey  <tom@tromey.com>
9837
9838         * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
9839         (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
9840         * ada-lang.h (create_ada_exception_catchpoint): Update.
9841         * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
9842         std::string.
9843         (create_excep_cond_exprs, ~ada_catchpoint)
9844         (should_stop_exception, print_one_exception)
9845         (print_mention_exception, print_recreate_exception): Update.
9846         (ada_get_next_arg): Remove.
9847         (catch_ada_exception_command_split): Use std::string.  Change type
9848         of "excep_string", "cond_string".
9849         (catch_ada_exception_command): Update.
9850         (create_ada_exception_catchpoint): Change type of excep_string.
9851         (ada_exception_sal): Remove excep_string parameter.
9852         (~ada_catchpoint): Remove.
9853
9854 2018-05-21  Tom Tromey  <tom@tromey.com>
9855
9856         * ada-lang.c (ada_collect_symbol_completion_matches): Remove
9857         cleanup.
9858
9859 2018-05-21  Tom Tromey  <tom@tromey.com>
9860
9861         * ada-lang.c (ada_exception_message_1, ada_exception_message):
9862         Return unique_xmalloc_ptr.
9863         (print_it_exception): Update.
9864
9865 2018-05-21  Tom Tromey  <tom@tromey.com>
9866
9867         * tracepoint.c (trace_dump_actions): Use std::string.
9868
9869 2018-05-21  Tom Tromey  <tom@tromey.com>
9870
9871         * symfile.c (reread_symbols): Use std::string for original_name.
9872
9873 2018-05-21  Tom Tromey  <tom@tromey.com>
9874
9875         * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
9876         (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN.  Default
9877         constructor.
9878
9879 2018-05-20  Simon Marchi  <simon.marchi@polymtl.ca>
9880
9881         * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
9882         instance to...
9883         (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
9884         * objfiles.c (get_objfile_bfd_data): Allocate
9885         objfile_per_bfd_storage with obstack_new when allocating on
9886         obstack.
9887
9888 2018-05-20  Simon Marchi  <simon.marchi@ericsson.com>
9889
9890         * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
9891         OBSTACK_ZALLOC.
9892         * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
9893         * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
9894         * mdebugread.c (mdebug_build_psymtabs): Likewise.
9895         (add_pending): Likewise.
9896         (parse_symbol): Likewise.
9897         (parse_partial_symbols): Likewise.
9898         (psymtab_to_symtab_1): Likewise.
9899         (new_psymtab): Likewise.
9900         (elfmdebug_build_psymtabs): Likewise.
9901         * minsyms.c (terminate_minimal_symbol_table): Likewise.
9902         * objfiles.c (get_objfile_bfd_data): Likewise.
9903         (objfile_register_static_link): Likewise.
9904         * psymtab.c (allocate_psymtab): Likewise.
9905         * stabsread.c (read_member_functions): Likewise.
9906         * xcoffread.c (xcoff_end_psymtab): Likewise.
9907
9908 2018-05-20  Simon Marchi  <simon.marchi@ericsson.com>
9909
9910         * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
9911         compiler supports std::is_trivially_constructible.
9912         * common/poison.h: Include obstack.h.
9913         (IsMallocable): Define to is_trivially_constructible if the
9914         compiler supports it, define to true_type otherwise.
9915         (xobnew): New.
9916         (XOBNEW): Redefine.
9917         (xobnewvec): New.
9918         (XOBNEWVEC): Redefine.
9919         * gdb_obstack.h (obstack_zalloc): New.
9920         (OBSTACK_ZALLOC): Redefine.
9921         (obstack_calloc): New.
9922         (OBSTACK_CALLOC): Redefine.
9923         (obstack_new): New.
9924         * gdbarch.sh: Include gdb_obstack in gdbarch.h.
9925         (gdbarch_obstack): New declaration in gdbarch.h, definition in
9926         gdbarch.c.
9927         (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
9928         obstack_calloc/obstack_zalloc.
9929         (gdbarch_obstack_zalloc): Remove.
9930         * target-descriptions.c (tdesc_data_init): Use obstack_new.
9931
9932 2018-05-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
9933
9934         * stack.c (backtrace_command_1): Remove useless variable int i.
9935
9936 2018-05-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
9937
9938         * stack.c (print_frame_info): Fix comment.
9939
9940 2018-05-18  Tom Tromey  <tom@tromey.com>
9941
9942         * dwarf2read.c (struct dwz_file): Add constructor, initializers.
9943         <dwz_bfd>: Now a gdb_bfd_ref_ptr.
9944         (~dwarf2_per_objfile): Update
9945         (dwarf2_get_dwz_file): Use new.
9946         * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
9947         unique_ptr.
9948
9949 2018-05-18  Tom Tromey  <tom@tromey.com>
9950
9951         * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
9952         unique_ptr.
9953         * dwarf2read.c (struct dwp_file): Add constructor and
9954         initializers.
9955         (open_and_init_dwp_file): Return a unique_ptr.
9956         (dwarf2_per_objfile, create_dwp_hash_table)
9957         (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
9958         (lookup_dwo_unit_in_dwp): Update.
9959         (open_and_init_dwp_file, get_dwp_file): Update.
9960
9961 2018-05-18  Tom Tromey  <tom@tromey.com>
9962
9963         * dwarf2read.c (dwarf2_per_objfile): Update.
9964         (struct mapped_index): Add initializers.
9965         (dwarf2_read_index): Use new.
9966         (dw2_symtab_iter_init): Update.
9967         * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
9968         unique_ptr.
9969
9970 2018-05-18  Simon Marchi  <simon.marchi@ericsson.com>
9971
9972         * dwarf2read.c (mapped_index) <total_size>: Remove.
9973
9974 2018-05-18  Simon Marchi  <simon.marchi@ericsson.com>
9975
9976         * unittests/format_pieces-selftests.c (test_format_specifier):
9977         Add ARI comments.
9978
9979 2018-05-18  Tom Tromey  <tom@tromey.com>
9980
9981         * c-typeprint.c (maybe_print_hole): New function.
9982         (c_print_type_struct_field_offset): Update.
9983         (c_type_print_base_struct_union): Call maybe_print_hole.
9984
9985 2018-05-17  Keith Seitz  <keiths@redhat.com>
9986
9987         * breakpoint.c (build_bpstat_chain): New function, moved from
9988         bpstat_stop_status.
9989         (bpstat_stop_status): Add optional parameter, `stop_chain'.
9990         If no stop chain is passed, call build_bpstat_chain to build it.
9991         * breakpoint.h (build_bpstat_chain): Declare.
9992         (bpstat_stop_status): Move documentation here from breakpoint.c.
9993         * infrun.c (handle_signal_stop): Before eliding inlined frames,
9994         build the stop chain and pass it to skip_inline_frames.
9995         Pass this stop chain to bpstat_stop_status.
9996         * inline-frame.c: Include breakpoint.h.
9997         (stopped_by_user_bp_inline_frame): New function.
9998         (skip_inline_frames): Add parameter `stop_chain'.
9999         Move documention to inline-frame.h.
10000         If non-NULL, use stopped_by_user_bp_inline_frame to determine
10001         whether the frame should be elided.
10002         * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
10003         Add moved documentation and update for new parameter.
10004
10005 2018-05-17  Simon Marchi  <simon.marchi@ericsson.com>
10006
10007         PR cli/14975
10008         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10009         unittests/format_pieces-selftests.c.
10010         * common/format.h (format_piece) <operator==>: New.
10011         (format_pieces) <operator[]>: Remove.
10012         * common/format.c (format_pieces::format_pieces): Handle \e.
10013         * unittests/format_pieces-selftests.c: New.
10014
10015 2018-05-17  Tom Tromey  <tom@tromey.com>
10016
10017         PR symtab/23010:
10018         * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
10019         (dw2_instantiate_symtab): Add skip_partial parameter.
10020         (dw2_find_last_source_symtab, dw2_map_expand_apply)
10021         (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
10022         (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
10023         (dw2_expand_symtabs_matching_one)
10024         (dw2_find_pc_sect_compunit_symtab)
10025         (dw2_debug_names_lookup_symbol)
10026         (dw2_debug_names_expand_symtabs_for_function): Update.
10027         (init_cutu_and_read_dies): Add skip_partial parameter.
10028         (process_psymtab_comp_unit, build_type_psymtabs_1)
10029         (process_skeletonless_type_unit, load_partial_comp_unit)
10030         (psymtab_to_symtab_1): Update.
10031         (load_full_comp_unit): Add skip_partial parameter.
10032         (process_imported_unit_die, dwarf2_read_addr_index)
10033         (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
10034         (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
10035         (read_signatured_type): Update.
10036
10037 2018-05-17  Simon Marchi  <simon.marchi@ericsson.com>
10038
10039         * value.c (release_value): Remove unused variable.
10040         (record_latest_value): Likewise.
10041         (access_value_history): Likewise.
10042         (preserve_values): Likewise.
10043
10044 2018-05-17  Tom Tromey  <tom@tromey.com>
10045
10046         * extension.h (struct ext_lang_type_printers) <py_type_printers>:
10047         Initialize.
10048
10049 2018-05-16  Maciej W. Rozycki  <macro@mips.com>
10050
10051         PR gdb/22286
10052         * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
10053         Also handle registers whose width is not a multiple of
10054         PTRACE_TYPE_RET.
10055         (linux_nat_trad_target::store_register): Likewise.
10056
10057 2018-05-16  Tom Tromey  <tom@tromey.com>
10058
10059         * gdbcore.h (core_bfd): Redefine.
10060         * corelow.c (core_target::close): Update.
10061         (core_target_open): Update.
10062         * progspace.h (struct program_space) <cbfd>: Now a
10063         gdb_bfd_ref_ptr.
10064
10065 2018-05-16  Tom Tromey  <tom@tromey.com>
10066
10067         PR cli/19551:
10068         * symfile-add-flags.h (enum symfile_add_flags)
10069         <SYMFILE_NOT_FILENAME>: New constant.
10070         * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME.  Get
10071         objfile name from BFD.
10072         (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
10073         * minidebug.c (find_separate_debug_file_in_section): Put
10074         ".gnu_debugdata" into BFD's file name.
10075
10076 2018-05-16  Simon Marchi  <simon.marchi@ericsson.com>
10077
10078         * regcache.c (regcache_read_ftype, regcache_write_ftype):
10079         Remove.
10080
10081 2018-05-15  Tamar Christina  <tamar.christina@arm.com>
10082
10083         PR binutils/21446
10084         * aarch64-tdep.c (aarch64_analyze_prologue,
10085         aarch64_software_single_step, aarch64_displaced_step_copy_insn):
10086         Indicate not interested in errors.
10087
10088 2018-05-15  Maciej W. Rozycki  <macro@mips.com>
10089
10090         * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
10091         Supply the MIPS_ZERO_REGNUM register.
10092
10093 2018-05-15  Maciej W. Rozycki  <macro@mips.com>
10094
10095         * mips-tdep.c (mask_address_var): Make variable static.
10096
10097 2018-05-14  Tom Tromey  <tom@tromey.com>
10098
10099         * dwarf2read.c (rust_union_quirks): Clear rust_unions.
10100
10101 2018-05-11  Andrew Burgess  <andrew.burgess@embecosm.com>
10102
10103         * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
10104         FXSAVE_ADDR for the mxcsr register.
10105
10106 2018-05-11  Max Filippov  <jcmvbkbc@gmail.com>
10107
10108         * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
10109
10110 2018-05-11  Pedro Alves  <palves@redhat.com>
10111
10112         * corelow.c (core_target) <core_target>: No longer inline.
10113         Initialize m_core_gdbarch, m_core_vec and build the section table
10114         here.
10115         <~core_target>: New.
10116         <core_gdbarch, get_core_register_section>: New methods.
10117         <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
10118         factored out from ...
10119         <core_data, core_vec, core_gdbarch>: ... these deleted globals.
10120         (core_ops): Delete.
10121         (sniff_core_bfd): Add gdbarch parameter.
10122         (core_close): Delete, merged into ...
10123         (core_target::close): ... here.  Delete self.
10124         (core_close_cleanup): Delete.
10125         (core_target_open): Allocate a core_target on the heap.  Use a
10126         unique_ptr instead of a cleanup.  Bits moved into the core_target
10127         ctor.  Adjust to use core_target methods instead of globals.
10128         (get_core_register_section): Rename to ...
10129         (core_target::get_core_register_section): ... this and adjust.
10130         (struct get_core_registers_cb_data): New.
10131         (get_core_registers_cb): Use it.  Use bool.
10132         (core_target::fetch_registers, core_target::files_info)
10133         (core_target::xfer_partial, core_target::read_description)
10134         (core_target::pid_to, core_target::thread_name): Adjust to
10135         reference class fields instead of globals.
10136         * target.h (struct target_ops_deleter, target_ops_up): New.
10137
10138 2018-05-11  Pedro Alves  <palves@redhat.com>
10139
10140         * corefile.c (core_file_command): Move to corelow.c.
10141         * corelow.c (the_core_target): Delete.
10142         (core_file_command): Moved from corefile.c.  Check exec_bfd
10143         instead of the_core_target.  Use target_detach instead of calling
10144         into the_core_target directly.
10145         (maybe_say_no_core_file_now): New.
10146         (core_target::detach): Use it.
10147         (_initialize_corelow): Remove references to the_core_target.
10148         * gdbcore.h (the_core_target): Delete.
10149
10150 2018-05-11  Tom Tromey  <tromey@redhat.com>
10151             Pedro Alves  <palves@redhat.com>
10152
10153         * corefile.c (core_bfd): Remove.
10154         * gdbcore.h (core_bfd): Now a macro.
10155         * progspace.h (struct program_space) <cbfd>: New field.
10156
10157 2018-05-11  Tom Tromey  <tom@tromey.com>
10158
10159         * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
10160         gdb::def_vector.
10161
10162 2018-05-10  Tom Tromey  <tom@tromey.com>
10163
10164         * configure: Rebuild.
10165         * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
10166
10167 2018-05-10  Joel Brobecker  <brobecker@adacore.com>
10168
10169         PR server/23158:
10170         * regformats/regdat.sh: Adjust script, following the addition
10171         of the new expedite_regs parameter to init_target_desc.
10172
10173 2018-05-10  Omair Javaid  <omair.javaid@linaro.org>
10174     
10175         PR gdb/23127
10176         * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
10177         set_gdbarch_significant_addr_bit.
10178         * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
10179         set_gdbarch_significant_addr_bit.
10180         * utils.c (address_significant): Update to sign extend addr.
10181
10182 2018-05-09  Max Filippov  <jcmvbkbc@gmail.com>
10183
10184         * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
10185         (xtensa_linux_init_abi): Limit tdep->num_regs by
10186         tdep->num_nopriv_regs.
10187         * xtensa-tdep.c (xtensa_derive_tdep): Calculate
10188         tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
10189         not initialized.
10190
10191 2018-05-08  Simon Marchi  <simon.marchi@ericsson.com>
10192
10193         * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
10194
10195 2018-05-08  Andrew Burgess  <andrew.burgess@embecosm.com>
10196
10197         * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
10198         (I387_MXCSR_INIT_VAL): New constant.
10199         * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
10200         buffer if it was supplied by the inferior.
10201         * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
10202         (i387_xsave_get_clear_bv): New function.
10203         (i387_supply_xsave): Only read x87 control registers from the
10204         xsave buffer if the feature is enabled, and the state will have
10205         been written, otherwise, provide a suitable default.
10206         (i387_collect_xsave): Pre-clear all registers in xsave buffer,
10207         including x87 control registers.  Update control registers if they
10208         have changed from the default value, and mark features as enabled
10209         as required.
10210         * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
10211
10212 2018-05-08  Ulrich Weigand  <uweigand@de.ibm.com>
10213
10214         * spu-tdep.c (info_spu_event_command): Fix output formatting.
10215
10216 2018-05-07  Tom Tromey  <tom@tromey.com>
10217
10218         * configure: Rebuild.
10219         * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
10220
10221 2018-05-07  Tom Tromey  <tom@tromey.com>
10222
10223         PR tdep/20362:
10224         * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
10225         bit.  Use correct value for VDIV.
10226
10227 2018-05-04  Tom Tromey  <tom@tromey.com>
10228
10229         * configure: Rebuild.
10230         * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
10231
10232 2018-05-04  Tom Tromey  <tom@tromey.com>
10233
10234         * linux-record.c (record_linux_system_call) <case
10235         RECORD_SYS_RECVFROM>: Add "break".
10236
10237 2018-05-04  Tom Tromey  <tom@tromey.com>
10238
10239         * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
10240         Add missing "break".
10241         * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
10242         Add missing "break".
10243
10244 2018-05-04  Tom Tromey  <tom@tromey.com>
10245
10246         * rs6000-tdep.c (ppc_process_record_op4)
10247         (ppc_process_record_op63): Add fall-through comment.
10248
10249 2018-05-04  Tom Tromey  <tom@tromey.com>
10250
10251         * i386-tdep.c (i386_process_record): Add fall-through comment.
10252
10253 2018-05-04  Tom Tromey  <tom@tromey.com>
10254
10255         * stabsread.c (define_symbol) <case 'p'>: Add fall-through
10256         comment.
10257
10258 2018-05-04  Tom Tromey  <tom@tromey.com>
10259
10260         * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
10261         * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
10262         * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
10263         comment.
10264         * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
10265         comment.
10266         * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
10267         comment.
10268
10269 2018-05-04  Tom Tromey  <tom@tromey.com>
10270
10271         * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
10272
10273 2018-05-04  Tom Tromey  <tom@tromey.com>
10274
10275         * s390-tdep.c (s390_process_record): Fix fall-through comments.
10276         * xcoffread.c (scan_xcoff_symtab): Move comment later.
10277         * symfile.c (section_is_mapped): Fix fall-through comment.
10278         * stabsread.c (define_symbol, read_member_functions): Fix
10279         fall-through comment.
10280         * s390-linux-tdep.c (s390_process_record): Fix fall-through
10281         comment.
10282         * remote.c (remote_wait_as): Fix fall-through comment.
10283         * p-exp.y (yylex): Fix fall-through comment.
10284         * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
10285         comment.
10286         * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
10287         * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
10288         * jv-exp.y (yylex): Fix fall-through comment.
10289         * go-exp.y (lex_one_token): Fix fall-through comment.
10290         * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
10291         fall-through comment.
10292         * f-exp.y (yylex): Fix fall-through comment.
10293         * dwarf2read.c (process_die): Fix fall-through comments.
10294         * dbxread.c (process_one_symbol): Fix fall-through comment.
10295         * d-exp.y (lex_one_token): Fix fall-through comment.
10296         * cp-name-parser.y (yylex): Fix fall-through comment.
10297         * coffread.c (coff_symtab_read): Fix fall-through comment.
10298         * c-exp.y (lex_one_token): Fix fall-through comment.
10299         * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
10300         comment.
10301         * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
10302         comment.
10303
10304 2018-05-04  Tom Tromey  <tom@tromey.com>
10305
10306         PR python/22730:
10307         * NEWS: Mention gdb.execute change.
10308         * gdbcmd.h (execute_control_command): Don't declare.
10309         * python/python.c (execute_gdb_command): Use read_command_lines_1,
10310         execute_control_commands, execute_control_commands_to_string.
10311         * cli/cli-script.h (execute_control_commands)
10312         (execute_control_commands_to_string): Declare.
10313         (execute_control_command): Add from_tty parameter.
10314         * cli/cli-script.c (execute_control_commands)
10315         (execute_control_commands_to_string): New functions.
10316         (execute_user_command): Use execute_control_commands.
10317         (execute_control_command_1): Add "from_tty" parameter.  Update.
10318         (execute_control_command): Likewise.
10319
10320 2018-05-04  Tom Tromey  <tom@tromey.com>
10321
10322         PR python/22731:
10323         * NEWS: Mention that breakpoint commands are writable.
10324         * python/py-breakpoint.c (bppy_set_commands): New function.
10325         (breakpoint_object_getset) <"commands">: Use it.
10326
10327 2018-05-04  Tom Tromey  <tom@tromey.com>
10328
10329         * tracepoint.c (actions_command): Update.
10330         * mi/mi-cmd-break.c (mi_command_line_array)
10331         (mi_command_line_array_cnt, mi_command_line_array_ptr)
10332         (mi_read_next_line): Remove.
10333         (mi_cmd_break_commands): Update.
10334         * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
10335         function_view.
10336         * cli/cli-script.c (get_command_line): Update.
10337         (process_next_line): Use function_view.  Constify.
10338         (recurse_read_control_structure, read_command_lines)
10339         (read_command_lines_1): Change argument types to function_view.
10340         (do_define_command, document_command): Update.
10341         * breakpoint.h (check_tracepoint_command): Don't declare.
10342         * breakpoint.c (check_tracepoint_command): Remove.
10343         (commands_command_1, create_tracepoint_from_upload): Update.
10344
10345 2018-05-04  Tom Tromey  <tom@tromey.com>
10346
10347         PR gdb/11750:
10348         * cli/cli-script.h (enum command_control_type) <define_control>:
10349         New constant.
10350         * cli/cli-script.c (multi_line_command_p): Handle define_control.
10351         (build_command_line, execute_control_command_1)
10352         (process_next_line): Likewise.
10353         (do_define_command): New function, extracted from define_command.
10354         (define_command): Use it.
10355
10356 2018-05-04  Tom Tromey  <tom@tromey.com>
10357
10358         * tracepoint.c (actions_command): Update.
10359         * cli/cli-script.h (read_command_lines): Update.
10360         * cli/cli-script.c (read_command_lines): Constify prompt_arg.
10361         (MAX_TMPBUF): Remove define.
10362         (define_command): Use string_printf.
10363         (document_command): Likewise.
10364         * breakpoint.c (commands_command_1): Update.
10365
10366 2018-05-04  Tom Tromey  <tom@tromey.com>
10367
10368         * top.c (execute_command): Update.
10369         * cli/cli-script.h (print_command_lines): Now varargs.
10370         * cli/cli-script.c (print_command_lines): Now varargs.
10371         (execute_control_command_1) <case while_control, case if_control>:
10372         Update.
10373
10374 2018-05-04  Tom Tromey  <tom@tromey.com>
10375
10376         * tracepoint.c (all_tracepoint_actions): Rename from
10377         all_tracepoint_actions_and_cleanup.  Change return type.
10378         (actions_command, encode_actions_1, encode_actions)
10379         (trace_dump_actions, tdump_command): Update.
10380         * remote.c (remote_download_command_source): Update.
10381         * python/python.c (gdbpy_eval_from_control_command)
10382         (python_command, python_interactive_command): Update.
10383         * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
10384         * guile/guile.c (guile_command)
10385         (gdbscm_eval_from_control_command, guile_command): Update.
10386         * compile/compile.c (compile_code_command)
10387         (compile_print_command, compile_to_object): Update.
10388         * cli/cli-script.h (struct command_lines_deleter): New.
10389         (counted_command_line): New typedef.
10390         (struct command_line): Add constructor, destructor.
10391         <body_list>: Remove.
10392         <body_list_0, body_list_1>: New members.
10393         (command_line_up): Remove typedef.
10394         (read_command_lines, read_command_lines_1, get_command_line):
10395         Update.
10396         (copy_command_lines): Don't declare.
10397         * cli/cli-script.c (build_command_line): Use "new".
10398         (get_command_line): Return counted_command_line.
10399         (print_command_lines, execute_user_command)
10400         (execute_control_command_1, while_command, if_command): Update.
10401         (realloc_body_list): Remove.
10402         (process_next_line, recurse_read_control_structure): Update.
10403         (read_command_lines, read_command_lines_1): Return counted_command_line.
10404         (free_command_lines): Use "delete".
10405         (copy_command_lines): Remove.
10406         (define_command, document_command, show_user_1): Update.
10407         * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
10408         a counted_command_line.
10409         * breakpoint.h (counted_command_line): Remove typedef.
10410         (breakpoint_set_commands): Update.
10411         * breakpoint.c (check_no_tracepoint_commands)
10412         (validate_commands_for_breakpoint): Update.
10413         (breakpoint_set_commands): Change commands to be a
10414         counted_command_line.
10415         (commands_command_1, update_dprintf_command_list)
10416         (create_tracepoint_from_upload): Update.
10417
10418 2018-05-04  Tom Tromey  <tom@tromey.com>
10419
10420         * cli/cli-decode.h (cmd_list_element): New constructor.
10421         (~cmd_list_element): New destructor.
10422         (struct cmd_list_element): Add initializers.
10423         * cli/cli-decode.c (do_add_cmd): Use "new".
10424         (delete_cmd): Use "delete".
10425
10426 2018-05-04  Jan Kratochvil  <jan.kratochvil@redhat.com>
10427             Pedro Alves <palves@redhat.com>
10428
10429         PR breakpoints/19806 and support for PR external/20207.
10430         * NEWS: Mention Aarch64 watchpoint improvements.
10431         * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
10432         watchpoints and PR external/20207 watchpoints.
10433         * nat/aarch64-linux-hw-point.c
10434         (kernel_supports_any_contiguous_range): New.
10435         (aarch64_watchpoint_offset): New.
10436         (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
10437         (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
10438         (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
10439         (aarch64_align_watchpoint): New parameters aligned_offset_p and
10440         next_addr_orig_p.  Support PR external/20207 watchpoints.
10441         (aarch64_downgrade_regs): New.
10442         (aarch64_dr_state_insert_one_point): New parameters offset and
10443         addr_orig.
10444         (aarch64_dr_state_remove_one_point): Likewise.
10445         (aarch64_handle_breakpoint): Update caller.
10446         (aarch64_handle_aligned_watchpoint): Likewise.
10447         (aarch64_handle_unaligned_watchpoint): Support addr_orig and
10448         aligned_offset.
10449         (aarch64_linux_set_debug_regs): Remove const from state.  Call
10450         aarch64_downgrade_regs.
10451         (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
10452         * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
10453         (DR_CONTROL_MASK): ... this.
10454         (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
10455         (unsigned int aarch64_watchpoint_offset): New prototype.
10456         (aarch64_linux_set_debug_regs): Remove const from state.
10457         * utils.c (align_up, align_down): Move to ...
10458         * common/common-utils.c (align_up, align_down): ... here.
10459         * utils.h (align_up, align_down): Move to ...
10460         * common/common-utils.h (align_up, align_down): ... here.
10461
10462 2018-05-04  Joel Brobecker  <brobecker@adacore.com>
10463
10464         * sparc-tdep.c (sparc_structure_return_p): Re-implement to
10465         match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
10466         (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
10467         Re-implement to match the ABI as summarized in GCC's
10468         gcc/config/sparc/sparc.c.  All callers updated.
10469         (sparc32_store_arguments): Remove assertion.
10470
10471 2018-05-04  Tom Tromey  <tom@tromey.com>
10472
10473         * printcmd.c: Don't include tui.h.
10474         (decode_format): Use skip_spaces.
10475
10476 2018-05-04  Tom Tromey  <tom@tromey.com>
10477
10478         PR gdb/22619:
10479         * printcmd.c (last_count): New global.
10480         (x_command): Use saved count when repeating.
10481
10482 2018-05-04  Tom Tromey  <tom@tromey.com>
10483
10484         * nto-procfs.c (do_closedir_cleanup): Remove.
10485         (procfs_pidlist): Use gdb_dir_up.
10486         * procfs.c (do_closedir_cleanup): Remove.
10487         (proc_update_threads): Use gdb_dir_up.
10488         * common/filestuff.h (struct gdb_dir_deleter): New.
10489         (gdb_dir_up): New typedef.
10490
10491 2018-05-04  Tom Tromey  <tom@tromey.com>
10492
10493         * ada-lang.c (print_mention_exception): Use std::string.
10494
10495 2018-05-04  Tom Tromey  <tom@tromey.com>
10496
10497         * ada-lang.c (create_excep_cond_exprs): Update.
10498         (ada_exception_catchpoint_cond_string): Use std::string.
10499
10500 2018-05-04  Tom Tromey  <tom@tromey.com>
10501
10502         * ada-lang.c (xget_renaming_scope): Return std::string.
10503         (old_renaming_is_invisible): Update.
10504
10505 2018-05-04  Tom Tromey  <tom@tromey.com>
10506
10507         * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
10508         (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
10509
10510 2018-05-04  Ulrich Weigand  <uweigand@de.ibm.com>
10511
10512         * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
10513
10514 2018-05-04  Tom Tromey  <tom@tromey.com>
10515
10516         * remote.c (remote_query_supported_append): Change type.
10517         (remote_check_symbols): Update.
10518
10519 2018-05-04  Paul Pluzhnikov  <ppluzhnikov@google.com>
10520
10521         PR gdb/11420
10522         * configure.ac: Prepend libpython.
10523         * python/python-config.py: Likewise.
10524         * configure: Regenerate.
10525
10526 2018-05-03  Simon Marchi  <simon.marchi@ericsson.com>
10527
10528         * Makefile.in (%.c: %.l): Use -t instead of --stdout.
10529
10530 2018-05-03  Pedro Alves  <palves@redhat.com>
10531
10532         * s390-linux-nat.c
10533         (s390_linux_nat_target::have_continuable_watchpoint): Mark with
10534         override.  Write 'true' instead of '1'.
10535         (s390_linux_nat_target::watchpoint_addr_within_range): Remove
10536         declaration.
10537
10538 2018-05-02  Pedro Alves  <palves@redhat.com>
10539
10540         * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
10541         add_inf_child_target.
10542         * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
10543         add_inf_child_target.
10544         * aix-thread.c (aix_thread_target_info): New.
10545         (aix_thread_target) <shortname, longname, doc>: Delete.
10546         <info>: New.
10547         * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
10548         add_inf_child_target.
10549         * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
10550         add_inf_child_target.
10551         * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
10552         add_inf_child_target.
10553         * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
10554         add_inf_child_target.
10555         * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
10556         add_inf_child_target.
10557         * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
10558         add_inf_child_target.
10559         * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
10560         add_inf_child_target.
10561         * arm-linux-nat.c (_initialize_arm_linux_nat): Use
10562         add_inf_child_target.
10563         * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
10564         add_inf_child_target.
10565         * bfd-target.c (target_bfd_target_info): New.
10566         (target_bfd) <shortname, longname, doc>: Delete.
10567         <info>: New.
10568         * bsd-kvm.c (bsd_kvm_target_info): New.
10569         (bsd_kvm_target) <shortname, longname, doc>: Delete.
10570         <info>: New.
10571         (bsd_kvm_target::open): Rename to ...
10572         (bsd_kvm_target_open): ... this.  Adjust.
10573         * bsd-uthread.c (bsd_uthread_target_info): New.
10574         (bsd_uthread_target) <shortname, longname, doc>: Delete.
10575         <info>: New.
10576         * corefile.c (core_file_command): Adjust.
10577         * corelow.c (core_target_info): New.
10578         (core_target) <shortname, longname, doc>: Delete.
10579         <info>: New.
10580         (core_target::open): Rename to ...
10581         (core_target_open): ... this.  Adjust.
10582         * ctf.c (ctf_target_info): New.
10583         (ctf_target) <shortname, longname, doc>: Delete.
10584         <info>: New.
10585         (ctf_target::open): Rename to ...
10586         (ctf_target_open): ... this.
10587         (_initialize_ctf): Adjust.
10588         * exec.c (exec_target_info): New.
10589         (exec_target) <shortname, longname, doc>: Delete.
10590         <info>: New.
10591         (exec_target::open): Rename to ...
10592         (exec_target_open): ... this.
10593         * gdbcore.h (core_target_open): Declare.
10594         * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
10595         * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
10596         add_inf_child_target.
10597         * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
10598         add_inf_child_target.
10599         * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
10600         add_inf_child_target.
10601         * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
10602         add_inf_child_target.
10603         * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
10604         add_inf_child_target.
10605         * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
10606         add_inf_child_target.
10607         * i386-linux-nat.c (_initialize_i386_linux_nat): Use
10608         add_inf_child_target.
10609         * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
10610         add_inf_child_target.
10611         * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
10612         add_inf_child_target.
10613         * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
10614         add_inf_child_target.
10615         * inf-child.c (inf_child_target_info): New.
10616         (inf_child_target::info): New.
10617         (inf_child_open_target): Remove 'target' parameter.  Use
10618         get_native_target instead.
10619         (inf_child_target::open): Delete.
10620         (add_inf_child_target): New.
10621         * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
10622         Delete.
10623         <info>: New.
10624         (add_inf_child_target): Declare.
10625         (inf_child_open_target): Declare.
10626         * linux-thread-db.c (thread_db_target_info): New.
10627         (thread_db_target) <shortname, longname, doc>: Delete.
10628         <info>: New.
10629         * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
10630         add_inf_child_target.
10631         * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
10632         add_inf_child_target.
10633         * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
10634         add_inf_child_target.
10635         * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
10636         add_inf_child_target.
10637         * make-target-delegates (print_class): Adjust.
10638         * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
10639         add_inf_child_target.
10640         * mips-linux-nat.c (_initialize_mips_linux_nat): Use
10641         add_inf_child_target.
10642         * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
10643         add_inf_child_target.
10644         * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
10645         add_inf_child_target.
10646         * nto-procfs.c (nto_native_target_info): New.
10647         (nto_procfs_target_native) <shortname, longname, doc>:
10648         Delete.
10649         <info>: New.
10650         (nto_procfs_target_info): New.
10651         (nto_procfs_target_procfs) <shortname, longname, doc>:
10652         Delete.
10653         <info>: New.
10654         (init_procfs_targets): Adjust.
10655         * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
10656         add_inf_child_target.
10657         * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
10658         add_inf_child_target.
10659         * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
10660         add_inf_child_target.
10661         * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
10662         add_inf_child_target.
10663         * ravenscar-thread.c (ravenscar_target_info): New.
10664         (ravenscar_thread_target) <shortname, longname, doc>:
10665         Delete.
10666         <info>: New.
10667         * record-btrace.c (record_btrace_target_info):
10668         (record_btrace_target) <shortname, longname, doc>: Delete.
10669         <info>: New.
10670         (record_btrace_target::open): Rename to ...
10671         (record_btrace_target_open): ... this.  Adjust.
10672         * record-full.c (record_longname, record_doc): New.
10673         (record_full_base_target) <shortname, longname, doc>: Delete.
10674         <info>: New.
10675         (record_full_target_info): New.
10676         (record_full_target): <shortname>: Delete.
10677         <info>: New.
10678         (record_full_core_open_1, record_full_open_1): Update comments.
10679         (record_full_base_target::open): Rename to ...
10680         (record_full_open): ... this.
10681         (cmd_record_full_restore): Update.
10682         (_initialize_record_full): Update.
10683         * remote-sim.c (remote_sim_target_info): New.
10684         (gdbsim_target) <shortname, longname, doc>: Delete.
10685         <info>: New.
10686         (gdbsim_target::open): Rename to ...
10687         (gdbsim_target_open): ... this.
10688         (_initialize_remote_sim): Adjust.
10689         * remote.c (remote_doc): New.
10690         (remote_target_info): New.
10691         (remote_target) <shortname, longname, doc>: Delete.
10692         <info>: New.
10693         (extended_remote_target_info): New.
10694         (extended_remote_target) <shortname, longname, doc>: Delete.
10695         <info>: New.
10696         (remote_target::open_1): Make static.  Adjust.
10697         * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
10698         * s390-linux-nat.c (_initialize_s390_nat): Use
10699         add_inf_child_target.
10700         * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
10701         add_inf_child_target.
10702         * sol-thread.c (thread_db_target_info): New.
10703         (sol_thread_target) <shortname, longname, doc>: Delete.
10704         <info>: New.
10705         * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
10706         add_inf_child_target.
10707         * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
10708         add_inf_child_target.
10709         * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
10710         add_inf_child_target.
10711         * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
10712         add_inf_child_target.
10713         * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
10714         add_inf_child_target.
10715         * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
10716         add_inf_child_target.
10717         * spu-linux-nat.c (_initialize_spu_nat): Use
10718         add_inf_child_target.
10719         * spu-multiarch.c (spu_multiarch_target_info): New.
10720         (spu_multiarch_target) <shortname, longname, doc>: Delete.
10721         <info>: New.
10722         * target-delegates.c: Regenerate.
10723         * target.c: Include <unordered_map>.
10724         (target_ops_p): Delete.
10725         (DEF_VEC_P(target_ops_p)): Delete.
10726         (target_factories): New.
10727         (test_target_info): New.
10728         (test_target_ops::info): New.
10729         (open_target): Adjust to use target_factories.
10730         (add_target_with_completer): Rename to ...
10731         (add_target): ... this.  Change prototype.  Register target_info
10732         and open callback in target_factories.  Register target_info in
10733         command context instead of target_ops.
10734         (add_target): Delete old implementation.
10735         (add_deprecated_target_alias): Change prototype.  Adjust.
10736         (the_native_target): New.
10737         (set_native_target, get_native_target): New.
10738         (find_default_run_target): Use the_native_target.
10739         (find_attach_target, find_run_target): Simplify.
10740         (target_ops::open): Delete.
10741         (dummy_target_info): New.
10742         (dummy_target::shortname, dummy_target::longname)
10743         (dummy_target::doc): Delete.
10744         (dummy_target::info): New.
10745         (debug_target::shortname, debug_target::longname)
10746         (debug_target::doc): Delete.
10747         (debug_target::info): New.
10748         * target.h (struct target_info): New.
10749         (target_ops::~target_ops): Add comment.
10750         (target_ops::info): New.
10751         (target_ops::shortname, target_ops::longname, target_ops::doc): No
10752         longer virtual.  Implement in terms of target_info.
10753         (set_native_target, get_native_target): Declare.
10754         (target_open_ftype): New.
10755         (add_target, add_target_with_completer)
10756         (add_deprecated_target_alias): Change prototype.
10757         (test_target) <shortname, longname, doc>: Delete.
10758         <info>: New.
10759         * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
10760         add_inf_child_target.
10761         * tracefile-tfile.c (tfile_target_info): New.
10762         (tfile_target) <shortname, longname, doc>: Delete.
10763         <info>: New.
10764         (tfile_target::open): Rename to ...
10765         (tfile_target_open): ... this.
10766         (_initialize_tracefile_tfile): Adjust.
10767         * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
10768         add_inf_child_target.
10769         * windows-nat.c (_initialize_windows_nat): Use
10770         add_inf_child_target.
10771         * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
10772         add_inf_child_target.
10773
10774 2018-05-02  Pedro Alves  <palves@redhat.com>
10775
10776         * linux-nat.h (linux_nat_target) <low_new_thread,
10777         low_delete_thread, low_new_fork, low_forget_process,
10778         low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
10779         New virtual methods.
10780         (linux_nat_set_new_thread, linux_nat_set_delete_thread)
10781         (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
10782         (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
10783         (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
10784         (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
10785         Delete.
10786         * linux-fork.c (delete_fork): Adjust to call low method.
10787         * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
10788         (linux_nat_new_fork, linux_nat_forget_process_hook)
10789         (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
10790         (linux_nat_status_is_event):
10791         (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
10792         (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
10793         to call low method.
10794         (sigtrap_is_event): Rename to ...
10795         (linux_nat_target::low_status_is_event): ... this.
10796         (linux_nat_set_status_is_event): Delete.
10797         (save_stop_reason, linux_nat_wait_1)
10798         (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
10799         low methods.
10800         (linux_nat_set_new_thread, linux_nat_set_delete_thread)
10801         (linux_nat_set_new_fork, linux_nat_set_forget_process)
10802         (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
10803         (linux_nat_set_prepare_to_resume): Delete.
10804         * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
10805         low virtual methods.
10806         * amd64-linux-nat.c: Likewise.
10807         * arm-linux-nat.c: Likewise.
10808         * i386-linux-nat.c: Likewise.
10809         * ia64-linux-nat.c: Likewise.
10810         * mips-linux-nat.c: Likewise.
10811         * ppc-linux-nat.c: Likewise.
10812         * s390-linux-nat.c: Likewise.
10813         * sparc64-linux-nat.c: Likewise.
10814         * x86-linux-nat.c: Likewise.
10815         * x86-linux-nat.h: Include "nat/x86-linux.h".
10816         (x86_linux_nat_target) <low_new_fork, low_forget_process,
10817         low_prepare_to_resume, low_new_thread, low_delete_thread>:
10818         Override methods.
10819
10820 2018-05-02  Pedro Alves  <palves@redhat.com>
10821
10822         * target.h (target_ops)
10823         <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
10824         stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
10825         stopped_by_watchpoint, have_continuable_watchpoint,
10826         stopped_data_address, watchpoint_addr_within_range,
10827         can_accel_watchpoint_condition, can_run, thread_alive,
10828         has_all_memory, has_memory, has_stack, has_registers,
10829         has_execution, can_async_p, is_async_p, supports_non_stop,
10830         always_non_stop_p, can_execute_reverse, supports_multi_process,
10831         supports_enable_disable_tracepoint,
10832         supports_disable_randomization, supports_string_tracing,
10833         supports_evaluation_of_breakpoint_conditions,
10834         can_run_breakpoint_commands, filesystem_is_local,
10835         can_download_tracepoint, get_trace_state_variable_value,
10836         set_trace_notes, get_tib_address, use_agent, can_use_agent,
10837         record_is_replaying, record_will_replay,
10838         augmented_libraries_svr4_read>: Adjust to return bool.
10839         * aarch64-linux-nat.c: All implementations adjusted.
10840         * aix-thread.c: All implementations adjusted.
10841         * arm-linux-nat.c: All implementations adjusted.
10842         * breakpoint.c: All implementations adjusted.
10843         * bsd-kvm.c: All implementations adjusted.
10844         * bsd-uthread.c: All implementations adjusted.
10845         * corelow.c: All implementations adjusted.
10846         * ctf.c: All implementations adjusted.
10847         * darwin-nat.c: All implementations adjusted.
10848         * darwin-nat.h: All implementations adjusted.
10849         * exec.c: All implementations adjusted.
10850         * fbsd-nat.c: All implementations adjusted.
10851         * fbsd-nat.h: All implementations adjusted.
10852         * gnu-nat.c: All implementations adjusted.
10853         * gnu-nat.h: All implementations adjusted.
10854         * go32-nat.c: All implementations adjusted.
10855         * ia64-linux-nat.c: All implementations adjusted.
10856         * inf-child.c: All implementations adjusted.
10857         * inf-child.h: All implementations adjusted.
10858         * inf-ptrace.c: All implementations adjusted.
10859         * inf-ptrace.h: All implementations adjusted.
10860         * linux-nat.c: All implementations adjusted.
10861         * linux-nat.h: All implementations adjusted.
10862         * mips-linux-nat.c: All implementations adjusted.
10863         * nto-procfs.c: All implementations adjusted.
10864         * ppc-linux-nat.c: All implementations adjusted.
10865         * procfs.c: All implementations adjusted.
10866         * ravenscar-thread.c: All implementations adjusted.
10867         * record-btrace.c: All implementations adjusted.
10868         * record-full.c: All implementations adjusted.
10869         * remote-sim.c: All implementations adjusted.
10870         * remote.c: All implementations adjusted.
10871         * s390-linux-nat.c: All implementations adjusted.
10872         * sol-thread.c: All implementations adjusted.
10873         * spu-multiarch.c: All implementations adjusted.
10874         * target-delegates.c: All implementations adjusted.
10875         * target.c: All implementations adjusted.
10876         * target.h: All implementations adjusted.
10877         * tracefile-tfile.c: All implementations adjusted.
10878         * tracefile.c: All implementations adjusted.
10879         * tracefile.h: All implementations adjusted.
10880         * windows-nat.c: All implementations adjusted.
10881         * x86-linux-nat.h: All implementations adjusted.
10882         * x86-nat.h: All implementations adjusted.
10883
10884 2018-05-02  Pedro Alves  <palves@redhat.com>
10885
10886         * make-target-delegates (scan_target_h): Don't trim lines here.
10887         Replace sequences of tabs and/or whitespace with a single
10888         whitespace.
10889         (top level, parsing methods): Trim each line before processing it
10890         here.
10891
10892 2018-05-02  Pedro Alves  <palves@redhat.com>
10893             John Baldwin  <jhb@freebsd.org>
10894
10895         * target.h (enum strata) <debug_stratum>: New.
10896         (struct target_ops) <all delegation methods>: Replace by C++
10897         virtual methods, and drop "to_" prefix.  All references updated
10898         throughout.
10899         <to_shortname, to_longname, to_doc, to_data,
10900         to_have_steppable_watchpoint, to_have_continuable_watchpoint,
10901         to_has_thread_control, to_attach_no_wait>: Delete, replaced by
10902         virtual methods.  All references updated throughout.
10903         <can_attach, supports_terminal_ours, can_create_inferior,
10904         get_thread_control_capabilities, attach_no_wait>: New
10905         virtual methods.
10906         <insert_breakpoint, remove_breakpoint>: Now
10907         TARGET_DEFAULT_NORETURN methods.
10908         <info_proc>: Now returns bool.
10909         <to_magic>: Delete.
10910         (OPS_MAGIC): Delete.
10911         (current_target): Delete.  All references replaced by references
10912         to ...
10913         (target_stack): ... this.  New.
10914         (target_shortname, target_longname): Adjust.
10915         (target_can_run): Now a function declaration.
10916         (default_child_has_all_memory, default_child_has_memory)
10917         (default_child_has_stack, default_child_has_registers)
10918         (default_child_has_execution): Remove target_ops parameter.
10919         (complete_target_initialization): Delete.
10920         (memory_breakpoint_target): New template class.
10921         (test_target_ops): Refactor as a C++ class with virtual methods.
10922         * make-target-delegates (NAME_PART): Tighten.
10923         (POINTER_PART, CP_SYMBOL): New.
10924         (SIMPLE_RETURN_PART): Reimplement.
10925         (VEC_RETURN_PART): Expect less.
10926         (RETURN_PART, VIRTUAL_PART): New.
10927         (METHOD): Adjust to C++ virtual methods.
10928         (scan_target_h): Remove reference to C99.
10929         (dname): Output "target_ops::" prefix.
10930         (write_function_header): Adjust to output a C++ class method.
10931         (write_declaration): New.
10932         (write_delegator): Adjust to output a C++ class method.
10933         (tdname): Output "dummy_target::" prefix.
10934         (write_tdefault, write_debugmethod): Adjust to output a C++ class
10935         method.
10936         (tdefault_names, debug_names): Delete.
10937         (return_types, tdefaults, styles, argtypes_array): New.
10938         (top level): All methods are delegators.
10939         (print_class): New.
10940         (top level): Print dummy_target and debug_target classes.
10941         * target-delegates.c: Regenerate.
10942         * target-debug.h (target_debug_print_enum_info_proc_what)
10943         (target_debug_print_thread_control_capabilities)
10944         (target_debug_print_thread_info_p): New.
10945         * target.c (dummy_target): Delete.
10946         (the_dummy_target, the_debug_target): New.
10947         (target_stack): Now extern.
10948         (set_targetdebug): Push/unpush debug target.
10949         (default_child_has_all_memory, default_child_has_memory)
10950         (default_child_has_stack, default_child_has_registers)
10951         (default_child_has_execution): Remove target_ops parameter.
10952         (complete_target_initialization): Delete.
10953         (add_target_with_completer): No longer call
10954         complete_target_initialization.
10955         (target_supports_terminal_ours): Use regular delegation.
10956         (update_current_target): Delete.
10957         (push_target): No longer check magic number.  Don't call
10958         update_current_target.
10959         (unpush_target): Don't call update_current_target.
10960         (target_is_pushed): No longer check magic number.
10961         (target_require_runnable): Skip for all stratums over
10962         process_stratum.
10963         (target_ops::info_proc): New.
10964         (target_info_proc): Use find_target_at and
10965         find_default_run_target.
10966         (target_supports_disable_randomization): Use regular delegation.
10967         (target_get_osdata): Use find_target_at.
10968         (target_ops::open, target_ops::close, target_ops::can_attach)
10969         (target_ops::attach, target_ops::can_create_inferior)
10970         (target_ops::create_inferior, target_ops::can_run)
10971         (target_can_run): New.
10972         (default_fileio_target): Use regular delegation.
10973         (target_ops::fileio_open, target_ops::fileio_pwrite)
10974         (target_ops::fileio_pread, target_ops::fileio_fstat)
10975         (target_ops::fileio_close, target_ops::fileio_unlink)
10976         (target_ops::fileio_readlink): New.
10977         (target_fileio_open_1, target_fileio_unlink)
10978         (target_fileio_readlink): Always call the target method.  Handle
10979         FILEIO_ENOSYS.
10980         (return_zero, return_zero_has_execution): Delete.
10981         (init_dummy_target): Delete.
10982         (dummy_target::dummy_target, dummy_target::shortname)
10983         (dummy_target::longname, dummy_target::doc)
10984         (debug_target::debug_target, debug_target::shortname)
10985         (debug_target::longname, debug_target::doc): New.
10986         (target_supports_delete_record): Use regular delegation.
10987         (setup_target_debug): Delete.
10988         (maintenance_print_target_stack): Skip debug_stratum.
10989         (initialize_targets): Instantiate the_dummy_target and
10990         the_debug_target.
10991         * auxv.c (target_auxv_parse): Remove 'ops' parameter.  Adjust to
10992         use target_stack.
10993         (target_auxv_search, fprint_target_auxv): Adjust.
10994         (info_auxv_command): Adjust to use target_stack.
10995         * auxv.h (target_auxv_parse): Remove 'ops' parameter.
10996         * exceptions.c (print_flush): Handle a NULL target_stack.
10997         * regcache.c (target_ops_no_register): Refactor as class with
10998         virtual methods.
10999
11000         * exec.c (exec_target): New class.
11001         (exec_ops): Now an exec_target.
11002         (exec_open, exec_close_1, exec_get_section_table)
11003         (exec_xfer_partial, exec_files_info, exec_has_memory)
11004         (exec_make_note_section): Refactor as exec_target methods.
11005         (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
11006         Delete.
11007         (exec_target::find_memory_regions): New.
11008         (_initialize_exec): Don't call init_exec_ops.
11009         * gdbcore.h (exec_file_clear): Delete.
11010
11011         * corefile.c (core_target): Delete.
11012         (core_file_command): Adjust.
11013         * corelow.c (core_target): New class.
11014         (the_core_target): New.
11015         (core_close): Remove target_ops parameter.
11016         (core_close_cleanup): Adjust.
11017         (core_target::close): New.
11018         (core_open, core_detach, get_core_registers, core_files_info)
11019         (core_xfer_partial, core_thread_alive, core_read_description)
11020         (core_pid_to_str, core_thread_name, core_has_memory)
11021         (core_has_stack, core_has_registers, core_info_proc): Rework as
11022         core_target methods.
11023         (ignore, core_remove_breakpoint, init_core_ops): Delete.
11024         (_initialize_corelow): Initialize the_core_target.
11025         * gdbcore.h (core_target): Delete.
11026         (the_core_target): New.
11027
11028         * ctf.c: (ctf_target): New class.
11029         (ctf_ops): Now a ctf_target.
11030         (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
11031         (ctf_xfer_partial, ctf_get_trace_state_variable_value)
11032         (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
11033         methods.
11034         (init_ctf_ops): Delete.
11035         (_initialize_ctf): Don't call it.
11036         * tracefile-tfile.c (tfile_target): New class.
11037         (tfile_ops): Now a tfile_target.
11038         (tfile_open, tfile_close, tfile_files_info)
11039         (tfile_get_tracepoint_status, tfile_trace_find)
11040         (tfile_fetch_registers, tfile_xfer_partial)
11041         (tfile_get_trace_state_variable_value, tfile_traceframe_info):
11042         Refactor as tfile_target methods.
11043         (tfile_xfer_partial_features): Remove target_ops parameter.
11044         (init_tfile_ops): Delete.
11045         (_initialize_tracefile_tfile): Don't call it.
11046         * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
11047         (tracefile_has_stack, tracefile_has_registers)
11048         (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
11049         tracefile_target methods.
11050         (init_tracefile_ops): Delete.
11051         (tracefile_target::tracefile_target): New.
11052         * tracefile.h: Include "target.h".
11053         (tracefile_target): New class.
11054         (init_tracefile_ops): Delete.
11055
11056         * spu-multiarch.c (spu_multiarch_target): New class.
11057         (spu_ops): Now a spu_multiarch_target.
11058         (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
11059         (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
11060         (spu_search_memory, spu_mourn_inferior): Refactor as
11061         spu_multiarch_target methods.
11062         (init_spu_ops): Delete.
11063         (_initialize_spu_multiarch): Remove references to init_spu_ops,
11064         complete_target_initialization.
11065
11066         * ravenscar-thread.c (ravenscar_thread_target): New class.
11067         (ravenscar_ops): Now a ravenscar_thread_target.
11068         (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
11069         (ravenscar_thread_alive, ravenscar_pid_to_str)
11070         (ravenscar_fetch_registers, ravenscar_store_registers)
11071         (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
11072         (ravenscar_stopped_by_hw_breakpoint)
11073         (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
11074         (ravenscar_mourn_inferior, ravenscar_core_of_thread)
11075         (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
11076         methods.
11077         (init_ravenscar_thread_ops): Delete.
11078         (_initialize_ravenscar): Remove references to
11079         init_ravenscar_thread_ops and complete_target_initialization.
11080
11081         * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
11082         (bsd_uthread_target): New class.
11083         (bsd_uthread_ops): Now a bsd_uthread_target.
11084         (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
11085         (bsd_uthread_close, bsd_uthread_mourn_inferior)
11086         (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
11087         (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
11088         (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
11089         (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
11090         (bsd_uthread_target): Delete function.
11091         (_initialize_bsd_uthread): Remove reference to
11092         complete_target_initialization.
11093
11094         * bfd-target.c (target_bfd_data): Delete.  Fields folded into ...
11095         (target_bfd): ... this new class.
11096         (target_bfd_xfer_partial, target_bfd_get_section_table)
11097         (target_bfd_close): Refactor as target_bfd methods.
11098         (target_bfd::~target_bfd): New.
11099         (target_bfd_reopen): Adjust.
11100         (target_bfd::close): New.
11101
11102         * record-btrace.c (record_btrace_target): New class.
11103         (record_btrace_ops): Now a record_btrace_target.
11104         (record_btrace_open, record_btrace_stop_recording)
11105         (record_btrace_disconnect, record_btrace_close)
11106         (record_btrace_async, record_btrace_info)
11107         (record_btrace_insn_history, record_btrace_insn_history_range)
11108         (record_btrace_insn_history_from, record_btrace_call_history)
11109         (record_btrace_call_history_range)
11110         (record_btrace_call_history_from, record_btrace_record_method)
11111         (record_btrace_is_replaying, record_btrace_will_replay)
11112         (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
11113         (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
11114         (record_btrace_store_registers, record_btrace_prepare_to_store)
11115         (record_btrace_to_get_unwinder)
11116         (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
11117         (record_btrace_commit_resume, record_btrace_wait)
11118         (record_btrace_stop, record_btrace_can_execute_reverse)
11119         (record_btrace_stopped_by_sw_breakpoint)
11120         (record_btrace_supports_stopped_by_sw_breakpoint)
11121         (record_btrace_stopped_by_hw_breakpoint)
11122         (record_btrace_supports_stopped_by_hw_breakpoint)
11123         (record_btrace_update_thread_list, record_btrace_thread_alive)
11124         (record_btrace_goto_begin, record_btrace_goto_end)
11125         (record_btrace_goto, record_btrace_stop_replaying_all)
11126         (record_btrace_execution_direction)
11127         (record_btrace_prepare_to_generate_core)
11128         (record_btrace_done_generating_core): Refactor as
11129         record_btrace_target methods.
11130         (init_record_btrace_ops): Delete.
11131         (_initialize_record_btrace): Remove reference to
11132         init_record_btrace_ops.
11133         * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
11134         the execution_direction global.
11135         (record_full_base_target, record_full_target)
11136         (record_full_core_target): New classes.
11137         (record_full_ops): Now a record_full_target.
11138         (record_full_core_ops): Now a record_full_core_target.
11139         (record_full_target::detach, record_full_target::disconnect)
11140         (record_full_core_target::disconnect)
11141         (record_full_target::mourn_inferior, record_full_target::kill):
11142         New.
11143         (record_full_open, record_full_close, record_full_async): Refactor
11144         as methods of the record_full_base_target class.
11145         (record_full_resume, record_full_commit_resume): Refactor
11146         as methods of the record_full_target class.
11147         (record_full_wait, record_full_stopped_by_watchpoint)
11148         (record_full_stopped_data_address)
11149         (record_full_stopped_by_sw_breakpoint)
11150         (record_full_supports_stopped_by_sw_breakpoint)
11151         (record_full_stopped_by_hw_breakpoint)
11152         (record_full_supports_stopped_by_hw_breakpoint): Refactor as
11153         methods of the record_full_base_target class.
11154         (record_full_store_registers, record_full_xfer_partial)
11155         (record_full_insert_breakpoint, record_full_remove_breakpoint):
11156         Refactor as methods of the record_full_target class.
11157         (record_full_can_execute_reverse, record_full_get_bookmark)
11158         (record_full_goto_bookmark, record_full_execution_direction)
11159         (record_full_record_method, record_full_info, record_full_delete)
11160         (record_full_is_replaying, record_full_will_replay)
11161         (record_full_goto_begin, record_full_goto_end, record_full_goto)
11162         (record_full_stop_replaying): Refactor as methods of the
11163         record_full_base_target class.
11164         (record_full_core_resume, record_full_core_kill)
11165         (record_full_core_fetch_registers)
11166         (record_full_core_prepare_to_store)
11167         (record_full_core_store_registers, record_full_core_xfer_partial)
11168         (record_full_core_insert_breakpoint)
11169         (record_full_core_remove_breakpoint)
11170         (record_full_core_has_execution): Refactor
11171         as methods of the record_full_core_target class.
11172         (record_full_base_target::supports_delete_record): New.
11173         (init_record_full_ops): Delete.
11174         (init_record_full_core_ops): Delete.
11175         (record_full_save): Refactor as method of the
11176         record_full_base_target class.
11177         (_initialize_record_full): Remove references to
11178         init_record_full_ops and init_record_full_core_ops.
11179
11180         * remote.c (remote_target, extended_remote_target): New classes.
11181         (remote_ops): Now a remote_target.
11182         (extended_remote_ops): Now an extended_remote_target.
11183         (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
11184         (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
11185         (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
11186         (remote_pass_signals, remote_set_syscall_catchpoint)
11187         (remote_program_signals, )
11188         (remote_thread_always_alive): Remove target_ops parameter.
11189         (remote_thread_alive, remote_thread_name)
11190         (remote_update_thread_list, remote_threads_extra_info)
11191         (remote_static_tracepoint_marker_at)
11192         (remote_static_tracepoint_markers_by_strid)
11193         (remote_get_ada_task_ptid, remote_close, remote_start_remote)
11194         (remote_open): Refactor as methods of remote_target.
11195         (extended_remote_open, extended_remote_detach)
11196         (extended_remote_attach, extended_remote_post_attach):
11197         (extended_remote_supports_disable_randomization)
11198         (extended_remote_create_inferior): : Refactor as method of
11199         extended_remote_target.
11200         (remote_set_permissions, remote_open_1, remote_detach)
11201         (remote_follow_fork, remote_follow_exec, remote_disconnect)
11202         (remote_resume, remote_commit_resume, remote_stop)
11203         (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
11204         (remote_terminal_ours, remote_wait, remote_fetch_registers)
11205         (remote_prepare_to_store, remote_store_registers)
11206         (remote_flash_erase, remote_flash_done, remote_files_info)
11207         (remote_kill, remote_mourn, remote_insert_breakpoint)
11208         (remote_remove_breakpoint, remote_insert_watchpoint)
11209         (remote_watchpoint_addr_within_range)
11210         (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
11211         (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
11212         (remote_supports_stopped_by_sw_breakpoint)
11213         (remote_stopped_by_hw_breakpoint)
11214         (remote_supports_stopped_by_hw_breakpoint)
11215         (remote_stopped_by_watchpoint, remote_stopped_data_address)
11216         (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
11217         (remote_verify_memory): Refactor as methods of remote_target.
11218         (remote_write_qxfer, remote_read_qxfer): Remove target_ops
11219         parameter.
11220         (remote_xfer_partial, remote_get_memory_xfer_limit)
11221         (remote_search_memory, remote_rcmd, remote_memory_map)
11222         (remote_pid_to_str, remote_get_thread_local_address)
11223         (remote_get_tib_address, remote_read_description): Refactor as
11224         methods of remote_target.
11225         (remote_target::fileio_open, remote_target::fileio_pwrite)
11226         (remote_target::fileio_pread, remote_target::fileio_close): New.
11227         (remote_hostio_readlink, remote_hostio_fstat)
11228         (remote_filesystem_is_local, remote_can_execute_reverse)
11229         (remote_supports_non_stop, remote_supports_disable_randomization)
11230         (remote_supports_multi_process, remote_supports_cond_breakpoints)
11231         (remote_supports_enable_disable_tracepoint)
11232         (remote_supports_string_tracing)
11233         (remote_can_run_breakpoint_commands, remote_trace_init)
11234         (remote_download_tracepoint, remote_can_download_tracepoint)
11235         (remote_download_trace_state_variable, remote_enable_tracepoint)
11236         (remote_disable_tracepoint, remote_trace_set_readonly_regions)
11237         (remote_trace_start, remote_get_trace_status)
11238         (remote_get_tracepoint_status, remote_trace_stop)
11239         (remote_trace_find, remote_get_trace_state_variable_value)
11240         (remote_save_trace_data, remote_get_raw_trace_data)
11241         (remote_set_disconnected_tracing, remote_core_of_thread)
11242         (remote_set_circular_trace_buffer, remote_traceframe_info)
11243         (remote_get_min_fast_tracepoint_insn_len)
11244         (remote_set_trace_buffer_size, remote_set_trace_notes)
11245         (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
11246         (remote_disable_btrace, remote_teardown_btrace)
11247         (remote_read_btrace, remote_btrace_conf)
11248         (remote_augmented_libraries_svr4_read, remote_load)
11249         (remote_pid_to_exec_file, remote_can_do_single_step)
11250         (remote_execution_direction, remote_thread_handle_to_thread_info):
11251         Refactor as methods of remote_target.
11252         (init_remote_ops, init_extended_remote_ops): Delete.
11253         (remote_can_async_p, remote_is_async_p, remote_async)
11254         (remote_thread_events, remote_upload_tracepoints)
11255         (remote_upload_trace_state_variables): Refactor as methods of
11256         remote_target.
11257         (_initialize_remote): Remove references to init_remote_ops and
11258         init_extended_remote_ops.
11259
11260         * remote-sim.c (gdbsim_target): New class.
11261         (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
11262         (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
11263         (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
11264         (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
11265         (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
11266         (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
11267         Refactor as methods of gdbsim_target.
11268         (gdbsim_ops): Now a gdbsim_target.
11269         (init_gdbsim_ops): Delete.
11270         (gdbsim_cntrl_c): Adjust.
11271         (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
11272
11273         * amd64-linux-nat.c (amd64_linux_nat_target): New class.
11274         (the_amd64_linux_nat_target): New.
11275         (amd64_linux_fetch_inferior_registers)
11276         (amd64_linux_store_inferior_registers): Refactor as methods of
11277         amd64_linux_nat_target.
11278         (_initialize_amd64_linux_nat): Adjust.  Set linux_target.
11279         * i386-linux-nat.c: Don't include "linux-nat.h".
11280         (i386_linux_nat_target): New class.
11281         (the_i386_linux_nat_target): New.
11282         (i386_linux_fetch_inferior_registers)
11283         (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
11284         as methods of i386_linux_nat_target.
11285         (_initialize_i386_linux_nat): Adjust.  Set linux_target.
11286         * inf-child.c (inf_child_ops): Delete.
11287         (inf_child_fetch_inferior_registers)
11288         (inf_child_store_inferior_registers): Delete.
11289         (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
11290         methods of inf_child_target.
11291         (inf_child_target::supports_terminal_ours)
11292         (inf_child_target::terminal_init)
11293         (inf_child_target::terminal_inferior)
11294         (inf_child_target::terminal_ours_for_output)
11295         (inf_child_target::terminal_ours, inf_child_target::interrupt)
11296         (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
11297         New.
11298         (inf_child_open, inf_child_disconnect, inf_child_close)
11299         (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
11300         (inf_child_post_startup_inferior, inf_child_can_run)
11301         (inf_child_pid_to_exec_file): Refactor as methods of
11302         inf_child_target.
11303         (inf_child_follow_fork): Delete.
11304         (inf_child_target::can_create_inferior)
11305         (inf_child_target::can_attach): New.
11306         (inf_child_target::has_all_memory, inf_child_target::has_memory)
11307         (inf_child_target::has_stack, inf_child_target::has_registers)
11308         (inf_child_target::has_execution): New.
11309         (inf_child_fileio_open, inf_child_fileio_pwrite)
11310         (inf_child_fileio_pread, inf_child_fileio_fstat)
11311         (inf_child_fileio_close, inf_child_fileio_unlink)
11312         (inf_child_fileio_readlink, inf_child_use_agent)
11313         (inf_child_can_use_agent): Refactor as methods of
11314         inf_child_target.
11315         (return_zero, inf_child_target): Delete.
11316         (inf_child_target::inf_child_target): New.
11317         * inf-child.h: Include "target.h".
11318         (inf_child_target): Delete function prototype.
11319         (inf_child_target): New class.
11320         (inf_child_open_target, inf_child_mourn_inferior)
11321         (inf_child_maybe_unpush_target): Delete.
11322         * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
11323         (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
11324         (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
11325         (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
11326         (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
11327         (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
11328         (inf_ptrace_wait, inf_ptrace_xfer_partial)
11329         (inf_ptrace_thread_alive, inf_ptrace_files_info)
11330         (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
11331         methods of inf_ptrace_target.
11332         (inf_ptrace_target): Delete function.
11333         * inf-ptrace.h: Include "inf-child.h".
11334         (inf_ptrace_target): Delete function declaration.
11335         (inf_ptrace_target): New class.
11336         (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
11337         * linux-nat.c (linux_target): New.
11338         (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
11339         (linux_nat_target::~linux_nat_target): New.
11340         (linux_child_post_attach, linux_child_post_startup_inferior)
11341         (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
11342         (linux_child_remove_fork_catchpoint)
11343         (linux_child_insert_vfork_catchpoint)
11344         (linux_child_remove_vfork_catchpoint)
11345         (linux_child_insert_exec_catchpoint)
11346         (linux_child_remove_exec_catchpoint)
11347         (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
11348         (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
11349         (linux_nat_resume, linux_nat_stopped_by_watchpoint)
11350         (linux_nat_stopped_data_address)
11351         (linux_nat_stopped_by_sw_breakpoint)
11352         (linux_nat_supports_stopped_by_sw_breakpoint)
11353         (linux_nat_stopped_by_hw_breakpoint)
11354         (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
11355         (linux_nat_kill, linux_nat_mourn_inferior)
11356         (linux_nat_xfer_partial, linux_nat_thread_alive)
11357         (linux_nat_update_thread_list, linux_nat_pid_to_str)
11358         (linux_nat_thread_name, linux_child_pid_to_exec_file)
11359         (linux_child_static_tracepoint_markers_by_strid)
11360         (linux_nat_is_async_p, linux_nat_can_async_p)
11361         (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
11362         (linux_nat_supports_multi_process)
11363         (linux_nat_supports_disable_randomization, linux_nat_async)
11364         (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
11365         (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
11366         (linux_nat_fileio_open, linux_nat_fileio_readlink)
11367         (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
11368         methods of linux_nat_target.
11369         (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
11370         (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
11371         parameter.
11372         (check_stopped_by_watchpoint): Adjust.
11373         (linux_xfer_partial): Delete.
11374         (linux_target_install_ops, linux_target, linux_nat_add_target):
11375         Delete.
11376         (linux_nat_target::linux_nat_target): New.
11377         * linux-nat.h: Include "inf-ptrace.h".
11378         (linux_nat_target): New.
11379         (linux_target, linux_target_install_ops, linux_nat_add_target):
11380         Delete function declarations.
11381         (linux_target): Declare global.
11382         * linux-thread-db.c (thread_db_target): New.
11383         (thread_db_target::thread_db_target): New.
11384         (thread_db_ops): Delete.
11385         (the_thread_db_target): New.
11386         (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
11387         (thread_db_update_thread_list, thread_db_pid_to_str)
11388         (thread_db_extra_thread_info)
11389         (thread_db_thread_handle_to_thread_info)
11390         (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
11391         (thread_db_resume): Refactor as methods of thread_db_target.
11392         (init_thread_db_ops): Delete.
11393         (_initialize_thread_db): Remove reference to init_thread_db_ops.
11394         * x86-linux-nat.c: Don't include "linux-nat.h".
11395         (super_post_startup_inferior): Delete.
11396         (x86_linux_nat_target::~x86_linux_nat_target): New.
11397         (x86_linux_child_post_startup_inferior)
11398         (x86_linux_read_description, x86_linux_enable_btrace)
11399         (x86_linux_disable_btrace, x86_linux_teardown_btrace)
11400         (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
11401         methods of x86_linux_nat_target.
11402         (x86_linux_create_target): Delete.  Bits folded ...
11403         (x86_linux_add_target): ... here.  Now takes a linux_nat_target
11404         pointer.
11405         * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
11406         (x86_linux_nat_target): New class.
11407         (x86_linux_create_target): Delete.
11408         (x86_linux_add_target): Now takes a linux_nat_target pointer.
11409         * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
11410         (x86_region_ok_for_watchpoint, x86_stopped_data_address)
11411         (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
11412         (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
11413         (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
11414         make extern.
11415         (x86_use_watchpoints): Delete.
11416         * x86-nat.h: Include "breakpoint.h" and "target.h".
11417         (x86_use_watchpoints): Delete.
11418         (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
11419         (x86_stopped_by_watchpoint, x86_stopped_data_address)
11420         (x86_insert_watchpoint, x86_remove_watchpoint)
11421         (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
11422         (x86_stopped_by_hw_breakpoint): New declarations.
11423         (x86_nat_target): New template class.
11424
11425         * ppc-linux-nat.c (ppc_linux_nat_target): New class.
11426         (the_ppc_linux_nat_target): New.
11427         (ppc_linux_fetch_inferior_registers)
11428         (ppc_linux_can_use_hw_breakpoint)
11429         (ppc_linux_region_ok_for_hw_watchpoint)
11430         (ppc_linux_ranged_break_num_registers)
11431         (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
11432         (ppc_linux_insert_mask_watchpoint)
11433         (ppc_linux_remove_mask_watchpoint)
11434         (ppc_linux_can_accel_watchpoint_condition)
11435         (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
11436         (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
11437         (ppc_linux_watchpoint_addr_within_range)
11438         (ppc_linux_masked_watch_num_registers)
11439         (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
11440         (ppc_linux_read_description): Refactor as methods of
11441         ppc_linux_nat_target.
11442         (_initialize_ppc_linux_nat): Adjust.  Set linux_target.
11443
11444         * procfs.c (procfs_xfer_partial): Delete forward declaration.
11445         (procfs_target): New class.
11446         (the_procfs_target): New.
11447         (procfs_target): Delete function.
11448         (procfs_auxv_parse, procfs_attach, procfs_detach)
11449         (procfs_fetch_registers, procfs_store_registers, procfs_wait)
11450         (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
11451         (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
11452         (procfs_create_inferior, procfs_update_thread_list)
11453         (procfs_thread_alive, procfs_pid_to_str)
11454         (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
11455         (procfs_stopped_data_address, procfs_insert_watchpoint)
11456         (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
11457         (proc_find_memory_regions, procfs_info_proc)
11458         (procfs_make_note_section): Refactor as methods of procfs_target.
11459         (_initialize_procfs): Adjust.
11460         * sol-thread.c (sol_thread_target): New class.
11461         (sol_thread_ops): Now a sol_thread_target.
11462         (sol_thread_detach, sol_thread_resume, sol_thread_wait)
11463         (sol_thread_fetch_registers, sol_thread_store_registers)
11464         (sol_thread_xfer_partial, sol_thread_mourn_inferior)
11465         (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
11466         (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
11467         (init_sol_thread_ops): Delete.
11468         (_initialize_sol_thread): Adjust.  Remove references to
11469         init_sol_thread_ops and complete_target_initialization.
11470
11471         * windows-nat.c (windows_nat_target): New class.
11472         (windows_fetch_inferior_registers)
11473         (windows_store_inferior_registers, windows_resume, windows_wait)
11474         (windows_attach, windows_detach, windows_pid_to_exec_file)
11475         (windows_files_info, windows_create_inferior)
11476         (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
11477         (windows_close, windows_pid_to_str, windows_xfer_partial)
11478         (windows_get_tib_address, windows_get_ada_task_ptid)
11479         (windows_thread_name, windows_thread_alive): Refactor as
11480         windows_nat_target methods.
11481         (do_initial_windows_stuff): Adjust.
11482         (windows_target): Delete function.
11483         (_initialize_windows_nat): Adjust.
11484
11485         * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
11486         (darwin_mourn_inferior, darwin_kill_inferior)
11487         (darwin_create_inferior, darwin_attach, darwin_detach)
11488         (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
11489         (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
11490         (darwin_supports_multi_process): Refactor as darwin_nat_target
11491         methods.
11492         (darwin_resume_to, darwin_files_info): Delete.
11493         (_initialize_darwin_inferior): Rename to ...
11494         (_initialize_darwin_nat): ... this.  Adjust to C++ification.
11495         * darwin-nat.h: Include "inf-child.h".
11496         (darwin_nat_target): New class.
11497         (darwin_complete_target): Delete.
11498         * i386-darwin-nat.c (i386_darwin_nat_target): New class.
11499         (darwin_target): New.
11500         (i386_darwin_fetch_inferior_registers)
11501         (i386_darwin_store_inferior_registers): Refactor as methods of
11502         darwin_nat_target.
11503         (darwin_complete_target): Delete, with ...
11504         (_initialize_i386_darwin_nat): ... bits factored out here.
11505
11506         * alpha-linux-nat.c (alpha_linux_nat_target): New class.
11507         (the_alpha_linux_nat_target): New.
11508         (alpha_linux_register_u_offset): Refactor as
11509         alpha_linux_nat_target method.
11510         (_initialize_alpha_linux_nat): Adjust.
11511         * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
11512         (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
11513         (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
11514         methods of linux_nat_trad_target.
11515         (linux_trad_target): Delete.
11516         * linux-nat-trad.h (linux_trad_target): Delete function.
11517         (linux_nat_trad_target): New class.
11518         * mips-linux-nat.c (mips_linux_nat_target): New class.
11519         (super_fetch_registers, super_store_registers, super_close):
11520         Delete.
11521         (the_mips_linux_nat_target): New.
11522         (mips64_linux_regsets_fetch_registers)
11523         (mips64_linux_regsets_store_registers)
11524         (mips64_linux_fetch_registers, mips64_linux_store_registers)
11525         (mips_linux_register_u_offset, mips_linux_read_description)
11526         (mips_linux_can_use_hw_breakpoint)
11527         (mips_linux_stopped_by_watchpoint)
11528         (mips_linux_stopped_data_address)
11529         (mips_linux_region_ok_for_hw_watchpoint)
11530         (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
11531         (mips_linux_close): Refactor as methods of mips_linux_nat.
11532         (_initialize_mips_linux_nat): Adjust to C++ification.
11533
11534         * aix-thread.c (aix_thread_target): New class.
11535         (aix_thread_ops): Now an aix_thread_target.
11536         (aix_thread_detach, aix_thread_resume, aix_thread_wait)
11537         (aix_thread_fetch_registers, aix_thread_store_registers)
11538         (aix_thread_xfer_partial, aix_thread_mourn_inferior)
11539         (aix_thread_thread_alive, aix_thread_pid_to_str)
11540         (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
11541         Refactor as methods of aix_thread_target.
11542         (init_aix_thread_ops): Delete.
11543         (_initialize_aix_thread): Remove references to init_aix_thread_ops
11544         and complete_target_initialization.
11545         * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
11546         (rs6000_nat_target): New class.
11547         (the_rs6000_nat_target): New.
11548         (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
11549         (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
11550         (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
11551         (super_create_inferior): Delete.
11552         (_initialize_rs6000_nat): Adjust to C++ification.
11553
11554         * arm-linux-nat.c (arm_linux_nat_target): New class.
11555         (the_arm_linux_nat_target): New.
11556         (arm_linux_fetch_inferior_registers)
11557         (arm_linux_store_inferior_registers, arm_linux_read_description)
11558         (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
11559         (arm_linux_remove_hw_breakpoint)
11560         (arm_linux_region_ok_for_hw_watchpoint)
11561         (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
11562         (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
11563         (arm_linux_watchpoint_addr_within_range): Refactor as methods of
11564         arm_linux_nat_target.
11565         (_initialize_arm_linux_nat): Adjust to C++ification.
11566
11567         * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
11568         (the_aarch64_linux_nat_target): New.
11569         (aarch64_linux_fetch_inferior_registers)
11570         (aarch64_linux_store_inferior_registers)
11571         (aarch64_linux_child_post_startup_inferior)
11572         (aarch64_linux_read_description)
11573         (aarch64_linux_can_use_hw_breakpoint)
11574         (aarch64_linux_insert_hw_breakpoint)
11575         (aarch64_linux_remove_hw_breakpoint)
11576         (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
11577         (aarch64_linux_region_ok_for_hw_watchpoint)
11578         (aarch64_linux_stopped_data_address)
11579         (aarch64_linux_stopped_by_watchpoint)
11580         (aarch64_linux_watchpoint_addr_within_range)
11581         (aarch64_linux_can_do_single_step): Refactor as methods of
11582         aarch64_linux_nat_target.
11583         (super_post_startup_inferior): Delete.
11584         (_initialize_aarch64_linux_nat): Adjust to C++ification.
11585
11586         * hppa-linux-nat.c (hppa_linux_nat_target): New class.
11587         (the_hppa_linux_nat_target): New.
11588         (hppa_linux_fetch_inferior_registers)
11589         (hppa_linux_store_inferior_registers): Refactor as methods of
11590         hppa_linux_nat_target.
11591         (_initialize_hppa_linux_nat): Adjust to C++ification.
11592
11593         * ia64-linux-nat.c (ia64_linux_nat_target): New class.
11594         (the_ia64_linux_nat_target): New.
11595         (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
11596         (ia64_linux_stopped_data_address)
11597         (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
11598         (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
11599         ia64_linux_nat_target methods.
11600         (super_xfer_partial): Delete.
11601         (_initialize_ia64_linux_nat): Adjust to C++ification.
11602
11603         * m32r-linux-nat.c (m32r_linux_nat_target): New class.
11604         (the_m32r_linux_nat_target): New.
11605         (m32r_linux_fetch_inferior_registers)
11606         (m32r_linux_store_inferior_registers): Refactor as
11607         m32r_linux_nat_target methods.
11608         (_initialize_m32r_linux_nat): Adjust to C++ification.
11609
11610         * m68k-linux-nat.c (m68k_linux_nat_target): New class.
11611         (the_m68k_linux_nat_target): New.
11612         (m68k_linux_fetch_inferior_registers)
11613         (m68k_linux_store_inferior_registers): Refactor as
11614         m68k_linux_nat_target methods.
11615         (_initialize_m68k_linux_nat): Adjust to C++ification.
11616
11617         * s390-linux-nat.c (s390_linux_nat_target): New class.
11618         (the_s390_linux_nat_target): New.
11619         (s390_linux_fetch_inferior_registers)
11620         (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
11621         (s390_insert_watchpoint, s390_remove_watchpoint)
11622         (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
11623         (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
11624         (s390_auxv_parse, s390_read_description): Refactor as methods of
11625         s390_linux_nat_target.
11626         (_initialize_s390_nat): Adjust to C++ification.
11627
11628         * sparc-linux-nat.c (sparc_linux_nat_target): New class.
11629         (the_sparc_linux_nat_target): New.
11630         (_initialize_sparc_linux_nat): Adjust to C++ification.
11631         * sparc-nat.c (sparc_fetch_inferior_registers)
11632         (sparc_store_inferior_registers): Remove target_ops parameter.
11633         * sparc-nat.h (sparc_fetch_inferior_registers)
11634         (sparc_store_inferior_registers): Remove target_ops parameter.
11635         * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
11636         (the_sparc64_linux_nat_target): New.
11637         (_initialize_sparc64_linux_nat): Adjust to C++ification.
11638
11639         * spu-linux-nat.c (spu_linux_nat_target): New class.
11640         (the_spu_linux_nat_target): New.
11641         (spu_child_post_startup_inferior, spu_child_post_attach)
11642         (spu_child_wait, spu_fetch_inferior_registers)
11643         (spu_store_inferior_registers, spu_xfer_partial)
11644         (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
11645         methods.
11646         (_initialize_spu_nat): Adjust to C++ification.
11647
11648         * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
11649         (the_tilegx_linux_nat_target): New.
11650         (fetch_inferior_registers, store_inferior_registers):
11651         Refactor as methods.
11652         (_initialize_tile_linux_nat): Adjust to C++ification.
11653
11654         * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
11655         (the_xtensa_linux_nat_target): New.
11656         (xtensa_linux_fetch_inferior_registers)
11657         (xtensa_linux_store_inferior_registers): Refactor as
11658         xtensa_linux_nat_target methods.
11659         (_initialize_xtensa_linux_nat): Adjust to C++ification.
11660
11661         * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
11662         (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
11663         (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
11664         (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
11665         (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
11666         (fbsd_stopped_by_sw_breakpoint)
11667         (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
11668         (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
11669         (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
11670         (fbsd_post_startup_inferior, fbsd_post_attach)
11671         (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
11672         (fbsd_set_syscall_catchpoint)
11673         (super_xfer_partial, super_resume, super_wait)
11674         (fbsd_supports_stopped_by_hw_breakpoint): Delete.
11675         (fbsd_handle_debug_trap): Remove target_ops parameter.
11676         (fbsd_nat_add_target): Delete.
11677         * fbsd-nat.h: Include "inf-ptrace.h".
11678         (fbsd_nat_add_target): Delete.
11679         (USE_SIGTRAP_SIGINFO): Define.
11680         (fbsd_nat_target): New class.
11681
11682         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
11683         (amd64bsd_store_inferior_registers): Remove target_ops parameter.
11684         (amd64bsd_target): Delete.
11685         * amd64-bsd-nat.h: New file.
11686         * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
11687         "x86-bsd-nat.h".
11688         (amd64_fbsd_nat_target): New class.
11689         (the_amd64_fbsd_nat_target): New.
11690         (amd64fbsd_read_description): Refactor as method of
11691         amd64_fbsd_nat_target.
11692         (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
11693         (_initialize_amd64fbsd_nat): Adjust to C++ification.
11694         * amd64-nat.h (amd64bsd_target): Delete function declaration.
11695         * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
11696         (i386bsd_store_inferior_registers): Remove target_ops parameter.
11697         (i386bsd_target): Delete.
11698         * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
11699         (i386bsd_fetch_inferior_registers)
11700         (i386bsd_store_inferior_registers): Declare.
11701         (i386_bsd_nat_target): New class.
11702         * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
11703         (the_i386_fbsd_nat_target): New.
11704         (i386fbsd_resume, i386fbsd_read_description): Refactor as
11705         i386_fbsd_nat_target methods.
11706         (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
11707         (_initialize_i386fbsd_nat): Adjust to C++ification.
11708         * x86-bsd-nat.c (super_mourn_inferior): Delete.
11709         (x86bsd_mourn_inferior, x86bsd_target): Delete.
11710         (_initialize_x86_bsd_nat): Adjust to C++ification.
11711         * x86-bsd-nat.h: Include "x86-nat.h".
11712         (x86bsd_target): Delete declaration.
11713         (x86bsd_nat_target): New class.
11714
11715         * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
11716         (the_aarch64_fbsd_nat_target): New.
11717         (aarch64_fbsd_fetch_inferior_registers)
11718         (aarch64_fbsd_store_inferior_registers): Refactor as methods of
11719         aarch64_fbsd_nat_target.
11720         (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
11721         * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
11722         (the_alpha_bsd_nat_target): New.
11723         (alphabsd_fetch_inferior_registers)
11724         (alphabsd_store_inferior_registers): Refactor as
11725         alpha_bsd_nat_target methods.
11726         (_initialize_alphabsd_nat): Refactor as methods of
11727         alpha_bsd_nat_target.
11728         * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
11729         (the_amd64_nbsd_nat_target): New.
11730         (_initialize_amd64nbsd_nat): Adjust to C++ification.
11731         * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
11732         (the_amd64_obsd_nat_target): New.
11733         (_initialize_amd64obsd_nat): Adjust to C++ification.
11734         * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
11735         (the_arm_fbsd_nat_target): New.
11736         (arm_fbsd_fetch_inferior_registers)
11737         (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
11738         (_initialize_arm_fbsd_nat): Refactor as methods of
11739         arm_fbsd_nat_target.
11740         (_initialize_arm_fbsd_nat): Adjust to C++ification.
11741         * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
11742         (the_arm_netbsd_nat_target): New.
11743         (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
11744         arm_netbsd_nat_target.
11745         (_initialize_arm_netbsd_nat): Adjust to C++ification.
11746         * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
11747         (the_hppa_nbsd_nat_target): New.
11748         (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
11749         hppa_nbsd_nat_target methods.
11750         (_initialize_hppanbsd_nat): Adjust to C++ification.
11751         * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
11752         (the_hppa_obsd_nat_target): New.
11753         (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
11754         methods of hppa_obsd_nat_target.
11755         (_initialize_hppaobsd_nat): Adjust to C++ification.  Use
11756         add_target.
11757         * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
11758         (_initialize_i386nbsd_nat): Adjust to C++ification.  Use
11759         add_target.
11760         * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
11761         (_initialize_i386obsd_nat): Use add_target.
11762         * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
11763         (the_m68k_bsd_nat_target): New.
11764         (m68kbsd_fetch_inferior_registers)
11765         (m68kbsd_store_inferior_registers): Refactor as methods of
11766         m68k_bsd_nat_target.
11767         (_initialize_m68kbsd_nat): Adjust to C++ification.
11768         * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
11769         (the_mips_fbsd_nat_target): New.
11770         (mips_fbsd_fetch_inferior_registers)
11771         (mips_fbsd_store_inferior_registers): Refactor as methods of
11772         mips_fbsd_nat_target.
11773         (_initialize_mips_fbsd_nat): Adjust to C++ification.  Use
11774         add_target.
11775         * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
11776         (the_mips_nbsd_nat_target): New.
11777         (mipsnbsd_fetch_inferior_registers)
11778         (mipsnbsd_store_inferior_registers): Refactor as methods of
11779         mips_nbsd_nat_target.
11780         (_initialize_mipsnbsd_nat): Adjust to C++ification.
11781         * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
11782         (the_mips64_obsd_nat_target): New.
11783         (mips64obsd_fetch_inferior_registers)
11784         (mips64obsd_store_inferior_registers): Refactor as methods of
11785         mips64_obsd_nat_target.
11786         (_initialize_mips64obsd_nat): Adjust to C++ification.  Use
11787         add_target.
11788         * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
11789         nbsd_nat_target.
11790         * nbsd-nat.h: Include "inf-ptrace.h".
11791         (nbsd_nat_target): New class.
11792         * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
11793         (obsd_wait): Refactor as methods of obsd_nat_target.
11794         (obsd_add_target): Delete.
11795         * obsd-nat.h: Include "inf-ptrace.h".
11796         (obsd_nat_target): New class.
11797         * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
11798         (the_ppc_fbsd_nat_target): New.
11799         (ppcfbsd_fetch_inferior_registers)
11800         (ppcfbsd_store_inferior_registers): Refactor as methods of
11801         ppc_fbsd_nat_target.
11802         (_initialize_ppcfbsd_nat): Adjust to C++ification.  Use
11803         add_target.
11804         * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
11805         (the_ppc_nbsd_nat_target): New.
11806         (ppcnbsd_fetch_inferior_registers)
11807         (ppcnbsd_store_inferior_registers): Refactor as methods of
11808         ppc_nbsd_nat_target.
11809         (_initialize_ppcnbsd_nat): Adjust to C++ification.
11810         * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
11811         (the_ppc_obsd_nat_target): New.
11812         (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
11813         methods of ppc_obsd_nat_target.
11814         (_initialize_ppcobsd_nat): Adjust to C++ification.  Use
11815         add_target.
11816         * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
11817         (the_sh_nbsd_nat_target): New.
11818         (shnbsd_fetch_inferior_registers)
11819         (shnbsd_store_inferior_registers): Refactor as methods of
11820         sh_nbsd_nat_target.
11821         (_initialize_shnbsd_nat): Adjust to C++ification.
11822         * sparc-nat.c (sparc_xfer_wcookie): Make extern.
11823         (inf_ptrace_xfer_partial): Delete.
11824         (sparc_xfer_partial, sparc_target): Delete.
11825         * sparc-nat.h (sparc_fetch_inferior_registers)
11826         (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
11827         (sparc_target): Delete function declaration.
11828         (sparc_target): New template class.
11829         * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
11830         (_initialize_sparcnbsd_nat): Adjust to C++ification.
11831         * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
11832         (_initialize_sparc64fbsd_nat): Adjust to C++ification.  Use
11833         add_target.
11834         * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
11835         (_initialize_sparc64nbsd_nat): Adjust to C++ification.
11836         * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
11837         (_initialize_sparc64obsd_nat): Adjust to C++ification.  Use
11838         add_target.
11839         * vax-bsd-nat.c (vax_bsd_nat_target): New class.
11840         (the_vax_bsd_nat_target): New.
11841         (vaxbsd_fetch_inferior_registers)
11842         (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
11843         methods.
11844         (_initialize_vaxbsd_nat): Adjust to C++ification.
11845
11846         * bsd-kvm.c (bsd_kvm_target): New class.
11847         (bsd_kvm_ops): Now a bsd_kvm_target.
11848         (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
11849         (bsd_kvm_files_info, bsd_kvm_fetch_registers)
11850         (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
11851         bsd_kvm_target.
11852         (bsd_kvm_return_one): Delete.
11853         (bsd_kvm_add_target): Adjust to C++ification.
11854
11855         * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
11856         (nto_procfs_target_procfs): New classes.
11857         (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
11858         (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
11859         (procfs_post_attach, procfs_wait, procfs_fetch_registers)
11860         (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
11861         (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
11862         (procfs_remove_hw_breakpoint, procfs_resume)
11863         (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
11864         (procfs_kill_inferior, procfs_store_registers)
11865         (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
11866         as methods of nto_procfs_target.
11867         (nto_procfs_ops): Now an nto_procfs_target_procfs.
11868         (nto_native_ops): Delete.
11869         (procfs_open, procfs_native_open): Delete.
11870         (nto_native_ops): Now an nto_procfs_target_native.
11871         (init_procfs_targets): Adjust to C++ification.
11872         (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
11873         (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
11874         Refactor as methods of nto_procfs_target.
11875
11876         * go32-nat.c (go32_nat_target): New class.
11877         (the_go32_nat_target): New.
11878         (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
11879         (go32_store_registers, go32_xfer_partial, go32_files_info)
11880         (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
11881         (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
11882         (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
11883         (go32_pid_to_str): Refactor as methods of go32_nat_target.
11884         (go32_target): Delete.
11885         (_initialize_go32_nat): Adjust to C++ification.
11886
11887         * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
11888         (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
11889         (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
11890         (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
11891         gnu_nat_target.
11892         (gnu_target): Delete.
11893         * gnu-nat.h (gnu_target): Delete.
11894         (gnu_nat_target): New class.
11895         * i386-gnu-nat.c (gnu_base_target): New.
11896         (i386_gnu_nat_target): New class.
11897         (the_i386_gnu_nat_target): New.
11898         (_initialize_i386gnu_nat): Adjust to C++ification.
11899
11900 2018-05-02  Pedro Alves  <palves@redhat.com>
11901
11902         * bfd-target.c (target_bfd_xclose): Rename to ...
11903         (target_bfd_close): ... this.
11904         (target_bfd_reopen): Adjust.
11905         * target.c (target_close): Remove references to to_xclose.
11906         * target.h (target_ops::to_xclose): Delete.
11907         (target_ops::to_close): Update comments.
11908
11909 2018-05-02  Pedro Alves  <palves@redhat.com>
11910
11911         * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
11912         "linux-nat.h".
11913         * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
11914         * inf-ptrace.c (inf_ptrace_register_u_offset)
11915         (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
11916         (inf_ptrace_store_register, inf_ptrace_store_registers)
11917         (inf_ptrace_trad_target): Move to ...
11918         * linux-nat-trad.c: ... this new file.
11919         * linux-nat-trad.h: New file.
11920         * linux-nat.c (linux_target_install_ops): Make extern.
11921         (linux_trad_target): Delete.
11922         * linux-nat.h (linux_trad_target): Delete declaration.
11923         (linux_target_install_ops): Declare.
11924         * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
11925         "linux-nat.h".
11926
11927 2018-05-02  Pedro Alves  <palves@redhat.com>
11928
11929         * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
11930         procfs_target/add_target here.
11931         * procfs.c (procfs_target): Make static.
11932         (_initialize_procfs): Call add_target here.
11933         * procfs.h (struct target_ops): Remove forward declaration.
11934         (procfs_target): Remove declaration.
11935         * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
11936
11937 2018-05-02  Pedro Alves  <palves@redhat.com>
11938
11939         * procfs.c (procfs_stopped_by_watchpoint)
11940         (procfs_insert_watchpoint, procfs_remove_watchpoint)
11941         (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
11942         Forward declare.
11943         (procfs_use_watchpoints): Delete, move contents...
11944         (procfs_target): ... here.
11945         * procfs.h (procfs_use_watchpoints): Delete declaration.
11946         * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
11947         procfs_use_watchpoints.
11948         * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
11949         procfs_use_watchpoints.
11950
11951 2018-05-02  Tom Tromey  <tom@tromey.com>
11952
11953         PR python/20084:
11954         * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
11955         and var_zuinteger_unlimited.
11956         * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
11957         and PARAM_ZUINTEGER_UNLIMITED.
11958         (set_parameter_value): Handle var_zuinteger and
11959         var_zuinteger_unlimited.
11960         (add_setshow_generic): Likewise.
11961         (parmpy_init): Likewise.
11962
11963 2018-04-28  Dan Robertson  <danlrobertson89@gmail.com>
11964
11965         PR rust/23124
11966         * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
11967         pointer is not null before dereferencing it.
11968
11969 2018-04-30  Tom Tromey  <tom@tromey.com>
11970
11971         * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
11972         is_mi_like_p.
11973
11974 2018-04-30  Tom Tromey  <tom@tromey.com>
11975
11976         * breakpoint.c (mention): Remove use of is_mi_like_p.
11977         (print_mention_ranged_breakpoint): Likewise.
11978         * break-catch-throw.c (print_it_exception_catchpoint): Remove use
11979         of is_mi_like_p.
11980
11981 2018-04-30  Tom Tromey  <tom@tromey.com>
11982
11983         * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
11984
11985 2018-04-30  Tom Tromey  <tom@tromey.com>
11986
11987         * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
11988         (info_spu_event_command): Remove some uses of is_mi_like_p.
11989
11990 2018-04-30  Tom Tromey  <tom@tromey.com>
11991
11992         * python/py-framefilter.c (py_print_single_arg)
11993         (enumerate_locals, py_print_args, py_print_frame): Remove some
11994         uses of is_mi_like_p.
11995
11996 2018-04-30  Tom Tromey  <tom@tromey.com>
11997
11998         * ui-out.c: Update.
11999         * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
12000         * ui-out.h (ui_out::is_mi_like_p): Now const.
12001         (ui_out::do_is_mi_like_p): Now const.
12002         * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
12003
12004 2018-04-30  Tom Tromey  <tom@tromey.com>
12005
12006         * varobj.c (varobj_set_visualizer): Use new_reference.
12007         * python/python.c (gdbpy_decode_line): Use new_reference.
12008         * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
12009         new_reference.
12010
12011 2018-04-30  Tom Tromey  <tom@tromey.com>
12012
12013         * varobj.c (install_new_value): Use new_reference.
12014         * value.h (value_incref): Return void.  Swap intro comment with
12015         value_decref.
12016         * value.c (set_value_parent): Use new_reference.
12017         (value_incref): Return void.  Update intro comment.
12018         (release_value): Use new_reference.
12019         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
12020
12021 2018-04-30  Tom Tromey  <tom@tromey.com>
12022
12023         * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
12024         * gdb_bfd.h (new_bfd_ref): Remove.
12025         (gdb_bfd_open): Update comment.
12026         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
12027         (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
12028         (gdb_bfd_fdopenr): Use new_reference.
12029         * exec.c (exec_file_attach): Use new_reference.
12030
12031 2018-04-30  Tom Tromey  <tom@tromey.com>
12032
12033         * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
12034         method.
12035
12036 2018-04-30  Tom Tromey  <tom@tromey.com>
12037
12038         * jit.c (jit_read_code_entry): Use type_align.
12039         * i386-tdep.c (i386_gdbarch_init): Don't call
12040         set_gdbarch_long_long_align_bit.
12041         * gdbarch.sh: Remove long_long_align_bit.
12042         * gdbarch.c, gdbarch.h: Rebuild.
12043         * arc-tdep.c (arc_type_align): New function.
12044         (arc_gdbarch_init): Use arc_type_align.  Don't call
12045         set_gdbarch_long_long_align_bit.
12046
12047 2018-04-30  Tom Tromey  <tom@tromey.com>
12048
12049         * rust-lang.c (rust_type_alignment): Remove.
12050         (rust_composite_type): Use type_align.
12051
12052 2018-04-30  Tom Tromey  <tom@tromey.com>
12053
12054         * NEWS: Mention Type.align.
12055         * python/py-type.c (typy_get_alignof): New function.
12056         (type_object_getset): Add "alignof".
12057
12058 2018-04-30  Tom Tromey  <tom@tromey.com>
12059
12060         PR exp/17095:
12061         * NEWS: Update.
12062         * std-operator.def (UNOP_ALIGNOF): New operator.
12063         * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
12064         New.
12065         * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
12066         * c-lang.c (c_op_print_tab): Add alignof.
12067         * c-exp.y (ALIGNOF): New token.
12068         (exp): Add "ALIGNOF" production.
12069         (ident_tokens): Add _Alignof and alignof.
12070
12071 2018-04-30  Tom Tromey  <tom@tromey.com>
12072
12073         * i386-tdep.c (i386_type_align): New function.
12074         (i386_gdbarch_init): Update.
12075         * gdbarch.sh (type_align): New method.
12076         * gdbarch.c, gdbarch.h: Rebuild.
12077         * arch-utils.h (default_type_align): Declare.
12078         * arch-utils.c (default_type_align): New function.
12079         * gdbtypes.h (TYPE_ALIGN_BITS): New define.
12080         (struct type) <align_log2>: New field.
12081         <instance_flags>: Now a bitfield.
12082         (TYPE_RAW_ALIGN): New macro.
12083         (type_align, type_raw_align, set_type_align): Declare.
12084         * gdbtypes.c (type_align, type_raw_align, set_type_align): New
12085         functions.
12086         * dwarf2read.c (quirk_rust_enum): Set type alignment.
12087         (get_alignment, maybe_set_alignment): New functions.
12088         (read_structure_type, read_enumeration_type, read_array_type)
12089         (read_set_type, read_tag_pointer_type, read_tag_reference_type)
12090         (read_subrange_type, read_base_type): Set type alignment.
12091
12092 2018-04-30  Simon Marchi  <simon.marchi@ericsson.com>
12093
12094         * dwarf2read.c (read_index_from_section): Use bool.
12095
12096 2018-04-29  Fabian Groffen  <grobian@gentoo.org>
12097
12098         PR gdb/22950
12099         * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
12100         with #ifdef.
12101
12102 2018-04-29  John Reiser  <jreiser@BitWagon.com>
12103
12104         PR build/22873
12105         * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
12106         last step, and do it atomically.
12107
12108 2018-04-27  Alexandre Oliva  <aoliva@redhat.com>
12109
12110         * compile/compile-c-types.c (convert_int, convert_float):
12111         Update for C FE v1.
12112
12113 2018-04-27  Tom Tromey  <tom@tromey.com>
12114
12115         PR rust/22545:
12116         * rust-lang.c (rust_inclusive_range_type_p): New function.
12117         (rust_range): Handle inclusive ranges.
12118         (rust_compute_range): Likewise.
12119         * rust-exp.y (struct rust_op) <inclusive>: New field.
12120         (DOTDOTEQ): New constant.
12121         (range_expr): Add "..=" productions.
12122         (operator_tokens): Add "..=" token.
12123         (ast_range): Add "inclusive" parameter.
12124         (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
12125         ranges.
12126         * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
12127         bounds values.
12128         * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
12129         LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
12130         Update comments.
12131         * expprint.c (print_subexp_standard): Handle new bounds values.
12132         (dump_subexp_body_standard): Likewise.
12133
12134 2018-04-27  Tom Tromey  <tom@tromey.com>
12135
12136         * configure: Rebuild.
12137         * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
12138         * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
12139         "OVERRIDE".
12140         (class symbol_needs_eval_context): Likewise.
12141         * dwarf2read.c (mock_mapped_index::symbol_name_count)
12142         (mock_mapped_index::symbol_name_at): Use "override".  Remove
12143         "virtual".
12144         * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
12145         "override".
12146         (class dwarf_expr_executor): Use "override", not "OVERRIDE".
12147         * aarch64-tdep.c (instruction_reader::read): Use "override".
12148         (instruction_reader_test::read): Likewise.
12149         * arm-tdep.c (instruction_reader::read): Use "override".
12150         (instruction_reader_thumb::read): Likewise.
12151
12152 2018-04-26  Andrzej Kaczmarek  <andrzej.kaczmarek@codecoup.pl>
12153
12154         PR remote/9665
12155         * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
12156         instead of remote_send.
12157         (remote_send): Remove.
12158
12159 2018-04-26  Pedro Alves  <palves@redhat.com>
12160
12161         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
12162         find_function_start_sal instead of find_pc_line.
12163
12164 2018-04-26  Pedro Alves  <palves@redhat.com>
12165
12166         * breakpoint.c (set_breakpoint_location_function): Handle
12167         mst_data_gnu_ifunc.
12168         * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
12169         * elfread.c (elf_symtab_read): Give data symbols with
12170         BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
12171         (elf_rel_plt_read): Update comment.
12172         * linespec.c (convert_linespec_to_sals): Handle
12173         mst_data_gnu_ifunc.
12174         (minsym_found): Handle mst_data_gnu_ifunc.
12175         * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
12176         (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
12177         * parse.c (find_minsym_type_and_address): Handle
12178         mst_data_gnu_ifunc.
12179         * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
12180         * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
12181         * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
12182         comment.
12183         <mst_data_gnu_ifunc>: New enumerator.
12184
12185 2018-04-26  Pedro Alves  <palves@redhat.com>
12186
12187         * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
12188         (lookup_minimal_symbol_by_pc_section): ... this.  Replace
12189         'want_trampoline' parameter by a lookup_msym_prefer parameter.
12190         Handle it.
12191         (lookup_minimal_symbol_by_pc_section): Delete old implementation.
12192         (lookup_minimal_symbol_by_pc): Adjust.
12193         (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
12194         (lookup_solib_trampoline_symbol_by_pc): Adjust.
12195         * minsyms.h (lookup_msym_prefer): New enum.
12196         (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
12197         parameter by a lookup_msym_prefer parameter.
12198
12199 2018-04-26  Pedro Alves  <palves@redhat.com>
12200
12201         * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
12202         ends in "@plt" instead of looking at the symbol's section.
12203
12204 2018-04-26  Pedro Alves  <palves@redhat.com>
12205
12206         * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete.  Remove
12207         all references.
12208         (find_pc_partial_function_gnu_ifunc): Rename to ...
12209         (find_pc_partial_function): ... this, and remove references to
12210         'is_gnu_ifunc_p'.
12211         (find_pc_partial_function): Delete old implementation.
12212         * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
12213
12214 2018-04-26  Pedro Alves  <palves@redhat.com>
12215
12216         * linespec.c (struct bound_minimal_symbol_search_key): New.
12217         (convert_linespec_to_sals): Sort minimal symbols earlier.  Don't
12218         skip first line if we found a GNU ifunc minimal symbol by name.
12219         (compare_msymbols): Change parameters to work with a destructured
12220         lhs minsym.
12221         (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
12222         functions.
12223
12224 2018-04-26  Pedro Alves  <palves@redhat.com>
12225
12226         * breakpoint.c (set_breakpoint_location_function): Don't resolve
12227         ifunc targets here.  Instead, if we have an ifunc minsym, use its
12228         address/name.
12229         (add_location_to_breakpoint): Store the minsym and the objfile in
12230         the breakpoint location.
12231         * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
12232         * linespec.c (minsym_found): Resolve GNU ifunc targets here.
12233         Record the minsym in the sal.
12234         * symtab.h (symtab_and_line) <msymbol>: New field.
12235
12236 2018-04-26  Pedro Alves  <palves@redhat.com>
12237
12238         * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
12239         unless we actually resolved the ifunc.
12240
12241 2018-04-26  Pedro Alves  <palves@redhat.com>
12242
12243         * c-exp.y (variable production): Prefer ifunc minsyms over
12244         regular function symbols.
12245         * symtab.c (find_gnu_ifunc): New function.
12246         * minsyms.h (lookup_msym_prefer): New enum.
12247         (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
12248         parameter by a lookup_msym_prefer parameter.
12249         * symtab.h (find_gnu_ifunc): New declaration.
12250
12251 2018-04-26  Pedro Alves  <palves@redhat.com>
12252
12253         * blockframe.c (find_gnu_ifunc_target_type): New function.
12254         (find_function_type): New.
12255         * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
12256         return a value with a memory address.
12257         (eval_call): For calls to GNU ifunc functions, try to find the
12258         type of the target function from the type that the resolver
12259         returns.
12260         * gdbtypes.c (objfile_type): Don't install a return type for ifunc
12261         symbols.
12262         * infcall.c (find_function_return_type): Delete.
12263         (find_function_addr): Add 'function_type' parameter.  For calls to
12264         GNU ifunc functions, try to find the type of the target function
12265         from the type that the resolver returns, and return it via
12266         FUNCTION_TYPE.
12267         (call_function_by_hand_dummy): Adjust to use the function type
12268         returned by find_function_addr.
12269         (find_function_addr): Add 'function_type' parameter and move
12270         description here.
12271         * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
12272         declarations.
12273
12274 2018-04-26  Pedro Alves  <palves@redhat.com>
12275
12276         * c-exp.y (variable production): Skip finding an alias for ifunc
12277         symbols.
12278
12279 2018-04-26  Pedro Alves  <palves@redhat.com>
12280
12281         * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
12282
12283 2018-04-25  Pedro Alves  <palves@redhat.com>
12284
12285         * infcmd.c (kill_command): Print the pid as string, not the whole
12286         thread's ptid.  Add comment.  s/has been killed/killed/ in output
12287         message.
12288         * remote.c (remote_detach_1): Print the pid as string, not the
12289         whole thread's ptid.
12290
12291 2018-04-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
12292             Sergio Durigan Junior  <sergiodj@redhat.com>
12293             Pedro Alves  <palves@redhat.com>
12294
12295         * infcmd.c (kill_command): Print message when inferior has
12296         been killed.
12297         * inferior.c (print_inferior_events): Remove 'static'.  Set as
12298         '1'.
12299         (add_inferior): Improve message printed when
12300         'print_inferior_events' is on.
12301         (exit_inferior): Remove message printed when
12302         'print_inferior_events' is on.
12303         (detach_inferior): Improve message printed when
12304         'print_inferior_events' is on.
12305         (initialize_inferiors): Use 'add_inferior_silent' to set
12306         'current_inferior_'.
12307         * inferior.h (print_inferior_events): Declare here as
12308         'extern'.
12309         * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
12310         '[Detaching...]' messages when 'print_inferior_events' is on.
12311         Use 'add_thread_silent' instead of 'add_thread'.  Add '[' and ']'
12312         as prefix/suffix for messages.  Remove periods.  Fix erroneous
12313         'Detaching after fork from child...', replace it by '... from
12314         parent...'.
12315         (handle_vfork_child_exec_or_exit): Add '[' and ']' as
12316         prefix/suffix when printing 'Detaching...' messages.  Print
12317         them when 'print_inferior_events' is on.
12318         * remote.c (remote_detach_1): Print message when detaching
12319         from inferior and '!is_fork_parent'.
12320
12321 2018-04-24  Tom Tromey  <tom@tromey.com>
12322
12323         * cli-out.h: Reindent.
12324
12325 2018-04-24  Tom Tromey  <tom@tromey.com>
12326
12327         * cli-out.c (cli_ui_out::out_field_fmt): Remove.
12328         (cli_ui_out::do_field_string): Use fputs_filtered.
12329         * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
12330
12331 2018-04-23  Tom Tromey  <tom@tromey.com>
12332
12333         * guile/scm-frame.c (gdbscm_frame_read_var): Use
12334         gdb::unique_xmalloc_ptr.
12335
12336 2018-04-23  Tom Tromey  <tom@tromey.com>
12337
12338         * configure: Rebuild.
12339
12340 2018-04-22  Rajendra SY  <rajendra.sy@gmail.com>
12341
12342         PR gdb/23095
12343         * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
12344         prepare_for_testing.  Set normal_bp to r_debug_state if target
12345         is bsd.
12346
12347 2018-04-21  Pedro Alves  <palves@redhat.com>
12348             Rajendra SY  <rajendra.sy@gmail.com>
12349
12350         * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
12351         * remote.c (extended_remote_attach): In all-stop mode, mark the
12352         thread as executing.
12353
12354 2018-04-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
12355
12356         * thread.c (thread_apply_all_command): Fix comment.
12357         (thread_command): Fix comment.
12358
12359 2018-04-10  Alan Hayward  <alan.hayward@arm.com>
12360
12361         * common/tdesc.h (tdesc_create_feature): Remove xml filename
12362         parameter.
12363         * features/aarch64-core.c (create_feature_aarch64_core):
12364         Regenerate.
12365         * features/aarch64-fpu.c (create_feature_aarch64_fpu):
12366         Likewise.
12367         * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
12368         Likewise.
12369         * features/i386/32bit-avx512.c
12370         (create_feature_i386_32bit_avx512): Likewise.
12371         * features/i386/32bit-core.c (create_feature_i386_32bit_core):
12372         Likewise.
12373         * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
12374         Likewise.
12375         * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
12376         Likewise.
12377         * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
12378         Likewise.
12379         * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
12380         Likewise.
12381         * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
12382         Likewise.
12383         * features/i386/64bit-avx512.c
12384         (create_feature_i386_64bit_avx512): Likewise.
12385         * features/i386/64bit-core.c (create_feature_i386_64bit_core):
12386         Likewise.
12387         * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
12388         Likewise.
12389         * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
12390         Likewise.
12391         * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
12392         Likewise.
12393         * features/i386/64bit-segments.c
12394         (create_feature_i386_64bit_segments): Likewise.
12395         * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
12396         Likewise.
12397         * features/i386/x32-core.c
12398         (create_feature_i386_x32_core): Likewise.
12399         * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
12400         * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
12401         * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
12402         * target-descriptions.c: In generated code, don't pass xml
12403         filename.
12404
12405 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
12406
12407         * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
12408         (print_xml_feature::visit_post): Likewise.
12409         (print_xml_feature::visit): Likewise.
12410         * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
12411         (print_xml_feature): Add new class.
12412         * regformats/regdat.sh: Null xmltarget on feature targets.
12413         * target-descriptions.c (struct target_desc): Add xmltarget.
12414         (maintenance_check_tdesc_xml_convert): Add unittest function.
12415         (tdesc_get_features_xml): Add function to get xml.
12416         (maintenance_check_xml_descriptions): Test xml generation.
12417         * xml-tdesc.c (string_read_description_xml): Add function.
12418         * xml-tdesc.h (string_read_description_xml): Add declaration.
12419
12420 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
12421
12422         * features/Makefile: Add feature marker to targets with new style
12423         target descriptions.
12424         * regformats/aarch64.dat: Regenerate.
12425         * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
12426         * regformats/i386/amd64-avx-linux.dat: Likewise.
12427         * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
12428         * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
12429         * regformats/i386/amd64-linux.dat: Likewise.
12430         * regformats/i386/amd64-mpx-linux.dat: Likewise.
12431         * regformats/i386/amd64.dat: Likewise.
12432         * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
12433         * regformats/i386/i386-avx-linux.dat: Likewise.
12434         * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
12435         * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
12436         * regformats/i386/i386-linux.dat: Likewise.
12437         * regformats/i386/i386-mmx-linux.dat: Likewise.
12438         * regformats/i386/i386-mpx-linux.dat: Likewise.
12439         * regformats/i386/i386.dat: Likewise.
12440         * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
12441         * regformats/i386/x32-avx-linux.dat: Likewise.
12442         * regformats/i386/x32-linux.dat: Likewise.
12443         * regformats/tic6x-c62x-linux.dat: Likewise.
12444         * regformats/tic6x-c64x-linux.dat: Likewise.
12445         * regformats/tic6x-c64xp-linux.dat: Likewise.
12446         * regformats/regdat.sh: Parse feature marker.
12447
12448 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
12449
12450         * common/tdesc.h (tdesc_architecture_name): Add new declaration.
12451         (tdesc_osabi_name): Likewise.
12452         * target-descriptions.c (tdesc_architecture_name): Add new
12453         function.
12454         (tdesc_osabi_name): Likewise.
12455
12456 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
12457
12458         * common/tdesc.c (tdesc_predefined_type): Move to here.
12459         (tdesc_named_type): Likewise.
12460         (tdesc_create_vector): Likewise.
12461         (tdesc_create_struct): Likewise.
12462         (tdesc_set_struct_size): Likewise.
12463         (tdesc_create_union): Likewise.
12464         (tdesc_create_flags): Likewise.
12465         (tdesc_create_enum): Likewise.
12466         (tdesc_add_field): Likewise.
12467         (tdesc_add_typed_bitfield): Likewise.
12468         (tdesc_add_bitfield): Likewise.
12469         (tdesc_add_flag): Likewise.
12470         (tdesc_add_enum_value): Likewise.
12471         * common/tdesc.h (struct tdesc_type_builtin): Likewise.
12472         (struct tdesc_type_vector): Likewise.
12473         (struct tdesc_type_field): Likewise.
12474         (struct tdesc_type_with_fields): Likewise.
12475         (tdesc_create_enum): Add declaration.
12476         (tdesc_add_typed_bitfield): Likewise.
12477         (tdesc_add_enum_value): Likewise.
12478         * target-descriptions.c (tdesc_type_field): Move from here.
12479         (tdesc_type_builtin): Likewise.
12480         (tdesc_type_vector): Likewise.
12481         (tdesc_type_with_fields): Likewise.
12482         (tdesc_predefined_types): Likewise.
12483         (tdesc_named_type): Likewise.
12484         (tdesc_create_vector): Likewise.
12485         (tdesc_create_struct): Likewise.
12486         (tdesc_set_struct_size): Likewise.
12487         (tdesc_create_union): Likewise.
12488         (tdesc_create_flags): Likewise.
12489         (tdesc_create_enum): Likewise.
12490         (tdesc_add_field): Likewise.
12491         (tdesc_add_typed_bitfield): Likewise.
12492         (tdesc_add_bitfield): Likewise.
12493         (tdesc_add_flag): Likewise.
12494         (tdesc_add_enum_value): Likewise.
12495         * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
12496         (tdesc_add_typed_bitfield): Likewise.
12497         (tdesc_add_enum_value): Likewise.
12498
12499 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
12500
12501         * common/tdesc.c (tdesc_feature::accept): Move to here.
12502         (tdesc_feature::operator==): Likewise.
12503         (tdesc_create_reg): Likewise.
12504         * common/tdesc.h (tdesc_type_kind): Likewise.
12505         (struct tdesc_type): Likewise.
12506         (struct tdesc_feature): Likewise.
12507         * regformats/regdat.sh: Create a feature.
12508         * target-descriptions.c (tdesc_type_kind): Move from here.
12509         (tdesc_type): Likewise.
12510         (tdesc_type_up): Likewise.
12511         (tdesc_feature): Likewise.
12512         (tdesc_create_reg): Likewise.
12513
12514 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
12515
12516         * Makefile.in: Add arch/tdesc.c
12517         * common/tdesc.c: New file.
12518         * common/tdesc.h (tdesc_element_visitor): Move to here.
12519         (tdesc_element): Likewise.
12520         (tdesc_reg): Likewise.
12521         (tdesc_reg_up): Likewise.
12522         * regformats/regdef.h (reg): Add offset to constructors.
12523         * target-descriptions.c (tdesc_element_visitor): Move from here.
12524         (tdesc_element): Likewise.
12525         (tdesc_reg): Likewise.
12526         (tdesc_reg_up): Likewise.
12527
12528 2018-04-17  Tom Tromey  <tom@tromey.com>
12529
12530         * dwarf2read.c (quirk_rust_enum): Conditionally drop the
12531         discriminant field.
12532
12533 2018-04-17  Tom Tromey  <tom@tromey.com>
12534
12535         * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
12536
12537 2018-04-17  Andreas Arnez  <arnez@linux.vnet.ibm.com>
12538
12539         * symtab.c (print_symbol_info): Skip printing filename and line
12540         number when `last' is NULL.
12541         (symtab_symbol_info): Use empty string instead of NULL for first
12542         invocation of print_symbol_info.
12543         (rbreak_command): Pass NULL to `last' parameter of
12544         print_symbol_info.
12545
12546 2018-04-16  Simon Marchi  <simon.marchi@ericsson.com>
12547
12548         * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
12549         instead of nullptr.
12550
12551 2018-04-16  Pedro Alves  <palves@redhat.com>
12552
12553         * MAINTAINERS (sh): Remove.
12554         * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
12555         (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
12556         (ALLDEPFILES): Remove sh64-tdep.c.
12557         * NEWS: Mentions that support for SH-5/SH64 is removed.
12558         * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
12559         (sh*-*-openbsd*): Ditto.
12560         (sh64-*-elf*): Remove.
12561         (sh*): Remove.
12562         * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
12563         * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
12564         * sh-tdep.c: No longer include "sh64-tdep.h".
12565         (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
12566         * sh64-tdep.c, sh64-tdep.h: Remove files.
12567
12568 2018-04-16  Pedro Alves  <palves@redhat.com>
12569
12570         * MAINTAINERS: Remove m88k.
12571         * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
12572         (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
12573         (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
12574         * NEWS: Mention that support for m88k was removed.
12575         * configure.host (m88*-*-*): Remove support.
12576         * configure.nat (m88k-*-*): Remove support.
12577         * configure.tgt (m88*-*-openbsd*): Remove.
12578         * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
12579
12580 2018-04-15  Simon Marchi  <simon.marchi@polymtl.ca>
12581
12582         * configure.tgt (x86_tobjs): New variable.
12583         (amd64_tobjs, i386_tobjs): Use it.
12584
12585 2018-04-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
12586
12587         * symtab.c (print_symbol_info): Precede the symbol definition by
12588         the line number when available.
12589         * NEWS: Advertise this enhancement.
12590
12591 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
12592
12593         * NEWS (New options): announce set/show record btrace cpu.
12594         * btrace.c: Include record-btrace.h.
12595         (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
12596         the vendor is unknown.
12597         (btrace_compute_ftrace_1): Add cpu parameter.  Update callers.
12598         Maybe overwrite the btrace configuration's cpu.
12599         (btrace_compute_ftrace): Add cpu parameter.  Update callers.
12600         (btrace_fetch): Add cpu parameter.  Update callers.
12601         (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
12602         Maybe overwrite the btrace configuration's cpu.  Skip enabling
12603         errata workarounds if the vendor is unknown.
12604         * python/py-record-btrace.c: Include record-btrace.h.
12605         (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
12606         (recpy_bt_function_call_history): Call record_btrace_get_cpu.
12607         * record-btrace.c (record_btrace_cpu_state_kind): New.
12608         (record_btrace_cpu): New.
12609         (set_record_btrace_cpu_cmdlist): New.
12610         (record_btrace_get_cpu): New.
12611         (require_btrace_thread, record_btrace_info)
12612         (record_btrace_resume_thread): Call record_btrace_get_cpu.
12613         (cmd_set_record_btrace_cpu_none): New.
12614         (cmd_set_record_btrace_cpu_auto): New.
12615         (cmd_set_record_btrace_cpu): New.
12616         (cmd_show_record_btrace_cpu): New.
12617         (_initialize_record_btrace): Initialize set/show record btrace cpu
12618         commands.
12619         * record-btrace.h (record_btrace_get_cpu): New.
12620
12621 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
12622
12623         * record.c (set_record_command): Fix typo in message.
12624
12625 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
12626
12627         * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
12628
12629 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
12630
12631         * infrun.c (process_event_stop_test): Call
12632         gdbarch_in_indirect_branch_thunk.
12633         * gdbarch.sh (in_indirect_branch_thunk): New.
12634         * gdbarch.c: Regenerated.
12635         * gdbarch.h: Regenerated.
12636         * x86-tdep.h: New.
12637         * x86-tdep.c: New.
12638         * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
12639         (HFILES_NO_SRCDIR): Add x86-tdep.h.
12640         (ALLDEPFILES): Add x86-tdep.c.
12641         * arch-utils.h (default_in_indirect_branch_thunk): New.
12642         * arch-utils.c (default_in_indirect_branch_thunk): New.
12643         * i386-tdep: Include x86-tdep.h.
12644         (i386_in_indirect_branch_thunk): New.
12645         (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
12646         function.
12647         * amd64-tdep: Include x86-tdep.h.
12648         (amd64_in_indirect_branch_thunk): New.
12649         (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
12650
12651 2018-04-12  Jan Kratochvil  <jan.kratochvil@redhat.com>
12652
12653         PR gdb/23053
12654         * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
12655         (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
12656         (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
12657         regression.
12658
12659 2018-04-12  Tom Tromey  <tom@tromey.com>
12660
12661         * rust-lang.c (rust_print_struct_def): Remove univariant code.
12662         (rust_evaluate_subexp): Likewise.
12663
12664 2018-04-12  Pedro Alves  <palves@redhat.com>
12665
12666         * procfs.c (procfs_detach): Make forward declaration's prototype
12667         match definition's protototype.
12668         (proc_get_LDT_entry): Remove stale do_cleanups call.
12669
12670 2018-04-12  Pedro Alves  <palves@redhat.com>
12671
12672         * target.h (target_ops::to_has_exited): Delete.
12673         (target_has_exited): Delete.
12674         * target-delegates.c: Regenerate.
12675
12676 2018-04-11  Pedro Alves  <palves@redhat.com>
12677
12678         * target.c (fileio_fh_t::t): Add comment.
12679         (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
12680         (target_fileio_close): Handle a NULL target.
12681         (invalidate_fileio_fh): New.
12682         (target_close): Call it.
12683         * remote.c (remote_hostio_send_command): No longer check whether
12684         remote_desc is open.
12685
12686 2018-04-11  Pedro Alves  <palves@redhat.com>
12687
12688         * target.c (fileio_fh_t): Make it a named struct instead of a
12689         typedef.
12690         (fileio_fh_t::is_closed): New method.
12691         (DEF_VEC_O (fileio_fh_t)): Remove.
12692         (fileio_fhandles): Now a std::vector.
12693         (is_closed_fileio_fh): Delete.
12694         (acquire_fileio_fd): Adjust.  Rename parameters.
12695         (release_fileio_fd): Adjust.
12696         (fileio_fd_to_fh): Reimplement as a function instead of a macro.
12697         (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
12698         (target_fileio_close): Adjust.
12699
12700 2018-04-10  Simon Marchi  <simon.marchi@ericsson.com>
12701
12702         * auto-load.c (auto_load_safe_path_vec_update): Iterate by
12703         index.
12704
12705 2018-04-10  Pedro Alves  <palves@redhat.com>
12706
12707         * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
12708         (scoped_finish_thread_state): New class.
12709         * infcmd.c (run_command_1): Use it instead of finish_thread_state
12710         cleanup.
12711         * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
12712         (fetch_inferior_event, normal_stop): Likewise.
12713         * thread.c (finish_thread_state_cleanup): Delete.
12714
12715 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
12716             Pedro Alves  <palves@redhat.com>
12717
12718         * value.c: Include "selftest.h" and "common/array-view.h".
12719         (struct range) <operator ==>: New.
12720         (test_ranges_contain): New.
12721         (check_ranges_vector): New.
12722         (test_insert_into_bit_range_vector): New.
12723         (_initialize_values): Register selftests.
12724         * common/array-view.h (operator==, operator!=): New.
12725
12726 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
12727
12728         * common/gdb_vecs.h (unordered_remove): Add overload that takes
12729         an iterator.
12730         * inline-frame.c: Include <algorithm>.
12731         (struct inline_state): Add constructor.
12732         (inline_state_s): Remove.
12733         (DEF_VEC_O(inline_state_s)): Remove.
12734         (inline_states): Change type to std::vector.
12735         (find_inline_frame_state): Adjust to std::vector.
12736         (allocate_inline_frame_state): Remove.
12737         (clear_inline_frame_state): Adjust to std::vector.
12738         (skip_inline_frames): Adjust to std::vector.
12739
12740 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
12741
12742         * tracepoint.h (struct trace_state_variable): Add constructor.
12743         <name>: Change type to std::string.
12744         * tracepoint.c (tsv_s): Remove.
12745         (DEF_VEC_O(tsv_s)): Remove.
12746         (tvariables): Change to std::vector.
12747         (create_trace_state_variable): Adjust to std::vector.
12748         (find_trace_state_variable): Likewise.
12749         (find_trace_state_variable_by_number): Likewise.
12750         (delete_trace_state_variable): Likewise.
12751         (trace_variable_command): Adjust to std::string.
12752         (delete_trace_variable_command): Likewise.
12753         (tvariables_info_1): Adjust to std::vector.
12754         (save_trace_state_variables): Likewise.
12755         (start_tracing): Likewise.
12756         (merge_uploaded_trace_state_variables): Adjust to std::vector
12757         and std::string.
12758         * target.h (struct target_ops)
12759         <to_download_trace_state_variable>: Pass reference to
12760         trace_state_variable.
12761         * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
12762         * target-delegates.c: Re-generate.
12763         * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
12764         (mi_tsv_deleted): Likewise.
12765         * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
12766         * remote.c (remote_download_trace_state_variable): Change
12767         pointer to reference and adjust.
12768         * make-target-delegates (parse_argtypes): Handle references.
12769         (write_function_header): Likewise.
12770         (munge_type): Likewise.
12771
12772 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
12773
12774         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12775         string_view-selftests.c.
12776         * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
12777         testsuite.
12778         * unittests/basic_string_view/cons/char/1.cc: Likewise.
12779         * unittests/basic_string_view/cons/char/2.cc: Likewise.
12780         * unittests/basic_string_view/cons/char/3.cc: Likewise.
12781         * unittests/basic_string_view/element_access/char/1.cc:
12782         Likewise.
12783         * unittests/basic_string_view/element_access/char/empty.cc:
12784         Likewise.
12785         * unittests/basic_string_view/element_access/char/front_back.cc:
12786         Likewise.
12787         * unittests/basic_string_view/inserters/char/2.cc: Likewise.
12788         * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
12789         Likewise.
12790         * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
12791         Likewise.
12792         * unittests/basic_string_view/modifiers/swap/char/1.cc:
12793         Likewise.
12794         * unittests/basic_string_view/operations/compare/char/1.cc:
12795         Likewise.
12796         * unittests/basic_string_view/operations/compare/char/13650.cc:
12797         Likewise.
12798         * unittests/basic_string_view/operations/copy/char/1.cc:
12799         Likewise.
12800         * unittests/basic_string_view/operations/data/char/1.cc:
12801         Likewise.
12802         * unittests/basic_string_view/operations/find/char/1.cc:
12803         Likewise.
12804         * unittests/basic_string_view/operations/find/char/2.cc:
12805         Likewise.
12806         * unittests/basic_string_view/operations/find/char/3.cc:
12807         Likewise.
12808         * unittests/basic_string_view/operations/find/char/4.cc:
12809         Likewise.
12810         * unittests/basic_string_view/operations/rfind/char/1.cc:
12811         Likewise.
12812         * unittests/basic_string_view/operations/rfind/char/2.cc:
12813         Likewise.
12814         * unittests/basic_string_view/operations/rfind/char/3.cc:
12815         Likewise.
12816         * unittests/basic_string_view/operations/substr/char/1.cc:
12817         Likewise.
12818         * unittests/basic_string_view/operators/char/2.cc: Likewise.
12819         * unittests/string_view-selftests.c: New file.
12820
12821 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
12822
12823         * unittests/basic_string_view/capacity/1.cc: New file.
12824         * unittests/basic_string_view/capacity/empty_neg.cc: New file.
12825         * unittests/basic_string_view/cons/char/1.cc: New file.
12826         * unittests/basic_string_view/cons/char/2.cc: New file.
12827         * unittests/basic_string_view/cons/char/3.cc: New file.
12828         * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
12829         * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
12830         * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
12831         * unittests/basic_string_view/element_access/char/1.cc: New file.
12832         * unittests/basic_string_view/element_access/char/2.cc: New file.
12833         * unittests/basic_string_view/element_access/char/empty.cc: New file.
12834         * unittests/basic_string_view/element_access/char/front_back.cc: New file.
12835         * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
12836         * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
12837         * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
12838         * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
12839         * unittests/basic_string_view/include.cc: New file.
12840         * unittests/basic_string_view/inserters/char/1.cc: New file.
12841         * unittests/basic_string_view/inserters/char/2.cc: New file.
12842         * unittests/basic_string_view/inserters/char/3.cc: New file.
12843         * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
12844         * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
12845         * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
12846         * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
12847         * unittests/basic_string_view/literals/types.cc: New file.
12848         * unittests/basic_string_view/literals/values.cc: New file.
12849         * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
12850         * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
12851         * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
12852         * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
12853         * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
12854         * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
12855         * unittests/basic_string_view/operations/compare/char/1.cc: New file.
12856         * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
12857         * unittests/basic_string_view/operations/compare/char/2.cc: New file.
12858         * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
12859         * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
12860         * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
12861         * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
12862         * unittests/basic_string_view/operations/copy/char/1.cc: New file.
12863         * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
12864         * unittests/basic_string_view/operations/data/char/1.cc: New file.
12865         * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
12866         * unittests/basic_string_view/operations/find/char/1.cc: New file.
12867         * unittests/basic_string_view/operations/find/char/2.cc: New file.
12868         * unittests/basic_string_view/operations/find/char/3.cc: New file.
12869         * unittests/basic_string_view/operations/find/char/4.cc: New file.
12870         * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
12871         * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
12872         * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
12873         * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
12874         * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
12875         * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
12876         * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
12877         * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
12878         * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
12879         * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
12880         * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
12881         * unittests/basic_string_view/operations/substr/char/1.cc: New file.
12882         * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
12883         * unittests/basic_string_view/operators/char/2.cc: New file.
12884         * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
12885         * unittests/basic_string_view/range_access/char/1.cc: New file.
12886         * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
12887         * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
12888         * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
12889         * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
12890         * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
12891         * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
12892         * unittests/basic_string_view/requirements/typedefs.cc: New file.
12893         * unittests/basic_string_view/typedefs.cc: New file.
12894         * unittests/basic_string_view/types/1.cc: New file.
12895
12896 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
12897
12898         * common/gdb_string_view.h: Remove libstdc++ implementation
12899         details, adjust to gdb reality.
12900         * common/gdb_string_view.tcc: Likewise.
12901         * cli/cli-script.c (struct string_view): Remove.
12902         (user_args) <m_args>: Change element type to gdb::string_view.
12903         (user_args::insert_args): Adjust.
12904
12905 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
12906
12907         * common/gdb_string_view.h: New file.
12908         * common/gdb_string_view.tcc: New file.
12909
12910 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
12911
12912         * ax_cxx_compile_stdcxx.m4: Sync with upstream.
12913         * configure: Re-generate.
12914
12915 2018-04-09  Pedro Alves  <palves@redhat.com>
12916
12917         * gdbarch.sh: Include "observable.h" instead of "observer.h".
12918         (set_target_gdbarch): Call
12919         gdb::observers::architecture_changed.notify instead of
12920         observer_notify_architecture_changed.
12921
12922 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
12923
12924         * tracepoint.c (struct current_traceframe_cleanup): Remove.
12925         (do_restore_current_traceframe_cleanup): Remove.
12926         (restore_current_traceframe_cleanup_dtor): Remove.
12927         (make_cleanup_restore_current_traceframe): Remove.
12928         (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
12929         New.
12930         * tracepoint.h (struct scoped_restore_current_traceframe): New.
12931         * infrun.c (fetch_inferior_event): Use
12932         scoped_restore_current_traceframe.
12933
12934 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
12935
12936         * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
12937         Remove.
12938         <n_allocated_type_units>: Remove.
12939         <all_type_units>: Change to std::vector.
12940         * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
12941         to std::vector change.
12942         (dwarf2_per_objfile::get_cutu): Likewise.
12943         (dwarf2_per_objfile::get_tu): Likewise.
12944         (create_signatured_type_table_from_index): Likewise.
12945         (create_signatured_type_table_from_debug_names): Likewise.
12946         (dw2_symtab_iter_next): Likewise.
12947         (dw2_print_stats): Likewise.
12948         (dw2_expand_all_symtabs): Likewise.
12949         (dw2_expand_marked_cus): Likewise.
12950         (dw2_debug_names_iterator::next): Likewise.
12951         (dwarf2_initialize_objfile): Likewise.
12952         (add_signatured_type_cu_to_table): Likewise.
12953         (create_all_type_units): Likewise.
12954         (add_type_unit): Likewise.
12955         (struct tu_abbrev_offset): Add constructor.
12956         (build_type_psymtabs_1): Adjust to std::vector change.
12957         (print_tu_stats): Likewise.
12958         * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
12959         (write_debug_names): Likewise.
12960
12961 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
12962
12963         * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
12964         Make an std::vector.
12965         <n_comp_units>: Remove.
12966         * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
12967         to std::vector change.
12968         (dwarf2_per_objfile::get_cutu): Likewise.
12969         (dwarf2_per_objfile::get_cu): Likewise.
12970         (create_cus_from_index): Likewise.
12971         (create_addrmap_from_index): Likewise.
12972         (create_addrmap_from_aranges): Likewise.
12973         (dwarf2_read_index): Likewise.
12974         (dw2_find_last_source_symtab): Likewise.
12975         (dw2_map_symtabs_matching_filename): Likewise.
12976         (dw2_symtab_iter_next): Likewise.
12977         (dw2_print_stats): Likewise.
12978         (dw2_expand_all_symtabs): Likewise.
12979         (dw2_expand_symtabs_with_fullname): Likewise.
12980         (dw2_expand_marked_cus): Likewise.
12981         (dw2_map_symbol_filenames): Likewise.
12982         (create_cus_from_debug_names): Likewise.
12983         (dwarf2_read_debug_names): Likewise.
12984         (dw2_debug_names_iterator::next): Likewise.
12985         (dwarf2_initialize_objfile): Likewise.
12986         (set_partial_user): Likewise.
12987         (dwarf2_build_psymtabs_hard): Likewise.
12988         (read_comp_units_from_section): Remove arguments, adjust to
12989         std::vector change.
12990         (create_all_comp_units): Adjust to std::vector and
12991         read_comp_units_from_section changes.
12992         (dwarf2_find_containing_comp_unit): Adjust to std::vector
12993         change.
12994         * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
12995         (psyms_seen_size): Likewise.
12996         (write_gdbindex): Likewise.
12997         (write_debug_names): Likewise.
12998
12999 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
13000
13001         * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
13002         with dwarf2_per_objfile.
13003         (create_cus_from_index): Likewise.
13004         (create_signatured_type_table_from_index): Likewise.
13005         (dwarf2_read_index): Likewise.
13006         (dwarf2_initialize_objfile): Likewise.
13007         (dwarf2_fetch_die_loc_sect_off):  Get dwarf2_per_objfile from
13008         per_cu rather than get_dwarf2_per_objfile.
13009
13010 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
13011
13012         * dwarf2read.h (struct signatured_type): Forward declare.
13013         (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
13014         New methods.
13015         * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
13016         (dw2_get_cutu): ...this.
13017         (dwarf2_per_objfile::get_cu): Rename from...
13018         (dw2_get_cu): ...this.
13019         (dwarf2_per_objfile::get_tu): New.
13020         (create_addrmap_from_index): Adjust.
13021         (create_addrmap_from_aranges): Adjust.
13022         (dw2_find_last_source_symtab): Adjust.
13023         (dw2_map_symtabs_matching_filename): Adjust.
13024         (dw2_symtab_iter_next): Adjust.
13025         (dw2_print_stats): Adjust.
13026         (dw2_expand_all_symtabs): Adjust.
13027         (dw2_expand_symtabs_with_fullname): Adjust.
13028         (dw2_expand_marked_cus): Adjust.
13029         (dw_expand_symtabs_matching_file_matcher): Adjust.
13030         (dw2_map_symbol_filenames): Adjust.
13031         (dw2_debug_names_iterator::next): Adjust.
13032         (dwarf2_initialize_objfile): Adjust.
13033         (set_partial_user): Adjust.
13034         (dwarf2_build_psymtabs_hard): Adjust.
13035
13036 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
13037
13038         * dwarf2read.c (create_signatured_type_table_from_debug_names):
13039         Remove unused variables.
13040         (dw2_map_symtabs_matching_filename): Likewise.
13041         (dwarf2_record_block_ranges): Likewise.
13042         (dwarf2_read_addr_index): Likewise.
13043         (follow_die_offset): Likewise.
13044
13045 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
13046
13047         * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
13048         to symbol_file_add_main.
13049
13050 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
13051
13052         PR mi/22299
13053         * mi/mi-console.c (do_fputc_async_safe): New.
13054         (mi_console_file::write_async_safe): New.
13055         (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
13056         * mi/mi-console.h (class mi_console_file) <write_async_safe>:
13057         New.
13058         * ui-file.c (ui_file::putstrn): Adjust call to
13059         fputstrn_unfiltered.
13060         * utils.c (printchar): Replace do_fputs and do_fprintf
13061         parameters by do_fputc.
13062         (fputstr_filtered): Adjust call to printchar.
13063         (fputstr_unfiltered): Likewise.
13064         (fputstrn_filtered): Likewise.
13065         (fputstrn_unfiltered): Add do_fputc parameter, pass to
13066         printchar.
13067         * utils.h (do_fputc_ftype): New typedef.
13068         (fputstrn_unfiltered): Add do_fputc parameter.
13069
13070 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
13071
13072         * regformats/i386/i386-avx.dat: Remove.
13073
13074 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
13075
13076         PR gdb/22979
13077         * amd64-tdep.c (amd64_none_init_abi): New function.
13078         (amd64_x32_none_init_abi): New function.
13079         (_initialize_amd64_tdep): Register handlers for x86-64 and
13080         x64_32 with GDB_OSABI_NONE.
13081         * osabi.c (gdbarch_init_osabi): Allow running handlers for the
13082         GDB_OSABI_NONE osabi.
13083
13084 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
13085
13086         PR gdb/22980
13087         * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
13088         GDB_OSABI_NONE.
13089         * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
13090         * osabi.c (gdb_osabi_names): Add "unknown" entry.
13091
13092 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
13093
13094         * common/byte-vector.h (char_vector): New type.
13095         * target.h (target_read_alloc): Return
13096         gdb::optional<byte_vector>.
13097         (target_read_stralloc): Return gdb::optional<char_vector>.
13098         (target_get_osdata): Return gdb::optional<char_vector>.
13099         * target.c (target_read_alloc_1): Templatize.  Replacement
13100         manual memory management with vector.
13101         (target_read_alloc): Change return type, adjust.
13102         (target_read_stralloc): Change return type, adjust.
13103         (target_get_osdata): Change return type, adjust.
13104         * auxv.c (struct auxv_info) <length>: Remove.
13105         <data>: Change type to gdb::optional<byte_vector>.
13106         (auxv_inferior_data_cleanup): Free auxv_info with delete.
13107         (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
13108         (target_auxv_search): Adjust.
13109         (fprint_target_auxv): Adjust.
13110         * avr-tdep.c (avr_io_reg_read_command): Adjust.
13111         * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
13112         (linux_make_corefile_notes): Adjust.
13113         * osdata.c (get_osdata): Adjust.
13114         * remote.c (remote_get_threads_with_qxfer): Adjust.
13115         (remote_memory_map): Adjust.
13116         (remote_traceframe_info): Adjust.
13117         (btrace_read_config): Adjust.
13118         (remote_read_btrace): Adjust.
13119         (remote_pid_to_exec_file): Adjust.
13120         * solib-aix.c (solib_aix_get_library_list): Adjust.
13121         * solib-dsbt.c (decode_loadmap): Don't free buf.
13122         (dsbt_get_initial_loadmaps): Adjust.
13123         * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
13124         * solib-target.c (solib_target_current_sos): Adjust.
13125         * tracepoint.c (sdata_make_value): Adjust.
13126         * xml-support.c (xinclude_start_include): Adjust.
13127         (xml_fetch_content_from_file): Adjust.
13128         * xml-support.h (xml_fetch_another): Change return type.
13129         (xml_fetch_content_from_file): Change return type.
13130         * xml-syscall.c (xml_init_syscalls_info): Adjust.
13131         * xml-tdesc.c (file_read_description_xml): Adjust.
13132         (fetch_available_features_from_target): Change return type.
13133         (target_fetch_description_xml): Adjust.
13134         (target_read_description_xml): Adjust.
13135
13136 2018-04-06  Tom Tromey  <tom@tromey.com>
13137
13138         * value.c (~value): Update.
13139         (struct value) <contents>: Now unique_xmalloc_ptr.
13140         (value_contents_bits_eq, allocate_value_contents)
13141         (value_contents_raw, value_contents_all_raw)
13142         (value_contents_for_printing, value_contents_for_printing_const)
13143         (set_value_enclosing_type): Update.
13144
13145 2018-04-06  Tom Tromey  <tom@tromey.com>
13146
13147         * value.c (range_s): Remove typedef, VEC.
13148         (struct range): Add operator<.
13149         (range_lessthan): Remove.
13150         (ranges_contain): Change type.
13151         (~value): Update.
13152         (struct value) <unavailable, optimized_out>: Now std::vector.
13153         (value_entirely_available)
13154         (value_entirely_covered_by_range_vector)
13155         (value_entirely_unavailable, value_entirely_optimized_out):
13156         Update.
13157         (insert_into_bit_range_vector): Change argument type.
13158         (find_first_range_overlap): Likewise.
13159         (struct ranges_and_idx, value_contents_bits_eq)
13160         (require_not_optimized_out, require_available): Update.
13161         (ranges_copy_adjusted): Change argument types.
13162         (value_optimized_out, value_copy, value_fetch_lazy): Update.
13163
13164 2018-04-06  Tom Tromey  <tom@tromey.com>
13165
13166         * value.c (~value): Update.
13167         (struct value) <parent>: Now a value_ref_ptr.
13168         (value_parent, set_value_parent, value_address, value_copy):
13169         Update.
13170
13171 2018-04-06  Tom Tromey  <tom@tromey.com>
13172
13173         * value.c (struct value): Add constructor, destructor, and member
13174         initializers.
13175         (allocate_value_lazy, value_decref): Update.
13176
13177 2018-04-06  Tom Tromey  <tom@tromey.com>
13178
13179         * value.c (struct value) <released, next>: Remove.
13180         (all_values): Now a std::vector.
13181         (allocate_value_lazy): Update.
13182         (value_next): Remove.
13183         (value_mark, value_free_to_mark, release_value)
13184         (value_release_to_mark): Update.
13185
13186 2018-04-06  Tom Tromey  <tom@tromey.com>
13187
13188         * value.h (fetch_subexp_value, value_release_to_mark): Update.
13189         (free_value_chain): Remove.
13190         * value.c (free_value_chain): Remove.
13191         (value_release_to_mark): Return a std::vector.
13192         * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
13193         std::vector.
13194         (check_condition): Update.
13195         * eval.c (fetch_subexp_value): Change "val_chain" to a
13196         std::vector.
13197         * breakpoint.c (update_watchpoint): Update.
13198         (can_use_hardware_watchpoint): Change "vals" to a std::vector.
13199
13200 2018-04-06  Tom Tromey  <tom@tromey.com>
13201
13202         * value.h (free_all_values): Remove.
13203         * value.c (free_all_values): Remove.
13204
13205 2018-04-06  Tom Tromey  <tom@tromey.com>
13206
13207         * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
13208         (value_history_chain, value_history_count): Remove.
13209         (value_history): New global.
13210         (record_latest_value, access_value_history, show_values)
13211         (preserve_values): Update.
13212
13213 2018-04-06  Tom Tromey  <tom@tromey.com>
13214
13215         * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
13216         * varobj.c (varobj_set_display_format, varobj_set_value)
13217         (install_default_visualizer, construct_visualizer)
13218         (install_new_value, ~varobj, varobj_get_value_type)
13219         (my_value_of_variable, varobj_editable_p): Update.
13220         * c-varobj.c (c_describe_child, c_value_of_variable)
13221         (cplus_number_of_children, cplus_describe_child): Update.
13222         * ada-varobj.c (ada_number_of_children, ada_name_of_child)
13223         (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
13224         (ada_value_of_variable, ada_value_is_changeable_p): Update.
13225
13226 2018-04-06  Tom Tromey  <tom@tromey.com>
13227
13228         * printcmd.c (last_examine_address): Change type to
13229         value_ref_ptr.
13230         (do_examine, x_command): Update.
13231
13232 2018-04-06  Tom Tromey  <tom@tromey.com>
13233
13234         * value.c (release_value): Update.
13235         * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
13236         (struct bpstats) <val>: Now a value_ref_ptr.
13237         * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
13238         (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
13239         (~watchpoint, print_it_watchpoint, watch_command_1)
13240         (invalidate_bp_value_on_memory_change): Update.
13241
13242 2018-04-06  Tom Tromey  <tom@tromey.com>
13243
13244         * varobj.c (varobj_clear_saved_item)
13245         (update_dynamic_varobj_children, install_new_value, ~varobj):
13246         Update.
13247         * value.h (value_incref): Move declaration earlier.
13248         (value_decref): Rename from value_free.
13249         (struct value_ref_policy): New.
13250         (value_ref_ptr): New typedef.
13251         (struct value_deleter): Remove.
13252         (gdb_value_up): Remove typedef.
13253         (release_value): Change return type.
13254         (release_value_or_incref): Remove.
13255         * value.c (set_value_parent): Update.
13256         (value_incref): Change return type.
13257         (value_decref): Rename from value_free.
13258         (value_free_to_mark, free_all_values, free_value_chain): Update.
13259         (release_value): Return value_ref_ptr.
13260         (release_value_or_incref): Remove.
13261         (record_latest_value, set_internalvar, clear_internalvar):
13262         Update.
13263         * stack.c (info_frame_command): Don't call value_free.
13264         * python/py-value.c (valpy_dealloc, valpy_new)
13265         (value_to_value_object): Update.
13266         * printcmd.c (do_examine): Update.
13267         * opencl-lang.c (lval_func_free_closure): Update.
13268         * mi/mi-main.c (register_changed_p): Don't call value_free.
13269         * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
13270         * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
13271         * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
13272         value_free.
13273         * guile/scm-value.c (vlscm_free_value_smob)
13274         (vlscm_scm_from_value): Update.
13275         * frame.c (frame_register_unwind, frame_unwind_register_signed)
13276         (frame_unwind_register_unsigned, get_frame_register_bytes)
13277         (put_frame_register_bytes): Don't call value_free.
13278         * findvar.c (address_from_register): Don't call value_free.
13279         * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
13280         * dwarf2loc.c (entry_data_value_free_closure)
13281         (value_of_dwarf_reg_entry, free_pieced_value_closure)
13282         (dwarf2_evaluate_loc_desc_full): Update.
13283         * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
13284         (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
13285         (~watchpoint, watch_command_1)
13286         (invalidate_bp_value_on_memory_change): Update.
13287         * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
13288
13289 2018-04-06  Simon Marchi  <simon.marchi@polymtl.ca>
13290
13291         PR gdb/23022
13292         * warning.m4: Add -Wno-error=deprecated-register.
13293         * configure: Re-generate.
13294
13295 2018-04-05  Tom Tromey  <tom@tromey.com>
13296
13297         * linespec.h: Remove include of "vec.h".
13298
13299 2018-04-05  Tom Tromey  <tom@tromey.com>
13300
13301         * linespec.c (typep): Remove typedef.
13302         (find_methods, find_superclass_methods): Take a std::vector.
13303         (find_method): Use std::vector.
13304
13305 2018-04-05  Tom Tromey  <tom@tromey.com>
13306
13307         * utils.c (compare_strings): Remove.
13308         * utils.h (compare_strings): Remove.
13309         * objc-lang.h (find_imps): Update.
13310         * objc-lang.c (find_methods): Take a std::vector.
13311         (uniquify_strings, find_imps): Likewise.
13312         * linespec.c (find_methods): Take a std::vector.
13313         (decode_objc): Use std::vector.
13314         (add_all_symbol_names_from_pspace, find_superclass_methods): Take
13315         a std::vector.
13316         (find_method, find_function_symbols): Use std::vector.
13317
13318 2018-04-05  Tom Tromey  <tom@tromey.com>
13319
13320         * completer.c (completion_tracker::completion_tracker): Remove
13321         cast.
13322         (completion_tracker::discard_completions): Likewise.
13323         * breakpoint.c (ambiguous_names_p): Remove cast.
13324         * ada-lang.c (_initialize_ada_language): Remove cast.
13325         * utils.h (streq): Update.
13326         (streq_hash): Add new declaration.
13327         * utils.c (streq): Return bool.
13328         (streq_hash): New function.
13329
13330 2018-04-05  Tom Tromey  <tom@tromey.com>
13331
13332         * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
13333         Remove a string copy.
13334
13335 2018-04-05  Tom Tromey  <tom@tromey.com>
13336
13337         * linespec.c (filter_results): Use std::vector.
13338         (decode_line_2, decode_line_full): Update.
13339
13340 2018-04-05  Tom Tromey  <tom@tromey.com>
13341
13342         * linespec.c (canonical_to_fullform): Return std::string.
13343         (filter_results): Update.
13344         (struct decode_line_2_item): Add constructor.
13345         <fullform, displayform>: Now std::string.
13346         (decode_line_2_compare_items): Now a std::sort comparator.
13347         (decode_line_2): Update.
13348
13349 2018-04-05  Tom Tromey  <tom@tromey.com>
13350
13351         * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
13352         (unexpected_linespec_error): Update.
13353         (linespec_parse_basic, parse_linespec): Update.
13354
13355 2018-04-05  Tom Tromey  <tom@tromey.com>
13356
13357         * linespec.c (linespec_parse_basic): Reindent.
13358
13359 2018-04-05  Tom Tromey  <tom@tromey.com>
13360
13361         * minsyms.h (iterate_over_minimal_symbols): Update.
13362         * minsyms.c (iterate_over_minimal_symbols): Take a
13363         gdb::function_view.
13364         * linespec.c (struct collect_minsyms): Remove.
13365         (compare_msyms): Now a std::sort comparator.
13366         (add_minsym): Add parameters.
13367         (search_minsyms_for_name): Update.  Use std::vector.
13368
13369 2018-04-03  Tom Tromey  <tom@tromey.com>
13370
13371         * mipsread.c (read_alphacoff_dynamic_symtab): Use
13372         gdb::byte_vector.
13373
13374 2018-04-02  Weimin Pan  <weimin.pan@oracle.com>
13375
13376         * MAINTAINERS (Write After Approval): Add Weimin Pan.
13377
13378 2018-04-02  Weimin Pan  <weimin.pan@oracle.com>
13379
13380         PR gdb/16959
13381         * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when 
13382         printing static type.
13383
13384 2018-04-01  Tom Tromey  <tom@tromey.com>
13385
13386         * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
13387         (rs6000_xfer_shared_libraries): Update.
13388
13389 2018-04-01  Simon Marchi  <simon.marchi@polymtl.ca>
13390
13391         * common/gdb_vecs.h (char_ptr): Remove.
13392         * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
13393
13394 2018-03-30  Simon Marchi  <simon.marchi@polymtl.ca>
13395
13396         * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
13397         with std::vector.
13398         * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
13399
13400 2018-03-30  Simon Marchi  <simon.marchi@polymtl.ca>
13401
13402         * tracepoint.h (struct uploaded_tp): Initialize fields.
13403         <actions, step_actions, cmd_strings>: Change type to
13404         std::vector<char *>.
13405         * tracepoint.c (get_uploaded_tp): Allocate with new.
13406         (free_uploaded_tps): Free with delete.
13407         (parse_tracepoint_definition): Adjust to std::vector change.
13408         * breakpoint.c (read_uploaded_action): Likewise.
13409         (create_tracepoint_from_upload): Likewise.
13410         * ctf.c (ctf_write_uploaded_tp): Likewise.
13411         (SET_ARRAY_FIELD): Likewise.
13412         * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
13413
13414 2018-03-30  Tom Tromey  <tom@tromey.com>
13415
13416         * solib-svr4.c (lm_info_read): Use gdb::byte_vector.  Return
13417         std::unique_ptr.
13418         (svr4_keep_data_in_core): Update.
13419         (svr4_read_so_list): Update.
13420
13421 2018-03-30  Tom Tromey  <tom@tromey.com>
13422
13423         * windows-nat.c (handle_output_debug_string, handle_exception):
13424         Update.
13425         * target.h (target_read_string): Update.
13426         * target.c (target_read_string): Change "string" to
13427         unique_xmalloc_ptr.
13428         * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
13429         Update.
13430         * solib-frv.c (frv_current_sos): Update.
13431         * solib-dsbt.c (dsbt_current_sos): Update.
13432         * solib-darwin.c (darwin_current_sos): Update.
13433         * linux-thread-db.c (inferior_has_bug): Update.
13434         * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
13435         Update.  Remove alloca.
13436         * ada-lang.c (ada_main_name): Update.
13437
13438 2018-03-30  Tom Tromey  <tom@tromey.com>
13439
13440         * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
13441         (struct dwo_file_deleter): New.
13442         (dwo_file_up): New typedef.
13443         (open_and_init_dwo_file): Use dwo_file_up.
13444         (free_dwo_file_cleanup): Remove.
13445
13446 2018-03-30  Tom Tromey  <tom@tromey.com>
13447
13448         * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
13449         (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
13450
13451 2018-03-30  Tom Tromey  <tom@tromey.com>
13452
13453         * dwarf2read.c (class free_cached_comp_units): New class.
13454         (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
13455         (free_cached_comp_units): Remove function.
13456
13457 2018-03-30  Tom Tromey  <tom@tromey.com>
13458
13459         * utils.h (make_cleanup_unpush_target): Remove.
13460         * inf-ptrace.c (struct target_unpusher): New.
13461         (target_unpush_up) New typedef.
13462         (inf_ptrace_create_inferior, inf_ptrace_attach): Use
13463         target_unpush_up.
13464         * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
13465
13466 2018-03-27  Tom Tromey  <tom@tromey.com>
13467
13468         * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
13469
13470 2018-03-27  Pedro Alves  <palves@redhat.com>
13471             Tom Tromey  <tom@tromey.com>
13472
13473         * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
13474         destructor.  Now a class.
13475         (gdb_readline_wrapper_cleanup): Remove function.
13476         (gdb_readline_wrapper): Remove cleanups.
13477
13478 2018-03-27  Tom Tromey  <tom@tromey.com>
13479
13480         * typeprint.h (struct type_print_options) <local_typedefs,
13481         global_typedefs>: Remove "struct" keyword.
13482         (class typedef_hash_table): New class.
13483         (recursively_update_typedef_hash, add_template_parameters)
13484         (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
13485         (find_typedef_in_hash): Don't declare.
13486         * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
13487         (typedef_hash_table::recursively_update): Rename from
13488         recursively_update_typedef_hash.  Now a member.
13489         (typedef_hash_table::add_template_parameters): Rename from
13490         add_template_parameters.  Now a member.
13491         (typedef_hash_table::typedef_hash_table): Now a constructor;
13492         rename from create_typedef_hash.
13493         (typedef_hash_table::~typedef_hash_table): Now a destructor;
13494         rename from free_typedef_hash.
13495         (do_free_typedef_hash, make_cleanup_free_typedef_hash)
13496         (do_free_global_table): Remove.
13497         (typedef_hash_table::typedef_hash_table): New constructor; renamed
13498         from copy_type_recursive.
13499         (create_global_typedef_table): Remove.
13500         (typedef_hash_table::find_global_typedef): Now a member of
13501         typedef_hash_table.
13502         (typedef_hash_table::find_typedef): Rename from
13503         find_typedef_in_hash; now a member.
13504         (whatis_exp): Update.
13505         * extension.h (struct ext_lang_type_printers): Add constructor and
13506         destructor.
13507         (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
13508         declare.
13509         * extension.c (ext_lang_type_printers::ext_lang_type_printers):
13510         Now a constructor; rename from start_ext_lang_type_printers.
13511         (ext_lang_type_printers): Now a destructor; rename from
13512         free_ext_lang_type_printers.
13513         * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
13514         Update.
13515         (c_type_print_base_struct_union): Update.  Remove cleanups.
13516
13517 2018-03-27  Tom Tromey  <tom@tromey.com>
13518
13519         * dwarf-index-write.c: Include <cmath>.
13520
13521 2018-03-27  Joel Brobecker  <brobecker@adacore.com>
13522
13523         * NEWS: Add entry describing new "set|show varsize-limit" command.
13524         * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
13525         command.
13526         * printcmd.c (_initialize_printcmd): Add "set var" alias of
13527         "set variable".
13528
13529 2018-03-27  Simon Marchi  <simon.marchi@ericsson.com>
13530
13531         * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
13532         dwarf-index-write.c
13533         (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
13534         * dwarf-index-common.c: New file.
13535         * dwarf-index-common.h: New file.
13536         * dwarf-index-write.c: New file.
13537         * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
13538         (struct dwarf2_section_info): Move from here.
13539         (dwarf2_section_info_def): Likewise.
13540         (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
13541         (offset_type): Likewise.
13542         (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
13543         (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
13544         (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
13545         (byte_swap): Likewise.
13546         (MAYBE_SWAP): Likewise.
13547         (dwarf2_per_cu_ptr): Likewise.
13548         (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
13549         (struct tu_stats): Likewise.
13550         (struct dwarf2_per_objfile): Likewise.
13551         (struct dwarf2_per_cu_data): Likewise.
13552         (struct signatured_type): Likewise.
13553         (sig_type_ptr): Likewise.
13554         (DEF_VEC_P (sig_type_ptr)): Likewise.
13555         (INDEX4_SUFFIX): Likewise.
13556         (INDEX5_SUFFIX): Likewise.
13557         (DEBUG_STR_SUFFIX): Likewise.
13558         (dwarf2_read_section): Make non-static.
13559         (mapped_index_string_hash): Move from here.
13560         (dwarf5_djb_hash): Likewise.
13561         (file_write): Likewise.
13562         (class data_buf): Likewise.
13563         (struct symtab_index_entry): Likewise.
13564         (struct mapped_symtab): Likewise.
13565         (find_slot): Likewise.
13566         (hash_expand): Likewise.
13567         (add_index_entry): Likewise.
13568         (uniquify_cu_indices): Likewise.
13569         (class c_str_view): Likewise.
13570         (class c_str_view_hasher): Likewise.
13571         (class vector_hasher): Likewise.
13572         (write_hash_table): Likewise.
13573         (psym_index_map): Likewise.
13574         (struct addrmap_index_data): Likewise.
13575         (add_address_entry): Likewise.
13576         (add_address_entry_worker): Likewise.
13577         (write_address_map): Likewise.
13578         (symbol_kind): Likewise.
13579         (write_psymbols): Likewise.
13580         (struct signatured_type_index_data): Likewise.
13581         (write_one_signatured_type): Likewise.
13582         (recursively_count_psymbols): Likewise.
13583         (recursively_write_psymbols): Likewise.
13584         (class debug_names): Likewise.
13585         (check_dwarf64_offsets): Likewise.
13586         (psyms_seen_size): Likewise.
13587         (write_gdbindex): Likewise.
13588         (write_debug_names): Likewise.
13589         (assert_file_size): Likewise.
13590         (write_psymtabs_to_index): Likewise.
13591         (save_gdb_index_command): Likewise.
13592         (_initialize_dwarf2_read): Don't register the "save gdb-index"
13593         command.
13594         * dwarf2read.h: New file.
13595
13596 2018-03-27  Joel Brobecker  <brobecker@adacore.com>
13597
13598         PR gdb/22670
13599         * dwarf2read.c (dwarf2_physname): Do not return the demangled
13600         symbol name if the CU's language stores symbol names in linkage
13601         format.
13602         * language.h (struct language_defn)
13603         <la_store_sym_names_in_linkage_form_p>: New field.  Adjust
13604         all instances of this struct.
13605
13606 2018-03-26  Tom Tromey  <tom@tromey.com>
13607
13608         * stack.c (backtrace_command_1): Remove verbose code.
13609
13610 2018-03-26  Tom Tromey  <tom@tromey.com>
13611
13612         * python/py-framefilter.c (py_print_type): Don't catch
13613         exceptions.  Return void.
13614         (py_print_value): Likewise.
13615         (py_print_single_arg): Likewise.
13616         (enumerate_args): Don't catch exceptions.
13617         (py_print_args): Likewise.
13618         (py_print_frame): Likewise.
13619         (gdbpy_apply_frame_filter): Catch exceptions here.
13620
13621 2018-03-26  Tom Tromey  <tom@tromey.com>
13622
13623         * stack.c (_initialize_stack): Remove trailing newlines from help
13624         text.  Add "Usage" line to "backtrace" help.
13625
13626 2018-03-26  Tom Tromey  <tom@tromey.com>
13627
13628         PR python/16486:
13629         * python/py-framefilter.c (py_print_args): Call wrap_hint.
13630
13631 2018-03-26  Tom Tromey  <tom@tromey.com>
13632
13633         * python/py-framefilter.c (py_print_single_arg): Return
13634         EXT_LANG_BT_ERROR from catch.
13635
13636 2018-03-26  Tom Tromey  <tom@tromey.com>
13637
13638         PR backtrace/15584:
13639         * stack.c (backtrace_command_1): Move some code into no-filters
13640         "if".
13641
13642 2018-03-26  Tom Tromey  <tom@tromey.com>
13643
13644         * python/py-framefilter.c (throw_quit_or_print_exception): New
13645         function.
13646         (gdbpy_apply_frame_filter): Use it.
13647
13648 2018-03-26  Tom Tromey  <tom@tromey.com>
13649
13650         PR cli/17716:
13651         * python/py-framefilter.c (py_print_type, py_print_value)
13652         (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
13653         RETURN_MASK_ERROR.
13654
13655 2018-03-26  Tom Tromey  <tom@tromey.com>
13656
13657         * python/py-framefilter.c (enumerate_args): Use
13658         gdb::unique_xmalloc_ptr.
13659
13660 2018-03-26  Tom Tromey  <tom@tromey.com>
13661
13662         * python/py-framefilter.c (py_print_frame): Return
13663         EXT_LANG_BT_OK.
13664         (gdbpy_apply_frame_filter): Update comment.
13665         * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
13666         Remove.
13667         <EXT_LANG_BT_NO_FILTERS>: Change value.
13668
13669 2018-03-26  Tom Tromey  <tom@tromey.com>
13670
13671         PR backtrace/15582:
13672         * stack.c (backtrace_command): Parse "hide" argument.
13673         * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
13674         * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
13675         constant.
13676
13677 2018-03-26  Tom Tromey  <tom@tromey.com>
13678
13679         * stack.c (backtrace_command_1): Remove "show_locals" parameter,
13680         add "flags".
13681         (backtrace_command): Remove "fulltrace", add "flags".
13682
13683 2018-03-26  Tom Tromey  <tom@tromey.com>
13684
13685         * stack.c (backtrace_command): Rewrite command line parsing.
13686
13687 2018-03-26  Simon Marchi  <simon.marchi@ericsson.com>
13688
13689         * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
13690
13691 2018-03-26  Simon Marchi  <simon.marchi@ericsson.com>
13692
13693         * filename-seen-cache.h: Add include guard.
13694
13695 2018-03-26  Keith Seitz  <keiths@redhat.com>
13696
13697         * symfile.c (place_section): Remove "struct" from section_addr_info
13698         in comment.
13699         * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
13700         "struct" keyword from section_addr_info.
13701
13702 2018-03-26  Alan Hayward  <alan.hayward@arm.com>
13703
13704         * regformats/regdef.h (reg): Add constructors.
13705
13706 2018-03-25  Pedro Alves  <palves@redhat.com>
13707
13708         * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
13709         if then/else bodies in var_func_name extraction.
13710
13711 2018-03-23  Weimin Pan  <weimin.pan@oracle.com>
13712
13713         * minsyms.c (lookup_minimal_symbol_and_objfile): Use
13714         lookup_minimal_symbol() to find symbol entry.
13715         * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
13716
13717 2018-03-23  Keith Seitz  <keiths@redhat.com>
13718
13719         PR c++/22968
13720         * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
13721         nested type definitions for C++, too.
13722
13723 2018-03-23  Tom Tromey  <tom@tromey.com>
13724
13725         * machoread.c (struct oso_el): Add a constructor.  Don't define as
13726         a typedef.
13727         (macho_register_oso): Remove.
13728         (macho_symtab_read): Take a std::vector.
13729         (oso_el_compare_name): Now a std::sort comparator.
13730         (macho_symfile_read_all_oso): Take a std::vector.
13731         (macho_symfile_read): Use std::vector.  Remove cleanups.
13732
13733 2018-03-22  Tom Tromey  <tom@tromey.com>
13734
13735         * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
13736         (record_full_goto_bookmark): Use std::string.
13737
13738 2018-03-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
13739
13740         PR tdep/18295
13741         * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
13742         a single mask.
13743
13744 2018-03-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
13745
13746         * rs6000-tdep.c (store_insn_p): New function.
13747         (skip_prologue): New variable alloca_reg_offset. Set lr_reg
13748         and cr_reg to their unshifted values. Use store_insn_p to
13749         match LR saves using either R1 or fdata->alloca_reg. Use
13750         store_insn_p to match CR saves. Set alloca_reg_offset
13751         when alloca_reg and framep are set. Remove lr_reg shift
13752         when assigning to fdata->lr_register.
13753
13754 2018-03-22  Andreas Arnez  <arnez@linux.vnet.ibm.com>
13755
13756         * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
13757         command line args instead of emitting a warning.
13758
13759 2018-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
13760
13761         * tracepoint.h (struct static_tracepoint_marker): Initialize
13762         fields, define default constructor, move constructor and move
13763         assignment, disable the rest.
13764         <str_id, extra>: Make std::string.
13765         (release_static_tracepoint_marker): Remove.
13766         (free_current_marker): Remove.
13767         * tracepoint.c (free_current_marker): Remove.
13768         (parse_static_tracepoint_marker_definition): Adjust to
13769         std::string, use new hex2str overload.
13770         (release_static_tracepoint_marker): Remove.
13771         (print_one_static_tracepoint_marker): Get marker by reference
13772         and adjust to std::string.
13773         (info_static_tracepoint_markers_command): Adjust to std::vector
13774         changes
13775         * target.h (static_tracepoint_marker_p): Remove typedef.
13776         (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
13777         (struct target_ops) <to_static_tracepoint_marker_at>: Return
13778         bool.
13779         <to_static_tracepoint_markers_by_strid>: Return std::vector.
13780         * target-debug.h
13781         (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
13782         (target_debug_print_std_vector_static_tracepoint_marker): New.
13783         (target_debug_print_struct_static_tracepoint_marker_p): Rename
13784         to...
13785         (target_debug_print_static_tracepoint_marker_p): ... this.
13786         * target-delegates.c: Re-generate.
13787         * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
13788         Make std::string.
13789         * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
13790         (decode_static_tracepoint_spec): Adjust to std::vector.
13791         (tracepoint_print_one_detail): Adjust to std::string.
13792         (strace_marker_decode_location): Adjust to std::string.
13793         (update_static_tracepoint): Adjust to std::string, remove call
13794         to release_static_tracepoint_marker.
13795         * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
13796         Adjust to std::vector.
13797         * remote.c (remote_static_tracepoint_marker_at): Return bool.
13798         (remote_static_tracepoint_markers_by_strid): Adjust to
13799         std::vector.
13800         * common/rsp-low.h (hex2str): New overload with explicit count
13801         of bytes.
13802         * common/rsp-low.c (hex2str): New overload with explicit count
13803         of bytes.
13804         * unittests/rsp-low-selftests.c (test_hex2str): New function.
13805         (_initialize_rsp_low_selftests): Add test_hex2str test.
13806         * unittests/tracepoint-selftests.c
13807         (test_parse_static_tracepoint_marker_definition): Adjust to
13808         std::string.
13809
13810 2018-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
13811
13812         * tracepoint.c (parse_static_tracepoint_marker_definition):
13813         Consider case where the definition is followed by more
13814         definitions.
13815         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
13816         tracepoint-selftests.c.
13817         * unittests/tracepoint-selftests.c: New.
13818
13819 2018-03-21  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
13820
13821         * MAINTAINERS (Write After Approval): Add Pedro Franco de
13822         Carvalho.
13823
13824 2018-03-20  Stephen Roberts  <stephen.roberts@arm.com>
13825
13826         * symtab.c (find_pc_sect_line): fixed indentation.
13827
13828 2018-03-20  Stephen Roberts  <stephen.roberts@arm.com>
13829
13830         * symtab.c (find_pc_sect_line): now uses binary search.
13831
13832 2018-03-19  Tom Tromey  <tom@tromey.com>
13833
13834         * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
13835         "IDENT" production.
13836
13837 2018-03-19  Pedro Alves  <palves@redhat.com>
13838             Tom Tromey  <tom@tromey.com>
13839
13840         * unittests/observable-selftests.c: New file.
13841         * common/observable.h: New file.
13842         * observable.h: New file.
13843         * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
13844         arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
13845         breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
13846         corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
13847         extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
13848         infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
13849         linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
13850         mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
13851         ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
13852         python/py-breakpoint.c, python/py-finishbreakpoint.c,
13853         python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
13854         record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
13855         riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
13856         spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
13857         symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
13858         tui/tui-interp.c, valops.c: Update all users.
13859         * tui/tui-hooks.c (tui_bp_created_observer)
13860         (tui_bp_deleted_observer, tui_bp_modified_observer)
13861         (tui_inferior_exit_observer, tui_before_prompt_observer)
13862         (tui_normal_stop_observer, tui_register_changed_observer):
13863         Remove.
13864         (tui_observers_token): New global.
13865         (attach_or_detach, tui_attach_detach_observers): New functions.
13866         (tui_install_hooks, tui_remove_hooks): Use
13867         tui_attach_detach_observers.
13868         * record-btrace.c (record_btrace_thread_observer): Remove.
13869         (record_btrace_thread_observer_token): New global.
13870         * observer.sh: Remove.
13871         * observer.c: Rename to observable.c.
13872         * observable.c (namespace gdb_observers): Define new objects.
13873         (observer_debug): Move into gdb_observers namespace.
13874         (struct observer, struct observer_list, xalloc_observer_list_node)
13875         (xfree_observer_list_node, generic_observer_attach)
13876         (generic_observer_detach, generic_observer_notify): Remove.
13877         (_initialize_observer): Update.
13878         Don't include observer.inc.
13879         * Makefile.in (generated_files): Remove observer.h, observer.inc.
13880         (clean mostlyclean): Likewise.
13881         (observer.h, observer.inc): Remove targets.
13882         (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
13883         (COMMON_SFILES): Use observable.c, not observer.c.
13884         * .gitignore: Remove observer.h.
13885
13886 2018-03-18  Tom Tromey  <tom@tromey.com>
13887
13888         * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
13889         gdb::def_vector.
13890         (bfd_lookup_symbol_from_dyn_symtab): Likewise.
13891
13892 2018-03-17  Tom Tromey  <tom@tromey.com>
13893
13894         * auto-load.c (auto_load_objfile_script_1): Use std::string.
13895
13896 2018-03-17  Tom Tromey  <tom@tromey.com>
13897
13898         * target.c (class scoped_target_fd): New.
13899         (target_fileio_close_cleanup): Remove.
13900         (target_fileio_read_alloc_1): Use scoped_target_fd.
13901
13902 2018-03-16  Simon Marchi  <simon.marchi@polymtl.ca>
13903
13904         * silent-rules.mk: New.
13905         * Makefile.in: Include silent-rules.mk
13906         (srcdir, VPATH, top_srcdir): Move up.
13907         (COMPILE): Add ECHO_CXX.
13908         (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
13909         (init.c): Add ECHO_INIT_C.
13910         (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
13911         (version.c): Add ECHO_GEN.
13912         (printcmd.o): Add ECHO_CXX.
13913         (target-float.o): Add ECHO_CXX.
13914         (ada-exp.o): Add ECHO_CXX.
13915         (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
13916         (insight$(EXEEXT)): Add ECHO_CXXLD.
13917         * gnulib/configure.ac: Add AM_SILENT_RULES.
13918         * gnulib/aclocal.m4: Re-generate.
13919         * gnulib/configure: Re-generate.
13920         * gnulib/import/Makefile.in: Re-generate.
13921
13922 2018-03-16  Tom Tromey  <tom@tromey.com>
13923
13924         * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
13925         * utils.h (make_cleanup_free_section_addr_info): Don't declare.
13926         * utils.c (do_free_section_addr_info)
13927         (make_cleanup_free_section_addr_info): Remove.
13928         * symfile.h (struct other_sections): Add constructor.
13929         (struct section_addr_info): Remove.
13930         (section_addr_info): New typedef.
13931         (struct sym_fns) <sym_offsets>: Change type of parameter.
13932         (build_section_addr_info_from_objfile)
13933         (relative_addr_info_to_section_offsets, addr_info_make_relative)
13934         (default_symfile_offsets, symbol_file_add)
13935         (symbol_file_add_from_bfd)
13936         (build_section_addr_info_from_section_table): Update.
13937         (alloc_section_addr_info, free_section_addr_info): Don't declare.
13938         * symfile.c (alloc_section_addr_info): Remove.
13939         (build_section_addr_info_from_section_table): Change return type.
13940         Update.
13941         (build_section_addr_info_from_bfd)
13942         (build_section_addr_info_from_objfile): Likewise.
13943         (free_section_addr_info): Remove.
13944         (relative_addr_info_to_section_offsets): Change type of "addrs".
13945         (addrs_section_compar): Now a std::sort comparator.
13946         (addrs_section_sort): Change return type.
13947         (addr_info_make_relative): Change type of "addrs".  Update.
13948         (default_symfile_offsets, syms_from_objfile_1)
13949         (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
13950         (symbol_file_add_separate): Update.
13951         (symbol_file_add): Change type of "addrs".  Update.
13952         (add_symbol_file_command): Update.  Remove cleanups.
13953         * symfile-mem.c (symbol_file_add_from_memory): Update.  Remove
13954         cleanups.
13955         * symfile-debug.c (debug_sym_offsets): Change type of "info".
13956         * solib.c (solib_read_symbols): Update.
13957         * objfiles.c (objfile_relocate): Update.  Remove cleanups.
13958         * machoread.c (macho_symfile_offsets): Update.
13959         * jit.c (jit_bfd_try_read_symtab): Update.
13960
13961 2018-03-15  Simon Marchi  <simon.marchi@polymtl.ca>
13962
13963         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
13964         unittests/utils-selftests.c.
13965         * unittests/utils-selftests.c: New file.
13966
13967 2018-03-14  Tom Tromey  <tom@tromey.com>
13968
13969         PR cli/14977:
13970         * printcmd.c (printf_c_string, printf_wide_c_string): Special case
13971         for NULL.
13972
13973 2018-03-14  Tom Tromey  <tom@tromey.com>
13974
13975         PR cli/19918:
13976         * printcmd.c (printf_pointer): Allow "-" in format.
13977
13978 2018-03-14  Tom Tromey  <tom@tromey.com>
13979
13980         * printcmd.c (_initialize_printcmd): Add usage to printf.
13981
13982 2018-03-14  Yao Qi  <qiyao@sourceware.org>
13983
13984         * MAINTAINERS: Update my email address.
13985
13986 2018-03-13  Tom Tromey  <tom@tromey.com>
13987
13988         * machoread.c (macho_check_dsym): Change filenamep to a
13989         std::string*.
13990         (macho_symfile_read): Update.
13991         * symfile.c (load_command): Use std::string.
13992
13993 2018-03-12  Andrew Burgess  <andrew.burgess@embecosm.com>
13994
13995         * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
13996         to error message string.
13997         (riscv_register_name): Use xsnprintf instead of sprintf.
13998         (riscv_insn::fetch_instruction): Use gdb_assert instead of
13999         internal_error.
14000         (riscv_print_arg_location): Use gdb_assert_not_reached instead of
14001         error.
14002         (riscv_push_dummy_call): Likewise.
14003
14004 2018-03-12  Tom Tromey  <tom@tromey.com>
14005
14006         * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
14007         Use gdb::byte_vector.
14008         * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
14009
14010 2018-03-12  Yao Qi  <yao.qi@linaro.org>
14011
14012         * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
14013         parameter type to readable_regcache.
14014         * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
14015         the declaration.
14016
14017 2018-03-11  Tom Tromey  <tom@tromey.com>
14018
14019         * dwarf2read.c (struct nextfield): Add initializers.
14020         (struct nextfnfield): Remove.
14021         (struct fnfieldlist): Add initializers.  Remove "length" and
14022         "head", use std::vector.
14023         (struct decl_field_list): Remove.
14024         (struct field_info): Add initializers.
14025         <fields, baseclasses>: Now std::vector.
14026         <nbaseclasses, nfnfields, typedef_field_list_count,
14027         nested_types_list_count>: Remove.
14028         (dwarf2_add_field, dwarf2_add_type_defn)
14029         (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
14030         (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
14031         (process_structure_scope): Update.
14032
14033 2018-03-11  Tom Tromey  <tom@tromey.com>
14034
14035         * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
14036         for use by std::sort.
14037         (build_type_psymtabs_1): Use std::vector.
14038
14039 2018-03-09  Eli Zaretskii  <eliz@gnu.org>
14040
14041         * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
14042         and LIBMPFR in the printed configuration.
14043
14044 2018-03-08  Tom Tromey  <tom@tromey.com>
14045
14046         * source.c (get_filename_and_charpos): Use scoped_fd.
14047         * nto-procfs.c (procfs_open_1): Use scoped_fd.
14048         (procfs_pidlist): Likewise.
14049         * procfs.c (proc_get_LDT_entry): Use scoped_fd.
14050         (iterate_over_mappings): Likewise.
14051
14052 2018-03-08  Tom Tromey  <tom@tromey.com>
14053
14054         * infcall.c (struct call_return_meta_info)
14055         <stack_temporaries_enabled>: Remove.
14056         (get_call_return_value, call_function_by_hand_dummy): Update.
14057         * thread.c (disable_thread_stack_temporaries): Remove.
14058         (enable_thread_stack_temporaries): Remove.
14059         (thread_stack_temporaries_enabled_p): Return bool.
14060         (push_thread_stack_temporary, value_in_thread_stack_temporaries)
14061         (get_last_thread_stack_temporary): Update.
14062         * eval.c (evaluate_subexp): Update.
14063         * gdbthread.h (class enable_thread_stack_temporaries): Now a
14064         class, not a function.
14065         (value_ptr, value_vec): Remove typedefs.
14066         (class thread_info) <stack_temporaries_enabled>: Now bool.
14067         <stack_temporaries>: Now a std::vector.
14068         (thread_stack_temporaries_enabled_p)
14069         (value_in_thread_stack_temporaries): Return bool.
14070
14071 2018-03-08  Simon Marchi  <simon.marchi@ericsson.com>
14072
14073         * remote.c (putpkt_binary): Fix omitted bytes reporting.
14074         (getpkt_or_notif_sane_1): Likewise.
14075
14076 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
14077
14078         * build-id.c (build_id_to_debug_bfd): Use std::string.
14079
14080 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
14081
14082         * build-id.c (find_separate_debug_file_by_buildid): Return
14083         std::string.
14084         * build-id.h (find_separate_debug_file_by_buildid): Return
14085         std::string.
14086         * coffread.c (coff_symfile_read): Adjust to std::string.
14087         * elfread.c (elf_symfile_read): Adjust to std::string.
14088         * symfile.c (separate_debug_file_exists): Change parameter to
14089         std::string.
14090         (find_separate_debug_file): Return std::string.
14091         (find_separate_debug_file_by_debuglink): Return std::string.
14092         * symfile.h (find_separate_debug_file_by_debuglink): Return
14093         std::string.
14094
14095 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
14096
14097         * common/xml-utils.c (xml_escape_text): Move code to...
14098         (xml_escape_text_append): ... this new function.
14099         * common/xml-utils.h (xml_escape_text_append): New declaration.
14100         * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
14101         New function.
14102         (_initialize_xml_utils): register test_xml_escape_text_append as
14103         a selftest.
14104
14105 2018-03-07  Alan Hayward  <alan.hayward@arm.com>
14106
14107         * defs.h: Remove MAX_REGISTER_SIZE.
14108         * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
14109         asserts.
14110         * python/py-unwind.c (pyuw_sniffer): Likewise.
14111
14112 2018-03-07  Tom Tromey  <tom@tromey.com>
14113
14114         * linux-tdep.c (linux_info_proc): Update.
14115         * target.h (struct target_ops) <to_fileio_readlink>: Return
14116         optional<string>.
14117         (target_fileio_readlink): Return optional<string>.
14118         * remote.c (remote_hostio_readlink): Return optional<string>.
14119         * inf-child.c (inf_child_fileio_readlink): Return
14120         optional<string>.
14121         * target.c (target_fileio_readlink): Return optional<string>.
14122
14123 2018-03-07  Andrew Burgess  <andrew.burgess@embecosm.com>
14124
14125         * regcache.c (cooked_read_test): Add riscv to the list of
14126         architectures that have a save_reggroup.
14127
14128 2018-03-07  Andreas Arnez  <arnez@linux.vnet.ibm.com>
14129
14130         * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
14131         value is not a dynamic class object.
14132
14133 2018-03-06  Tom Tromey  <tom@tromey.com>
14134
14135         * rust-exp.y: Formatting fixes.
14136
14137 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
14138
14139         * riscv-tdep.c (riscv_register_name): Remove target description
14140         support.
14141         (riscv_gdbarch_init): Remove target description check.
14142
14143 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
14144
14145         * riscv-tdep.c: Remove 'Contributed by ...' lines from header
14146         comment.
14147         * riscv-tdep.h: Likewise.
14148
14149 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
14150
14151         * riscv-tdep.c (riscv_pseudo_register_read): Delete.
14152         (riscv_pseudo_register_write): Delete.
14153         (riscv_gdbarch_init): Remove all use of pseudo registers.
14154
14155 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
14156
14157         * record-btrace.c (btrace_print_lines): Replace cleanup
14158         parameter with RAII equivalents.
14159         (btrace_insn_history): Replace cleanup with RAII equivalents.
14160         * ui-out.h (make_cleanup_ui_out_list_begin_end,
14161         make_cleanup_ui_out_tuple_begin_end): Remove.
14162         * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
14163         make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
14164         make_cleanup_ui_out_list_begin_end): Remove.
14165
14166 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
14167
14168         * record-btrace.c (record_btrace_maybe_mark_async_event): Change
14169         parameter types to std::vector.  Use bool.
14170         (record_btrace_wait): Replace VEC(tp_t) with
14171         std::vector<thread_info *>.
14172         * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
14173
14174 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
14175
14176         * record-btrace.c (record_btrace_disable_callback): Remove.
14177         (struct scoped_btrace_disable): New.
14178         (record_btrace_open): Use scoped_btrace_disable.
14179
14180 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
14181
14182         * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
14183         reading values from registers.
14184
14185 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
14186
14187         * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
14188         where appropriate.
14189
14190 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
14191
14192         * riscv-tdep.c (riscv_print_arg_location): Add header comment,
14193         change parameter type.  Use GDB's print functions, and use
14194         core_addr_to_string where appropriate.
14195         (riscv_push_dummy_call): Use core_addr_to_string where
14196         appropriate, update call to riscv_print_arg_location, and reindent
14197         a few lines.
14198         (riscv_return_value): Update call to riscv_print_arg_location.
14199
14200 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
14201             Tim Newsome <tim@sifive.com>
14202             Albert Ou <a0u@eecs.berkeley.edu>
14203             Darius Rad <darius@bluespec.com>
14204
14205         * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
14206         (HFILES_NO_SRCDIR): Add riscv-tdep.h.
14207         (ALLDEPFILES): Add riscv-tdep.c
14208         * configure.tgt: Add riscv support.
14209         * riscv-tdep.c: New file.
14210         * riscv-tdep.h: New file.
14211         * NEWS: Mention new target.
14212         * MAINTAINERS: Add entry for riscv.
14213
14214 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
14215
14216         * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
14217         fields within aggregates.
14218
14219 2018-03-04  Simon Marchi  <simon.marchi@polymtl.ca>
14220
14221         * record-btrace.c (btrace_print_lines): Change type of flags to
14222         gdb_disassembly_flags.
14223
14224 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
14225
14226         * fbsd-nat.c: Include "inf-ptrace.h".
14227         (USE_SIGTRAP_SIGINFO): Conditionally define.
14228         [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
14229         (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
14230         [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
14231         function.
14232         [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
14233         Likewise.
14234         [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
14235         Likewise.
14236         (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
14237         "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
14238         "supports_stopped_by_hw_breakpoint" target methods.
14239
14240 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
14241
14242         * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
14243         * fbsd-nat.c (debug_fbsd_nat): New variable.
14244         (show_fbsd_nat_debug): New function.
14245         (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
14246         (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
14247
14248 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
14249
14250         * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
14251         * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
14252         prototype.
14253         * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
14254         (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
14255         method.
14256
14257 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
14258
14259         * common/gdb_vecs.c (free_char_ptr_vec): Remove.
14260         * common/gdb_vecs.h (free_char_ptr_vec): Remove.
14261
14262 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
14263
14264         * charset.c (struct charset_vector): New.
14265         (charsets): Change type to charset_vector.
14266         (find_charset_names): Adjust.
14267         (add_one): Adjust.
14268         (_initialize_charset): Adjust.
14269
14270 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
14271
14272         * progspace.h (struct program_space) <deleted_solibs>: Change
14273         type to std::vector<std::string>.
14274         * progspace.c (clear_program_space_solib_cache): Adjust.
14275         * breakpoint.c (print_solib_event): Adjust.
14276         (check_status_catch_solib): Adjust.
14277         * solib.c (update_solib_list): Adjust.
14278         * ui-out.h (class ui_out) <field_string>: New overload.
14279         * ui-out.c (ui_out::field_string): New overload.
14280
14281 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
14282
14283         * progspace.h (struct program_space): Add constructor and
14284         destructor, initialize fields.
14285         (add_program_space): Remove.
14286         * progspace.c (add_program_space): Rename to...
14287         (program_space::program_space): ... this.
14288         (release_program_space): Rename to...
14289         (program_space::~program_space): ... this.
14290         (delete_program_space): Use delete to delete program_space.
14291         (initialize_progspace): Use new to allocate program_space.
14292         * inferior.c (add_inferior_with_spaces): Likewise.
14293         (clone_inferior_command): Likewise.
14294         * infrun.c (follow_fork_inferior): Likewise.
14295         (handle_vfork_child_exec_or_exit): Likewise.
14296
14297 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
14298
14299         * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
14300         (delim_string_to_char_ptr_vec): Return std::vector of
14301         gdb::unique_xmalloc_ptr.
14302         (dirnames_to_char_ptr_vec_append): Take std::vector of
14303         gdb::unique_xmalloc_ptr.
14304         (dirnames_to_char_ptr_vec): Return std::vector of
14305         gdb::unique_xmalloc_ptr.
14306         * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
14307         Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
14308         (delim_string_to_char_ptr_vec): Return an std::vector of
14309         gdb::unique_xmalloc_ptr, adjust the code.
14310         (dirnames_to_char_ptr_vec_append): Take an std::vector of
14311         gdb::unique_xmalloc_ptr, adjust the code.
14312         (dirnames_to_char_ptr_vec): Return an std::vector of
14313         gdb::unique_xmalloc_ptr, adjust the code.
14314         * auto-load.c (auto_load_safe_path_vec): Change type to
14315         std::vector of gdb::unique_xmalloc_ptr.
14316         (auto_load_expand_dir_vars): Return an std::vector of
14317         gdb::unique_xmalloc_ptr, adjust the code.
14318         (auto_load_safe_path_vec_update): Adjust.
14319         (filename_is_in_auto_load_safe_path_vec): Adjust.
14320         (auto_load_objfile_script_1): Adjust.
14321         * build-id.c (build_id_to_debug_bfd): Adjust.
14322         * linux-thread-db.c (thread_db_load_search): Adjust.
14323         * source.c (add_path): Adjust.
14324         (openp): Adjust.
14325         * symfile.c (find_separate_debug_file): Adjust.
14326         * utils.c (do_free_char_ptr_vec): Remove.
14327         (make_cleanup_free_char_ptr_vec): Remove.
14328
14329 2018-03-01  Sergio Durigan Junior  <sergiodj@redhat.com>
14330
14331         PR gdb/22907
14332         * common/pathstuff.c: Conditionally include "<windows.h>".
14333
14334 2018-03-01  Georg Sauthoff  <mail@georg.so>
14335
14336         PR gdb/22888
14337         * gcore.in: Quote variables and switch interpreter to bash.
14338
14339 2018-03-01  Tom Tromey  <tom@tromey.com>
14340
14341         * dwarf2read.c (alloc_discriminant_info): Fix default_index
14342         assertion.  Add assertion for discriminant_index.
14343         (quirk_rust_enum): Use correct base type name in univariant case.
14344
14345 2018-03-01  Simon Marchi  <simon.marchi@ericsson.com>
14346
14347         * record.c (get_call_history_modifiers): Return a
14348         record_print_flags.
14349         (cmd_record_call_history): Adjust.
14350         * record-btrace.c (record_btrace_call_history): Adjust.
14351         (record_btrace_call_history_range): Adjust.
14352         (record_btrace_call_history_from): Adjust.
14353         * target-debug.h (target_debug_print_record_print_flags): New.
14354         * target-delegates.c: Re-generate.
14355         * target.c (target_call_history): Change flags type.
14356         (target_call_history_from): Likewise.
14357         (target_call_history_range): Likewise.
14358         * target.h (struct target_ops) <target_call_history>: Likewise.
14359         (target_call_history_from): Likewise.
14360         (target_call_history_range): Likewise.
14361
14362 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
14363             Simon Marchi  <simon.marchi@polymtl.ca>
14364
14365         * common/common-utils.c: Include "sys/stat.h".
14366         (is_regular_file): Move here from "source.c"; change return
14367         type to "bool".
14368         * common/common-utils.h (is_regular_file): New prototype.
14369         * common/pathstuff.c (contains_dir_separator): New function.
14370         * common/pathstuff.h (contains_dir_separator): New prototype.
14371         * source.c: Don't include "sys/stat.h".
14372         (is_regular_file): Move to "common/common-utils.c".
14373
14374 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
14375
14376         * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
14377         (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
14378         * auto-load.c: Include "common/pathstuff.h".
14379         * common/common-def.h (current_directory): Move here.
14380         * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
14381         function.
14382         * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
14383         prototype.
14384         * common/pathstuff.c: New file.
14385         * common/pathstuff.h: New file.
14386         * compile/compile.c: Include "common/pathstuff.h".
14387         * defs.h (current_directory): Move to "common/common-defs.h".
14388         * dwarf2read.c: Include "common/pathstuff.h".
14389         * exec.c: Likewise.
14390         * guile/scm-safe-call.c: Likewise.
14391         * linux-thread-db.c: Likewise.
14392         * main.c: Likewise.
14393         * nto-tdep.c: Likewise.
14394         * objfiles.c: Likewise.
14395         * source.c: Likewise.
14396         * symtab.c: Likewise.
14397         * utils.c: Include "common/pathstuff.h".
14398         (gdb_realpath): Move to "common/pathstuff.c".
14399         (gdb_realpath_keepfile): Likewise.
14400         (gdb_abspath): Likewise.
14401         * utils.h (gdb_realpath): Move to "common/pathstuff.h".
14402         (gdb_realpath_keepfile): Likewise.
14403         (gdb_abspath): Likewise.
14404
14405 2018-02-28  John Baldwin  <jhb@FreeBSD.org>
14406
14407         * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
14408         wildcard process pid for super_resume for kernels with a
14409         specific bug.
14410
14411 2018-02-27  Phil Muldoon  <pmuldoon@redhat.com>
14412
14413         * compile/compile.c (get_args): Add additional comments
14414         explaining function.
14415
14416 2018-02-27  Simon Marchi  <simon.marchi@polymtl.ca>
14417             Tom Tromey  <tom@tromey.com>
14418
14419         * target.h (memory_write_request_s): Remove typedef.  Don't define
14420         VEC.
14421         (target_write_memory_blocks): Change argument to std::vector.
14422         (struct memory_write_request): Add constructor.
14423         * target-memory.c (compare_block_starting_address): Return bool.
14424         Change argument types.
14425         (claim_memory): Change arguments to use std::vector.
14426         (split_regular_and_flash_blocks, blocks_to_erase)
14427         (compute_garbled_blocks): Likewise.
14428         (cleanup_request_data, cleanup_write_requests_vector): Remove.
14429         (target_write_memory_blocks): Change argument to std::vector.
14430         * symfile.c (struct load_section_data): Add constructor and
14431         destructor.  Use std::vector for "requests".
14432         (struct load_progress_data): Add initializers.
14433         (load_section_callback): Update.  Use "new".
14434         (clear_memory_write_data): Remove.
14435         (generic_load): Update.
14436
14437 2018-02-27  Alan Hayward  <alan.hayward@arm.com>
14438
14439         * arch/aarch64.h: Use common/tdesc.h.
14440
14441 2018-02-26  Maciej W. Rozycki  <macro@mips.com>
14442
14443         * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
14444         architecture with a 64-bit ABI.
14445
14446 2018-02-26  Maciej W. Rozycki  <macro@mips.com>
14447
14448         * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
14449         ahead of target description loading.
14450
14451 2018-02-26  Tom Tromey  <tom@tromey.com>
14452
14453         * stack.c (backtrace_command_1): Update.
14454         * python/python-internal.h (gdbpy_apply_frame_filter): Change type
14455         of "flags".
14456         * python/py-framefilter.c (py_print_frame)
14457         (gdbpy_apply_frame_filter): Change type of "flags".
14458         * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
14459         of "flags".
14460         (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
14461         (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
14462         * extension.h (enum frame_filter_flag): Rename from
14463         frame_filter_flags.
14464         (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
14465         (apply_ext_lang_frame_filter): Change type of "flags".
14466         * extension.c (apply_ext_lang_frame_filter): Change type of
14467         "flags".
14468         * extension-priv.h (struct extension_language_ops)
14469         <apply_frame_filter>: Change type of "flags".
14470
14471 2018-02-26  Tom Tromey  <tom@tromey.com>
14472
14473         PR python/16497:
14474         * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag.  Fix
14475         off-by-one in py_end computation.
14476         * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
14477         PRINT_MORE_FRAMES.
14478         * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
14479         constant.
14480
14481 2018-02-26  Tom Tromey  <tom@tromey.com>
14482
14483         * dwarf2read.c (struct variant_field): New.
14484         (struct nextfield) <variant>: New field.
14485         (dwarf2_add_field): Handle DW_TAG_variant_part.
14486         (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
14487         discriminated union.
14488         (read_structure_type): Handle DW_TAG_variant_part.
14489         (handle_struct_member_die): New function, extracted from
14490         process_structure_scope.  Handle DW_TAG_variant.
14491         (process_structure_scope): Handle discriminated unions.  Call
14492         handle_struct_member_die.
14493
14494 2018-02-26  Tom Tromey  <tom@tromey.com>
14495
14496         * rust-lang.h (rust_last_path_segment): Declare.
14497         * rust-lang.c (rust_last_path_segment): Now public.  Change
14498         contract.
14499         (struct disr_info): Remove.
14500         (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
14501         (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
14502         (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
14503         (rust_enum_p, rust_enum_variant): New function.
14504         (rust_underscore_fields): Remove "offset" parameter.
14505         (rust_print_enum): New function.
14506         (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
14507         <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
14508         (rust_print_struct_def): Add "for_rust_enum" parameter.  Handle
14509         enums.
14510         (rust_internal_print_type): New function, from rust_print_type.
14511         Remove enum code.
14512         (rust_print_type): Call rust_internal_print_type.
14513         (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
14514         Update enum handling.
14515         * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
14516         (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
14517         (rust_union_quirks): New functions.
14518         (process_full_comp_unit, process_full_type_unit): Call
14519         rust_union_quirks.
14520         (process_structure_scope): Update rust_unions if necessary.
14521
14522 2018-02-26  Tom Tromey  <tom@tromey.com>
14523
14524         * value.h (value_union_variant): Declare.
14525         * valops.c (value_union_variant): New function.
14526         * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
14527         (struct discriminant_info): New.
14528         (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
14529         enumerator.
14530         (struct main_type) <flag_discriminated_union>: New field.
14531
14532 2018-02-26  Tom Tromey  <tom@tromey.com>
14533
14534         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
14535         unittests/unpack-selftests.c.
14536         * unittests/unpack-selftests.c: New file.
14537         * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
14538
14539 2018-02-26  Yao Qi  <yao.qi@linaro.org>
14540
14541         * dwarf2read.c (struct partial_die_info) <read>: New method.
14542         (read_partial_die): Remove the declaration.
14543         (load_partial_dies): Update.
14544         (partial_die_info::partial_die_info):
14545         (read_partial_die): Change it to partial_die_info::read.
14546
14547 2018-02-26  Yao Qi  <yao.qi@linaro.org>
14548
14549         * dwarf2read.c (struct partial_die_info) <fixup>: New method.
14550         (fixup_partial_die): Remove declaration.
14551         (scan_partial_symbols): Update.
14552         (partial_die_parent_scope): Likewise.
14553         (partial_die_full_name): Likewise.
14554         (fixup_partial_die): Change it to partial_die_info::fixup.
14555
14556 2018-02-26  Yao Qi  <yao.qi@linaro.org>
14557
14558         * dwarf2read.c (read_partial_die): Update the declaration.
14559         (load_partial_dies): Caller update.
14560         (read_partial_die): Remove one argument abbrev_len.
14561
14562 2018-02-26  Yao Qi  <yao.qi@linaro.org>
14563
14564         * dwarf2read.c (struct partial_die_info): Add ctor, delete
14565         assignment operator.
14566         (load_partial_dies): Use ctor and copy ctor.
14567         (read_partial_die): Update.
14568         (dwarf2_cu::find_partial_die): Use ctor.
14569
14570 2018-02-26  Yao Qi  <yao.qi@linaro.org>
14571
14572         * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
14573         (find_partial_die_in_comp_unit): Change it to
14574         dwarf2_cu::find_partial_die.
14575         (find_partial_die): Update.
14576
14577 2018-02-26  Yao Qi  <yao.qi@linaro.org>
14578
14579         * dwarf2read.c (read_partial_die): Remove the code checking abbrev
14580         is NULL.
14581
14582 2018-02-26  Yao Qi  <yao.qi@linaro.org>
14583
14584         * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
14585
14586 2018-02-26  Alan Hayward  <alan.hayward@arm.com>
14587
14588         * arch/amd64.h: Use common/tdesc.h.
14589         * arch/i386.c: Likewise.
14590         * arch/i386.h: Likewise.
14591         * arch/tic6x.c: Likewise.
14592         * arch/tdesc.h: Move file from here...
14593         * common/tdesc.h: ...to here.
14594         * features/aarch64-core.c: Regenerate.
14595         * features/aarch64-fpu.c: Regenerate.
14596         * features/i386/32bit-avx.c: Regenerate.
14597         * features/i386/32bit-avx512.c: Regenerate.
14598         * features/i386/32bit-core.c: Regenerate.
14599         * features/i386/32bit-linux.c: Regenerate.
14600         * features/i386/32bit-mpx.c: Regenerate.
14601         * features/i386/32bit-pkeys.c: Regenerate.
14602         * features/i386/32bit-sse.c: Regenerate.
14603         * features/i386/64bit-avx.c: Regenerate.
14604         * features/i386/64bit-avx512.c: Regenerate.
14605         * features/i386/64bit-core.c: Regenerate.
14606         * features/i386/64bit-linux.c: Regenerate.
14607         * features/i386/64bit-mpx.c: Regenerate.
14608         * features/i386/64bit-pkeys.c: Regenerate.
14609         * features/i386/64bit-segments.c: Regenerate.
14610         * features/i386/64bit-sse.c: Regenerate.
14611         * features/i386/x32-core.c: Regenerate.
14612         * features/tic6x-c6xp.c: Regenerate.
14613         * features/tic6x-core.c: Regenerate.
14614         * features/tic6x-gp.c: Regenerate.
14615         * target-descriptions.c: Use common/tdesc.h.
14616         * target-descriptions.h: Likewise.
14617
14618 2018-02-24  Tom Tromey  <tom@tromey.com>
14619
14620         * linux-thread-db.c (try_thread_db_load_from_pdir_1)
14621         (try_thread_db_load_from_dir, thread_db_load_search): Use
14622         std::string.
14623         (info_auto_load_libthread_db_compare): Return bool.  Change
14624         argument types.
14625         (info_auto_load_libthread_db): Use std::vector, std::string.
14626         Remove cleanups.
14627
14628 2018-02-24  Tom Tromey  <tom@tromey.com>
14629
14630         * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
14631         std::string.
14632         * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
14633         std::string*.
14634         * gdbarch.c: Rebuild.
14635         * gdbarch.h: Rebuild.
14636         * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
14637         * arch-utils.h (default_fast_tracepoint_valid_at): Update.
14638         * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
14639         std::string*.
14640
14641 2018-02-23  Simon Marchi  <simon.marchi@polymtl.ca>
14642
14643         * gdbtypes.h (sect_offset): Change type to uint64_t.
14644         (sect_offset_str): New function.
14645         * dwarf2read.c (create_addrmap_from_aranges): Use
14646         sect_offset_str.
14647         (error_check_comp_unit_head): Likewise.
14648         (create_debug_type_hash_table): Likewise.
14649         (read_cutu_die_from_dwo): Likewise.
14650         (init_cutu_and_read_dies): Likewise.
14651         (init_cutu_and_read_dies_no_follow): Likewise.
14652         (process_psymtab_comp_unit_reader): Likewise.
14653         (partial_die_parent_scope): Likewise.
14654         (peek_die_abbrev): Likewise.
14655         (process_queue): Likewise.
14656         (dwarf2_physname): Likewise.
14657         (read_namespace_alias): Likewise.
14658         (read_import_statement): Likewise.
14659         (create_dwo_cu_reader): Likewise.
14660         (create_cus_hash_table): Likewise.
14661         (lookup_dwo_cutu): Likewise.
14662         (inherit_abstract_dies): Likewise.
14663         (read_func_scope): Likewise.
14664         (read_call_site_scope): Likewise.
14665         (dwarf2_add_member_fn): Likewise.
14666         (read_common_block): Likewise.
14667         (read_module_type): Likewise.
14668         (read_typedef): Likewise.
14669         (read_subrange_type): Likewise.
14670         (load_partial_dies): Likewise.
14671         (read_partial_die): Likewise.
14672         (find_partial_die): Likewise.
14673         (read_str_index): Likewise.
14674         (dwarf2_string_attr): Likewise.
14675         (build_error_marker_type): Likewise.
14676         (lookup_die_type): Likewise.
14677         (dump_die_shallow): Likewise.
14678         (follow_die_ref): Likewise.
14679         (dwarf2_fetch_die_loc_sect_off): Likewise.
14680         (dwarf2_fetch_constant_bytes): Likewise.
14681         (follow_die_sig): Likewise.
14682         (get_signatured_type): Likewise.
14683         (get_DW_AT_signature_type): Likewise.
14684         (dwarf2_find_containing_comp_unit): Likewise.
14685         (set_die_type): Likewise.
14686
14687 2018-02-21  John Baldwin  <jhb@FreeBSD.org>
14688
14689         * arch/aarch64.c: Include "common-defs.h".
14690         * arch/amd64.c: Likewise.
14691         * arch/i386.c: Likewise.
14692
14693 2018-02-21  Tom Tromey  <tom@tromey.com>
14694
14695         * value.h: (extract_field_op): Update.
14696         * eval.c (extract_field_op): Return a const char *.
14697         * expression.h (parse_expression_for_completion): Update.
14698         * completer.c (complete_expression): Update.
14699         (add_struct_fields): Make fieldname const.
14700         * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
14701         (mark_completion_tag, parse_exp_in_context_1): Update.
14702         (parse_expression_for_completion): Change "name" to
14703         unique_xmalloc_ptr*.
14704
14705 2018-02-21  Tom Tromey  <tom@tromey.com>
14706
14707         * infcall.c (call_function_by_hand_dummy): Use std::vector.
14708
14709 2018-02-21  Yao Qi  <yao.qi@linaro.org>
14710
14711         * avr-tdep.c (avr_read_pc): Change parameter type to
14712         readable_regcache.
14713         * gdbarch.sh (read_pc): Likewise.
14714         * gdbarch.c: Re-generated.
14715         * gdbarch.h: Re-generated.
14716         * hppa-tdep.c (hppa_read_pc): Change parameter type to
14717         readable_regcache.
14718         * ia64-tdep.c (ia64_read_pc): Likewise.
14719         * mips-tdep.c (mips_read_pc): Likewise.
14720         * spu-tdep.c (spu_read_pc): Likewise.
14721
14722 2018-02-21  Yao Qi  <yao.qi@linaro.org>
14723
14724         * Makefile.in (COMMON_SFILES): Add regcache-dump.c
14725         * regcache-dump.c: New file.
14726         * regcache.c: Move register_dump to regcache-dump.c.
14727         (maintenance_print_registers): Likewise.
14728         (maintenance_print_raw_registers): Likewise.
14729         (maintenance_print_cooked_registers): Likewise.
14730         (maintenance_print_register_groups): Likewise.
14731         (maintenance_print_remote_registers): Likewise.
14732         (_initialize_regcache): Likewise.
14733         * regcache.h (register_dump): Moved from regcache.c.
14734
14735 2018-02-21  Yao Qi  <yao.qi@linaro.org>
14736
14737         * regcache.c (regcache::regcache): Update.
14738         (regcache::invalidate): Move it to detached_regcache::invalidate.
14739         (get_thread_arch_aspace_regcache): Update.
14740         (regcache::raw_update): Update.
14741         (regcache::cooked_read): Remove some code.
14742         (regcache::cooked_read_value): Likewise.
14743         (regcache::raw_write): Remove assert on m_readonly_p.
14744         (regcache::raw_supply_integer): Move it to
14745         detached_regcache::raw_supply_integer.
14746         (regcache::raw_supply_zeroed): Likewise.
14747         * regcache.h (detached_regcache) <raw_supply_integer>: New
14748         declaration.
14749         <raw_supply_zeroed, invalidate>: Likewise.
14750         (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
14751         <invalidate>: Likewise.
14752         <m_readonly_p>: Removed.
14753
14754 2018-02-21  Yao Qi  <yao.qi@linaro.org>
14755
14756         * infcmd.c (get_return_value): Let stop_regs point to
14757         get_current_regcache.
14758         * regcache.c (regcache::regcache): Remove.
14759         (register_dump_reg_buffer): New class.
14760         (regcache_print): Adjust.
14761         * regcache.h (regcache): Remove constructors.
14762
14763 2018-02-21  Yao Qi  <yao.qi@linaro.org>
14764
14765         * regcache.c (class register_dump): New class.
14766         (register_dump_regcache, register_dump_none): New class.
14767         (register_dump_remote, register_dump_groups): New class.
14768         (regcache_print): Update.
14769         * regcache.h (regcache_dump_what): Move it to regcache.c.
14770         (regcache) <dump>: Remove.
14771
14772 2018-02-21  Yao Qi  <yao.qi@linaro.org>
14773
14774         * jit.c (struct jit_unwind_private) <regcache>: Change its type to
14775          reg_buffer_rw *.
14776         (jit_unwind_reg_set_impl): Call raw_supply.
14777         (jit_frame_sniffer): Use reg_buffer_rw.
14778         * record-full.c (record_full_core_regbuf): Change its type.
14779         (record_full_core_open_1): Use reg_buffer_rw.
14780         (record_full_close): Likewise.
14781         (record_full_core_fetch_registers): Use regcache->raw_supply.
14782         (record_full_core_store_registers): Likewise.
14783         * regcache.c (regcache::get_register_status): Move it to
14784         reg_buffer.
14785         (regcache_raw_set_cached_value): Remove.
14786         (regcache::raw_set_cached_value): Remove.
14787         (regcache::raw_write): Call raw_supply.
14788         (regcache::raw_supply): Move it to reg_buffer_rw.
14789         * regcache.h (regcache_raw_set_cached_value): Remove.
14790         (reg_buffer_rw): New class.
14791
14792 2018-02-21  Yao Qi  <yao.qi@linaro.org>
14793
14794         * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
14795         readonly_detached_regcache.
14796         (dummy_frame_prev_register): Use regcache->cooked_read.
14797         * frame.c (frame_save_as_regcache): Change return type.
14798         (frame_pop): Update.
14799         * frame.h (frame_save_as_regcache): Update declaration.
14800         * inferior.h (get_infcall_suspend_state_regcache): Update
14801         declaration.
14802         * infrun.c (infcall_suspend_state) <registers>: use
14803         readonly_detached_regcache.
14804         (save_infcall_suspend_state): Don't use regcache_dup.
14805         (get_infcall_suspend_state_regcache): Change return type.
14806         * linux-fork.c (struct fork_info) <savedregs>: Change to
14807         readonly_detached_regcache.
14808         <pc>: New field.
14809         (fork_save_infrun_state): Don't use regcache_dup.
14810         (info_checkpoints_command): Adjust.
14811         * mi/mi-main.c (register_changed_p): Update declaration.
14812         (mi_cmd_data_list_changed_registers): Use
14813         readonly_detached_regcache.
14814         (register_changed_p): Change parameter type to
14815         readonly_detached_regcache.
14816         * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
14817         readonly_detached_regcache.
14818         (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
14819         * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
14820         New.
14821         (regcache::save): Move it to reg_buffer.
14822         (regcache::restore): Change parameter type.
14823         (regcache_dup): Remove.
14824         * regcache.h (reg_buffer) <save>: New method.
14825         (readonly_detached_regcache): New class.
14826         * spu-tdep.c (spu2ppu_cache) <regcache>: Use
14827         readonly_detached_regcache.
14828         (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
14829
14830 2018-02-21  Yao Qi  <yao.qi@linaro.org>
14831
14832         * frame.c (frame_save_as_regcache): Use regcache method save.
14833         (frame_pop): Use regcache method restore.
14834         * infrun.c (restore_infcall_suspend_state): Likewise.
14835         * linux-fork.c (fork_load_infrun_state): Likewise.
14836         * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
14837         save.
14838         * regcache.c (regcache_save): Remove.
14839         (regcache::restore): More asserts.
14840         (regcache_cpy): Remove.
14841         * regcache.h (regcache_save): Remove the declaration.
14842         (regcache::restore): Move from private to public.
14843         Remove the friend declaration of regcache_cpy.
14844         (regcache_cpy): Remove declaration.
14845
14846 2018-02-21  Yao Qi  <yao.qi@linaro.org>
14847
14848         * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
14849         parameter type to 'readable_regcache *'.
14850         * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
14851         * arm-tdep.c (arm_neon_quad_read): Likewise.
14852         (arm_pseudo_read): Likewise.
14853         * avr-tdep.c (avr_pseudo_register_read): Likewise.
14854         * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
14855         * frv-tdep.c (frv_pseudo_register_read): Likewise.
14856         * gdbarch.c: Re-generated.
14857         * gdbarch.h: Re-generated.
14858         * gdbarch.sh (pseudo_register_read): Change parameter type to
14859         'readable_regcache *'.
14860         (pseudo_register_read_value): Likewise.
14861         * h8300-tdep.c (pseudo_from_raw_register): Likewise.
14862         (h8300_pseudo_register_read): Likewise.
14863         * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
14864         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
14865         (i386_pseudo_register_read_into_value): Likewise.
14866         (i386_pseudo_register_read_value): Likewise.
14867         * i386-tdep.h (i386_pseudo_register_read_into_value): Update
14868         declaration.
14869         * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
14870         * m32c-tdep.c (m32c_raw_read): Likewise.
14871         (m32c_read_flg): Likewise.
14872         (m32c_banked_register): Likewise.
14873         (m32c_banked_read): Likewise.
14874         (m32c_sb_read): Likewise.
14875         (m32c_part_read): Likewise.
14876         (m32c_cat_read): Likewise.
14877         (m32c_r3r2r1r0_read): Likewise.
14878         (m32c_pseudo_register_read): Likewise.
14879         * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
14880         * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
14881         (mep_pseudo_cr64_read): Likewise.
14882         (mep_pseudo_register_read): Likewise.
14883         * mips-tdep.c (mips_pseudo_register_read): Likewise.
14884         * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
14885         * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
14886         * regcache.c (regcache::raw_read): Move it to readable_regcache.
14887         (regcache::cooked_read): Likewise.
14888         (regcache::cooked_read_value): Likewise.
14889         (regcache_cooked_read_signed):
14890         (regcache::cooked_read): Likewise.
14891         * regcache.h (readable_regcache): New class.
14892         (regcache): Inherit readable_regcache.  Move some methods to
14893         readable_regcache.
14894         * rl78-tdep.c (rl78_pseudo_register_read): Change
14895         parameter type to 'readable_regcache *'.
14896         * rs6000-tdep.c (do_regcache_raw_read): Remove.
14897         (e500_pseudo_register_read): Change parameter type to
14898         'readable_regcache *'.
14899         (dfp_pseudo_register_read): Likewise.
14900         (vsx_pseudo_register_read): Likewise.
14901         (efpr_pseudo_register_read): Likewise.
14902         * s390-tdep.c (s390_pseudo_register_read): Likewise.
14903         * sh-tdep.c (sh_pseudo_register_read): Likewise.
14904         * sh64-tdep.c (pseudo_register_read_portions): Likewise.
14905         (sh64_pseudo_register_read): Likewise.
14906         * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
14907         * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
14908         * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
14909         (spu_pseudo_register_read): Likewise.
14910         * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
14911         (xtensa_pseudo_register_read): Likewise.
14912
14913 2018-02-21  Yao Qi  <yao.qi@linaro.org>
14914
14915         * regcache.c (regcache::regcache): Call reg_buffer ctor.
14916         (regcache::arch): Move it to reg_buffer::arch.
14917         (regcache::register_buffer): Likewise.
14918         (regcache::assert_regnum): Likewise.
14919         (regcache::num_raw_registers): Likewise.
14920         * regcache.h (reg_buffer): New class.
14921         (regcache): Inherit reg_buffer.
14922
14923 2018-02-20  Simon Marchi  <simon.marchi@ericsson.com>
14924
14925         * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
14926         gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
14927
14928 2018-02-20  Markus Metzger  <markus.t.metzger@intel.com>
14929
14930         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
14931
14932 2018-02-19  Alan Hayward  <alan.hayward@arm.com>
14933
14934         * Makefile.in: (COMMON_SFILES): Add common/*.c files.
14935         (SFILES): Remove common/*.c files.
14936         (COMMON_OBS): Remove some *.o files built from common/*.c files.
14937         * common/common.host: Add common reference.
14938         * configure.ac: Likewise.
14939         * configure: Regenerate.
14940
14941 2018-02-16  Yao Qi  <yao.qi@linaro.org>
14942
14943         * block.c (block_namespace_info): Inherit allocate_on_obstack.
14944         (block_initialize_namespace): Use new.
14945         * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
14946         (dwarf2_free_objfile): Use delete.
14947         * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
14948         (copy_type_recursive): Use new.
14949         * gdb_obstack.h (allocate_on_obstack): New.
14950
14951 2018-02-15  Yao Qi  <yao.qi@linaro.org>
14952
14953         PR gdb/22849
14954         * inferior.c (exit_inferior_1): Reset inf->control.
14955
14956 2018-02-15  Joel Brobecker  <brobecker@adacore.com>
14957
14958         * ada-lang.c (ada_to_fixed_value_create): Delete advance
14959         declaration.
14960
14961 2018-02-14  Pedro Alves  <palves@redhat.com>
14962
14963         * frame-unwind.c (frame_unwind_try_unwinder): Always call
14964         frame_cleanup_after_sniffer on exception.
14965
14966 2018-02-14  Tom Tromey  <tom@tromey.com>
14967
14968         * solist.h (struct target_so_ops) <bfd_open>: Make pathname
14969         const.
14970         (solib_bfd_open): Make pathname const.
14971         * solib.c (solib_bfd_open): Make pathname const.
14972         * solib-spu.c (spu_bfd_fopen): Make name const.
14973         (spu_bfd_open): Make pathname const.
14974         * solib-darwin.c (darwin_bfd_open): Make pathname const.
14975         * solib-aix.c (solib_aix_bfd_open): Make pathname const.
14976
14977 2018-02-14  Tom Tromey  <tom@tromey.com>
14978
14979         * symfile.c (symfile_bfd_open): Update.
14980         * source.h (openp, source_full_path_of, find_and_open_source):
14981         Change argument type to unique_xmalloc_ptr.
14982         * source.c (openp): Take a unique_xmalloc_ptr.
14983         (source_full_path_of, find_and_open_source): Likewise.
14984         (open_source_file, symtab_to_fullname): Update.
14985         * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
14986         unique_xmalloc_ptr.
14987         * solib.c (solib_find_1): Use unique_xmalloc_ptr.
14988         (exec_file_find): Update.
14989         * psymtab.c (psymtab_to_fullname): Update.
14990         * nto-tdep.h (nto_find_and_open_solib): Update.
14991         * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
14992         unique_xmalloc_ptr.
14993         * exec.c (exec_file_attach): Update.
14994         * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
14995         * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
14996
14997 2018-02-14  Tom Tromey  <tom@tromey.com>
14998
14999         * solib.c: Include source.h.
15000         * nto-tdep.c: Include source.h.
15001         * mi/mi-cmd-env.c: Include source.h.
15002         * infcmd.c: Include source.h.
15003         * exec.c: Include source.h.
15004         * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
15005         (add_path, directory_switch, source_path, init_source_path): Move
15006         declarations...
15007         * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
15008         (add_path, directory_switch, source_path, init_source_path):
15009         ...here.
15010
15011 2018-02-14  Tom Tromey  <tom@tromey.com>
15012
15013         * solist.h (exec_file_find, solib_find): Return
15014         unique_xmalloc_ptr.
15015         (solib_bfd_fopen): Take a const char *.
15016         * solib.c (solib_find_1): Return unique_xmalloc_ptr.
15017         (exec_file_find, solib_find): Likewise.
15018         (solib_bfd_fopen): Do not take ownership of "pathname".
15019         (solib_bfd_open): Use unique_xmalloc_ptr.
15020         * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
15021         * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
15022         * infrun.c (follow_exec): Use unique_xmalloc_ptr.
15023         * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
15024
15025 2018-02-14  Joel Brobecker  <brobecker@adacore.com>
15026
15027         * ada-lang.c (name_match_type_from_name): Remove reference to
15028         ada_name_for_lookup in function's documentation.
15029         * ada-lang.h (ada_name_for_lookup): Delete declaration.
15030
15031 2018-02-13  Simon Marchi  <simon.marchi@polymtl.ca>
15032
15033         * defs.h (enum openp_flags): New enum.
15034         (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
15035         Move to enum openp_flags.
15036         (openp_flags): New enum flags.
15037         (openp): Change parameter type to openp_flags.
15038         * source.c (openp): Change parameter type to openp_flags.
15039         * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
15040         * dwarf2read.c (try_open_dwop_file): Use openp_flags.
15041
15042 2018-02-13  Simon Marchi  <simon.marchi@polymtl.ca>
15043
15044         * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
15045         per-command.
15046
15047 2018-02-12  Andrew Burgess  <andrew.burgess@embecosm.com>
15048
15049         * dwarf2read.c (dwarf2_release_queue): Delete function, move body
15050         into...
15051         (class dwarf2_queue_guard): ...the destructor of this new class.
15052         (dw2_do_instantiate_symtab): Create instance of the new class
15053         dwarf2_queue_guard, remove cleanup.
15054
15055 2018-02-09  Tom Tromey  <tom@tromey.com>
15056
15057         * source.c (find_source_lines): Don't reference past the end of
15058         the vector.
15059
15060 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
15061
15062         * remote.c (remote_btrace_maybe_reopen): Change error message.
15063         * btrace.c (btrace_enable): Likewise.
15064         (parse_xml_btrace): Likewise.
15065         (parse_xml_btrace_conf): Likewise.
15066
15067 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
15068
15069         * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
15070         (linux_enable_pt, linux_enable_bts): Call
15071         diagnose_perf_event_open_fail.
15072
15073 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
15074
15075         * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
15076         Remove parameter and change return type.  Update callers.  Move it.
15077         (linux_enable_bts, linux_enable_pt): Improve error message.
15078         (linux_enable_pt): Remove zero buffer size check.
15079         (linux_enable_btrace): Improve error messages.  Remove NULL return
15080         check.
15081
15082 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
15083
15084         * btrace.c (btrace_enable): Remove target_supports_btrace call.
15085         * nat/linux-btrace.c (perf_event_pt_event_type): Move.
15086         (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
15087         (linux_supports_pt, linux_supports_btrace): Remove.
15088         (linux_enable_bts): Call cpu_supports_bts.
15089         * nat/linux-btrace.h (linux_supports_btrace): Remove.
15090         * remote.c (remote_supports_btrace): Remove.
15091         (init_remote_ops): Remove remote_supports_btrace.
15092         * target-delegates.c: Regenerated.
15093         * target.c (target_supports_btrace): Remove.
15094         * target.h (target_ops) <to_supports_btrace>: Remove
15095         (target_supports_btrace): Remove.
15096         * x86-linux-nat.c (x86_linux_create_target): Remove
15097         linux_supports_btrace.
15098
15099 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
15100
15101         * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
15102         btrace failed.
15103         * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
15104         exception and use message in own exception.
15105
15106 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
15107
15108         * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
15109         (perf_event_pt_event_type): Use gdb_file_up.
15110         (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
15111         scoped_fd, and scoped_mmap.
15112
15113 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
15114
15115         * common/scoped_mmap.h: New.
15116         * unittests/scoped_mmap-selftest.c: New.
15117         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
15118         unittests/scoped_mmap-selftest.c.
15119
15120 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
15121
15122         * common/scoped_fd.h: New.
15123         * unittests/scoped_fd-selftest.c: New.
15124         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
15125         unittests/scoped_fd-selftest.c.
15126
15127 2018-02-09  Tom Tromey  <tom@tromey.com>
15128
15129         * auto-load.c (auto_load_section_scripts): Use
15130         gdb::unique_xmalloc_ptr.
15131
15132 2018-02-09  Tom Tromey  <tom@tromey.com>
15133
15134         * auto-load.c (execute_script_contents): Use std::string.
15135
15136 2018-02-09  Joel Brobecker  <brobecker@adacore.com>
15137
15138         * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
15139         Python function, rather than a new command.
15140
15141 2018-02-08  Tom Tromey  <tom@tromey.com>
15142
15143         * solib.c (solib_find_1): Use std::string.
15144         (solib_bfd_fopen): Use unique_xmalloc_ptr.
15145
15146 2018-02-08  Tom Tromey  <tom@tromey.com>
15147
15148         * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
15149
15150 2018-02-08  Tom Tromey  <tom@tromey.com>
15151
15152         * source.c (find_source_lines): Use gdb::def_vector.
15153
15154 2018-02-08  Tom Tromey  <tom@tromey.com>
15155
15156         * macrocmd.c (struct temporary_macro_definition): New.
15157         (macro_define_command): Use temporary_macro_definition.  Remove
15158         cleanups.
15159         (free_macro_definition_ptr): Remove.
15160
15161 2018-02-08  Tom Tromey  <tom@tromey.com>
15162
15163         * macroexp.c (maybe_expand): Use std::string.
15164
15165 2018-02-08  Tom Tromey  <tom@tromey.com>
15166
15167         * macroexp.c (struct macro_buffer): Add initializers for some
15168         members.
15169         (init_buffer, init_shared_buffer, free_buffer)
15170         (free_buffer_return_text): Remove.
15171         (macro_buffer): New constructors.
15172         (~macro_buffer): New destructor.
15173         (macro_buffer::set_shared): New method.
15174         (macro_buffer::resize_buffer, macro_buffer::appendc)
15175         (macro_buffer::appendmem): Now methods, not free functions.
15176         (set_token, append_tokens_without_splicing, stringify)
15177         (macro_stringify): Update.
15178         (gather_arguments): Change return type.  Remove argc_p argument,
15179         add args_ptr argument.  Use std::vector.
15180         (substitute_args): Remove argc argument.  Accept std::vector.
15181         (expand): Update.  Use std::vector.
15182         (scan, macro_expand, macro_expand_next): Update.
15183
15184 2018-02-08  Tom Tromey  <tom@tromey.com>
15185
15186         * symtab.c (default_collect_symbol_completion_matches_break_on):
15187         Use unique_xmalloc_ptr.
15188         * macroscope.h: (sal_macro_scope, user_macro_scope)
15189         (default_macro_scope): Return unique_xmalloc_ptr.
15190         * macroscope.c (sal_macro_scope, user_macro_scope)
15191         (default_macro_scope): Return unique_xmalloc_ptr.
15192         * macroexp.h (macro_expand, macro_expand_once): Return
15193         unique_xmalloc_ptr.
15194         * macroexp.c (macro_expand, macro_expand_once): Return
15195         unique_xmalloc_ptr.
15196         * macrocmd.c (macro_expand_command, macro_expand_once_command)
15197         (info_macro_command, info_macros_command): Use
15198         unique_xmalloc_ptr.
15199         * compile/compile-c-support.c (write_macro_definitions): Use
15200         unique_xmalloc_ptr.
15201         * c-exp.y (c_parse): Use unique_xmalloc_ptr.
15202
15203 2018-02-07  Simon Marchi  <simon.marchi@ericsson.com>
15204
15205         * value.c (value_static_field): Assign field type instead of
15206         containing type when returning an optimized out value.
15207
15208 2018-02-06  Yao Qi  <yao.qi@linaro.org>
15209
15210         * ft32-tdep.c (ft32_read_pc): Remove.
15211         (ft32_write_pc): Remove.
15212         (ft32_gdbarch_init): Update.
15213         * m32r-tdep.c (m32r_read_pc): Remove.
15214         (m32r_gdbarch_init): Update.
15215         * mep-tdep.c (mep_read_pc): Remove.
15216         (mep_gdbarch_init): Update.
15217         * microblaze-tdep.c (microblaze_write_pc): Remove.
15218         (microblaze_gdbarch_init): Update.
15219         * mn10300-tdep.c (mn10300_read_pc): Remove.
15220         (mn10300_write_pc): Remove.
15221         (mn10300_gdbarch_init): Update.
15222         * moxie-tdep.c (moxie_read_pc): Remove.
15223         (moxie_write_pc): Remove.
15224         (moxie_gdbarch_init): Update.
15225
15226 2018-02-06  Yao Qi  <yao.qi@linaro.org>
15227
15228         * expprint.c (print_subexp_standard): Handle
15229         OP_F77_UNDETERMINED_ARGLIST.
15230         (dump_subexp_body_standard): Likewise.
15231
15232 2018-02-05  Alan Hayward  <alan.hayward@arm.com>
15233
15234         * target-descriptions.c (tdesc_element_visitor) Add empty
15235         implementations.
15236         (tdesc_type): Move make_gdb_type from here.
15237         (tdesc_type_builtin): Likewise.
15238         (tdesc_type_vector): Likewise.
15239         (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
15240         (make_gdb_type_struct): Move from tdesc_type_with_fields.
15241         (make_gdb_type_union): Likewise.
15242         (make_gdb_type_flags): Likewise.
15243         (make_gdb_type_enum): Likewise.
15244         (make_gdb_type): New function.
15245         (tdesc_register_type): Use static make_gdb_type.
15246
15247 2018-02-05  Ruslan Kabatsayev <b7.10110111@gmail.com>
15248
15249         * infcmd.c (default_print_one_register_info): Align natural-format
15250         column values consistently one under another.
15251         (pad_to_column): New function.
15252
15253 2018-02-05  Joel Brobecker  <brobecker@adacore.com>
15254
15255         * dwarf2read.c (dwarf2_physname): Move commment.
15256
15257 2018-02-01  Leszek Swirski  <leszeks@google.com>
15258
15259         * varobj.c (varobj_formatted_print_options): Allow recursive
15260         pretty printing if pretty printing is enabled.
15261
15262 2018-02-01  Leszek Swirski  <leszeks@google.com>
15263
15264         * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
15265         names after a structop as a filename.
15266
15267 2018-02-01  Yao Qi  <yao.qi@linaro.org>
15268
15269         * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
15270         (arm_record_coproc_data_proc): Likewise.
15271
15272 2018-02-01  Yao Qi  <yao.qi@linaro.org>
15273
15274         * arm-tdep.c (arm_record_extension_space): Change ret to signed.
15275
15276 2018-01-31  Nikola Prica  <nikola.prica@rt-rk.com>
15277
15278         * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
15279         assign shifted lr_reg to fdata->lr_register when lr_reg is set.
15280
15281 2018-01-31  Pedro Alves  <palves@redhat.com>
15282
15283         * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
15284         * inflow.c (child_terminal_save_inferior): Wrap reference to
15285         tcgetpgrp in HAVE_TERMIOS_H.
15286         (child_interrupt, child_pass_ctrlc): Wrap references to signal in
15287         _WIN32.
15288         * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
15289         always iterate over all inferiors.
15290         (gdbsim_cntrl_c): Adjust.
15291         * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
15292
15293 2018-01-31  Joel Brobecker  <brobecker@adacore.com>
15294
15295         * gdbtypes.c (lookup_array_range_type): Make sure the array's
15296         index type is objfile-owned if the element type is as well.
15297
15298 2018-01-31  Joel Brobecker  <brobecker@adacore.com>
15299
15300         GDB 8.1 released.
15301
15302 2018-01-30  Philipp Rudo  <prudo@linux.vnet.ibm.com>
15303
15304         * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
15305         "features/s390x-linux64.c".
15306         (_initialize_s390_linux_tdep): Remove initialization of tdescs
15307         s390_linux32 and s390x_linux64.
15308         (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
15309         default tdesc.
15310         * s390-tdep.c: Include "features/s390-linux32.c" and
15311         "features/s390x-linux64.c".
15312         (s390_tdesc_valid): Add check for tdesc_has_registers.
15313         (s390_gdbarch_init): Make sure there is always a valid tdesc.
15314         (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
15315         tdesc_s390x_linux64.
15316         * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
15317         tdesc_s390x_linux64 to...
15318         * s390-tdep.h: ...here.
15319
15320 2018-01-30  Pedro Alves  <palves@redhat.com>
15321
15322         PR gdb/13211
15323         * config.in, configure: Regenerate.
15324         * configure.ac: Check for getpgid.
15325         * go32-nat.c (go32_pass_ctrlc): New.
15326         (go32_target): Install it.
15327         * inf-child.c (inf_child_target): Install
15328         child_terminal_save_inferior, child_pass_ctrlc and
15329         child_interrupt.
15330         * inf-ptrace.c (inf_ptrace_interrupt): Delete.
15331         (inf_ptrace_target): No longer install it.
15332         * infcmd.c (interrupt_target_1): Adjust.
15333         * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
15334         (child_interrupt): Declare.
15335         (inferior::terminal_state): New.
15336         * inflow.c (struct terminal_info): Update comments.
15337         (inferior_process_group): Delete.
15338         (terminal_is_ours): Delete.
15339         (gdb_tty_state): New.
15340         (child_terminal_init): Adjust.
15341         (is_gdb_terminal, sharing_input_terminal_1)
15342         (sharing_input_terminal): New functions.
15343         (child_terminal_inferior): Adjust.  Use sharing_input_terminal.
15344         Set the process's actual process group in the foreground if
15345         possible.  Handle is_ours_for_output/is_ours distinction.  Don't
15346         mark terminal as the inferior's if not sharing GDB's terminal.
15347         Don't check attach_flag.
15348         (child_terminal_ours_for_output, child_terminal_ours): Adjust to
15349         pass down a target_terminal_state.
15350         (child_terminal_save_inferior): New, factored out from ...
15351         (child_terminal_ours_1): ... this.  Handle
15352         target_terminal_state::is_ours_for_output.
15353         (child_interrupt, child_pass_ctrlc): New.
15354         (inflow_inferior_exit): Clear the inferior's terminal_state.
15355         (copy_terminal_info): Copy the inferior's terminal state.
15356         (_initialize_inflow): Remove reference to terminal_is_ours.
15357         * inflow.h (inferior_process_group): Delete.
15358         * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
15359         * procfs.c (procfs_target): Don't install procfs_interrupt.
15360         (procfs_interrupt): Delete.
15361         * remote.c (remote_serial_quit_handler): Adjust.
15362         (remote_interrupt): Remove ptid parameter.  Adjust.
15363         * target-delegates.c: Regenerate.
15364         * target.c: Include "terminal.h".
15365         (target_terminal::terminal_state): Rename to ...
15366         (target_terminal::m_terminal_state): ... this.
15367         (target_terminal::init): Adjust.
15368         (target_terminal::inferior): Adjust to per-inferior
15369         terminal_state.
15370         (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
15371         (target_terminal::ours, target_terminal::ours_for_output): Use
15372         target_terminal_is_ours_kind.
15373         (target_interrupt): Remove ptid parameter.  Adjust.
15374         (default_target_pass_ctrlc): Adjust.
15375         * target.h (target_ops::to_terminal_save_inferior): New field.
15376         (target_ops::to_interrupt): Remove ptid_t parameter.
15377         (target_interrupt): Remove ptid_t parameter.  Update comment.
15378         (target_pass_ctrlc): Update comment.
15379         * target/target.h (target_terminal_state): New scoped enum,
15380         factored out of ...
15381         (target_terminal::terminal_state): ... here.
15382         (target_terminal::inferior): Update comments.
15383         (target_terminal::restore_inferior): New.
15384         (target_terminal::is_inferior, target_terminal::is_ours)
15385         (target_terminal::is_ours_for_output): Adjust.
15386         (target_terminal::scoped_restore_terminal_state): Adjust to
15387         rename, and call restore_inferior() instead of inferior().
15388         (target_terminal::scoped_restore_terminal_state::m_state): Change
15389         type.
15390         (target_terminal::terminal_state): Rename to ...
15391         (target_terminal::m_terminal_state): ... this and change type.
15392
15393 2018-01-30  Pedro Alves  <palves@redhat.com>
15394
15395         * linux-nat.c (wait_for_signal): New function.
15396         (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
15397         directly.
15398         (async_terminal_is_ours)
15399         (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
15400         (linux_nat_add_target): Don't override
15401         to_terminal_inferior/to_terminal_ours.
15402
15403 2018-01-29  Sergio Durigan Junior  <sergiodj@redhat.com>
15404
15405         * remote.c (remote_follow_fork): Don't call "detach_inferior".
15406
15407 2018-01-28  Simon Marchi  <simon.marchi@ericsson.com>
15408
15409         * dwarf2read.c (free_dwo_files): Add forward-declaration.
15410         (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
15411         dwarf2_per_objfile_free here.
15412         (dwarf2_per_objfile_free): Remove.
15413         (_initialize_dwarf2_read): Don't register
15414         dwarf2_per_objfile_free as a registry cleanup.
15415
15416 2018-01-27  Eli Zaretskii  <eliz@gnu.org>
15417
15418         Avoid compilation errors in MinGW native builds
15419
15420         The error is triggered by including python-internal.h, and the
15421         error message is:
15422
15423              In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
15424                       from build-gnulib/import/math.h:27,
15425                       from d:/usr/Python26/include/pyport.h:235,
15426                       from d:/usr/Python26/include/Python.h:58,
15427                       from python/python-internal.h:94,
15428                       from python/py-arch.c:24:
15429              d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
15430         using ::hypot;
15431                 ^~~~~
15432
15433         This happens because Python headers define 'hypot' to expand t
15434         '_hypot' in the Windows builds.
15435         * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
15436         'hypoth'.  This avoids a compilation error.
15437
15438 2018-01-26  Alan Hayward  <alan.hayward@arm.com>
15439
15440         * MAINTAINERS (Write After Approval): Fix ordering.
15441
15442 2018-01-26  Alan Hayward  <alan.hayward@arm.com>
15443
15444         * MAINTAINERS (Write After Approval): Add Alan Hayward.
15445
15446 2018-01-26  Alan Modra  <amodra@gmail.com>
15447
15448         * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
15449         (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
15450         Remove nop.  Make const.  Comment.
15451         (powerpc32_plt_stub_so_2): New.
15452         (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
15453         Correct count.  Update uses.
15454         (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
15455         Move common code reading PLT entry word.  Correct
15456         powerpc32_plt_stub PLT address calculation.
15457         * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
15458         (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
15459         (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
15460         (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
15461         (ppc64_standard_linkage8): Likewise.
15462         * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
15463         Correct insns description.
15464         * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
15465
15466 2018-01-24  Pedro Alves  <palves@redhat.com>
15467
15468         GCC PR libstdc++/83906
15469         * gdbtypes.c (operator==(const dynamic_prop &,
15470         const dynamic_prop &)): New.
15471         (operator==(const range_bounds &, const range_bounds &)): New.
15472         (check_types_equal): Use them instead of memcmp.
15473         * gdbtypes.h (operator==(const dynamic_prop &,
15474         const dynamic_prop &)): Declare.
15475         (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
15476         (operator==(const range_bounds &, const range_bounds &)): Declare.
15477         (operator!=(const range_bounds &, const range_bounds &)): Declare.
15478
15479 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
15480
15481         * s390-linux-tdep.c (s390_record_address_mask)
15482         (s390_record_calc_disp_common, s390_record_calc_disp)
15483         (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
15484         (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
15485         (s390_process_record): Move to s390-tdep.c.
15486         (s390_linux_init_abi_any): Adjust.
15487         * s390-tdep.c (s390_record_address_mask)
15488         (s390_record_calc_disp_common, s390_record_calc_disp)
15489         (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
15490         (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
15491         (s390_process_record): Moved from s390-linux-tdep.c
15492         (s390_gdbarch_init): Adjust.
15493
15494 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
15495
15496         * s390-linux-nat.c (s390-tdep.h): New include.
15497         * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
15498         (HFILES_NO_SRCDIR): Add s390-tdep.h.
15499         (ALLDEPFILES): Add s390-tdep.c.
15500         * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
15501         * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
15502         * s390-tdep.h: ...this.  New file.
15503         * s390-linux-tdep.c (s390-tdep.h): New include.
15504         (_initialize_s390_tdep): Rename to...
15505         (_initialize_s390_linux_tdep): ...this and adjust.
15506         (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
15507         (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
15508         s390-tdep.h.
15509         (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
15510         (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
15511         (s390_is_partial_instruction, s390_software_single_step)
15512         (is_non_branch_ril, s390_displaced_step_copy_insn)
15513         (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
15514         (s390_prologue_data, s390_addr, s390_store, s390_load)
15515         (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
15516         (s390_register_call_saved, s390_guess_tracepoint_registers)
15517         (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
15518         (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
15519         (s390_pseudo_register_name, s390_pseudo_register_type)
15520         (s390_pseudo_register_read, s390_pseudo_register_write)
15521         (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
15522         (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
15523         (s390_addr_bits_remove, s390_address_class_type_flags)
15524         (s390_address_class_type_flags_to_name)
15525         (s390_address_class_name_to_type_flags, s390_effective_inner_type)
15526         (s390_function_arg_float, s390_function_arg_vector)
15527         (is_power_of_two, s390_function_arg_integer, s390_arg_state)
15528         (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
15529         (s390_frame_align, s390_register_return_value, s390_return_value)
15530         (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
15531         (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
15532         (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
15533         (s390_trad_frame_prev_register, s390_unwind_cache)
15534         (s390_prologue_frame_unwind_cache)
15535         (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
15536         (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
15537         (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
15538         (s390_stub_frame_this_id, s390_stub_frame_prev_register)
15539         (s390_stub_frame_sniffer, s390_stub_frame_unwind)
15540         (s390_frame_base_address, s390_local_base_address)
15541         (s390_frame_base, s390_gcc_target_options)
15542         (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
15543         (s390_validate_reg_range, s390_tdesc_valid)
15544         (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
15545         * s390-tdep.c: ...this.  New file.
15546
15547 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
15548
15549         * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
15550         (s390_process_record, s390_gdbarch_tdep_alloc)
15551         (s390_linux_init_abi_any): Use/set new hook.
15552
15553 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
15554
15555         * s390-linux-tdep.c (osabi.h): New include.
15556         (s390_linux_init_abi_31, s390_linux_init_abi_64)
15557         (s390_linux_init_abi_any): New functions.
15558         (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
15559
15560 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
15561
15562         * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
15563         tdesc_has_registers check
15564
15565 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
15566
15567         * s390-linux-tdep.c (s390_tdesc_valid): New function.
15568         (s390_validate_reg_range): New macro.
15569         (s390_gdbarch_init): Adjust.
15570
15571 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
15572
15573         * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
15574         (s390_gdbarch_tdep_alloc): Adjust.
15575         (s390_gdbarch_init): Adjust.
15576
15577 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
15578
15579         * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
15580         <have_tdb>: Change type to bool.
15581         (s390_gdbarch_tdep_alloc): Adjust.
15582         (s390_gdbarch_init): Adjust.
15583
15584 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
15585
15586         * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
15587         (gdbarch_tdep) <have_upper, have_vx>: New fields.
15588         (s390_gdbarch_tdep_alloc): New function.
15589         (s390_gdbarch_init): Allocate tdep at start and use its fields
15590         instead of separate variables.
15591
15592 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
15593
15594         * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
15595         when looking for cached gdbarch and add comment for remaining.
15596
15597 2018-01-22  Pedro Alves  <palves@redhat.com>
15598             Sergio Durigan Junior  <sergiodj@redhat.com>
15599
15600         * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
15601         case.
15602
15603 2018-01-22  Maciej W. Rozycki  <macro@mips.com>
15604
15605         * MAINTAINERS: Update my company e-mail address.
15606
15607 2018-01-22  Yao Qi  <yao.qi@linaro.org>
15608
15609         * regcache.c (cooked_write_test): New function.
15610         (_initialize_regcache): Register the test.
15611
15612 2018-01-22  Yao Qi  <yao.qi@linaro.org>
15613
15614         * ia64-tdep.c (ia64_pseudo_register_read): Call
15615         regcache->cooked_read instead of regcache_cooked_read_unsigned.
15616         * m32c-tdep.c (m32c_cat_read): Likewise.
15617         (m32c_r3r2r1r0_read): Likewise.
15618         * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
15619         * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
15620
15621 2018-01-22  Yao Qi  <yao.qi@linaro.org>
15622
15623         * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
15624         method raw_read instead of regcache_raw_read.
15625         * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
15626         * arm-tdep.c (arm_neon_quad_read): Likewise.
15627         * avr-tdep.c (avr_pseudo_register_read): Likewise.
15628         * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
15629         * frv-tdep.c (frv_pseudo_register_read): Likewise.
15630         * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
15631         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
15632         (i386_pseudo_register_read_into_value): Likewise.
15633         * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
15634         * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
15635         * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
15636         * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
15637         * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
15638         * sparc-tdep.c (sparc32_pseudo_register_read):  Likewise.
15639         * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
15640         * spu-tdep.c (spu_pseudo_register_read_spu):  Likewise.
15641         * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
15642
15643 2018-01-22  Yao Qi  <yao.qi@linaro.org>
15644
15645         * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
15646         * configure.tgt: Remove target mt.
15647         * mt-tdep.c: Remove.
15648         * regcache.c (cooked_read_test): Remove the check for mt.
15649
15650 2018-01-22  Yao Qi  <yao.qi@linaro.org>
15651
15652         * jit.c (jit_frame_prev_register): Call regcache::cooked_read
15653         instead of gdbarch_pseudo_register_read_value.
15654
15655 2018-01-22  Joel Brobecker  <brobecker@adacore.com>
15656
15657         * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
15658         language is Ada.
15659
15660 2018-01-22  Joel Brobecker  <brobecker@adacore.com>
15661
15662         * linespec.c (create_sals_line_offset): Remove code that preserved
15663         the symtab_and_line's line number.
15664
15665 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
15666
15667         * varobj.c (varobj_create): Don't set valid_block when creating a
15668         floating varobj.
15669
15670 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
15671
15672         * varobj.c (varobj_create): Remove out of date comment.
15673
15674 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
15675
15676         PR mi/20395
15677         * ada-exp.y (write_var_from_sym): Pass extra parameter when
15678         updating innermost block.
15679         * parse.c (innermost_block_tracker::update): Take extra type
15680         parameter, and check types match before updating innermost block.
15681         (write_dollar_variable): Update innermost block for registers.
15682         * parser-defs.h (enum innermost_block_tracker_type): New enum.
15683         (innermost_block_tracker::innermost_block_tracker): Initialise
15684         m_types member.
15685         (innermost_block_tracker::reset): Take type parameter.
15686         (innermost_block_tracker::update): Take type parameter, and pass
15687         type through as needed.
15688         (innermost_block_tracker::m_types): New member.
15689         * varobj.c (varobj_create): Pass type when reseting innermost
15690         block.
15691
15692 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
15693
15694         * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
15695         * ada-lang.c (resolve_subexp): Likewise.
15696         * breakpoint.c (set_breakpoint_condition) Likewise.
15697         (watch_command_1) Likewise.
15698         * c-exp.y (variable): Likewise.
15699         * d-exp.y (PrimaryExpression): Likewise.
15700         * f-exp.y (variable): Likewise.
15701         * go-exp.y (variable): Likewise.
15702         * m2-exp.y (variable): Likewise.
15703         * objfiles.c (objfile::~objfile): Likewise.
15704         * p-exp.y (variable): Likewise.
15705         * parse.c (innermost_block): Change type.
15706         * parser-defs.h (class innermost_block_tracker): New.
15707         (innermost_block): Change to innermost_block_tracker.
15708         * printcmd.c (display_command): Switch to innermost_block API.
15709         (do_one_display): Likewise.
15710         * rust-exp.y (do_one_display): Likewise.
15711         * symfile.c (clear_symtab_users): Likewise.
15712         * varobj.c (varobj_create): Switch to innermost_block API, replace
15713         use of innermost_block with block stored on varobj object.
15714
15715 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
15716
15717         * expression.h (innermost_block): Remove declaration.
15718         * varobj.c: Add 'parser-defs.h' include.
15719
15720 2018-01-19  Tom Tromey  <tom@tromey.com>
15721
15722         * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
15723         symbols in the static and global blocks.
15724
15725 2018-01-19  James Clarke  <jrtc27@jrtc27.com>
15726
15727         * nat/linux-ptrace.c: Remove unnecessary reinclusion of
15728         gdb_ptrace.h, and move including gdb_wait.h ...
15729         * nat/linux-ptrace.h: ... to here.
15730
15731 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
15732
15733         * inf-ptrace.c (inf_ptrace_detach): Adjust call to
15734         inf_ptrace_detach_success.
15735         (inf_ptrace_detach_success): Add inferior parameter, use it
15736         instead of inferior_ptid, pass it to detach_inferior.
15737         * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
15738         parameter.
15739         * inferior.c (detach_inferior): Add overload that takes an
15740         inferior object.
15741         * inferior.h (detach_inferior): Likewise.
15742         * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
15743         use inferior_ptid, adjust call to inf_ptrace_detach_success.
15744         * linux-thread-db.c (thread_db_detach): Use inf parameter.
15745
15746 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
15747
15748         * target.h (struct target_ops) <to_detach>: Add inferior
15749         parameter.
15750         (target_detach): Likewise.
15751         * target.c (dispose_inferior): Pass inferior down.
15752         (target_detach): Pass inferior down.  Assert that it is equal to
15753         the current inferior.
15754         * aix-thread.c (aix_thread_detach): Pass inferior down.
15755         * corefile.c (core_file_command): Pass current_inferior() down.
15756         * corelow.c (core_detach): Add inferior parameter.
15757         * darwin-nat.c (darwin_detach): Likewise.
15758         * gnu-nat.c (gnu_detach): Likewise.
15759         * inf-ptrace.c (inf_ptrace_detach): Likewise.
15760         * infcmd.c (detach_command): Pass current_inferior() down to
15761         target_detach.
15762         * infrun.c (follow_fork_inferior): Pass parent_inf to
15763         target_detach.
15764         (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
15765         target_detach.
15766         * linux-nat.c (linux_nat_detach): Add inferior parameter.
15767         * linux-thread-db.c (thread_db_detach): Likewise.
15768         * nto-procfs.c (procfs_detach): Likewise.
15769         * procfs.c (procfs_detach): Likewise.
15770         * record.c (record_detach): Likewise.
15771         * record.h (struct inferior): Forward-declare.
15772         (record_detach): Add inferior parameter.
15773         * remote-sim.c (gdbsim_detach): Likewise.
15774         * remote.c (remote_detach_1): Likewise.
15775         (remote_detach): Likewise.
15776         (extended_remote_detach): Likewise.
15777         * sol-thread.c (sol_thread_detach): Likewise.
15778         * target-debug.h (target_debug_print_inferior_p): New macro.
15779         * target-delegates.c: Re-generate.
15780         * top.c (kill_or_detach): Pass inferior down to target_detach.
15781         * windows-nat.c (windows_detach): Add inferior parameter.
15782
15783 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
15784
15785         * target.h (struct target_ops) <to_detach>: Remove args
15786         parameter.
15787         (target_detach): Likewise.
15788         * target.c (dispose_inferior): Adjust.
15789         (target_detach): Remove args parameter, adjust.
15790         * aix-thread.c (aix_thread_detach): Adjust.
15791         * corefile.c (core_file_command): Adjust.
15792         * corelow.c (core_detach): Adjust.
15793         * darwin-nat.c (darwin_detach): Adjust.
15794         * gnu-nat.c (gnu_detach): Adjust.
15795         * inf-ptrace.c (inf_ptrace_detach): Adjust.
15796         * infcmd.c (detach_command): Adjust
15797         * infrun.c (follow_fork_inferior): Adjust.
15798         (handle_vfork_child_exec_or_exit): Adjust.
15799         * linux-fork.c (linux_fork_detach): Remove args parameter.
15800         * linux-fork.h (linux_fork_detach): Likewise.
15801         * linux-nat.c (linux_nat_detach): Likewise, and adjust.
15802         * linux-thread-db.c (thread_db_detach): Likewise.
15803         * nto-procfs.c (procfs_detach): Likewise.
15804         * procfs.c (procfs_detach): Likewise.
15805         (do_detach): Remove signo parameter.
15806         * record.c (record_detach): Remove args parameter.
15807         * record.h (record_detach): Likewise.
15808         * remote-sim.c (gdbsim_detach): Likewise.
15809         * remote.c (remote_detach_1): Likewise.
15810         (remote_detach): Likewise.
15811         (extended_remote_detach): Likewise.
15812         * sol-thread.c (sol_thread_detach): Likewise.
15813         * target-delegates.c: Re-generate.
15814         * top.c (struct qt_args) <args>: Remove field.
15815         (kill_or_detach): Don't pass args.
15816         (quit_force): Don't set args.
15817         * windows-nat.c (windows_detach): Remove args parameter.
15818
15819 2018-01-19  Yao Qi  <yao.qi@linaro.org>
15820
15821         * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
15822         (arm_linux_init_abi): Install it.
15823
15824 2018-01-19  Yao Qi  <yao.qi@linaro.org>
15825
15826         * osabi.c (gdb_osabi_names): Extend the regexp for
15827         arm-linux-gnueabihf.
15828
15829 2018-01-18  Yao Qi  <yao.qi@linaro.org>
15830
15831         * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
15832         m_abbrevs.
15833         (abbrev_table::add_abbrev): Update.
15834         (abbrev_table::lookup_abbrev): Update.
15835
15836 2018-01-18  Yao Qi  <yao.qi@linaro.org>
15837
15838         * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
15839
15840 2018-01-17  Sergio Durigan Junior  <sergiodj@redhat.com>
15841
15842         * compile/compile.c (compile_to_object): Convert "triplet_rx"
15843         to "std::string".
15844
15845 2018-01-17  Tom Tromey  <tom@tromey.com>
15846
15847         * dwarf2read.c (symbolp): Remove typedef.  Don't instantiate VEC.
15848
15849 2018-01-17  Tom Tromey  <tom@tromey.com>
15850
15851         * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
15852         * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
15853         (create_array_type_with_stride): Update.
15854         * dwarf2read.c (set_die_type): Update.
15855
15856 2018-01-17  Tom Tromey  <tom@tromey.com>
15857
15858         * dwarf2read.c (delayed_method_info): Remove typedef.
15859         (dwarf2_cu::method_info): Now a std::vector.
15860         (add_to_method_list): Update.
15861         (free_delayed_list): Remove.
15862         (compute_delayed_physnames): Update.
15863         (process_full_comp_unit, process_full_type_unit): Clear the method
15864         list.  Remove cleanups.
15865         (psymtab_include_file_name): Add name_holder parameter.  Use
15866         unique_xmalloc_ptr.
15867         (dwarf_decode_lines): Update.
15868
15869 2018-01-17  Tom Tromey  <tom@tromey.com>
15870             Simon Marchi  <simon.marchi@ericsson.com>
15871
15872         * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
15873         (dwarf2_per_objfile::free_cached_comp_units)
15874         (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
15875         (init_cutu_and_read_dies_no_follow): Update.
15876         (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
15877         (dwarf2_cu::~dwarf2_cu): New.
15878         (free_heap_comp_unit, free_stack_comp_unit): Remove.
15879         (age_cached_comp_units, free_one_cached_comp_unit): Update.
15880
15881 2018-01-17  Tom Tromey  <tom@tromey.com>
15882             Simon Marchi  <simon.marchi@ericsson.com>
15883
15884         * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
15885         (struct die_reader_specs) <abbrev_table>: New member.
15886         (struct abbrev_table): Add constructor.
15887         <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
15888         <abbrev_obstack>: Now an auto_obstack.
15889         (abbrev_table_up): New typedef.
15890         (init_cu_die_reader): Add abbrev_table parameter.
15891         (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
15892         Add result_dwo_abbrev_table.
15893         (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
15894         (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
15895         Update.
15896         (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
15897         parameter.
15898         (skip_children): Update.
15899         (abbrev_table::alloc_abbrev): Rename from
15900         abbrev_table_alloc_abbrev.
15901         (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
15902         (abbrev_table::lookup_abbrev): Rename from
15903         abbrev_table_lookup_abbrev.
15904         (abbrev_table_read_table): Return abbrev_table_up.
15905         (abbrev_table_free, abbrev_table_free_cleanup)
15906         (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
15907         (load_partial_dies): Update.
15908
15909 2018-01-17  Tom Tromey  <tom@tromey.com>
15910
15911         * dwarf2read.c (dwarf2_compute_name): Update comment.
15912         (read_func_scope, read_variable): Update.
15913         (new_symbol): Remove.
15914         (new_symbol_full): Rename to new_symbol.
15915
15916 2018-01-17  Mike Gulick  <mgulick@mathworks.com>
15917
15918         PR gdb/16577
15919         * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
15920         a warning instead of throwing an error, set section size to 0 and return
15921         NULL.
15922         * gdb_bfd.h (gdb_bfd_map_section): Update description.
15923
15924 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
15925
15926         * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
15927         std::string.
15928         (linux_ptrace_attach_fail_reason_string): Likewise.
15929         * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
15930         Likewise.
15931         (linux_ptrace_attach_fail_reason_string): Likewise.
15932         * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
15933
15934 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
15935
15936         * linux-nat.c (linux_nat_attach): Remove xstrdup.
15937
15938 2018-01-17  Eldar Abusalimov  <eldar.abusalimov@jetbrains.com>
15939
15940         PR gdb/21559
15941         * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
15942         checking for fs_base/gs_base fields in struct user_regs_struct.
15943         * configure: Regenerate.
15944
15945 2018-01-17  Yao Qi  <yao.qi@linaro.org>
15946
15947         * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
15948         function.
15949         (aarch64_linux_init_abi): Install it to gdbarch hook
15950         gcc_target_options.
15951
15952 2018-01-15  Pedro Alves  <palves@redhat.com>
15953
15954         * common/signals-state-save-restore.c
15955         (save_original_signals_state): Fix typos.
15956
15957 2017-01-12  Tom Tromey  <tom@tromey.com>
15958             Sergio Durigan Junior  <sergiodj@redhat.com>
15959
15960         * Makefile.in (install-only): Install gdb-add-index.
15961
15962 2018-01-12  John Baldwin  <jhb@FreeBSD.org>
15963
15964         * fbsd-tdep.c (KVE_PROTECTION): Correct value.
15965
15966 2018-01-12  Andreas Arnez  <arnez@linux.vnet.ibm.com>
15967
15968         * infrun.c (keep_going_pass_signal): Clear step-over info when
15969         insert_breakpoints fails.
15970
15971 2018-01-11  Pedro Alves  <palves@redhat.com>
15972
15973         PR gdb/22583
15974         * infrun.c (resume): Rename to ...
15975         (resume_1): ... this.
15976         (resume): Reimplement as wrapper around resume_1.
15977
15978 2018-01-11  Pedro Alves  <palves@redhat.com>
15979
15980         PR remote/22597
15981         * remote.c (remote_parse_stop_reply): Default to the last-set
15982         general thread instead of to 'magic_null_ptid'.
15983
15984 2018-01-10  Pedro Alves  <palves@redhat.com>
15985
15986         * language.h (language_get_symbol_name_matcher): Rename ...
15987         (get_symbol_name_matcher): ... this.
15988         * language.c (language_get_symbol_name_matcher): Ditto.
15989         * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
15990         callers adjusted.
15991
15992 2018-01-10  Pedro Alves  <palves@redhat.com>
15993
15994         PR gdb/22670
15995         * dwarf2read.c
15996         (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
15997         Adjust to use language_get_symbol_name_matcher instead of
15998         language_defn::la_get_symbol_name_matcher.
15999         * language.c (language_get_symbol_name_matcher): If in Ada mode
16000         and the lookup name is a verbatim match, return Ada's matcher.
16001         * language.h (language_get_symbol_name_matcher): Adjust comment.
16002         (ada_lookup_name_info::verbatim_p):: New method.
16003
16004 2018-01-10  Pedro Alves  <palves@redhat.com>
16005
16006         PR gdb/22670
16007         * ada-lang.c (ada_collect_symbol_completion_matches): If the
16008         minsym's language is language_auto or language_cplus, pass down
16009         language_ada instead.
16010         * symtab.c (compare_symbol_name): Don't frob symbol language here.
16011
16012 2018-01-10  Pedro Alves  <palves@redhat.com>
16013
16014         PR gdb/22670
16015         * minsyms.c (linkage_name_str): New function.
16016         (iterate_over_minimal_symbols): Use it.
16017
16018 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
16019
16020         * NEWS: Document that 'info proc' now works on FreeBSD.
16021
16022 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
16023
16024         * configure.ac: Check for kinfo_getfile in libutil.
16025         * configure: Regenerate.
16026         * config.in: Regenerate.
16027         * fbsd-nat.c: Include "fbsd-tdep.h".
16028         (fbsd_fetch_cmdline): New.
16029         (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
16030         rather than calling error.
16031         (fbsd_info_proc): New.
16032         (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
16033         (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
16034         (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
16035
16036 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
16037
16038         * fbsd-nat.c (struct free_deleter): Remove.
16039         (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
16040
16041 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
16042
16043         * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
16044         NULL for an empty pathname.
16045
16046 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
16047
16048         * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
16049         (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
16050         (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
16051         (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
16052         (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
16053         (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
16054         (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
16055         (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
16056         (kinfo_proc_layout_32, kinfo_proc_layout_i386)
16057         (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
16058         (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
16059         (fbsd_core_fetch_timeval, fbsd_print_sigset)
16060         (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
16061         (fbsd_init_abi):  Install gdbarch "core_info_proc" method.
16062         * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
16063
16064 2018-01-08  Samuel Thibault  <samuel.thibault@ens-lyon.org>
16065
16066         * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
16067         (gnu_xfer_auxv): New function.
16068         (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
16069         TARGET_OBJECT_AUXV.
16070
16071 2018-01-08  Yao Qi  <yao.qi@linaro.org>
16072             Simon Marchi  <simon.marchi@ericsson.com>
16073
16074         * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
16075         common/selftest.c.
16076         (COMMON_OBS): Remove selftest.o.
16077         * configure.ac: Append selftest-arch.c and common/selftest.c to
16078         CONFIG_SRCS.  Append selftest-arch.o and selftest.o to COMMON_OBS.
16079         * configure: Re-generated.
16080         * maint.c (maintenance_selftest): Wrap selftests::run_tests with
16081         GDB_SELF_TEST.
16082         (maintenance_info_selftests): Likewise.
16083
16084 2018-01-08  Xavier Roirand  <roirand@adacore.com>
16085
16086         * ada-valprint.c (val_print_packed_array_elements): Use
16087         proper number of elements when printing an array indexed
16088         by an enumeration type.
16089
16090 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
16091
16092         * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
16093         (dw2_get_file_names_reader): Adjust.
16094         (lookup_dwo_signatured_type): Adjust.
16095         (lookup_dwp_signatured_type): Adjust.
16096         (lookup_signatured_type): Adjust.
16097         (create_type_unit_group): Adjust.
16098         (get_type_unit_group): Adjust.
16099         (process_psymtab_comp_unit_reader): Adjust.
16100         (build_type_psymtabs_reader): Adjust.
16101         (scan_partial_symbols): Adjust.
16102         (add_partial_symbol): Adjust.
16103         (add_partial_subprogram): Adjust.
16104         (peek_die_abbrev): Adjust.
16105         (fixup_go_packaging): Adjust.
16106         (process_imported_unit_die): Adjust.
16107         (dwarf2_compute_name): Adjust.
16108         (dwarf2_physname): Adjust.
16109         (read_import_statement): Adjust.
16110         (handle_DW_AT_stmt_list): Adjust.
16111         (read_file_scope): Adjust.
16112         (read_func_scope): Adjust.
16113         (read_lexical_block_scope): Adjust.
16114         (read_call_site_scope): Adjust.
16115         (read_variable): Adjust.
16116         (dwarf2_rnglists_process): Adjust.
16117         (dwarf2_ranges_process): Adjust.
16118         (dwarf2_ranges_read): Adjust.
16119         (dwarf2_get_pc_bounds): Adjust.
16120         (dwarf2_record_block_ranges): Adjust.
16121         (dwarf2_add_field): Adjust.
16122         (dwarf2_add_member_fn): Adjust.
16123         (read_structure_type): Adjust.
16124         (process_structure_scope): Adjust.
16125         (read_enumeration_type): Adjust.
16126         (read_array_type): Adjust.
16127         (mark_common_block_symbol_computed): Adjust.
16128         (read_common_block): Adjust.
16129         (read_namespace_type): Adjust.
16130         (read_namespace): Adjust.
16131         (read_module_type): Adjust.
16132         (read_tag_pointer_type): Adjust.
16133         (read_tag_ptr_to_member_type): Adjust.
16134         (read_tag_string_type): Adjust.
16135         (read_subroutine_type): Adjust.
16136         (read_typedef): Adjust.
16137         (read_base_type): Adjust.
16138         (attr_to_dynamic_prop): Adjust.
16139         (read_subrange_type): Adjust.
16140         (read_unspecified_type): Adjust.
16141         (dwarf2_read_abbrevs): Adjust.
16142         (load_partial_dies): Adjust.
16143         (read_partial_die): Adjust.
16144         (find_partial_die): Adjust.
16145         (guess_partial_die_structure_name): Adjust.
16146         (fixup_partial_die): Adjust.
16147         (read_attribute_value): Adjust.
16148         (read_addr_index): Adjust.
16149         (read_addr_index_from_leb128): Adjust.
16150         (read_str_index): Adjust.
16151         (dwarf2_string_attr): Adjust.
16152         (get_debug_line_section): Adjust.
16153         (dwarf_decode_line_header): Adjust.
16154         (lnp_state_machine::check_line_address): Adjust.
16155         (dwarf_decode_lines_1): Adjust.
16156         (dwarf_decode_lines): Adjust.
16157         (dwarf2_start_symtab): Adjust.
16158         (var_decode_location): Adjust.
16159         (new_symbol_full): Adjust.
16160         (dwarf2_const_value_data): Adjust.
16161         (dwarf2_const_value_attr): Adjust.
16162         (dwarf2_const_value): Adjust.
16163         (die_type): Adjust.
16164         (die_containing_type): Adjust.
16165         (build_error_marker_type): Adjust.
16166         (lookup_die_type): Adjust.
16167         (guess_full_die_structure_name): Adjust.
16168         (anonymous_struct_prefix): Adjust.
16169         (determine_prefix): Adjust.
16170         (dwarf2_name): Adjust.
16171         (follow_die_ref_or_sig): Adjust.
16172         (follow_die_offset): Adjust.
16173         (follow_die_ref): Adjust.
16174         (follow_die_sig_1): Adjust.
16175         (follow_die_sig): Adjust.
16176         (get_signatured_type): Adjust.
16177         (get_DW_AT_signature_type): Adjust.
16178         (decode_locdesc): Adjust.
16179         (dwarf_decode_macros): Adjust.
16180         (cu_debug_loc_section): Adjust.
16181         (fill_in_loclist_baton): Adjust.
16182         (dwarf2_symbol_mark_computed): Adjust.
16183         (init_one_comp_unit): Don't assign
16184         dwarf2_cu::dwarf2_per_objfile.
16185         (set_die_type): Adjust.
16186
16187 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
16188
16189         * dwarf2read.c (struct mapped_debug_names): Add constructor.
16190         <dwarf2_per_objfile>: New field.
16191         (dwarf2_per_objfile): Remove global.
16192         (get_dwarf2_per_objfile): New function.
16193         (set_dwarf2_per_objfile): New function.
16194         (dwarf2_build_psymtabs_hard): Change objfile parameter to
16195         dwarf2_per_objfile.
16196         (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
16197         (read_abbrev_offset): Likewise.
16198         (read_indirect_string): Likewise.
16199         (read_indirect_line_string): Likewise.
16200         (read_indirect_string_at_offset): Likewise.
16201         (read_indirect_string_from_dwz): Likewise.
16202         (dwarf2_find_containing_comp_unit): Change objfile parameter to
16203         dwarf2_per_objfile.
16204         (age_cached_comp_units): Add dwarf2_per_objfile parameter.
16205         (create_all_comp_units): Change objfile parameter to
16206         dwarf2_per_objfile.
16207         (create_all_type_units): Likewise.
16208         (process_queue): Add dwarf2_per_objfile parameter.
16209         (read_and_check_comp_unit_head): Likewise.
16210         (lookup_dwo_unit_in_dwp): Likewise.
16211         (get_dwp_file): Likewise.
16212         (process_cu_includes): Likewise.
16213         (struct free_dwo_file_cleanup_data): New struct.
16214         (dwarf2_has_info): Use get_dwarf2_per_objfile and
16215         set_dwarf2_per_objfile.
16216         (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
16217         (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
16218         context, adjust calls.
16219         (dw2_instantiate_symtab): Likewise.
16220         (dw2_get_cutu): Add dwarf2_per_objfile parameter.
16221         (dw2_get_cu): Likewise.
16222         (create_cu_from_index_list): Change objfile parameter to
16223         dwarf2_per_objfile.
16224         (create_cus_from_index_list): Get dwarf2_per_objfile from
16225         context, adjust calls.
16226         (create_cus_from_index): Likewise.
16227         (create_signatured_type_table_from_index): Change objfile
16228         parameter to dwarf2_per_objfile.
16229         (create_signatured_type_table_from_debug_names): Change objfile
16230         parameter to dwarf2_per_objfile.
16231         (create_addrmap_from_index): Likewise.
16232         (create_addrmap_from_aranges): Likewise.
16233         (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
16234         (dw2_setup): Remove.
16235         (dw2_get_file_names_reader): Get dwarf2_per_objfile from
16236         context.
16237         (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
16238         get_dwarf2_per_objfile.
16239         (dw2_forget_cached_source_info): Likewise.
16240         (dw2_map_symtabs_matching_filename): Likewise.
16241         (struct dw2_symtab_iterator) <index>: Remove.
16242         <dwarf2_per_objfile>: New field.
16243         (dw2_symtab_iter_init): Replace index parameter with
16244         dwarf2_per_objfile.
16245         (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
16246         (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
16247         (dw2_print_stats): Likewise.
16248         (dw2_dump): Likewise.
16249         (dw2_expand_symtabs_for_function): Likewise.
16250         (dw2_expand_all_symtabs): Likewise.
16251         (dw2_expand_symtabs_with_fullname): Likewise.
16252         (dw2_expand_marked_cus): Replace index and objfile parameters
16253         with dwarf2_per_objfile.
16254         (dw_expand_symtabs_matching_file_matcher): Add
16255         dwarf2_per_objfile parameter and adjust calls.
16256         (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
16257         adjust calls.
16258         (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
16259         (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
16260         adjust calls.
16261         (create_cus_from_debug_names_list): Replace objfile parameter
16262         with dwarf2_per_objfile and adjust calls.
16263         (create_cus_from_debug_names): Likewise.
16264         (dwarf2_read_debug_names): Likewise.
16265         (mapped_debug_names::namei_to_name): Adjust call.
16266         (dw2_debug_names_iterator::next): Likewise.
16267         (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
16268         (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
16269         (dw2_debug_names_dump): Likewise.
16270         (dw2_debug_names_expand_symtabs_for_function): Likewise.
16271         (dw2_debug_names_expand_symtabs_matching): Likewise.
16272         (dwarf2_initialize_objfile): Likewise.
16273         (dwarf2_build_psymtabs): Likewise.
16274         (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
16275         this_cu.
16276         (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
16277         (read_and_check_comp_unit_head): Likewise.
16278         (read_abbrev_offset): Likewise.
16279         (create_debug_type_hash_table): Likewise.
16280         (create_debug_types_hash_table): Likewise.
16281         (create_all_type_units): Replace objfile parameter with
16282         dwarf2_per_objfile.
16283         (add_type_unit): Add dwarf2_per_objfile parameter.
16284         (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
16285         with dwarf2_per_objfile.
16286         (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
16287         (lookup_dwp_signatured_type): Likewise.
16288         (lookup_signatured_type): Likewise.
16289         (read_cutu_die_from_dwo): Likewise.
16290         (init_tu_and_read_dwo_dies): Likewise.
16291         (init_cutu_and_read_dies): Likewise.
16292         (init_cutu_and_read_dies_no_follow): Likewise.
16293         (allocate_type_unit_groups_table): Add objfile parameter.
16294         (create_type_unit_group): Use dwarf2_per_objfile from cu.
16295         (get_type_unit_group): Likewise.
16296         (process_psymtab_comp_unit): Update call.
16297         (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
16298         (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
16299         (print_tu_stats): Likewise.
16300         (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
16301         in void* parameter.
16302         (build_type_psymtabs): Change objfile parameter to
16303         dwarf2_per_objfile.
16304         (process_skeletonless_type_unit): Use dwarf2_per_objfile
16305         passed in void* parameter.
16306         (process_skeletonless_type_units): Change objfile parameter to
16307         dwarf2_per_objfile.
16308         (set_partial_user): Likewise.
16309         (dwarf2_build_psymtabs_hard): Likewise.
16310         (read_comp_units_from_section): Likewise.
16311         (create_all_comp_units): Likewise.
16312         (scan_partial_symbols): Update calls.
16313         (add_partial_symbol): Likewise.
16314         (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
16315         (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
16316         (process_queue): Add dwarf2_per_objfile parameter.
16317         (get_compunit_symtab): Use dwarf2_per_objfile from cu.
16318         (compute_compunit_symtab_includes): Likewise.
16319         (process_cu_includes): Add dwarf2_per_objfile parameter.
16320         (process_full_comp_unit): Use dwarf2_per_objfile from cu.
16321         (process_full_type_unit): Likewise.
16322         (process_imported_unit_die): Update call.
16323         (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
16324         (read_file_scope): Likewise.
16325         (allocate_dwo_file_hash_table): Add objfile parameter.
16326         (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
16327         (create_cus_hash_table): Likewise.
16328         (create_dwp_hash_table): Likewise.
16329         (create_dwo_unit_in_dwp_v1): Likewise.
16330         (create_dwp_v2_section): Likewise.
16331         (create_dwo_unit_in_dwp_v2): Likewise.
16332         (lookup_dwo_unit_in_dwp): Likewise.
16333         (try_open_dwop_file): Likewise.
16334         (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
16335         (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
16336         cleanup to include a reference to dwarf2_per_objfile.
16337         (open_dwp_file): Add dwarf2_per_objfile parameter.
16338         (open_and_init_dwp_file): Likewise.
16339         (get_dwp_file): Likewise.
16340         (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
16341         (queue_and_load_all_dwo_tus): Update call.
16342         (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
16343         data.
16344         (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
16345         (dwarf2_ranges_process): Likewise.
16346         (dwarf2_get_pc_bounds): Likewise.
16347         (mark_common_block_symbol_computed): Likewise.
16348         (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
16349         (dwarf2_read_abbrevs): Update call.
16350         (read_partial_die): Use dwarf2_per_objfile from cu.
16351         (find_partial_die): Likewise.
16352         (fixup_partial_die): Likewise.
16353         (read_attribute_value): Likewise.
16354         (read_indirect_string_at_offset_from): Add objfile parameter.
16355         (read_indirect_string_at_offset): Add dwarf2_per_objfile
16356         parameter.
16357         (read_indirect_string_from_dwz): Add objfile parameter.
16358         (read_indirect_string): Add objfile parameter.
16359         (read_addr_index_1): Add dwarf2_per_objfile parameter.
16360         (read_addr_index): Use dwarf2_per_objfile from cu.
16361         (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
16362         call dw2_setup.
16363         (read_str_index): Use dwarf2_per_objfile from cu.
16364         (get_debug_line_section): Likewise.
16365         (read_formatted_entries): Add dwarf2_per_objfile parameter.
16366         (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
16367         (new_symbol_full): Use dwarf2_per_objfile from cu.
16368         (build_error_marker_type): Likewise.
16369         (lookup_die_type): Likewise.
16370         (determine_prefix): Likewise.
16371         (follow_die_offset): Likewise.
16372         (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
16373         (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
16374         (dwarf2_fetch_die_type_sect_off): Likewise.
16375         (dwarf2_get_die_type): Likewise.
16376         (follow_die_sig_1): Use dwarf2_per_objfile from cu.
16377         (get_signatured_type): Likewise.
16378         (get_DW_AT_signature_type): Likewise.
16379         (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
16380         (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
16381         (cu_debug_loc_section): Likewise.
16382         (fill_in_loclist_baton): Likewise.
16383         (dwarf2_symbol_mark_computed): Likewise.
16384         (dwarf2_find_containing_comp_unit): Change objfile parameter to
16385         dwarf2_per_objfile.
16386         (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
16387         parameter.
16388         (age_cached_comp_units): Add dwarf2_per_objfile parameter.
16389         (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
16390         (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
16391         (set_die_type): Use dwarf2_free_objfile from cu.
16392         (get_die_type_at_offset): Likewise.
16393         (dwarf2_per_objfile_free): Don't assign global variable.
16394         (debug_names) <constructor>: Add dwarf2_per_objfile
16395         parameter, update m_debugstrlookup construction.
16396         (debug_names::debug_str_lookup): Add dwarf2_per_objfile
16397         parameter.
16398         <m_dwarf2_per_objfile>: New field.
16399         <lookup>: Use m_dwarf2_per_objfile.
16400         (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
16401         (psyms_seen_size): Likewise.
16402         (write_gdbindex): Replace objfile parameter with
16403         dwarf2_per_objfile.
16404         (write_debug_names): Likewise.
16405         (write_psymtabs_to_index): Likewise.
16406         (save_gdb_index_command): Use get_dwarf2_per_objfile, update
16407         calls.
16408
16409 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
16410
16411         * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
16412         <dwarf2_per_objfile>: New field.
16413         (struct dwarf2_per_cu_data) <objfile>: Remove.
16414         <dwarf2_per_objfile>: New field.
16415         (create_cu_from_index_list): Assign dwarf2_per_objfile instead
16416         of objfile.
16417         (create_signatured_type_table_from_index): Likewise.
16418         (create_debug_type_hash_table): Likewise.
16419         (fill_in_sig_entry_from_dwo_entry): Likewise.
16420         (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
16421         (create_type_unit_group): Assign dwarf2_per_objfile instead of
16422         objfile.
16423         (create_partial_symtab): Access objfile through
16424         dwarf2_per_objfile.
16425         (process_psymtab_comp_unit_reader): Likewise.
16426         (read_comp_units_from_section): Likewise.
16427         (scan_partial_symbols): Likewise.
16428         (add_partial_symbol): Likewise.
16429         (add_partial_subprogram): Likewise.
16430         (peek_die_abbrev): Likewise.
16431         (fixup_go_packaging): Likewise.
16432         (process_full_comp_unit): Likewise.
16433         (process_full_type_unit): Likewise.
16434         (process_imported_unit_die): Likewise.
16435         (dwarf2_compute_name): Likewise.
16436         (dwarf2_physname): Likewise.
16437         (read_import_statement): Likewise.
16438         (create_cus_hash_table): Assign dwarf2_physname instead of
16439         objfile.
16440         (read_func_scope): Access objfile through dwarf2_per_objfile.
16441         (read_lexical_block_scope): Likewise.
16442         (read_call_site_scope): Likewise.
16443         (read_variable): Likewise.
16444         (dwarf2_rnglists_process): Likewise.
16445         (dwarf2_ranges_process): Likewise.
16446         (dwarf2_ranges_read): Likewise.
16447         (dwarf2_record_block_ranges): Likewise.
16448         (dwarf2_add_field): Likewise.
16449         (dwarf2_add_member_fn): Likewise.
16450         (read_structure_type): Likewise.
16451         (process_structure_scope): Likewise.
16452         (read_enumeration_type): Likewise.
16453         (read_array_type): Likewise.
16454         (read_common_block): Likewise.
16455         (read_namespace_type): Likewise.
16456         (read_namespace): Likewise.
16457         (read_module_type): Likewise.
16458         (read_tag_pointer_type): Likewise.
16459         (read_tag_ptr_to_member_type): Likewise.
16460         (read_tag_string_type): Likewise.
16461         (read_subroutine_type): Likewise.
16462         (read_typedef): Likewise.
16463         (read_base_type): Likewise.
16464         (attr_to_dynamic_prop): Likewise.
16465         (read_subrange_type): Likewise.
16466         (read_unspecified_type): Likewise.
16467         (load_partial_dies): Likewise.
16468         (read_partial_die): Likewise.
16469         (find_partial_die): Likewise.
16470         (guess_partial_die_structure_name): Likewise.
16471         (fixup_partial_die): Likewise.
16472         (read_attribute_value): Likewise.
16473         (read_addr_index_from_leb128): Likewise.
16474         (dwarf2_read_addr_index): Likewise.
16475         (dwarf2_string_attr): Likewise.
16476         (lnp_state_machine::check_line_address): Likewise.
16477         (dwarf_decode_lines_1): Likewise.
16478         (dwarf_decode_lines): Likewise.
16479         (dwarf2_start_symtab): Likewise.
16480         (var_decode_location): Likewise.
16481         (new_symbol_full): Likewise.
16482         (dwarf2_const_value_data): Likewise.
16483         (dwarf2_const_value_attr): Likewise.
16484         (dwarf2_const_value): Likewise.
16485         (die_type): Likewise.
16486         (die_containing_type): Likewise.
16487         (lookup_die_type): Likewise.
16488         (guess_full_die_structure_name): Likewise.
16489         (anonymous_struct_prefix): Likewise.
16490         (dwarf2_name): Likewise.
16491         (follow_die_ref_or_sig): Likewise.
16492         (follow_die_offset): Likewise.
16493         (follow_die_ref): Likewise.
16494         (dwarf2_fetch_die_loc_sect_off): Likewise.
16495         (dwarf2_fetch_constant_bytes): Likewise.
16496         (dwarf2_fetch_die_type_sect_off): Likewise.
16497         (dwarf2_get_die_type): Likewise.
16498         (follow_die_sig): Likewise.
16499         (decode_locdesc): Likewise.
16500         (dwarf2_per_cu_objfile): Likewise.
16501         (dwarf2_per_cu_text_offset): Likewise.
16502         (init_one_comp_unit): Assign dwarf2_per_objfile instead of
16503         objfile.
16504         (set_die_type): Access objfile through
16505         dwarf2_per_objfile.
16506
16507 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
16508
16509         * valprint.c (converted_character_d): Remove typedef.
16510         (DEF_VEC_O (converted_character_d)): Remove.
16511         (count_next_character): Use std::vector.
16512         (print_converted_chars_to_obstack): Likewise.
16513         (generic_printstr): Likewise.
16514
16515 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
16516
16517         * xml-support.h (struct gdb_xml_value): Add constructor.
16518         <value>: Change type to unique_xmalloc_ptr.
16519         (gdb_xml_value_s): Remove typedef.
16520         (DEF_VEC_O (gdb_xml_value_s)): Remove.
16521         (gdb_xml_element_start_handler): Change parameter type to
16522         std::vector.
16523         (xml_find_attribute): Likewise.
16524         * xml-support.c (xml_find_attribute): Change parameter type to
16525         std::vector and adjust.
16526         (gdb_xml_values_cleanup): Remove.
16527         (gdb_xml_parser::start_element): Adjust to std::vector.
16528         (xinclude_start_include): Change paraeter type to std::vector
16529         and adjust.
16530         * btrace.c (check_xml_btrace_version): Likewise.
16531         (parse_xml_btrace_block): Likewise.
16532         (parse_xml_btrace_pt_config_cpu): Likewise.
16533         (parse_xml_btrace_pt): Likewise.
16534         (parse_xml_btrace_conf_bts): Likewise.
16535         (parse_xml_btrace_conf_pt): Likewise.
16536         * memory-map.c (memory_map_start_memory): Likewise.
16537         (memory_map_start_property): Likewise.
16538         * osdata.c (osdata_start_osdata): Likewise.
16539         (osdata_start_item): Likewise.
16540         (osdata_start_column): Likewise.
16541         * remote.c (start_thread): Likewise.
16542         * solib-aix.c (library_list_start_library): Likewise.
16543         (library_list_start_list): Likewise.
16544         * solib-svr4.c (library_list_start_library): Likewise.
16545         (svr4_library_list_start_list): Likewise.
16546         * solib-target.c (library_list_start_segment): Likewise.
16547         (library_list_start_section): Likewise.
16548         (library_list_start_library): Likewise.
16549         (library_list_start_list): Likewise.
16550         * tracepoint.c (traceframe_info_start_memory): Likewise.
16551         (traceframe_info_start_tvar): Likewise.
16552         * xml-syscall.c (syscall_start_syscall): Likewise.
16553         * xml-tdesc.c (tdesc_start_target): Likewise.
16554         (tdesc_start_feature): Likewise.
16555         (tdesc_start_reg): Likewise.
16556         (tdesc_start_union): Likewise.
16557         (tdesc_start_struct): Likewise.
16558         (tdesc_start_flags): Likewise.
16559         (tdesc_start_enum): Likewise.
16560         (tdesc_start_field): Likewise.
16561         (tdesc_start_enum_value): Likewise.
16562         (tdesc_start_vector): Likewise.
16563
16564 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
16565
16566         * extension.h (struct xmethod_worker) <clone>: Remove.
16567         * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
16568         Remove.
16569         (python_xmethod_worker::clone): Remove.
16570         * valops.c (find_overload_match): Use std::move instead of
16571         clone.
16572
16573 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
16574
16575         * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
16576         (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
16577         <free_xmethod_worker_data>: Remove.
16578         <get_matching_xmethod_workers>: Chance VEC to std::vector.
16579         <get_xmethod_arg_types>: Remove.
16580         <get_xmethod_result_type>: Remove.
16581         <invoke_xmethod>: Remove.
16582         * extension.c (new_xmethod_worker): Remove.
16583         (clone_xmethod_worker): Remove.
16584         (get_matching_xmethod_workers): Return void, pass std::vector by
16585         pointer.
16586         (get_xmethod_arg_types): Rename to...
16587         (xmethod_worker::get_arg_types): ... this, and adjust.
16588         (get_xmethod_result_type): Rename to...
16589         (xmethod_worker::get_result_type): ... this, and adjust.
16590         (invoke_xmethod): Remove.
16591         (free_xmethod_worker): Remove.
16592         (free_xmethod_worker_vec): Remove.
16593         * extension.h (enum ext_lang_rc): Move here from
16594         extension-priv.h.
16595         (struct xmethod_worker): Add constructor and destructor.
16596         <data>: Remove.
16597         <value>: Remove.
16598         <invoke, clone, do_get_result_type, do_get_arg_types>: New
16599         virtual pure methods.
16600         <get_arg_types, get_result_type>: New methods.
16601         (xmethod_worker_ptr): Remove typedef.
16602         (DEF_VEC_P (xmethod_worker_ptr)): Remove.
16603         (xmethod_worker_vec): Remove typedef.
16604         (xmethod_worker_up): New typedef.
16605         (invoke_xmethod): Remove.
16606         (clone_xmethod_worker): Remove.
16607         (free_xmethod_worker): Remove.
16608         (free_xmethod_worker_vec): Remove.
16609         (get_xmethod_arg_types): Remove.
16610         (get_xmethod_result_type): Remove.
16611         * valops.c (find_method_list): Use std::vector, don't use
16612         intermediate vector.
16613         (value_find_oload_method_list): Use std::vector.
16614         (find_overload_match): Use std::vector.
16615         (find_oload_champ): Use std::vector.
16616         * value.c (value_free): Use operator delete.
16617         (value_of_xmethod): Rename to...
16618         (value_from_xmethod): ... this.  Don't assign
16619         xmethod_worker::value, take rvalue-reference.
16620         (result_type_of_xmethod): Adjust.
16621         (call_xmethod): Adjust.
16622         * value.h: Include extension.h.
16623         (struct xmethod_worker): Don't forward-declare.
16624         (value_of_xmethod): Rename to...
16625         (value_from_xmethod): ... this, take rvalue-reference.
16626         * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
16627         (struct python_xmethod_worker): ... this, add constructor and
16628         destructor.
16629         <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
16630         (gdbpy_free_xmethod_worker_data): Rename to...
16631         (python_xmethod_worker::~python_xmethod_worker): ... this and
16632         adjust.
16633         (gdbpy_clone_xmethod_worker_data): Rename to...
16634         (python_xmethod_worker::clone): ... this and adjust.
16635         (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
16636         temporary vector.
16637         (gdbpy_get_xmethod_arg_types): Rename to...
16638         (python_xmethod_worker::do_get_arg_types): ... this and adjust.
16639         (gdbpy_get_xmethod_result_type): Rename to...
16640         (python_xmethod_worker::do_get_result_type): ... this and
16641         adjust.
16642         (gdbpy_invoke_xmethod): Rename to...
16643         (python_xmethod_worker::invoke): ... this and adjust.
16644         (new_python_xmethod_worker): Rename to...
16645         (python_xmethod_worker::python_xmethod_worker): ... this and
16646         adjust.
16647         * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
16648         Remove.
16649         (gdbpy_free_xmethod_worker_data): Remove.
16650         (gdbpy_get_matching_xmethod_workers): Use std::vector.
16651         (gdbpy_get_xmethod_arg_types): Remove.
16652         (gdbpy_get_xmethod_result_type): Remove.
16653         (gdbpy_invoke_xmethod): Remove.
16654         * python/python.c (python_extension_ops): Remove obsolete
16655         callbacks.
16656
16657 2018-01-05  Pedro Alves  <palves@redhat.com>
16658
16659         PR gdb/18653
16660         * common/signals-state-save-restore.c
16661         (save_original_signals_state): New parameter 'quiet'.  Warn if we
16662         find a custom handler preinstalled, instead of internal erroring.
16663         But only warn if !quiet.
16664         * common/signals-state-save-restore.h
16665         (save_original_signals_state): New parameter 'quiet'.
16666         * main.c (captured_main_1): Move save_original_signals_state call
16667         after option handling, and pass QUIET.
16668
16669 2018-01-05  Pedro Alves  <palves@redhat.com>
16670
16671         * spu-tdep.c (spu_catch_start): Pass
16672         symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
16673
16674 2018-01-05  Pedro Alves  <palves@redhat.com>
16675
16676         PR gdb/22670
16677         * ada-lang.c (literal_symbol_name_matcher): New function.
16678         (ada_get_symbol_name_matcher): Use it for
16679         symbol_name_match_type::SEARCH_NAME.
16680         * block.c (block_lookup_symbol): New parameter 'match_type'.  Pass
16681         it down instead of assuming symbol_name_match_type::FULL.
16682         * block.h (block_lookup_symbol): New parameter 'match_type'.
16683         * c-valprint.c (print_unpacked_pointer): Use
16684         lookup_symbol_search_name instead of lookup_symbol.
16685         * compile/compile-object-load.c (get_out_value_type): Pass down
16686         symbol_name_match_type::SEARCH_NAME.
16687         * cp-namespace.c (cp_basic_lookup_symbol): Pass down
16688         symbol_name_match_type::FULL.
16689         * cp-support.c (cp_get_symbol_name_matcher): Handle
16690         symbol_name_match_type::SEARCH_NAME.
16691         * infrun.c (insert_exception_resume_breakpoint): Use
16692         lookup_symbol_search_name.
16693         * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
16694         * psymtab.c (maintenance_check_psymtabs): Use
16695         symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
16696         * stack.c (print_frame_args): Use lookup_symbol_search_name and
16697         SYMBOL_SEARCH_NAME.
16698         * symtab.c (lookup_local_symbol): Don't demangle the lookup name
16699         if symbol_name_match_type::SEARCH_NAME.
16700         (lookup_symbol_in_language): Pass down
16701         symbol_name_match_type::FULL.
16702         (lookup_symbol_search_name): New.
16703         (lookup_language_this): Pass down
16704         symbol_name_match_type::SEARCH_NAME.
16705         (lookup_symbol_aux, lookup_local_symbol): New parameter
16706         'match_type'.  Pass it down.
16707         * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
16708         (lookup_symbol_search_name): New declaration.
16709         (lookup_symbol_in_block): New 'match_type' parameter.
16710
16711 2018-01-05  Pedro Alves  <palves@redhat.com>
16712
16713         PR gdb/22670
16714         * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
16715         ada_lookup_symbol.
16716         (ada_lookup_symbol): Reimplement in terms of
16717         ada_lookup_symbol_list, bits factored out from
16718         ada_lookup_encoded_symbol.
16719
16720 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
16721
16722         * ada-exp.y (write_object_renaming): When subscripting an array
16723         using a symbol as the index, pass the block in call to
16724         ada_lookup_encoded_symbol when looking that symbol up.
16725
16726 2018-01-05  Jerome Guitton  <guitton@adacore.com>
16727
16728         * ada-lang.c (ada_array_length): Use ada_index_type instead of
16729         TYPE_INDEX_TYPE.
16730
16731 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
16732
16733         * ada-lang.c (ada_to_fixed_value_create): Add handling of
16734         the case where VALUE_LVAL (val0) is not lval_memory.
16735
16736 2018-01-05  Xavier Roirand  <roirand@adacore.com>
16737
16738         * ada-valprint.c (print_optional_low_bound): Handle
16739         character-indexed array printing like boolean-indexed array
16740         printing.
16741
16742 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
16743
16744         * NEWS: Create a new section for the next release branch.
16745         Rename the section of the current branch, now that it has
16746         been cut.
16747
16748 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
16749
16750         GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
16751         * version.in: Bump version to 8.1.50.DATE-git.
16752
16753 2018-01-03  Xavier Roirand  <roirand@adacore.com>
16754
16755         * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
16756         Add field.
16757         * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
16758         Add field.
16759         (default_exception_support_info) <catch_handlers_sym>: Add field.
16760         (exception_support_info_fallback) <catch_handlers_sym>: Add field.
16761         (ada_exception_name_addr_1): Add "catch handlers" handling.
16762         (ada_exception_catchpoint_cond_string) <ex>: New parameter.
16763         Update all callers.
16764         (create_excep_cond_exprs) <ex>: Add parameter.
16765         (re_set_exception): Update create_excep_cond_exprs call.
16766         (print_it_exception, print_one_exception, print_mention_exception)
16767         (print_recreate_exception): Add "catch handler" handling.
16768         (allocate_location_catch_handlers, re_set_catch_handlers)
16769         (check_status_catch_handlers, print_it_catch_handlers)
16770         (print_one_catch_handlers, print_mention_catch_handlers)
16771         (print_recreate_catch_handlers): New function.
16772         (catch_handlers_breakpoint_ops): New variable.
16773         (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
16774         Add parameter.  Add "catch handler" handling.
16775         (ada_exception_sym_name, ada_exception_breakpoint_ops):
16776         Add "catch handler" handling.
16777         (ada_exception_catchpoint_cond_string): Add "catch handler"
16778         handling.
16779         (create_ada_exception_catchpoint): Update create_excep_cond_exprs
16780         call.
16781         (catch_ada_handlers_command): New function.
16782         (initialize_ada_catchpoint_ops): Initialize "catch handlers"
16783         operations structure.
16784         (_initialize_ada_language): Add "catch handlers" command entry.
16785         * NEWS: Document "catch handlers" feature.
16786
16787 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
16788
16789         * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
16790         account when creating the array type of the slice.
16791         (ada_value_slice): Likewise.
16792
16793 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
16794
16795         * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
16796         New enum value.
16797         (create_array_type_with_stride): Add byte_stride_prop parameter.
16798         * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
16799         New parameter.  Update all callers in this file.
16800         (array_type_has_dynamic_stride): New function.
16801         (is_dynamic_type_internal, resolve_dynamic_array): Add handling
16802         of arrays with dynamic byte strides.
16803         * dwarf2read.c (read_array_type): Add support for dynamic
16804         DW_AT_byte_stride attributes.
16805
16806 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
16807
16808         * dwarf2read.c (read_unspecified_type): Treat
16809         DW_TAG_enumeration_type DIEs from Ada units as stubs.
16810
16811 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
16812
16813         Update copyright year range in all GDB files.
16814
16815 2018-01-01, 18  Joel Brobecker  <brobecker@adacore.com>
16816
16817         * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
16818         and gdb/testsuite/gdb.base/step-line.c.
16819
16820 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
16821
16822         * copyright.py (main): Dump the contents of
16823         MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
16824         even if BY_HAND is empty.
16825
16826 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
16827
16828         * top.c (print_gdb_version): Update Copyright year in version
16829         message.
16830
16831 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
16832
16833         * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
16834
16835 For older changes see ChangeLog-2017.
16836 \f
16837 Local Variables:
16838 mode: change-log
16839 left-margin: 8
16840 fill-column: 74
16841 version-control: never
16842 coding: utf-8
16843 End: