gdb/dwarf: Convert some predicates from int to bool
[external/binutils.git] / gdb / ChangeLog
1 2018-12-17  Andrew Burgess  <andrew.burgess@embecosm.com>
2
3         * dwarf2read.c (struct dwarf2_cu): Convert the fields 'mark',
4         'has_loclist', 'checked_producer', 'producer_is_gxx_lt_4_6',
5         'producer_is_gcc_lt_4_3', 'producer_is_icc_lt_14',
6         'processing_has_namespace_info' from unsigned int to bool.  Update
7         comments.
8         (producer_is_icc_lt_14): Update return type.
9         (producer_is_gcc_lt_4_3): Likewise.
10         (producer_is_gxx_lt_4_6): Likewise.
11         (process_die): Write true instead of 1 into predicate fields.
12         (dwarf2_start_symtab): Likewise.
13         (var_decode_location): Likewise.
14         (dwarf2_mark_helper): Likewise.
15         (dwarf2_mark): Likewise.
16         (dwarf2_clear_marks): Write false instead of 0 into predicate
17         field.
18         (dwarf2_cu::dwarf2_cu): Initialise predicate fields to false, not
19         0.
20
21 2018-12-17  Szabolcs Nagy  <szabolcs.nagy@arm.com>
22
23         * nat/aarch64-sve-linux-ptrace.h: Include signal.h instead of
24         asm/sigcontext.h.
25
26 2018-12-17  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
27
28         * nat/linux-ptrace.c (kill_child): Fix ARI warning by removing
29         warning trailing new line.
30
31 2018-12-16  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
32
33         * nat/linux-ptrace.c (kill_child): New function.
34         (linux_ptrace_test_ret_to_nx): Use kill_child instead of local code.
35         Add a call to kill_child in case of early return after fork.
36         (linux_check_ptrace_features): Use kill_child instead of local code.
37         (linux_test_for_tracefork): Likewise.
38
39 2018-12-14  Tom Tromey  <tom@tromey.com>
40
41         * Makefile.in: Remove "alloca" comment.
42         (INFOFILES): Remove.
43         (local-maintainer-clean): Don't use INFOFILES.
44
45 2018-12-13  John Baldwin  <jhb@FreeBSD.org>
46
47         * syscalls/update-freebsd.sh: New file.
48         * syscalls/freebsd.xml: Regenerate.
49
50 2018-12-13  John Baldwin  <jhb@FreeBSD.org>
51
52         * NEWS: Add entry documenting system call aliases.
53         * break-catch-syscall.c (catch_syscall_split_args): Pass 'result'
54         to get_syscalls_by_name.
55         * gdbarch.sh (UNKNOWN_SYSCALL): Remove.
56         * gdbarch.h: Regenerate.
57         * syscalls/gdb-syscalls.dtd (syscall): Add alias attribute.
58         * xml-syscall.c [!HAVE_LIBEXPAT] (get_syscalls_by_name): Rename
59         from get_syscall_by_name.  Now accepts a pointer to a vector of
60         integers and returns a bool.
61         [HAVE_LIBEXPAT] (struct syscall_desc): Add alias member.
62         (syscall_create_syscall_desc): Add alias parameter and pass it to
63         syscall_desc constructor.
64         (syscall_start_syscall): Handle alias attribute.
65         (syscall_attr): Add alias attribute.
66         (xml_get_syscalls_by_name): Rename from xml_get_syscall_number.
67         Now accepts a pointer to a vector of integers and returns a
68         bool.  Add syscalls whose alias or name matches the requested
69         name.
70         (get_syscalls_by_name): Rename from get_syscall_by_name.  Now
71         accepts a pointer to a vector of integers and returns a bool.
72         * xml-syscall.h (get_syscalls_by_name): Likewise.
73
74 2018-12-13  John Baldwin  <jhb@FreeBSD.org>
75
76         * break-catch-syscall.c (catch_syscall_split_args): Pass 'result'
77         to get_syscalls_by_group.
78         * xml-syscall.c [!HAVE_LIBEXPAT] (get_syscalls_by_group): Return
79         false.
80         [HAVE_LIBEXPAT] (xml_list_syscalls_by_group): Append syscall
81         numbers to an existing vector of integers and return a bool.
82         (get_syscalls_by_group): Accept pointer to vector of integers
83         and change return type to bool.
84         * xml-syscall.h (get_syscalls_by_group): Likewise.
85
86 2018-12-13  Jim Wilson  <jimw@sifive.com>
87
88         * riscv-tdep.c (riscv_print_one_register_info): For MSTATUS, add
89         comment for SD field, and correct xlen calculation.  For MISA, add
90         comment for MXL field, add call to register_size, and correct base
91         calculation.
92
93 2018-12-13  Stafford Horne  <shorne@gmail.com>
94
95         * NEWS(New targets): Add or1k*-*-linux*.
96
97 2018-12-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
98
99         * nat/linux-osdata.c (linux_xfer_osdata_info_os_types): Forward
100         declare on one line to fix ARI warning.
101
102 2018-12-12  Andrew Burgess  <andrew.burgess@embecosm.com>
103
104         * infrun.c (infcall_suspend_state::infcall_suspend_state): New.
105         (infcall_suspend_state::registers): New.
106         (infcall_suspend_state::restore): New.
107         (infcall_suspend_state::thread_suspend): Rename to...
108         (infcall_suspend_state::m_thread_suspend): ...this.
109         (infcall_suspend_state::registers): Rename to...
110         (infcall_suspend_state::m_registers): ...this.
111         (infcall_suspend_state::siginfo_gdbarch): Rename to...
112         (infcall_suspend_state::m_siginfo_gdbarch): ...this.
113         (infcall_suspend_state::siginfo_data): Rename to...
114         (infcall_suspend_state::m_siginfo_data): ...this.
115         (save_infcall_suspend_state): Rewrite to use infcall_suspend_state
116         constructor.
117         (restore_infcall_suspend_state): Rewrite to use
118         infcall_suspend_state::restore method.
119         (get_infcall_suspend_state_regcache): Use
120         infcall_suspend_state::registers method.
121
122 2018-12-12  Andrew Burgess  <andrew.burgess@embecosm.com>
123
124         * riscv-tdep.c (riscv_call_arg_scalar_float): Unnamed (variadic)
125         arguments are passed in integer registers.
126         (riscv_call_arg_complex_float): Likewise.
127
128 2018-12-11  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
129
130         * nat/linux-osdata.c (common_getter): New function.
131         (struct osdata_type): Change getter to take_snapshot.
132         Add LONGEST len_avail and struct buffer buffer.
133         Change all elements in the initializer.
134         Add an element for the list of types.
135         (linux_xfer_osdata_info_os_types): New function.
136         (linux_common_xfer_osdata): Use common_getter for the list of types.
137         Replace getter call by common_getter.
138         (linux_xfer_osdata_cpus): Remove args READBUF, OFFSET, LEN.
139         Add arg BUFFER.  Only keep the code that adds data in BUFFER.
140         (linux_xfer_osdata_fds): Likewise.
141         (linux_xfer_osdata_modules): Likewise.
142         (linux_xfer_osdata_msg): Likewise.
143         (linux_xfer_osdata_processes): Likewise.
144         (linux_xfer_osdata_processgroups): Likewise.
145         (linux_xfer_osdata_sem): Likewise.
146         (linux_xfer_osdata_shm): Likewise.
147         (linux_xfer_osdata_isockets): Likewise.
148         (linux_xfer_osdata_threads): Likewise.
149
150 2018-12-11  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
151
152         * nat/linux-osdata.c: Removed various trailing spaces.
153
154 2018-12-10  Andrew Burgess  <andrew.burgess@embecosm.com>
155
156         * riscv-tdep.c (riscv_register_name): Fix ARI warning by removing
157         leading whitespace before #include line.
158
159 2018-12-08  Simon Marchi  <simon.marchi@ericsson.com>
160             Дилян Палаузов  <dilyan.palauzov@aegee.org>
161
162         PR gdb/23950
163         * configure.ac: Search for tgetent in libtinfow.
164         * configure: Re-generate.
165
166 2018-12-08  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
167
168         * linux-thread-db.c (struct thread_db_info): Add td_ta_delete_p.
169         (thread_db_err_str): Forward declare.
170         (delete_thread_db_info): Call td_ta_delete_p if available.
171         (try_thread_db_load_1): Acquire td_ta_delete address.
172         * nat/gdb_thread_db.h (td_ta_delete_ftype): Declare.
173
174 2018-12-08  Pedro Alves  <palves@redhat.com>
175
176         * source.c (forward_search_command): Rename to ...
177         (search_command_helper): ... this.  Add 'forward' parameter.
178         Tweak to use a gdb::def_vector<char> instead of a xrealloc'ed
179         buffer.  Handle backward searches too.
180         (forward_search_command, reverse_search_command): Reimplement by
181         calling search_command_helper.
182
183 2018-12-07  Andrew Burgess  <andrew.burgess@embecosm.com>
184
185         * .dir-locals.el: Copy most of the settings from c-mode over to
186         c++-mode.
187
188 2018-12-08  Stafford Horne  <shorne@gmail.com>
189
190         * Makefile.in (ALL_TARGET_OBS): Add or1k-linux-tdep.o.
191         * configure.tgt: Add or1k*-*-linux*.
192         * or1k-linux-tdep.c: New file.
193         * or1k-tdep.c (or1k_gdbarch_init): Call gdbarch_init_osabi.
194
195 2018-12-07  Pedro Alves  <palves@redhat.com>
196
197         * dwarf2read.c (get_gdb_index_contents_from_section): Use
198         gdb::make_array_view.
199
200 2018-12-05  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
201
202         * language.c (_initialize_language): Fix leak by assigning
203         a static string to language.  Same for range and case_sensitive,
204         even if no leak is detected for these variables.
205
206 2018-12-05  John Baldwin  <jhb@FreeBSD.org>
207
208         * configure: Re-generate.
209         * configure.ac: Use separate sed expressions to escape variables
210         in auto-load directories.
211
212 2018-12-05  Andrew Burgess  <andrew.burgess@embecosm.com>
213
214         * riscv-tdep.c (riscv_features_from_gdbarch_info): New function.
215         (riscv_find_default_target_description): Use new function to
216         extract feature from gdbarch_info.
217         (riscv_gdbarch_init): Add error checks for xlen and flen between
218         target description and bfd headers.  Be smarter about when we
219         think the hardware floating point abi should be used.
220
221 2018-12-05  Alan Hayward  <alan.hayward@arm.com>
222
223         * nat/aarch64-linux-hw-point.c
224         (aarch64_linux_any_set_debug_regs_state): New function.
225         * nat/aarch64-linux-hw-point.h
226         (aarch64_linux_any_set_debug_regs_state): New declaration.
227         * nat/aarch64-linux.c (aarch64_linux_new_thread): Check if any
228         BPs or WPs are set.
229
230 2018-11-30  John Baldwin  <jhb@FreeBSD.org>
231
232         * common/filestuff.c [HAVE_KINFO_GETFILE]: Include headers.
233         (fdwalk) [HAVE_KINFO_GETFILE]: Use kinfo_getfile.
234
235 2018-11-30  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
236             Simon Marchi  <simon.marchi@ericsson.com>
237
238         * linespec.c (symtab_vector_up): Remove.
239         (symtabs_from_filename): Change return type to std::vector.
240         (collect_symtabs_from_filename): Likewise.
241         (create_sals_line_offset): Assign return value of
242         collect_symtabs_from_filename to *ls->file_symtabs.
243         (convert_explicit_location_to_linespec): Remove call to release.
244         (parse_linespec): Likewise.
245         (symtab_collector) <symtab_collector>: Remove initialization of
246         m_symtabs.
247         <release_symtabs>: Change return type to std::vector<symtab *>.
248         <operator ()>: Adjust.
249
250 2018-11-30  John Baldwin  <jhb@FreeBSD.org>
251
252         * fbsd-nat.c [__FreeBSD_version >= 700009] (USE_SIGINFO): Macro
253         defined.
254         (union sigval32, struct siginfo32, fbsd_siginfo_size)
255         (fbsd_convert_siginfo): Make conditional on USE_SIGINFO instead
256         of KERN_PROC_AUXV and PT_LWPINFO.
257         (fbsd_nat_target::xfer_partial): Define method unconditionally.
258         Make TARGET_OBJECT_SIGNAL_INFO conditional on USE_SIGINFO.
259         Make TARGET_OBJECT_AUXV conditional on KERN_PROC_AUXV.
260         Make TARGET_OBJECT_FREEBSD_VMMAP and
261         TARGET_OBJECT_FREEBSD_PS_STRINGS conditional on KERN_PROC_VMMAP
262         and KERN_PROC_PS_STRINGS.
263         * fbsd-nat.h: Include <sys/proc.h>.
264         (fbsd_nat_target::xfer_partial): Declare method unconditionally.
265
266 2018-11-30  Andrew Burgess  <andrew.burgess@embecosm.com>
267
268         * riscv-linux-nat.c: Add 'inferior.h' and 'target-descriptions.h'
269         header files.
270         (riscv_linux_nat_target::read_description): New method.
271
272 2018-11-30  Andrew Burgess  <andrew.burgess@embecosm.com>
273
274         * arch/riscv.h (riscv_gdbarch_features::hash): New method.
275         * arch/riscv.c (struct riscv_gdbarch_features_hasher): New.
276         (riscv_tdesc_cache): New global.
277         (riscv_create_target_description): Look in the cache before
278         creating a new target description.
279
280 2018-11-30  Andrew Burgess  <andrew.burgess@embecosm.com>
281
282         * arch/riscv.h (riscv_gdb_features::operator==): New.
283         (riscv_gdb_features::operator!=): New.
284         * riscv-tdep.c (riscv_gdbarch_init): Make use of the inequality
285         operator.
286
287 2018-11-30  Andrew Burgess  <andrew.burgess@embecosm.com>
288
289         * arch/riscv.h (riscv_create_target_description): Make return type
290         const.
291         * arch/riscv.c (riscv_create_target_description): Likewise.
292         * riscv-tdep.c (riscv_find_default_target_description): Likewise.
293
294 2018-11-30  Jan Kratochvil  <jan.kratochvil@redhat.com>
295             Keith Seitz  <keiths@redhat.com>
296             Tom Tromey  <tom@tromey.com>
297             Sergio Durigan Junior  <sergiodj@redhat.com>
298
299         https://bugzilla.redhat.com/show_bug.cgi?id=1613614
300         * dwarf2read.c (dwarf2_find_containing_comp_unit): Add
301         'mid_cu->length' to '*cu_off' when checking if 'sect_off' is
302         inside the CU.
303
304 2018-11-30  Pedro Alves  <palves@redhat.com>
305
306         * aix-thread.c (aix_thread_target) <aix_thread_target>: Delete.
307         <stratum>: New override.
308         * bfd-target.c (aix_thread_target) <aix_thread_target>: Delete.
309         <stratum>: New override.
310         * bsd-uthread.c (bsd_uthread_target) <bsd_uthread_target>: Delete.
311         <stratum>: New override.
312         * exec.c (exec_target) <exec_target>: Delete.
313         <stratum>: New override.
314         * gdbarch-selftests.c (register_to_value_test): Adjust to use the
315         stratum method instead of the to_stratum field.
316         * linux-thread-db.c (thread_db_target) <thread_db_target>: Delete.
317         <stratum>: New override.
318         (thread_db_target::thread_db_target): Delete.
319         * make-target-delegates (print_class): Don't print a ctor
320         declaration.  Print a stratum method override declaration.
321         * process-stratum-target.h (process_stratum_target)
322         <process_stratum_target>: Delete.
323         <stratum>: New override.
324         * ravenscar-thread.c (ravenscar_thread_target)
325         <ravenscar_thread_target>: Delete.
326         <stratum>: New override.
327         * record-btrace.c (record_btrace_target)
328         <record_btrace_target>: Delete.
329         <stratum>: New override.
330         * record-full.c (record_full_base_target)
331         <record_full_base_target>: Delete.
332         <stratum>: New override.
333         * record.c (record_disconnect, record_detach)
334         (record_mourn_inferior, record_kill): Adjust to use the stratum
335         method instead of the to_stratum field.
336         * regcache.c (cooked_read_test, cooked_write_test): Likewise.
337         * sol-thread.c (sol_thread_target)
338         <sol_thread_target>: Delete.
339         <stratum>: New override.
340         * spu-multiarch.c (spu_multiarch_target)
341         <spu_multiarch_target>: Delete.
342         <stratum>: New override.
343         * target-delegates.c: Regenerate.
344         * target.c (target_stack::push, target_stack::unpush)
345         (pop_all_targets_above, pop_all_targets_at_and_above)
346         (info_target_command, target_require_runnable)
347         (target_stack::find_beneath): Adjust to use the stratum method
348         instead of the to_stratum field.
349         (dummy_target::dummy_target): Delete.
350         (dummy_target::stratum): New.
351         (debug_target::debug_target): Delete.
352         (debug_target::stratum): New.
353         (maintenance_print_target_stack): Adjust to use the stratum method
354         instead of the to_stratum field.
355         * target.h (struct target_ops) <stratum>: New method.
356         <to_stratum>: Delete.
357         <is_pushed>: Adjust to use the stratum method
358         instead of the to_stratum field.
359
360 2018-11-30  Pedro Alves  <palves@redhat.com>
361
362         * corelow.c (core_target) <has_all_memory, has_execution>: New
363         overrides.
364         * inf-child.c (inf_child_target::has_all_memory)
365         (inf_child_target::has_memory, inf_child_target::has_stack)
366         (inf_child_target::has_registers)
367         (inf_child_target::has_execution): Delete.
368         * inf-child.h (inf_child_target) <has_all_memory, has_memory,
369         has_stack, has_registers, has_execution>: Delete.
370         * process-stratum-target.c
371         (process_stratum_target::has_all_memory)
372         (process_stratum_target::has_memory)
373         (process_stratum_target::has_stack)
374         (process_stratum_target::has_registers)
375         (process_stratum_target::has_execution): New.
376         * process-stratum-target.h (process_stratum_target)
377         <has_all_memory, has_memory, has_stack, has_registers,
378         has_execution>: New method overrides.
379         * ravenscar-thread.c (ravenscar_thread_target) <has_all_memory,
380         has_memory, has_stack, has_registers, has_execution>: Delete.
381         * remote-sim.c (gdbsim_target) <has_stack, has_registers,
382         has_execution>: Delete.
383         * remote.c (remote_target) <has_all_memory, has_memory, has_stack,
384         has_registers, has_execution>: Delete.
385         * target.c (default_child_has_all_memory)
386         (default_child_has_memory, default_child_has_stack)
387         (default_child_has_registers, default_child_has_execution):
388         Delete.
389         * target.h (default_child_has_all_memory)
390         (default_child_has_memory, default_child_has_stack)
391         (default_child_has_registers, default_child_has_execution):
392         Delete.
393         * tracefile.h (tracefile_target) <has_execution>: New override.
394
395 2018-11-30  Pedro Alves  <palves@redhat.com>
396
397         * Makefile.in (COMMON_SFILES): Add process-stratum-target.c.
398         * bsd-kvm.c: Include "process-stratum-target.h".
399         (bsd_kvm_target): Now inherits from process_stratum_target.
400         (bsd_kvm_target::bsd_kvm_target): Default it.
401         * corelow.c: Include "process-stratum-target.h".
402         (core_target): Now inherits from process_stratum_target.
403         (core_target::core_target): Don't set to_stratum here.
404         * inf-child.c (inf_child_target::inf_child_target): Delete.
405         * inf-child.h: Include "process-stratum-target.h".
406         (inf_child_target): Inherit from process_stratum_target.
407         (inf_child_target) <inf_child_target>: Default it.
408         <can_async_p, supports_non_stop, supports_disable_randomization>:
409         Delete overrides.
410         * process-stratum-target.c: New file.
411         * process-stratum-target.h: New file.
412         * remote-sim.c: Include "process-stratum-target.h".
413         (gdbsim_target): Inherit from process_stratum_target.
414         <gdbsim_target>: Default it.
415         * remote.c: Include "process-stratum-target.h".
416         (remote_target): Inherit from process_stratum_target.
417         <remote_target>: Default it.
418         * target.c (default_thread_address_space)
419         (default_thread_architecture): Delete.
420         * target.h (target_ops) <thread_architecture>: Now returns NULL by
421         default.
422         <thread_address_space>: Ditto.
423         * test-target.h: Include "process-stratum-target.h" instead of
424         "target.h".
425         (test_target_ops): Inherit from process_stratum_target.
426         <test_target_ops>: Default it.
427         * tracefile.c (tracefile_target::tracefile_target): Delete.
428         * tracefile.h: Include "process-stratum-target.h".
429         (tracefile_target): Inherit from process_stratum_target.
430         <tracefile_target>: Default it.
431         * target-delegates.c: Regenerate.
432
433 2018-11-30  Pedro Alves  <palves@redhat.com>
434
435         * Makefile.in (COMMON_SFILES): Add test-target.c.
436         * gdbarch-selftests.c: Include "test-target.h".
437         * regcache.c: Include "test-target.h".
438         * target.c (test_target_info, test_target_ops::info): Move to ...
439         * test-target.c: ... this new file.
440         * target.h (test_target_ops): Move to ...
441         * test-target.h: ... this new file.
442
443 2018-11-29  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
444
445         * source.c (forward_search_command): Fix leak by using
446         xrealloc even for the first allocation in the loop, as buf
447         is static.
448
449 2018-11-29  Rajendra SY  <rajendra.sy@gmail.com>
450
451         PR gdb/23093
452         * gdb/fbsd-tdep.c (fbsd_gdb_signal_from_target)
453         (fbsd_gdb_signal_to_target): New.
454         (fbsd_init_abi): Install gdbarch "signal_from_target" and
455         "signal_to_target" methods.
456
457 2018-11-29  Tom Tromey  <tom@tromey.com>
458
459         * valarith.c (value_x_unop): Don't set argvec[3].
460
461 2018-11-26  Simon Marchi  <simon.marchi@ericsson.com>
462
463         PR gdb/23917
464         * sparc-linux-nat.c (sparc_linux_nat_target): Remove extraneous
465         semicolon.
466
467 2018-11-26  Pedro Alves  <palves@redhat.com>
468
469         * procfs.c (procfs_notice_thread): Replace uses of
470         in_thread_list/is_exited with find_thread_ptid/THREAD_EXITED.
471         * sol-thread.c (sol_thread_target::wait)
472         (sol_update_thread_list_callback): Likewise.
473
474 2018-11-25  Tom Tromey  <tom@tromey.com>
475
476         * ui-out.c (ui_out::field_fmt): Remove comment.
477         * tui/tui-out.c (tui_ui_out::do_field_fmt): Remove comment.
478         * mi/mi-out.c (mi_ui_out::do_field_fmt): Remove comment.
479
480 2018-11-24  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
481
482         * source.c (open_source_file): Leak fixed in '8e6a5953e1d Fix 4K
483         leak in open_source_file' has been partially undone by '2179fbc36d23
484         Return scoped_fd from open_source_file'. Re-add the transfer of
485         current s->fullname to the unique_xmalloc_ptr fullname given
486         to find_and_open_source.
487
488 2018-11-23  Pedro Alves  <palves@redhat.com>
489
490         * gdbthread.h (enum thread_state): Move comments here.
491         (is_running, is_stopped, is_exited): Remove declarations.
492
493 2018-11-22  Pedro Alves  <palves@redhat.com>
494
495         * Makefile.in (COMMON_SFILES): Add thread-iter.c.
496         * breakpoint.c (breakpoints_should_be_inserted_now): Replace
497         ALL_NON_EXITED_THREADS with all_non_exited_threads.
498         (print_one_breakpoint_location): Replace ALL_INFERIORS with
499         all_inferiors.
500         * bsd-kvm.c: Include inferior.h.
501         * btrace.c (btrace_free_objfile): Replace ALL_NON_EXITED_THREADS
502         with all_non_exited_threads.
503         * common/filtered-iterator.h: New.
504         * common/safe-iterator.h: New.
505         * corelow.c (core_target_open): Don't call init_thread_list here.
506         * darwin-nat.c (thread_info_from_private_thread_info): Replace
507         ALL_THREADS with all_threads.
508         * fbsd-nat.c (fbsd_nat_target::resume): Replace
509         ALL_NON_EXITED_THREADS with inf->non_exited_threads.
510         * fbsd-tdep.c (fbsd_make_corefile_notes): Replace
511         ALL_NON_EXITED_THREADS with inf->non_exited_threads.
512         * fork-child.c (postfork_hook): Don't call init_thread_list here.
513         * gdbarch-selftests.c (register_to_value_test): Adjust.
514         * gdbthread.h: Don't include "inferior.h" here.
515         (struct inferior): Forward declare.
516         (enum step_over_calls_kind): Moved here from inferior.h.
517         (thread_info::deletable): Definition moved to thread.c.
518         (find_thread_ptid (inferior *, ptid_t)): Declare.
519         (ALL_THREADS, ALL_THREADS_BY_INFERIOR, ALL_THREADS_SAFE): Delete.
520         Include "thread-iter.h".
521         (all_threads, all_non_exited_threads, all_threads_safe): New.
522         (any_thread_p): Declare.
523         (thread_list): Delete.
524         * infcmd.c (signal_command): Replace ALL_NON_EXITED_THREADS with
525         all_non_exited_threads.
526         (proceed_after_attach_callback): Delete.
527         (proceed_after_attach): Take an inferior pointer instead of an
528         integer PID.  Adjust to use range-for.
529         (attach_post_wait): Pass down inferior pointer instead of pid.
530         Use range-for instead of ALL_NON_EXITED_THREADS.
531         (detach_command): Remove init_thread_list call.
532         * inferior-iter.h: New.
533         * inferior.c (struct delete_thread_of_inferior_arg): Delete.
534         (delete_thread_of_inferior): Delete.
535         (delete_inferior, exit_inferior_1): Use range-for with
536         inf->threads_safe() instead of iterate_over_threads.
537         (inferior_appeared): Call init_thread_list here.
538         (discard_all_inferiors): Use all_non_exited_inferiors.
539         (find_inferior_id, find_inferior_pid): Use all_inferiors.
540         (iterate_over_inferiors): Use all_inferiors_safe.
541         (have_inferiors, number_of_live_inferiors): Use
542         all_non_exited_inferiors.
543         (number_of_inferiors): Use all_inferiors and std::distance.
544         (print_inferior): Use all_inferiors.
545         * inferior.h: Include gdbthread.h.
546         (enum step_over_calls_kind): Moved to gdbthread.h.
547         (struct inferior) <thread_list>: New field.
548         <threads, non_exited_threads, threads_safe>: New methods.
549         (ALL_INFERIORS): Delete.
550         Include "inferior-iter.h".
551         (ALL_NON_EXITED_INFERIORS): Delete.
552         (all_inferiors_safe, all_inferiors, all_non_exited_inferiors): New
553         functions.
554         * inflow.c (child_interrupt, child_pass_ctrlc): Replace
555         ALL_NON_EXITED_THREADS with all_non_exited_threads.
556         * infrun.c (follow_exec): Use all_threads_safe.
557         (clear_proceed_status, proceed): Use all_non_exited_threads.
558         (init_wait_for_inferior): Don't clear inline frame state here.
559         (infrun_thread_stop_requested, for_each_just_stopped_thread): Use
560         all_threads instead of ALL_NON_EXITED_THREADS.
561         (random_pending_event_thread): Use all_non_exited_threads instead
562         of ALL_NON_EXITED_THREADS.  Use a lambda for repeated code.
563         (clean_up_just_stopped_threads_fsms): Use all_non_exited_threads
564         instead of ALL_NON_EXITED_THREADS.
565         (handle_no_resumed): Use all_non_exited_threads instead of
566         ALL_NON_EXITED_THREADS.  Use all_inferiors instead of
567         ALL_INFERIORS.
568         (restart_threads, switch_back_to_stepped_thread): Use
569         all_non_exited_threads instead of ALL_NON_EXITED_THREADS.
570         * linux-nat.c (check_zombie_leaders): Replace ALL_INFERIORS with
571         all_inferiors.
572         (kill_unfollowed_fork_children): Use inf->non_exited_threads
573         instead of ALL_NON_EXITED_THREADS.
574         * linux-tdep.c (linux_make_corefile_notes): Use
575         inf->non_exited_threads instead of ALL_NON_EXITED_THREADS.
576         * linux-thread-db.c (thread_db_target::update_thread_list):
577         Replace ALL_INFERIORS with all_inferiors.
578         (thread_db_target::thread_handle_to_thread_info): Use
579         inf->non_exited_threads instead of ALL_NON_EXITED_THREADS.
580         * mi/mi-interp.c (multiple_inferiors_p): New.
581         (mi_on_resume_1): Simplify using all_non_exited_threads and
582         multiple_inferiors_p.
583         * mi/mi-main.c (mi_cmd_thread_list_ids): Use all_non_exited_threads
584         instead of ALL_NON_EXITED_THREADS.
585         * nto-procfs.c (nto_procfs_target::open): Don't call
586         init_thread_list here.
587         * record-btrace.c (record_btrace_target_open)
588         (record_btrace_target::stop_recording)
589         (record_btrace_target::close)
590         (record_btrace_target::record_is_replaying)
591         (record_btrace_target::resume, record_btrace_target::wait)
592         (record_btrace_target::record_stop_replaying): Use
593         all_non_exited_threads instead of ALL_NON_EXITED_THREADS.
594         * record-full.c (record_full_wait_1): Use all_non_exited_threads
595         instead of ALL_NON_EXITED_THREADS.
596         * regcache.c (cooked_read_test): Remove reference to global
597         thread_list.
598         * remote-sim.c (gdbsim_target::create_inferior): Don't call
599         init_thread_list here.
600         * remote.c (remote_target::update_thread_list): Use
601         all_threads_safe instead of ALL_NON_EXITED_THREADS.
602         (remote_target::process_initial_stop_replies): Replace
603         ALL_INFERIORS with all_non_exited_inferiors and use
604         all_non_exited_threads instead of ALL_NON_EXITED_THREADS.
605         (remote_target::open_1): Don't call init_thread_list here.
606         (remote_target::append_pending_thread_resumptions)
607         (remote_target::remote_resume_with_hc): Use all_non_exited_threads
608         instead of ALL_NON_EXITED_THREADS.
609         (remote_target::commit_resume)
610         (remote_target::remove_new_fork_children): Replace ALL_INFERIORS
611         with all_non_exited_inferiors and use all_non_exited_threads
612         instead of ALL_NON_EXITED_THREADS.
613         (remote_target::kill_new_fork_children): Use
614         all_non_exited_threads instead of ALL_NON_EXITED_THREADS.  Remove
615         init_thread_list and init_wait_for_inferior calls.
616         (remote_target::remote_btrace_maybe_reopen)
617         (remote_target::thread_handle_to_thread_info): Use
618         all_non_exited_threads instead of ALL_NON_EXITED_THREADS.
619         * target.c (target_terminal::restore_inferior)
620         (target_terminal_is_ours_kind): Replace ALL_INFERIORS with
621         all_non_exited_inferiors.
622         * thread-iter.c: New file.
623         * thread-iter.h: New file.
624         * thread.c: Include "inline-frame.h".
625         (thread_list): Delete.
626         (clear_thread_inferior_resources): Call clear_inline_frame_state.
627         (init_thread_list): Use all_threads_safe instead of
628         ALL_THREADS_SAFE.  Adjust to per-inferior thread lists.
629         (new_thread): Adjust to per-inferior thread lists.
630         (add_thread_silent): Pass inferior to find_thread_ptid.
631         (thread_info::deletable): New, moved from the header.
632         (delete_thread_1): Adjust to per-inferior thread lists.
633         (find_thread_global_id): Use inf->threads().
634         (find_thread_ptid): Use find_inferior_ptid and pass inferior to
635         find_thread_ptid.
636         (find_thread_ptid(inferior*, ptid_t)): New overload.
637         (iterate_over_threads): Use all_threads_safe.
638         (any_thread_p): New.
639         (thread_count): Use all_threads and std::distance.
640         (live_threads_count): Use all_non_exited_threads and
641         std::distance.
642         (valid_global_thread_id): Use all_threads.
643         (in_thread_list): Use find_thread_ptid.
644         (first_thread_of_inferior): Adjust to per-inferior thread lists.
645         (any_thread_of_inferior, any_live_thread_of_inferior): Use
646         inf->non_exited_threads().
647         (prune_threads, delete_exited_threads): Use all_threads_safe.
648         (thread_change_ptid): Pass inferior pointer to find_thread_ptid.
649         (set_resumed, set_running): Use all_non_exited_threads.
650         (is_thread_state, is_stopped, is_exited, is_running)
651         (is_executing): Delete.
652         (set_executing, set_stop_requested, finish_thread_state): Use
653         all_non_exited_threads.
654         (print_thread_info_1): Use all_inferiors and all_threads.
655         (thread_apply_all_command): Use all_non_exited_threads.
656         (thread_find_command): Use all_threads.
657         (update_threads_executing): Use all_non_exited_threads.
658         * tid-parse.c (parse_thread_id): Use inf->threads.
659         * x86-bsd-nat.c (x86bsd_dr_set): Use inf->non_exited_threads ().
660
661 2018-11-22  Pedro Alves  <palves@redhat.com>
662
663         * infrun.c (follow_exec) <set follow-exec new>: Add thread and
664         switch to it before calling into try_open_exec_file.
665
666 2018-11-22  Pedro Alves  <palves@redhat.com>
667
668         * cli/cli-interp.c (cli_on_user_selected_context_changed): Use
669         inferior_thread instead of find_thread_ptid, and only when
670         inferior_ptid is not null_ptid.
671         * inferior.c (add_inferior): Don't include target_pid_to_str
672         output when the inferior is not started.
673         * python/py-inferior.c (python_on_normal_stop): Don't use
674         find_thread_ptid.
675         (tui_on_user_selected_context_changed): Use inferior_thread
676         instead of find_thread_ptid, and only when inferior_ptid is not
677         null_ptid.
678
679 2018-11-21  Benno Fünfstück  <benno.fuenfstueck@gmail.com>
680
681         PR python/23714
682         * gdb/python/python.c (execute_gdb_command): Call
683         prevent_dont_repeat earlier to avoid affecting dont_repeat.
684
685 2018-11-21  Andrew Burgess  <andrew.burgess@embecosm.com>
686
687         * Makefile.in (ALL_TARGET_OBS): Add arch/riscv.o.
688         (HFILES_NO_SRCDIR): Add arch/riscv.h.
689         * arch/riscv.c: New file.
690         * arch/riscv.h: New file.
691         * configure.tgt: Add cpu_obs list of riscv, move riscv-tdep.o into
692         this list, and add arch/riscv.o.
693         * features/Makefile: Add riscv features.
694         * features/riscv/32bit-cpu.c: New file.
695         * features/riscv/32bit-cpu.xml: New file.
696         * features/riscv/32bit-csr.c: New file.
697         * features/riscv/32bit-csr.xml: New file.
698         * features/riscv/32bit-fpu.c: New file.
699         * features/riscv/32bit-fpu.xml: New file.
700         * features/riscv/64bit-cpu.c: New file.
701         * features/riscv/64bit-cpu.xml: New file.
702         * features/riscv/64bit-csr.c: New file.
703         * features/riscv/64bit-csr.xml: New file.
704         * features/riscv/64bit-fpu.c: New file.
705         * features/riscv/64bit-fpu.xml: New file.
706         * features/riscv/rebuild-csr-xml.sh: New file.
707         * riscv-tdep.c: Add 'arch/riscv.h' include.
708         (riscv_gdb_reg_names): Delete.
709         (csr_reggroup): New global.
710         (struct riscv_register_alias): Delete.
711         (struct riscv_register_feature): New structure.
712         (riscv_register_aliases): Delete.
713         (riscv_xreg_feature): New global.
714         (riscv_freg_feature): New global.
715         (riscv_virtual_feature): New global.
716         (riscv_csr_feature): New global.
717         (riscv_create_csr_aliases): New function.
718         (riscv_read_misa_reg): Delete.
719         (riscv_has_feature): Delete.
720         (riscv_isa_xlen): Simplify, just return cached xlen.
721         (riscv_isa_flen): Simplify, just return cached flen.
722         (riscv_has_fp_abi): Update for changes in struct gdbarch_tdep.
723         (riscv_register_name): Update to make use of tdesc_register_name.
724         Look up xreg and freg names in the new globals riscv_xreg_feature
725         and riscv_freg_feature.  Don't supply csr aliases here.
726         (riscv_fpreg_q_type): Delete.
727         (riscv_register_type): Use tdesc_register_type in almost all
728         cases, override the returned type in a few specific cases only.
729         (riscv_print_one_register_info): Handle errors reading registers.
730         (riscv_register_reggroup_p): Use tdesc_register_in_reggroup_p for
731         registers that are otherwise unknown to GDB.  Also check the
732         csr_reggroup.
733         (riscv_print_registers_info): Remove assert about upper register
734         number, and use gdbarch_register_reggroup_p instead of
735         short-cutting.
736         (riscv_find_default_target_description): New function.
737         (riscv_check_tdesc_feature): New function.
738         (riscv_add_reggroups): New function.
739         (riscv_setup_register_aliases): New function.
740         (riscv_init_reggroups): New function.
741         (_initialize_riscv_tdep): Add calls to setup CSR aliases, and
742         setup register groups.  Register new riscv debug variable.
743         * riscv-tdep.h: Add 'arch/riscv.h' include.
744         (struct gdbarch_tdep): Remove abi union, and add
745         riscv_gdbarch_features field.  Remove cached quad floating point
746         type, and provide initialisation for double type field.
747         * target-descriptions.c (maint_print_c_tdesc_cmd): Add riscv to
748         the list of targets using the feature based target descriptions.
749         * NEWS: Mention target description support.
750
751 2018-11-21  Pedro Alves  <palves@redhat.com>
752
753         * valops.c (find_method_list, value_find_oload_method_list)
754         (find_overload_match, find_oload_champ): Rename parameters and
755         locals.
756
757 2018-11-21  Pedro Alves  <palves@redhat.com>
758
759         * valops.c (find_method_list): Replace pointer and length
760         parameters with an gdb::array_view.  Adjust.
761         (value_find_oload_method_list): Likewise.
762         (find_overload_match): Use gdb::array_view for methods list.
763         Adjust to find_oload_champ interface change.
764         (find_oload_champ): 'xm_worker_vec' parameter now a pointer/array.
765         'num_fns' parameter now a size_t.  Eliminate 'fn_count' local.
766
767 2018-11-21  Pedro Alves  <palves@redhat.com>
768
769         * gdbtypes.c (compare_badness): Change type of parameters to const
770         reference.  Adjust to badness_vector being a std::vector now.
771         (rank_function): Adjust to badness_vector being a std::vector now.
772         * gdbtypes.h (badness_vector): Now a typedef to std::vector.
773         (LENGTH_MATCH): Delete.
774         (compare_badness): Change type of parameters to const reference.
775         (rank_function): Return a badness_vector by value now.
776         (find_overload_match): Adjust to badness_vector being a
777         std::vector now.  Remove cleanups.
778         (find_oload_champ_namespace): 'oload_champ_bv' parameter now a
779         badness_vector pointer.
780         (find_oload_champ_namespace_loop): 'oload_champ_bv' parameter now
781         a badness_vector pointer.  Adjust to badness_vector being a
782         std::vector now.  Remove cleanups.
783         (find_oload_champ): 'oload_champ_bv' parameter now
784         a badness_vector pointer.  Adjust to badness_vector being a
785         std::vector now.  Remove cleanups.
786
787 2018-11-21  Pedro Alves  <palves@redhat.com>
788
789         * cp-support.c (sym_return_val_size, sym_return_val_index)
790         (sym_return_val): Delete.
791         (overload_list_add_symbol): Add std::vector parameter.  Adjust to
792         add to the vector.
793         (make_symbol_overload_list): Adjust to return a std::vector
794         instead of maintaining a global open coded vector.
795         (make_symbol_overload_list_block): Add std::vector parameter.
796         (make_symbol_overload_list_block): Rename to ...
797         (add_symbol_overload_list_block): ... this and add std::vector
798         parameter.
799         (make_symbol_overload_list_namespace): Rename to ...
800         (add_symbol_overload_list_namespace): ... this and add std::vector
801         parameter.
802         (make_symbol_overload_list_adl_namespace): Rename to ...
803         (add_symbol_overload_list_adl_namespace): ... this and add
804         std::vector parameter.
805         (make_symbol_overload_list_adl): Delete.
806         (add_symbol_overload_list_adl): New.
807         (make_symbol_overload_list_using): Rename to ...
808         (add_symbol_overload_list_using): ... this and add std::vector
809         parameter.
810         (make_symbol_overload_list_qualified): Rename to ...
811         (add_symbol_overload_list_qualified): ... this and add std::vector
812         parameter.
813         * cp-support.h: Include "common/array-view.h" and <vector>.
814         (make_symbol_overload_list): Change return type to std::vector.
815         (make_symbol_overload_list_adl): Delete declaration.
816         (add_symbol_overload_list_adl): New declaration.
817         * valops.c (find_overload_match): Local 'oload_syms' now a
818         std::vector.
819         (find_oload_champ_namespace): 'oload_syms' parameter now a
820         std::vector pointer.
821         (find_oload_champ_namespace_loop): 'oload_syms' parameter now a
822         std::vector pointer.  Adjust to new make_symbol_overload_list
823         interface.
824
825 2018-11-21  Pedro Alves  <palves@redhat.com>
826
827         * common/array-view.h (array_view::splice(size_type, size_t)): New.
828         (array_view::splice(size_type)): New.
829         * eval.c (eval_call, evaluate_funcall): Adjust to use array_view.
830         * extension.c (xmethod_worker::get_arg_types): Adjust to return an
831         std::vector.
832         (xmethod_worker::get_result_type): Adjust to use gdb::array_view.
833         * extension.h: Include "common/array-view.h".
834         (xmethod_worker::invoke): Adjust to use gdb::array_view.
835         (xmethod_worker::get_arg_types): Adjust to return an std::vector.
836         (xmethod_worker::get_result_type): Adjust to use gdb::array_view.
837         (xmethod_worker::do_get_arg_types): Adjust to use std::vector.
838         (xmethod_worker::do_get_result_type): Adjust to use
839         gdb::array_view.
840         * gdbtypes.c (rank_function): Adjust to use gdb::array_view.
841         * gdbtypes.h: Include "common/array-view.h".
842         (rank_function): Adjust to use gdb::array_view.
843         * python/py-xmethods.c (python_xmethod_worker::invoke)
844         (python_xmethod_worker::do_get_arg_types)
845         (python_xmethod_worker::do_get_result_type)
846         (python_xmethod_worker::invoke): Adjust to new interfaces.
847         * valarith.c (value_user_defined_cpp_op, value_user_defined_op)
848         (value_x_binop, value_x_unop): Adjust to use gdb::array_view.
849         * valops.c (find_overload_match, find_oload_champ_namespace)
850         (find_oload_champ_namespace_loop, find_oload_champ): Adjust to use
851         gdb:array_view and the new xmethod_worker interfaces.
852         * value.c (result_type_of_xmethod, call_xmethod): Adjust to use
853         gdb::array_view.
854         * value.h (find_overload_match, result_type_of_xmethod)
855         (call_xmethod): Adjust to use gdb::array_view.
856         * unittests/array-view-selftests.c: Add slicing tests.
857
858 2018-11-21  Pedro Alves  <palves@redhat.com>
859
860         * ada-lang.c (ada_evaluate_subexp): Adjust to pass an array_view.
861         * common/array-view.h (make_array_view): New.
862         * compile/compile-object-run.c (compile_object_run): Adjust to
863         pass an array_view.
864         * elfread.c (elf_gnu_ifunc_resolve_addr): Adjust.
865         * eval.c (eval_call): Adjust to pass an array_view.
866         (evaluate_subexp_standard): Adjust to pass an array_view.
867         * gcore.c (call_target_sbrk): Adjust to pass an array_view.
868         * guile/scm-value.c (gdbscm_value_call): Likewise.
869         * infcall.c (push_dummy_code): Replace pointer + size parameters
870         with an array_view parameter.
871         (call_function_by_hand, call_function_by_hand_dummy): Likewise and
872         adjust.
873         * infcall.h: Include "common/array-view.h".
874         (call_function_by_hand, call_function_by_hand_dummy): Replace
875         pointer + size parameters with an array_view parameter.
876         * linux-fork.c (inferior_call_waitpid): Adjust to use array_view.
877         * linux-tdep.c (linux_infcall_mmap): Likewise.
878         * objc-lang.c (lookup_objc_class, lookup_child_selector)
879         (value_nsstring, print_object_command): Likewise.
880         * python/py-value.c (valpy_call): Likewise.
881         * rust-lang.c (rust_evaluate_funcall): Likewise.
882         * spu-tdep.c (flush_ea_cache): Likewise.
883         * valarith.c (value_x_binop, value_x_unop): Likewise.
884         * valops.c (value_allocate_space_in_inferior): Likewise.
885         * unittests/array-view-selftests.c (run_tests): Add
886         gdb::make_array_view test.
887
888 2018-11-20  Andrew Burgess  <andrew.burgess@embecosm.com>
889
890         * cli-out.c (cli_ui_out::do_field_int): Use string_printf rather
891         than a fixed size buffer.
892
893 2018-11-20  Andrew Burgess  <andrew.burgess@embecosm.com>
894
895         * breakpoint.c (print_one_breakpoint_location): Reduce whitespace,
896         and remove insertion of extra spaces in GDB's output.
897         * cli-out.c (cli_ui_out::do_field_fmt): Update header comment.
898         Layout field into a temporary buffer, and then output it as a
899         string field.
900
901 2018-11-20  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
902
903         * NEWS: Document the language choice done by
904         'info [types|functions|variables]|rbreak'.
905
906 2018-11-20  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
907
908         * symtab.c (treg_matches_sym_type_name): Use
909         scoped_switch_to_sym_language_if_auto instead of local logic.
910         (print_symbol_info): Use scoped_switch_to_sym_language_if_auto
911         to switch to SYM language when language mode is auto.
912
913 2018-11-20  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
914
915         * language.h (scoped_switch_to_sym_language_if_auto): New class.
916
917 2018-11-20  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
918
919         * symtab.c (search_symbols): Properly check absence of type regexp
920         before entering the loop scanning the minimal symbols.
921
922 2018-11-20  John Darrington  <john@darrington.wattle.id.au>
923
924         * s12z-tdep.c (s12z_extract_return_value): New function.
925         (inv_reg_perm) New array.
926         (s12z_return_value): Populate readbuf if non-null.
927
928 2018-11-20  Eli Zaretskii  <eliz@gnu.org>
929
930         * common/filestuff.c (gdb_fopen_cloexec): Disable use of "e" mode
931         with 'fopen' also if O_CLOEXEC is equal to O_NOINHERIT, to cater
932         to MinGW fixed by Gnulib.
933         (O_NOINHERIT): Define if not defined.
934
935 2018-11-19  John Darrington  <john@darrington.wattle.id.au>
936
937         * s12z-tdep.c (s12z_frame_cache): Add an assertion.
938
939 2018-11-19  Simon Marchi  <simon.marchi@polymtl.ca>
940
941         * infrun.c (displaced_step_inferior_state) <next>: Remove.
942
943 2018-11-19  Tom Tromey  <tom@tromey.com>
944
945         * source.c (get_filename_and_charpos): Return void.
946
947 2018-11-19  Simon Marchi  <simon.marchi@polymtl.ca>
948
949         * skip.c (_initialize_step_skip): Fix "info skip" help.
950
951 2018-11-16  Tom Tromey  <tom@tromey.com>
952
953         PR rust/23625:
954         * rust-lang.c (rust_internal_print_type): Handle TYPE_CODE_PTR.
955
956 2018-11-19  Simon Marchi  <simon.marchi@ericsson.com>
957
958         * infrun.c (displaced_step_inferior_states): Change type to
959         std::forward_list.
960         (get_displaced_stepping_state): Adjust.
961         (displaced_step_in_progress_any_inferior): Adjust.
962         (add_displaced_stepping_state): Adjust.
963         (remove_displaced_stepping_state): Adjust.
964
965 2018-11-18  Tom Tromey  <tom@tromey.com>
966
967         PR build/23814:
968         * target-delegates.c: Rebuild.
969         * ia64-linux-nat.c (class ia64_linux_nat_target)
970         <have_steppable_watchpoint>: Use override.  Return true, not 1.
971         (ia64_linux_nat_target::can_use_hw_breakpoint): Rename.  Remove
972         "self" argument.
973         (ia64_linux_nat_target::low_new_thread): Rename.
974         (class ia64_linux_nat_target) <read_description>: Don't declare.
975         * target.h (struct target_ops) <have_steppable_watchpoint>: Return
976         bool.
977
978 2018-11-16  Alan Hayward  <alan.hayward@arm.com>
979
980         PR gdb/22736:
981         * aarch64-tdep.c (aarch64_push_dummy_call): Remove
982         lang_struct_return code.
983
984 2018-11-16  Alan Hayward  <alan.hayward@arm.com>
985
986         * aarch64-tdep.c (aarch64_push_dummy_call): Replace arg with
987         return_method.
988         * alpha-tdep.c (alpha_push_dummy_call): Likewise.
989         * amd64-tdep.c (amd64_push_arguments): Likewise.
990         (amd64_push_dummy_call): Likewise.
991         * amd64-windows-tdep.c (amd64_windows_push_arguments): Likewise.
992         * arc-tdep.c (arc_push_dummy_call): Likewise.
993         * arm-tdep.c (arm_push_dummy_call): Likewise.
994         * avr-tdep.c (avr_push_dummy_call): Likewise.
995         * bfin-tdep.c (bfin_push_dummy_call): Likewise.
996         * cris-tdep.c (cris_push_dummy_call): Likewise.
997         * csky-tdep.c (csky_push_dummy_call): Likewise.
998         * frv-tdep.c (frv_push_dummy_call): Likewise.
999         * gdbarch.c: Regenerate.
1000         * gdbarch.h: Regenerate.
1001         * gdbarch.sh (gdbarch_push_dummy_call): Replace arg with
1002         return_method.
1003         * h8300-tdep.c (h8300_push_dummy_call): Likewise.
1004         * hppa-tdep.c (hppa32_push_dummy_call): Likewise.
1005         (hppa64_push_dummy_call): Likewise.
1006         * i386-darwin-tdep.c (i386_darwin_push_dummy_call): Likewise.
1007         * i386-tdep.c (i386_push_dummy_call): Likewise.
1008         * ia64-tdep.c (ia64_push_dummy_call): Likewise.
1009         * infcall.c (call_function_by_hand_dummy): Likewise.
1010         * iq2000-tdep.c (iq2000_push_dummy_call): Likewise.
1011         * lm32-tdep.c (lm32_push_dummy_call): Likewise.
1012         * m32c-tdep.c (m32c_push_dummy_call): Likewise.
1013         * m32r-tdep.c (m32r_push_dummy_call): Likewise.
1014         * m68hc11-tdep.c (m68hc11_push_dummy_call): Likewise.
1015         * m68k-tdep.c (m68k_push_dummy_call): Likewise.
1016         * mep-tdep.c (mep_push_dummy_call): Likewise.
1017         * mips-tdep.c (mips_eabi_push_dummy_call): Likewise.
1018         (mips_n32n64_push_dummy_call): Likewise.
1019         (mips_o32_push_dummy_call): Likewise.
1020         (mips_o64_push_dummy_call): Likewise.
1021         * mn10300-tdep.c (mn10300_push_dummy_call): Likewise.
1022         * msp430-tdep.c (msp430_push_dummy_call): Likewise.
1023         * nds32-tdep.c (nds32_push_dummy_call): Likewise.
1024         * nios2-tdep.c (nios2_push_dummy_call): Likewise.
1025         * or1k-tdep.c (or1k_push_dummy_call): Likewise.
1026         * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
1027         (ppc64_sysv_abi_push_dummy_call): Likewise.
1028         * ppc-tdep.h (ppc_sysv_abi_push_dummy_call): Likewise.
1029         (ppc64_sysv_abi_push_dummy_call): Likewise.
1030         * riscv-tdep.c (riscv_push_dummy_call): Likewise.
1031         * rl78-tdep.c (rl78_push_dummy_call): Likewise.
1032         * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
1033         * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
1034         * rx-tdep.c (rx_push_dummy_call): Likewise.
1035         * s390-tdep.c (s390_push_dummy_call): Likewise.
1036         * score-tdep.c (score_push_dummy_call): Likewise.
1037         * sh-tdep.c (sh_push_dummy_call_fpu): Likewise.
1038         (sh_push_dummy_call_nofpu): Likewise.
1039         * sparc-tdep.c (sparc32_store_arguments): Likewise.
1040         (sparc32_push_dummy_call): Likewise.
1041         * sparc64-tdep.c (sparc64_store_arguments): Likewise.
1042         (sparc64_push_dummy_call): Likewise.
1043         * spu-tdep.c (spu_push_dummy_call): Likewise.
1044         * tic6x-tdep.c (tic6x_push_dummy_call): Likewise.
1045         * tilegx-tdep.c (tilegx_push_dummy_call): Likewise.
1046         * v850-tdep.c (v850_push_dummy_call): Likewise.
1047         * vax-tdep.c (vax_push_dummy_call): Likewise.
1048         * xstormy16-tdep.c (xstormy16_push_dummy_call): Likewise.
1049         * xtensa-tdep.c (xtensa_push_dummy_call): Likewise.
1050
1051 2018-11-16  Alan Hayward  <alan.hayward@arm.com>
1052
1053         * gdbarch.sh (enum function_call_return_method): Add enum.
1054         * gdbarch.h: Regenerate.
1055         * infcall.c (call_function_by_hand_dummy): Replace vars with enum.
1056
1057 2018-11-15  Joel Brobecker  <brobecker@adacore.com>
1058
1059         * unittests/copy_bitwise-selftests.c: New file.
1060         * utils.c (selftests::bits_to_str, selftests::check_copy_bitwise)
1061         (selftests::copy_bitwise_tests): Delete, moving this code to
1062         unittests/copy_bitwise-selftests.c instead.
1063         (_initialize_utils): Do not register copy_bitwise tests.
1064         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1065         unittests/copy_bitwise-selftests.c.
1066
1067 2018-11-14  Joel Brobecker  <brobecker@adacore.com>
1068
1069         * ada-lang.c (move_bits): Delete. Update all callers to use
1070         copy_bitwise instead.
1071         * dwarf2loc.c (copy_bitwise, bits_to_str::bits_to_str)
1072         (selftests::check_copy_bitwise, selftests::copy_bitwise_tests):
1073         Move from here to utils.c.
1074         (_initialize_dwarf2loc): Remove call to register copy_bitwise
1075         selftests.
1076         * utils.h (copy_bitwise): Add declaration.
1077         * utils.c (copy_bitwise, bits_to_str::bits_to_str)
1078         (selftests::check_copy_bitwise, selftests::copy_bitwise_tests):
1079         Moved here from dwarf2loc.c.
1080         (_initialize_utils): Register copy_bitwise selftests.
1081
1082 2018-11-14  Jim Wilson  <jimw@sifive.com>
1083
1084         * riscv-tdep.c (struct riscv_arg_info): New field is_unnamed.
1085         (riscv_call_arg_scalar_int): If unnamed arg with twice xlen alignment,
1086         then increment next_regnum if odd.
1087         (riscv_arg_location): New arg is_unnamed.  Set ainfo->is_unnamed.
1088         (riscv_push_dummy_call): New local ftype.  Call check_typedef to set
1089         function type.  Pass new arg to riscv_arg_location based on function
1090         type.
1091         (riscv_return_value): Pass new arg to riscv_arg_location.
1092
1093         * riscv-tdep.c (BIGGEST_ALIGNMENT): New.
1094         (riscv_type_alignment) <TYPE_CODE_ARRAY>: If TYPE_VECTOR, return min
1095         of TYPE_LENGTH and BIGGEST_ALIGNMENT.
1096
1097         * riscv-tdep.c (riscv_call_arg_scalar_int): Use std::min when
1098         setting len.  New local align, set to max of arg align and xlen,
1099         and pass to first riscv_assign_stack_location call.
1100
1101 2018-11-12  Simon Marchi  <simon.marchi@polymtl.ca>
1102
1103         * skip.c (complete_skip_number): New function.
1104         (_initialize_step_skip): Add completers to some skip commands.
1105
1106 2018-11-09  Tom Tromey  <tom@tromey.com>
1107
1108         * remote.c (remote_g_packet_guess_s): Remove typedef and DEF_VEC.
1109         (struct remote_g_packet_data): Derive from allocate_on_obstack.
1110         <guesses>: Now a std::vector.
1111         (remote_g_packet_data_init, register_remote_g_packet_guess):
1112         Update.
1113         (remote_read_description_p): Update.  Return bool.
1114         (remote_target::read_description): Update.
1115         (struct remote_g_packet_guess): Add constructor.
1116
1117 2018-11-09  Tom Tromey  <tom@tromey.com>
1118
1119         * common/scoped_fd.h (class scoped_fd): Add move constructor and
1120         move assignment operator.
1121         * psymtab.c (psymtab_to_fullname): Update.
1122         * source.h (open_source_file): Return scoped_fd.
1123         (find_and_open_source): Likewise.
1124         * source.c (open_source_file): Return scoped_fd.
1125         (get_filename_and_charpos): Update.
1126         (print_source_lines_base): Update.  Use scoped_fd::to_file.
1127         (forward_search_command): Likewise.
1128         (reverse_search_command): Likewise.
1129         (find_and_open_source): Return scoped_fd.
1130         * tui/tui-source.c (tui_set_source_content): Update.  Use
1131         gdb_file_up.
1132
1133 2018-11-09  John Baldwin  <jhb@FreeBSD.org>
1134
1135         * minsyms.c (minimal_symbol_reader::install): Fix unsigned
1136         overflow.
1137
1138 2018-11-09  Hafiz Abid Qadeer  <abidh@codesourcery.com>
1139
1140         * configure: Regenerate.
1141
1142 2018-11-09  Tom de Vries  <tdevries@suse.de>
1143
1144         * symtab.c (symbol_set_names): Call symbol_find_demangled_name
1145         unconditionally, to set the language of the symbol.  Manage freeing
1146         returned pointer using gdb::unique_xmalloc_ptr.
1147
1148 2018-11-08  Tom Tromey  <tom@tromey.com>
1149
1150         * record.c (require_record_target): Upper-case "<TAB>".
1151
1152 2018-11-08  Tom Tromey  <tom@tromey.com>
1153
1154         * python/lib/gdb/command/pretty_printers.py
1155         (InfoPrettyPrinter.invoke): Don't indent "objfile" heading.
1156
1157 2018-11-08  Tom Tromey  <tom@tromey.com>
1158
1159         PR gdb/23555:
1160         PR gdb/23838:
1161         * target.h (target_supports_terminal_ours): Return bool.
1162         * target.c (target_supports_terminal_ours): Handle case where
1163         current_top_target returns nullptr.  Return bool.
1164
1165 2018-11-08  Joel Brobecker  <brobecker@adacore.com>
1166
1167         * aarch64-tdep.c (aapcs_is_vfp_call_or_return_candidate_1):
1168         return the correct count for potential HFAs.
1169
1170 2018-11-08  Jan Beulich  <jbeulich@suse.com>
1171
1172         * i387-tdep.c (i387_supply_xsave): Split handling of
1173         X86_XSTATE_ZMM_H and X86_XSTATE_ZMM.
1174         (i387_collect_xsave): Likewise.
1175
1176 2018-11-08  Andrew Burgess  <andrew.burgess@embecosm.com>
1177
1178         * riscv-tdep.c (riscv_insn::decode): Update header comment.
1179         (riscv_frame_this_id): Catch errors thrown while building the
1180         frame cache, leave the frame id as the default, which is the outer
1181         frame id.
1182
1183 2018-11-07  Joel Brobecker  <brobecker@adacore.com>
1184
1185         * ada-lang.c (read_atcb): Only set task_info->called_task if
1186         task_info->state == Entry_Caller_Sleep.
1187         (print_ada_task_info): Do not check task_info->state before
1188         checking task_info->called_task.
1189         (info_task): Likewise.
1190
1191 2018-11-07  Joel Brobecker  <brobecker@adacore.com>
1192
1193         * ada-tasks.c (read_atcb): Clear task_info before computing
1194         the value of each of its fields.
1195
1196 2018-11-07  Andrew Burgess  <andrew.burgess@embecosm.com>
1197
1198         * dwarf2read.c (dwarf2_init_integer_type): Check for name being
1199         NULL before dereferencing it.
1200
1201 2018-11-06  Tom de Vries  <tdevries@suse.de>
1202
1203         * linux-tdep.c (linux_vsyscall_range_raw): Use xmalloc to allocate
1204         program headers.
1205
1206 2018-11-06  Max Filippov  <jcmvbkbc@gmail.com>
1207
1208         * configure.tgt (xtensa*-*-linux*): Change to xtensa*-*-*linux*
1209         so that it applies to uclinux as well.
1210
1211 2018-11-06  Marius Muench  <marius.muench@eurecom.fr>
1212
1213         * arm-tdep.c (arm_scan_prologue): Don't dereference FP reg
1214         when on AAPCS.
1215
1216 2018-11-06  John Baldwin  <jhb@FreeBSD.org>
1217
1218         * riscv-fbsd-nat.c (getregs_supplies): Return true for
1219         RISCV_CSR_SSTATUS_REGNUM.
1220
1221 2018-11-04  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1222
1223         * source.c (open_source_file): Fix leak by transferring the
1224         current s->fullname to the unique_xmalloc_ptr fullname given
1225         to find_and_open_source.
1226
1227 2018-11-04  Tom Tromey  <tom@tromey.com>
1228
1229         * varobj.c (install_default_visualizer): Update.
1230         * python/python-internal.h (gdbpy_get_varobj_pretty_printer):
1231         Return gdbpy_ref.
1232         * python/py-prettyprint.c (search_pp_list): Return gdbpy_ref.
1233         (find_pretty_printer_from_progspace)
1234         (find_pretty_printer_from_gdb, find_pretty_printer)
1235         (gdbpy_get_varobj_pretty_printer): Return gdbpy_ref.
1236         (gdbpy_get_varobj_pretty_printer, gdbpy_default_visualizer):
1237         Update.
1238
1239 2018-11-04  Tom Tromey  <tom@tromey.com>
1240
1241         * python/python.c (gdbpy_parameter_value): Update.
1242         * python/python-internal.h (python_string_to_unicode)
1243         (python_string_to_target_python_string)
1244         (host_string_to_python_string): Return gdbpy_ref.
1245         * python/py-utils.c (python_string_to_unicode)
1246         (unicode_to_encoded_python_string)
1247         (unicode_to_target_python_string)
1248         (python_string_to_target_string)
1249         (python_string_to_target_python_string): Return gdbpy_ref.
1250         (python_string_to_host_string): Update.
1251         (host_string_to_python_string): Return gdbpy_ref.
1252         * python/py-symtab.c (stpy_get_filename, stpy_get_producer)
1253         (stpy_fullname): Update.
1254         * python/py-progspace.c (pspy_get_filename, pspy_solib_name):
1255         Update.
1256         * python/py-prettyprint.c (print_string_repr): Update.
1257         * python/py-objfile.c (objfpy_get_filename, objfpy_get_username)
1258         (objfpy_get_build_id): Update.
1259         * python/py-breakpoint.c (bppy_get_location)
1260         (bppy_get_expression, bppy_get_condition, bppy_get_commands):
1261         Update.
1262
1263 2018-11-04  Tom Tromey  <tom@tromey.com>
1264
1265         * python/python-internal.h (gdb_py_object_from_longest)
1266         (gdb_py_object_from_ulongest): Return gdbpy_ref.
1267         * python/py-value.c (valpy_int): Update.
1268         * python/py-utils.c (gdb_py_object_from_longest): Return
1269         gdbpy_ref.
1270         (gdb_py_object_from_ulongest): Likewise.
1271         * python/py-type.c (typy_get_alignof): Update.
1272         * python/py-linetable.c (ltpy_get_all_source_lines)
1273         (ltpy_entry_get_line, ltpy_entry_get_pc): Update.
1274         * python/py-block.c (blpy_get_start, blpy_get_end): Update.
1275
1276 2018-11-03  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1277
1278         * ada-lang.c (_initialize_ada_language): Fix typo.
1279
1280 2018-11-03  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1281
1282         * language.c (type): Remove.
1283         (_initialize_language): Remove assignment to type.
1284
1285 2018-11-02  Joel Brobecker  <brobecker@adacore.com>
1286
1287         * aarch64-ravenscar-thread.h, aarch64-ravenscar-thread.c: New files.
1288         * aarch64-tdep.c: #include "aarch64-ravenscar-thread.h".
1289         (aarch64_gdbarch_init): Add call to register_aarch64_ravenscar_ops.
1290         * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-ravenscar-thread.o.
1291         (HFILES_NO_SRCDIR): Add aarch64-ravenscar-thread.h.
1292         (ALLDEPFILES): Add aarch64-ravenscar-thread.c.
1293         * configure.tgt (cpu_obs) [aarch64*-*-*]: Add ravenscar-thread.o
1294         and aarch64-ravenscar-thread.o.
1295         * NEWS: Add entry documenting Ravenscar tasking support
1296         on AArch64 ELF.
1297
1298 2018-11-02  Matthew Malcomson  <matthew.malcomson@arm.com>
1299
1300         * symtab.c (info_functions_command): Initialize quiet flag.
1301         * stack.c (info_args_command): Likewise.
1302
1303 2018-11-01  Jim Wilson  <jimw@sifive.com>
1304
1305         * riscv-tdep.c (riscv_breakpoint_kind_from_pc): New local unaligned_p.
1306         Set if pcptr if unaligned.  Return 2 if unaligned_p true.  Update
1307         debugging messages.
1308
1309 2018-11-01  Joel Brobecker  <brobecker@adacore.com>
1310
1311         * ada-lang.c (ada_watch_location_expression): New function.
1312         (ada_language_defn): Set la_watch_location_expression to
1313         ada_watch_location_expression.
1314
1315 2018-11-01  Joel Brobecker  <brobecker@adacore.com>
1316
1317         * print-utils.c (int_string): Remove unnecessary trailing spaces.
1318
1319 2018-11-01  Joel Brobecker  <brobecker@adacore.com>
1320
1321         * rs6000-tdep.c (skip_prologue): Fix potential negative left
1322         shifting.
1323
1324 2018-11-01  Jerome Guitton  <guitton@adacore.com>
1325             Joel Brobecker  <brobecker@adacore.com>
1326
1327         * defs.h (enum gdb_osabi): Add GDB_OSABI_PIKEOS.
1328         * osabi.c (gdb_osabi_names): Add name for GDB_OSABI_PIKEOS.
1329         * arm-pikeos-tdep.c: New file.
1330         * configure.tgt: Add arm-pikeos-tdep.o to the case of ARM
1331         embedded system.
1332         * Makefile.in (ALL_TARGET_OBS): Add arm-pikeos-tdep.o.
1333
1334 2018-11-01  Simon Marchi  <simon.marchi@ericsson.com>
1335
1336         * common/pathstuff.c (get_standard_temp_dir): New.
1337         * common/pathstuff.h (get_standard_temp_dir): New.
1338         * config.in: Re-generate.
1339         * configure: Re-generate.
1340         * configure.ac: Don't check for mkdtemp.
1341         * gnulib/aclocal-m4-deps.mk: Re-generate.
1342         * gnulib/aclocal.m4: Re-generate.
1343         * gnulib/config.in: Re-generate.
1344         * gnulib/configure: Re-generate.
1345         * gnulib/import/Makefile.am: Re-generate.
1346         * gnulib/import/Makefile.in: Re-generate.
1347         * gnulib/import/m4/gnulib-cache.m4: Re-generate.
1348         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
1349         * gnulib/import/m4/mkdtemp.m4: New file.
1350         * gnulib/import/mkdtemp.c: New file.
1351         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES):
1352         Add mkdtemp module.
1353         * unittests/mkdir-recursive-selftests.c (test): Use
1354         get_standard_temp_dir.
1355         (_initialize_mkdir_recursive_selftests): Remove HAVE_MKDTEMP
1356         ifdef.
1357         * compile/compile.c (get_compile_file_tempdir): Likewise.
1358
1359 2018-11-01  Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
1360
1361         * rs6000-aix-tdep.c: Include "trad-frame.h" and "frame-unwind.h".
1362         (SIG_FRAME_LR_OFFSET64): New define.
1363         (SIG_FRAME_FP_OFFSET64): New define.
1364         (aix_sighandle_frame_cache): New Function.
1365         (aix_sighandle_frame_this_id): New Function.
1366         (aix_sighandle_frame_prev_register): New Function.
1367         (aix_sighandle_frame_sniffer): New Function.
1368         (aix_sighandle_frame_unwind): New global variable.
1369         (rs6000_aix_init_osabi): Install new frame unwinder.
1370
1371 2018-10-31  Sergio Durigan Junior  <sergiodj@redhat.com>
1372
1373         PR gdb/23835
1374         * common/common-defs.h: Don't redefine _FORTIFY_SOURCE if it's
1375         already defined.
1376
1377 2018-10-31  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1378
1379         * ppc-linux-nat.c: Include nat/linux-ptrace.h.
1380
1381 2018-10-31  Andrew Burgess  <andrew.burgess@embecosm.com>
1382
1383         * dwarf2read.c (struct dwarf2_cu): Add producer_is_icc field.
1384         (producer_is_icc): New function.
1385         (check_producer): Set producer_is_icc field on dwarf2_cu.
1386         (dwarf2_init_integer_type): New function.
1387         (read_base_type): Call dwarf2_init_integer_type instead of
1388         init_integer_type in all cases.
1389         (dwarf2_cu::dwarf2_cu): Initialise producer_is_icc field.
1390         * valprint.c (maybe_negate_by_bytes): Add an assertion that the
1391         LEN is greater than 0.
1392
1393 2018-10-30  Tom Tromey  <tom@tromey.com>
1394
1395         * main.c (captured_main_1): Check return value of bfd_init.
1396
1397 2018-10-29  Sergio Durigan Junior  <sergiodj@redhat.com>
1398
1399         * common/offset-type.h (DEFINE_OFFSET_REL_OP): Delete.
1400         Adjust comments.
1401
1402 2018-10-29  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1403
1404         * procfs.c: Include common/pathstuff.h.
1405
1406 2018-10-28  Andrew Burgess  <andrew.burgess@embecosm.com>
1407
1408         * riscv-linux-nat.c (riscv_linux_nat_target::fetch_registers):
1409         Add missing braces.  No functional change.
1410
1411 2018-10-27  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1412
1413         * macrocmd.c (info_macro_command): Use report_unrecognized_option_error
1414         to report a bad option and fix indentation.
1415         * demangle.c (demangle_command): Use report_unrecognized_option_error
1416         to report a bad option and correctly report the bad option.
1417
1418 2018-10-27  Tom Tromey  <tom@tromey.com>
1419
1420         PR cli/23364:
1421         * darwin-nat.c (copied_shell): New global.
1422         (may_have_sip): Rename from should_disable_startup_with_shell.
1423         (copy_shell_to_cache, maybe_cache_shell): New functions.
1424         (darwin_nat_target::create_inferior): Update.  Use
1425         copied_shell.
1426
1427 2018-10-27  Tom Tromey  <tom@tromey.com>
1428
1429         * unittests/scoped_fd-selftests.c (test_to_file): New function.
1430         (run_tests): Call test_to_file.
1431         * dwarf-index-write.c (write_psymtabs_to_index): Do not reopen
1432         temporary files.
1433         * common/scoped_fd.h (scoped_fd::to_file): New method.
1434
1435 2018-10-27  Tom Tromey  <tom@tromey.com>
1436
1437         * unittests/scoped_mmap-selftests.c (test_normal): Use
1438         gdb_mkostemp_cloexec.
1439         * unittests/scoped_fd-selftests.c (test_destroy, test_release):
1440         Use gdb_mkostemp_cloexec.
1441         * gnulib/aclocal-m4-deps.mk, gnulib/aclocal.m4,
1442         gnulib/config.in, gnulib/configure,
1443         gnulib/import/Makefile.am, gnulib/import/Makefile.in,
1444         gnulib/import/m4/gnulib-cache.m4,
1445         gnulib/import/m4/gnulib-comp.m4: Update.
1446         * gnulib/import/m4/mkostemp.m4: New file.
1447         * gnulib/import/m4/mkstemp.m4: Remove.
1448         * gnulib/import/mkostemp.c: New file.
1449         * gnulib/import/mkstemp.m4: Remove.
1450         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Remove
1451         mkstemp, add mkostemp.  Apply new patch.
1452         * gnulib/import/stdlib.in.h: Apply patch.
1453         * gnulib/patches/0002-mkostemp-mkostemps-Fix-compilation-error-in-C-mode-o.patch:
1454         New file.
1455         * dwarf-index-write.c (write_psymtabs_to_index): Use
1456         gdb_mkostemp_cloexec.
1457         * common/filestuff.h (gdb_mkostemp_cloexec): New function.
1458
1459 2018-10-27  Tom Tromey  <tom@tromey.com>
1460
1461         * unittests/mkdir-recursive-selftests.c: New file.
1462         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1463         unittests/mkdir-recursive-selftests.c.
1464         * dwarf-index-cache.c (mkdir_recursive): Move to
1465         common/filestuff.c.
1466         (index_cache::store): Check return value of mkdir_recursive.
1467         (create_dir_and_check, test_mkdir_recursive): Move to new file.
1468         (_initialize_index_cache): Don't register test.
1469         * common/filestuff.h (mkdir_recursive): Declare.
1470         * common/filestuff.c (mkdir_recursive): Move from
1471         dwarf-index-cache.c.  Return bool.
1472
1473 2018-10-27  Tom Tromey  <tom@tromey.com>
1474
1475         * dwarf-index-write.c (write_psymtabs_to_index): Move
1476         make_temp_filename to common/pathstuff.c.
1477         * common/pathstuff.h (make_temp_filename): Declare.
1478         * common/pathstuff.c (make_temp_filename): New function, moved
1479         from dwarf-index-write.c.
1480
1481 2018-10-27  Tom Tromey  <tom@tromey.com>
1482
1483         * procfs.c (procfs_target::create_inferior): Use get_shell.
1484         * cli/cli-cmds.c (shell_escape): Use get_shell.
1485         * windows-nat.c (windows_nat_target::create_inferior): Use
1486         get_shell.
1487         * common/pathstuff.c (get_shell): New function.
1488         * nat/fork-inferior.c (SHELL_FILE, get_startup_shell): Remove.
1489         (fork_inferior): Use get_shell.
1490         * common/pathstuff.h (get_shell): Declare.
1491
1492 2018-10-27  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1493
1494         * NEWS: Mention changes to 'info [args|functions|locals|variables]'
1495
1496 2018-10-27  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1497
1498         * stack.c (print_variable_and_value_data): Add preg and treg.
1499         (print_frame_local_vars): Add quiet, regexp and t_regexp arguments,
1500         and update callers.
1501         (print_frame_arg_vars): Likewise.
1502         (prepare_reg): New function.
1503         (info_locals_command): Extract info print args and use them.
1504         (info_args_command): Likewise.
1505         (_initialize_stack): Modify on-line help.
1506         * symtab.c (treg_matches_sym_type_name): New function.
1507         (search_symbols): New arg t_regexp.
1508         (symtab_symbol_info): New args quiet, regexp, t_regexp.
1509         (info_variables_command): Extract info print args and use them.
1510         (info_functions_command): Likewise.
1511         (info_types_command): Update call to symtab_symbol_info.
1512         (_initialize_symtab): Modify on-line help.
1513         * symtab.h (treg_matches_sym_type_name): New function.
1514         (search_symbols): New t_regexp arg.
1515
1516 2018-10-27  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1517
1518         * cli-utils.c (extract_arg_maybe_quoted): New function.
1519         (extract_info_print_args): New function.
1520         (info_print_args_help): New function.
1521         (report_unrecognized_option_error): New function.
1522         * cli-utils.h (extract_arg_maybe_quoted): New function.
1523         (extract_info_print_args): New function.
1524         (info_print_args_help): New function.
1525         (report_unrecognized_option_error): New function.
1526
1527 2018-10-26  Tom Tromey  <tom@tromey.com>
1528
1529         * dwarf2read.c (recursively_compute_inclusions): Use std::vector.
1530         (compute_compunit_symtab_includes): Update.
1531         * symtab.h: (symtab_ptr): Remove typedef.  Don't define a VEC.
1532         (compunit_symtab_ptr): Likewise.
1533
1534 2018-10-26  John Baldwin  <jhb@FreeBSD.org>
1535
1536         * fbsd-tdep.c (fbsd_print_auxv_entry): Only use
1537         default_print_auxv_entry for specific tag values.
1538
1539 2018-10-26  John Baldwin  <jhb@FreeBSD.org>
1540
1541         * fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_FREEBSD_HWCAP2.
1542
1543 2018-10-26  Jim Wilson  <jimw@sifive.com>
1544
1545         * riscv-linux-tdep.c: Include tramp-frame.h and trad-frame.h.
1546         (riscv_linux_sigframe_init): Declare.
1547         (RISCV_INST_LI_A7_SIGRETURN, RISCV_INT_ECALL): New.
1548         (riscv_linux_sigframe): New.
1549         (SIGFRAME_SIGINFO_SIZE, UCONTEXT_MCONTEXT_OFFSET): New.
1550         (riscv_linux_sigframe_init): Define.
1551         (riscv_linux_init_abi): Call tramp_frame_prepend_unwinder.
1552
1553         * riscv-tdep.c (riscv_isa_xlen): Refer to riscv-tdep.h comment.
1554         (riscv_isa_flen): Likewise.  Drop static.
1555         * riscv-tdep.h (riscv_isa_xlen): Move riscv-tdep.c comment to here.
1556         (riscv_isa_flen): Likewise.  Declare.
1557
1558 2018-10-26  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
1559             Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1560
1561         * arch/ppc-linux-tdesc.h (tdesc_powerpc_isa207_htm_vsx32l)
1562         (tdesc_powerpc_isa207_htm_vsx64l): Declare.
1563         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_TM_SPRREGSET)
1564         (PPC32_LINUX_SIZEOF_CGPRREGSET, PPC64_LINUX_SIZEOF_CGPRREGSET)
1565         (PPC_LINUX_SIZEOF_CFPRREGSET, PPC_LINUX_SIZEOF_CVMXREGSET)
1566         (PPC_LINUX_SIZEOF_CVSXREGSET, PPC_LINUX_SIZEOF_CPPRREGSET)
1567         (PPC_LINUX_SIZEOF_CDSCRREGSET, PPC_LINUX_SIZEOF_CTARREGSET):
1568         Define.
1569         (struct ppc_linux_features) <htm>: New field.
1570         (ppc_linux_no_features): Add initializer for htm field.
1571         * arch/ppc-linux-common.c (ppc_linux_match_description): Return
1572         new tdescs.
1573         * nat/ppc-linux.h (PPC_FEATURE2_HTM, NT_PPC_TM_CGPR)
1574         (NT_PPC_TM_CFPR, NT_PPC_TM_CVMX, NT_PPC_TM_CVSX)
1575         (NT_PPC_TM_SPR, NT_PPC_TM_CTAR, NT_PPC_TM_CPPR, NT_PPC_TM_CDSCR):
1576         Define if not already defined.
1577         * features/Makefile (WHICH): Add rs6000/powerpc-isa207-htm-vsx32l
1578         and rs6000/powerpc-isa207-htm-vsx64l.
1579         (XMLTOC): Add rs6000/powerpc-isa207-htm-vsx32l.xml and
1580         rs6000/powerpc-isa207-htm-vsx64l.xml.
1581         * features/rs6000/power-htm-spr.xml: New file.
1582         * features/rs6000/power-htm-core.xml: New file.
1583         * features/rs6000/power64-htm-core.xml: New file.
1584         * features/rs6000/power-htm-fpu.xml: New file.
1585         * features/rs6000/power-htm-altivec.xml: New file.
1586         * features/rs6000/power-htm-vsx.xml: New file.
1587         * features/rs6000/power-htm-ppr.xml: New file.
1588         * features/rs6000/power-htm-dscr.xml: New file.
1589         * features/rs6000/power-htm-tar.xml: New file.
1590         * features/rs6000/powerpc-isa207-htm-vsx32l.xml: New file.
1591         * features/rs6000/powerpc-isa207-htm-vsx64l.xml: New file.
1592         * features/rs6000/powerpc-isa207-htm-vsx32l.c: Generate.
1593         * features/rs6000/powerpc-isa207-htm-vsx64l.c: Generate.
1594         * regformats/rs6000/powerpc-isa207-htm-vsx32l.dat: Generate.
1595         * regformats/rs6000/powerpc-isa207-htm-vsx64l.dat: Generate.
1596         * ppc-linux-nat.c (fetch_register, fetch_ppc_registers): Call
1597         fetch_regset with HTM regsets.
1598         (store_register, store_ppc_registers): Call store_regset with HTM
1599         regsets.
1600         (ppc_linux_nat_target::read_description): Set htm field in the
1601         features struct if needed.
1602         * ppc-linux-tdep.c: Include
1603         features/rs6000/powerpc-isa207-htm-vsx32l.c and
1604         features/rs6000/powerpc-isa207-htm-vsx64l.c.
1605         (ppc32_regmap_tm_spr, ppc32_regmap_cgpr, ppc64_le_regmap_cgpr)
1606         (ppc64_be_regmap_cgpr, ppc32_regmap_cfpr, ppc32_le_regmap_cvmx)
1607         (ppc32_be_regmap_cvmx, ppc32_regmap_cvsx, ppc32_regmap_cppr)
1608         (ppc32_regmap_cdscr, ppc32_regmap_ctar): New globals.
1609         (ppc32_linux_tm_sprregset, ppc32_linux_cgprregset)
1610         (ppc64_be_linux_cgprregset, ppc64_le_linux_cgprregset)
1611         (ppc32_linux_cfprregset, ppc32_le_linux_cvmxregset)
1612         (ppc32_be_linux_cvmxregset, ppc32_linux_cvsxregset)
1613         (ppc32_linux_cpprregset, ppc32_linux_cdscrregset)
1614         (ppc32_linux_ctarregset): New globals.
1615         (ppc_linux_cgprregset, ppc_linux_cvmxregset): New functions.
1616         (ppc_linux_collect_core_cpgrregset): New function.
1617         (ppc_linux_iterate_over_regset_sections): Call back with the htm
1618         regsets.
1619         (ppc_linux_core_read_description): Check if the tm spr section is
1620         present and set htm in the features struct.
1621         (_initialize_ppc_linux_tdep): Call
1622         initialize_tdesc_powerpc_isa207_htm_vsx32l and
1623         initialize_tdesc_powerpc_isa207_htm_vsx64l.
1624         * ppc-linux-tdep.h (ppc_linux_cgprregset, ppc_linux_cvmxregset):
1625         Declare.
1626         (ppc32_linux_tm_sprregset, ppc32_linux_cfprregset)
1627         (ppc32_linux_cvsxregset, ppc32_linux_cpprregset)
1628         (ppc32_linux_cdscrregset, ppc32_linux_ctarregset): Declare.
1629         * ppc-tdep.h (struct gdbarch_tdep) <have_htm_spr, have_htm_core>:
1630         New fields.
1631         <have_htm_fpu, have_htm_altivec, have_htm_vsx>:
1632         Likewise.
1633         <ppc_cppr_regnum, ppc_cdscr_regnum, ppc_ctar_regnum>: Likewise.
1634         <ppc_cdl0_regnum, ppc_cvsr0_regnum, ppc_cefpr0_regnum>: Likewise.
1635         (enum) <PPC_TFHAR_REGNUM, PPC_TEXASR_REGNUM, PPC_TFIAR_REGNUM>:
1636         New enum fields.
1637         <PPC_CR0_REGNUM, PPC_CCR_REGNUM, PPC_CXER_REGNUM>: Likewise.
1638         <PPC_CLR_REGNUM, PPC_CCTR_REGNUM, PPC_CF0_REGNUM>: Likewise.
1639         <PPC_CFPSCR_REGNUM, PPC_CVR0_REGNUM, PPC_CVSCR_REGNUM>: Likewise.
1640         <PPC_CVRSAVE_REGNUM, PPC_CVSR0_UPPER_REGNUM>: Likewise.
1641         <PPC_CPPR_REGNUM, PPC_CDSCR_REGNUM>: Likewise.
1642         <PPC_CTAR_REGNUM>: Likewise.
1643         (PPC_IS_TMSPR_REGNUM, PPC_IS_CKPTGP_REGNUM, PPC_IS_CKPTFP_REGNUM)
1644         (PPC_IS_CKPTVMX_REGNUM, PPC_IS_CKPTVSX_REGNUM): Define.
1645         * rs6000-tdep.c (IS_CDFP_PSEUDOREG, IS_CVSX_PSEUDOREG)
1646         (IS_CEFP_PSEUDOREG): Define.
1647         (rs6000_register_name): Hide the upper halves of checkpointed VSX
1648         registers.  Return names for the checkpointed DFP, VSX, and EFP
1649         pseudo registers.
1650         (rs6000_pseudo_register_type): Remove initial assert and raise an
1651         internal error in the else clause instead.  Return types for the
1652         checkpointed DFP, VSX, and EFP pseudo registers.
1653         (dfp_pseudo_register_read, dfp_pseudo_register_write): Handle
1654         checkpointed DFP pseudo registers.
1655         (vsx_pseudo_register_read, vsx_pseudo_register_write): Handle
1656         checkpointed VSX pseudo registers.
1657         (efp_pseudo_register_read, efp_pseudo_register_write): Rename
1658         from efpr_pseudo_register_read and
1659         efpr_pseudo_register_write.  Handle checkpointed EFP pseudo
1660         registers.
1661         (rs6000_pseudo_register_read, rs6000_pseudo_register_write):
1662         Handle checkpointed DFP, VSX, and EFP registers.
1663         (dfp_ax_pseudo_register_collect, vsx_ax_pseudo_register_collect)
1664         (efp_ax_pseudo_register_collect): New functions.
1665         (rs6000_ax_pseudo_register_collect): Move DFP, VSX and EFP pseudo
1666         register logic to new functions.  Handle checkpointed DFP, VSX,
1667         and EFP pseudo registers.
1668         (rs6000_gdbarch_init): Look for and validate the htm features.
1669         Include checkpointed DFP, VSX and EFP pseudo-registers.
1670         * NEWS: Mention access to PPR, DSCR, TAR, EBB/PMU registers and
1671         HTM registers.
1672
1673 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1674
1675         * rs6000-tdep.c (rs6000_gdbarch_init): Reject tdescs with vsx but
1676         without altivec or fpu.
1677
1678 2018-10-26  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
1679             Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1680
1681         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_EBBREGSET)
1682         (PPC_LINUX_SIZEOF_PMUREGSET): Declare.
1683         * nat/ppc-linux.h (PPC_FEATURE2_EBB, NT_PPC_EBB, NT_PPC_PMU):
1684         Define if not already defined.
1685         * features/rs6000/power-ebb.xml: New file.
1686         * features/rs6000/power-linux-pmu.xml: New file.
1687         * features/rs6000/powerpc-isa207-vsx32l.xml: Include ebb and pmu
1688         features.
1689         * features/rs6000/powerpc-isa207-vsx64l.xml: Likewise.
1690         * features/rs6000/powerpc-isa207-vsx32l.c: Re-generate.
1691         * features/rs6000/powerpc-isa207-vsx64l.c: Re-generate.
1692         * regformats/rs6000/powerpc-isa207-vsx32l.dat: Re-generate.
1693         * regformats/rs6000/powerpc-isa207-vsx64l.dat: Re-generate.
1694         * ppc-linux-nat.c (fetch_register, fetch_ppc_registers): Call
1695         fetch_regset with ebb and pmu regsets.
1696         (store_register, store_ppc_registers): Call store_regset with ebb
1697         and pmu regsets.
1698         (ppc_linux_nat_target::read_description): Set isa207 field in the
1699         features struct if ebb and pmu are avaiable.
1700         * ppc-linux-tdep.c (ppc32_regmap_ebb, ppc32_regmap_pmu)
1701         (ppc32_linux_ebbregset, ppc32_linux_pmuregset): New globals.
1702         (ppc_linux_iterate_over_regset_sections): Call back with the ebb
1703         and pmu regsets.
1704         (ppc_linux_core_read_description): Check if the pmu section is
1705         present and set isa207 in the features struct.
1706         * ppc-linux-tdep.h (ppc32_linux_ebbregset)
1707         (ppc32_linux_pmuregset): Declare.
1708         * ppc-tdep.h (struct gdbarch_tdep) <ppc_mmcr0_regnum>: New field.
1709         <ppc_mmcr2_regnum, ppc_siar_regnum, ppc_sdar_regnum>: New fields.
1710         <ppc_sier_regnum>: New field.
1711         (enum): <PPC_BESCR_REGNUM, PPC_EBBHR_REGNUM, PPC_EBBRR_REGNUM>:
1712         New enum values.
1713         <PPC_MMCR0_REGNUM, PPC_MMCR2_REGNUM, PPC_SIAR_REGNUM>: New enum
1714         values.
1715         <PPC_SDAR_REGNUM, PPC_SIER_REGNUM>: New enum values.
1716         (PPC_IS_EBB_REGNUM, PPC_IS_PMU_REGNUM): Define.
1717         * rs6000-tdep.c (rs6000_gdbarch_init): Look for and validate the
1718         ebb and pmu features.
1719
1720 2018-10-26  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
1721             Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1722
1723         * arch/ppc-linux-tdesc.h (tdesc_powerpc_isa207_vsx32l)
1724         (tdesc_powerpc_isa207_vsx64l): Declare.
1725         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_TARREGSET): Define.
1726         (struct ppc_linux_features) <isa207>: New field.
1727         (ppc_linux_no_features): Add initializer for isa207 field.
1728         * arch/ppc-linux-common.c (ppc_linux_match_description): Return
1729         new tdescs.
1730         * nat/ppc-linux.h (PPC_FEATURE2_ARCH_2_07, PPC_FEATURE2_TAR)
1731         (NT_PPC_TAR): Define if not already defined.
1732         * features/Makefile (WHICH): Add rs6000/powerpc-isa207-vsx32l and
1733         rs6000/powerpc-isa207-vsx64l.
1734         (XMLTOC): Add rs6000/powerpc-isa207-vsx32l.xml and
1735         rs6000/powerpc-isa207-vsx64l.xml.
1736         * features/rs6000/power-tar.xml: New file.
1737         * features/rs6000/powerpc-isa207-vsx32l.xml: New file.
1738         * features/rs6000/powerpc-isa207-vsx64l.xml: New file.
1739         * features/rs6000/powerpc-isa207-vsx32l.c: Generate.
1740         * features/rs6000/powerpc-isa207-vsx64l.c: Generate.
1741         * regformats/rs6000/powerpc-isa207-vsx32l.dat: Generate.
1742         * regformats/rs6000/powerpc-isa207-vsx64l.dat: Generate.
1743         * ppc-linux-nat.c (fetch_register, fetch_ppc_registers): Call
1744         fetch_regset with the TAR regset.
1745         (store_register, store_ppc_registers): Call store_regset with the
1746         TAR regset.
1747         (ppc_linux_nat_target::read_description): Set isa207 field in the
1748         features struct if needed.
1749         * ppc-linux-tdep.c: Include
1750         features/rs6000/powerpc-isa207-vsx32l.c and
1751         features/rs6000/powerpc-isa207-vsx64l.c.
1752         (ppc32_regmap_tar, ppc32_linux_tarregset): New globals.
1753         (ppc_linux_iterate_over_regset_sections): Call back with the tar
1754         regset.
1755         (ppc_linux_core_read_description): Check if the tar section is
1756         present and set isa207 in the features struct.
1757         (_initialize_ppc_linux_tdep): Call
1758         initialize_tdesc_powerpc_isa207_vsx32l and
1759         initialize_tdesc_powerpc_isa207_vsx64l.
1760         * ppc-linux-tdep.h (ppc32_linux_tarregset): Declare.
1761         * ppc-tdep.h (gdbarch_tdep) <ppc_tar_regnum>: New field.
1762         (enum) <PPC_TAR_REGNUM>: New enum value.
1763         * rs6000-tdep.c (rs6000_gdbarch_init): Look for and validate tar
1764         feature.
1765         (ppc_process_record_op31): Record changes to TAR.
1766
1767 2018-10-26  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
1768             Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1769
1770         * arch/ppc-linux-tdesc.h (tdesc_powerpc_isa205_ppr_dscr_vsx32l)
1771         (tdesc_powerpc_isa205_ppr_dscr_vsx64l): Declare.
1772         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_PPRREGSET)
1773         (PPC_LINUX_SIZEOF_DSCRREGSET): Define.
1774         (struct ppc_linux_features) <ppr_dscr>: New field.
1775         (ppc_linux_no_features): Add initializer for ppr_dscr field.
1776         * arch/ppc-linux-common.c (ppc_linux_match_description): Return
1777         new tdescs.
1778         * nat/ppc-linux.h (PPC_FEATURE2_DSCR, NT_PPC_PPR, NT_PPC_DSCR):
1779         Define if not already defined.
1780         * features/Makefile (WHICH): Add
1781         rs6000/powerpc-isa205-ppr-dscr-vsx32l and
1782         rs6000/powerpc-isa205-ppr-dscr-vsx64l.
1783         (XMLTOC): Add rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml and
1784         rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml.
1785         * features/rs6000/power-dscr.xml: New file.
1786         * features/rs6000/power-ppr.xml: New file.
1787         * features/rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml: New file.
1788         * features/rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml: New file.
1789         * features/rs6000/powerpc-isa205-ppr-dscr-vsx32l.c: Generate.
1790         * features/rs6000/powerpc-isa205-ppr-dscr-vsx64l.c: Generate.
1791         * regformats/rs6000/powerpc-isa205-ppr-dscr-vsx32l.dat: Generate.
1792         * regformats/rs6000/powerpc-isa205-ppr-dscr-vsx64l.dat: Generate.
1793         * ppc-linux-nat.c: Include <sys/uio.h>.
1794         (fetch_regset, store_regset, check_regset): New functions.
1795         (fetch_register, fetch_ppc_registers): Call fetch_regset with
1796         DSCR and PPR regsets.
1797         (store_register, store_ppc_registers): Call store_regset with
1798         DSCR and PPR regsets.
1799         (ppc_linux_get_hwcap2): New function.
1800         (ppc_linux_nat_target::read_description): Call
1801         ppc_linux_get_hwcap2 and check_regset, set ppr_dscr field in the
1802         features struct if needed.
1803         * ppc-linux-tdep.c: Include
1804         features/rs6000/powerpc-isa205-ppr-dscr-vsx32l.c and
1805         features/rs6000/powerpc-isa205-ppr-dscr-vsx64l.c.
1806         (ppc32_regmap_ppr, ppc32_regmap_dscr, ppc32_linux_pprregset)
1807         (ppc32_linux_dscrregset): New globals.
1808         (ppc_linux_iterate_over_regset_sections): Call back with the ppr
1809         and dscr regsets.
1810         (ppc_linux_core_read_description): Check if the ppr and dscr
1811         sections are present and set ppr_dscr in the features struct.
1812         (_initialize_ppc_linux_tdep): Call
1813         initialize_tdesc_powerpc_isa205_ppr_dscr_vsx32l and
1814         initialize_tdesc_powerpc_isa205_ppr_dscr_vsx64l.
1815         * ppc-linux-tdep.h (ppc32_linux_pprregset)
1816         (ppc32_linux_dscrregset): Declare.
1817         * ppc-tdep.h (struct gdbarch_tdep) <ppc_ppr_regnum>: New field.
1818         <ppc_dscr_regnum>: New field.
1819         (enum) <PPC_PPR_REGNUM, PPC_DSCR_REGNUM>: New enum values.
1820         * rs6000-tdep.c (rs6000_gdbarch_init): Look for and validate ppr
1821         and dscr features.
1822         (ppc_process_record_op31): Record changes to PPR and DSCR.
1823
1824 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1825
1826         * rs6000-tdep.c (rs6000_gdbarch_init): Replace line wrapping by a
1827         second initializer line for the have_* variables.  Initialize
1828         have_fpu to 0 instead of 1.
1829
1830 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1831
1832         * arch/ppc-linux-common.c (ppc_linux_match_description):
1833         Parenthesize tdesc assignements and indent them properly.
1834
1835 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1836
1837         * ppc-linux-nat.c (fetch_register): Change if statement to else
1838         if.
1839         (store_register): Likewise.
1840
1841 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1842
1843         * rs6000-tdep.c: Remove reggroups.h include.
1844         (rs6000_pseudo_register_reggroup_p): Remove.
1845         (rs6000_gdbarch_init): Remove call to
1846         set_tdesc_pseudo_register_reggroup_p.
1847
1848 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1849
1850         * reggroups.c (default_register_reggroup_p): Return true for
1851         decfloat registers and float_reggroup.
1852
1853 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1854
1855         * ppc-linux-tdep.c (ppc_linux_collect_vrregset): Remove.
1856         (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): Replace
1857         ppc_linux_collect_vrregset by regcache_collect_regset.
1858
1859 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1860
1861         * linux-tdep.c (linux_collect_regset_section_cb): Use
1862         std::vector<gdb_byte> instead of char * and malloc for buf.
1863         Remove xfree.
1864
1865 2018-10-26  Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
1866
1867         * xcoffread.c (read_xcoff_symtab): Pass deduced language to
1868         symtab_start instead of always using language_unknown.
1869
1870 2018-10-26  Andrew Burgess  <andrew.burgess@embecosm.com>
1871
1872         * riscv-tdep.c (riscv_read_misa_reg): Update comment, remove
1873         READ_P parameter, catch and ignore register access errors from
1874         either the old or new MISA location.
1875         (riscv_has_feature): Update call to riscv_read_misa_reg.
1876
1877 2018-10-25  Andrew Burgess  <andrew.burgess@embecosm.com>
1878
1879         * python/py-function.c (convert_values_to_python): Return
1880         gdbpy_ref<>.  Add header comment.
1881         (fnpy_call): Adjust.
1882
1883 2018-10-25  Andrew Burgess  <andrew.burgess@embecosm.com>
1884
1885         * python/py-cmd.c (cmdpy_completer_helper): Return gdbpy_ref<>.
1886         (cmdpy_completer_handle_brkchars): Adjust.
1887         (cmdpy_completer): Adjust.
1888
1889 2018-10-25  Andrew Burgess  <andrew.burgess@embecosm.com>
1890
1891         * riscv-linux-nat.c (riscv_linux_nat_target::fetch_registers):
1892         Pass correct regnum to raw_supply_zeroed.
1893
1894 2018-10-23  Hafiz Abid Qadeer  <abidh@codesourcery.com>
1895
1896         * regcache.c (cooked_read_test): Add CSKY to the list of
1897         architectures with a save_reggroup
1898
1899 2018-10-23  Simon Marchi  <simon.marchi@polymtl.ca>
1900
1901         PR gdb/23368
1902         * infrun.c (follow_exec): In the follow_exec_mode_new case,
1903         transfer terminal state from old new new inferior.
1904         * terminal.h (swap_terminal_info): New function.
1905         * inflow.c (swap_terminal_info): New function.
1906
1907 2018-10-23  Tom Tromey  <tom@tromey.com>
1908
1909         * record-btrace.c (get_thread_current_frame_id): Rename from
1910         get_thread_current_frame.  Return a frame_id.
1911         (record_btrace_start_replaying): Update.
1912
1913 2018-10-23  Andrew Burgess  <andrew.burgess@embecosm.com>
1914
1915         * riscv-tdep.c (riscv_register_name): Use the user-friendly names
1916         for CSRs.
1917
1918 2018-10-23  Joel Brobecker  <brobecker@adacore.com>
1919
1920         * riscv-tdep.c (riscv_gdbarch_init): Set the gdbarch's
1921         have_nonsteppable_watchpoint attribute to 1.
1922
1923 2018-10-23  Andrew Burgess  <andrew.burgess@embecosm.com>
1924
1925         * riscv-tdep.c (riscv_gdb_reg_names): Update comment, and all
1926         register names.
1927         (struct register_alias): Rename to...
1928         (struct riscv_register_alias): ...this, and update comment.
1929         (riscv_register_aliases): Update type, and alias names.  Remove
1930         CSR names from this list.
1931         (riscv_register_name): Use riscv_gdb_reg_names for int and float
1932         register names.  Add an extra assertion.
1933         (riscv_is_regnum_a_named_csr): New function.
1934         (riscv_register_reggroup_p): Use riscv_is_regnum_a_named_csr.
1935
1936 2018-10-23  John Darrington  <john@darrington.wattle.id.au>
1937
1938         * configure.tgt: Add configuration for s12z.
1939         * s12z-tdep.c:  New file.
1940         * NEWS: Mention new target.
1941
1942 2018-10-22  Jim Wilson  <jimw@sifive.com>
1943
1944         * riscv-tdep.c (riscv_push_dummy_call) <in_reg>: Check for value in
1945         FP reg smaller than FP reg size, and fill with -1 instead of 0.
1946
1947         * riscv-tdep.c (riscv_fpreg_d_type, riscv_fpreg_q_type): New.
1948         (riscv_register_type): Use them.
1949         (riscv_print_one_register_info): Handle union of floats same as float.
1950         * riscv-tdep.h (struct gdbarch_tdep): Add riscv_fpreg_d_type and
1951         riscv_fpreg_q_type fields.
1952
1953 2018-10-21  Simon Marchi  <simon.marchi@ericsson.com>
1954
1955         * gdbarch.sh (gdbarch_num_cooked_regs): New.
1956         * gdbarch.h: Re-generate.
1957         * ax-gdb.c (gen_expr): Use gdbarch_num_cooked_regs.
1958         * dwarf2-frame.c (dwarf2_frame_cache): Likewise.
1959         * eval.c (evaluate_subexp_standard): Likewise.
1960         * findvar.c (value_of_register): Likewise.
1961         (value_of_register_lazy): Likewise.
1962         (address_from_register): Likewise.
1963         * frame.c (get_frame_register_bytes): Likewise.
1964         * gdbarch-selftests.c (register_to_value_test): Likewise.
1965         * h8300-tdep.c (h8300_register_type): Likewise.
1966         * i386-tdep.c (i386_dbx_reg_to_regnum): Likewise.
1967         (i386_svr4_reg_to_regnum): Likewise.
1968         * infcmd.c (default_print_registers_info): Likewise.
1969         (registers_info): Likewise.
1970         (print_vector_info): Likewise.
1971         (default_print_float_info): Likewise.
1972         * m68hc11-tdep.c (m68hc11_frame_unwind_cache): Likewise.
1973         * mdebugread.c (mdebug_reg_to_regnum): Likewise.
1974         * mi/mi-main.c (mi_cmd_data_list_register_names): Likewise.
1975         (mi_cmd_data_list_changed_registers): Likewise.
1976         (mi_cmd_data_list_register_values): Likewise.
1977         (mi_cmd_data_write_register_values): Likewise.
1978         (mi_cmd_trace_frame_collected): Likewise.
1979         * mips-tdep.c (print_gp_register_row): Likewise.
1980         (mips_print_registers_info): Likewise.
1981         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
1982         * regcache.c (init_regcache_descr): Likewise.
1983         (register_size): Likewise.
1984         (register_dump::dump): Likewise.
1985         (cooked_read_test): Likewise.
1986         (cooked_write_test): Likewise.
1987         * rs6000-tdep.c (rs6000_register_sim_regno): Likewise.
1988         (rs6000_gdbarch_init): Likewise.
1989         * stabsread.c (stab_reg_to_regnum): Likewise.
1990         * stack.c (info_frame_command): Likewise.
1991         * target-descriptions.c (tdesc_register_name): Likewise.
1992         * trad-frame.c (trad_frame_alloc_saved_regs): Likewise.
1993         * tui/tui-regs.c (tui_show_register_group): Likewise.
1994         * user-regs.c (user_reg_map_name_to_regnum): Likewise.
1995         (user_reg_map_regnum_to_name): Likewise.
1996         (value_of_user_reg): Likewise.
1997         (maintenance_print_user_registers): Likewise.
1998         * xtensa-tdep.c (xtensa_find_register_by_name): Likewise.
1999         (xtensa_register_name): Likewise.
2000         (xtensa_register_type): Likewise.
2001         (xtensa_reg_to_regnum): Likewise.
2002         (xtensa_pseudo_register_read): Likewise.
2003         (xtensa_pseudo_register_write): Likewise.
2004
2005 2018-10-21  Simon Marchi  <simon.marchi@polymtl.ca>
2006
2007         * amd64-tdep.c (amd64_pseudo_register_read_value): Use
2008         correctly-sized buffer with raw_read.
2009         (amd64_pseudo_register_write): Use correctly-sized buffer for
2010         raw_read/raw_write.
2011
2012 2018-10-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
2013
2014         * typeprint.c (_initialize_typeprint): Fix wrong prefixname arg
2015         in add_prefix_cmd of set print type.
2016
2017 2018-10-19  Tom Tromey  <tom@tromey.com>
2018
2019         PR tui/18388:
2020         * NEWS: Mention tabset deprecation.
2021         * tui/tui-win.c (tui_tab_width, internal_tab_width): New globals.
2022         (update_tab_width): New function.
2023         (tui_set_tab_width, tui_show_tab_width): New functions.
2024         (tui_set_tab_width_command): Use update_tab_width.
2025         (_initialize_tui_win): Move to end of file.  Deprecate "tabset".
2026         Add new "set tui tab-width" command.
2027         * tui/tui-source.c (tui_set_source_content): Update.
2028         * tui/tui-disasm.c (tui_set_disassem_content): Update.
2029         * tui/tui-data.h (tui_default_tab_len, tui_set_default_tab_len):
2030         Don't declare.
2031         (tui_tab_width): Declare.
2032         * tui/tui-data.c (default_tab_len, tui_default_tab_len)
2033         (tui_set_default_tab_len): Remove.
2034
2035 2018-10-19  Tom Tromey  <tom@tromey.com>
2036
2037         * tui/tui-io.h (key_is_start_sequence, key_is_end_sequence)
2038         (key_is_backspace, tui_getc): Don't declare.
2039         * tui/tui-io.c (key_is_start_sequence): Now static.
2040         (key_is_end_sequence, key_is_backspace): Remove.
2041         (tui_getc): Now static.
2042
2043 2018-10-19  Tom Tromey  <tom@tromey.com>
2044
2045         * symfile.c (reread_symbols): Clear "static_links".
2046
2047 2018-10-19  Alan Hayward  <alan.hayward@arm.com>
2048
2049         * aarch64-linux-tdep.c (AARCH64_SIGCONTEXT_RESERVED_SIZE): New
2050         define.
2051         (aarch64_linux_sigframe_init): Extra boundary checks.
2052
2053 2018-10-19  Andreas Arnez  <arnez@linux.ibm.com>
2054
2055         * s390-tdep.c (s390_pseudo_register_type): For v0-v15 don't yield
2056         the possibly non-existent tdesc type 'vec128', but the type of raw
2057         register v16 instead.
2058
2059 2018-10-19  Gary Benson <gbenson@redhat.com>
2060
2061         * cli/cli-interp.c (cli_interp::~cli_interp): New function.
2062
2063 2018-10-18  Sergio Durigan Junior  <sergiodj@redhat.com>
2064
2065         PR cli/23785
2066         * cli/cli-dump.c (restore_binary_file): Check if "file" is
2067         NULL.
2068
2069 2018-10-17  Paul Koning  <paul_koning@dell.com>
2070
2071         * charset.c (convert_between_encodings): Fix unsigned overflow.
2072
2073 2018-10-17  John Baldwin  <jhb@FreeBSD.org>
2074
2075         * fbsd-nat.c (fbsd_nat_target::info_proc) Use
2076         fbsd_info_proc_mappings_header and fbsd_info_proc_mappings_entry.
2077         * fbsd-tdep.c (fbsd_vm_map_entry_flags): Mark static.
2078         (fbsd_info_proc_mappings_header, fbsd_info_proc_mappings_entry):
2079         New functions.
2080         (fbsd_core_info_proc_mappings): Use fbsd_info_proc_mappings_header
2081         and fbsd_info_proc_mappings_header.
2082         * fbsd-tdep.h (fbsd_vm_map_entry_flags): Remove.
2083         (fbsd_info_proc_mappings_header, fbsd_info_proc_mappings_entry):
2084         New.
2085
2086 2018-10-17  Joel Brobecker  <brobecker@adacore.com>
2087
2088         * MAINTAINERS (Responsible Maintainers): Add Rainer Orth as
2089         Solaris Maintainer.
2090
2091 2018-10-15  Tom Tromey  <tom@tromey.com>
2092
2093         * tui/tui.c (strcat_to_buf): Remove casts.
2094         * tui/tui-winsource.c (tui_show_source_line)
2095         (tui_set_is_exec_point_at, tui_line_is_displayed): Remove casts.
2096         * tui/tui-wingeneral.c (tui_refresh_win, box_win): Remove casts.
2097         * tui/tui-windata.c (tui_first_data_item_displayed)
2098         (tui_delete_data_content_windows, tui_erase_data_content)
2099         (tui_display_all_data, tui_display_data_from)
2100         (tui_refresh_data_win, tui_vertical_data_scroll): Remove casts.
2101         * tui/tui-win.c (tui_set_win_height)
2102         (make_invisible_and_set_new_height, parse_scrolling_args): Remove
2103         casts.
2104         * tui/tui-win.c (tui_resize_all): Remove casts.
2105         (tui_scroll_backward_command, tui_set_focus)
2106         (tui_set_tab_width_command): Likewise.
2107         * tui/tui-source.c (tui_vertical_source_scroll): Remove cast.
2108         * tui/tui-regs.c (tui_show_register_group): Remove cast.
2109         * tui/tui-layout.c (tui_set_layout_by_name): Remove cast.
2110         * tui/tui-disasm.c (tui_vertical_disassem_scroll): Remove cast.
2111         * tui/tui-data.c (tui_partial_win_by_name, tui_free_win_content):
2112         Remove casts.
2113
2114 2018-10-15  Simon Marchi  <simon.marchi@ericsson.com>
2115
2116         * MAINTAINERS (Responsible Maintainers): Add Alan Hayward as
2117         AArch64/ARM maintainer.
2118
2119 2018-10-11  Gary Benson <gbenson@redhat.com>
2120
2121         * interps.h (interp::m_name): Make private and mutable.
2122         * interps.c (interp::~interp): Free m_name.
2123
2124 2018-10-10  Sergio Durigan Junior  <sergiodj@redhat.com>
2125             Simon Marchi <simark@simark.ca>
2126
2127         * README (`configure' options): Add documentation for new
2128         "--enable-unit-tests" option.
2129         * acinclude.m4: Include "selftest.m4".
2130         * configure: Regenerate.
2131         * configure.ac: Use "GDB_AC_SELFTEST".
2132         * maint.c (maintenance_selftest): Update message informing
2133         that selftests have been disabled.
2134         (maintenance_info_selftests): Likewise.
2135         * selftest.m4: New file.
2136
2137 2018-10-10  Gary Benson <gbenson@redhat.com>
2138
2139         * remote.c (remote_target::remote_send_printf): Add
2140         missing va_end found by Coverity.
2141
2142 2018-10-10  Markus Metzger  <markus.t.metzger@intel.com>
2143
2144         * btrace.c (ftrace_update_function): Add indirect jump heuristic.
2145
2146 2018-10-09  Tom Tromey  <tom@tromey.com>
2147
2148         * configure: Rebuild.
2149         * sanitize.m4 (AM_GDB_UBSAN): Default to no.
2150         * NEWS: Update --enable-ubsan documentation.
2151
2152 2018-10-09  Gary Benson <gbenson@redhat.com>
2153
2154         * dwarf2read.c (create_dwp_hash_table): Fix buffer overrun
2155         found by Coverity.
2156
2157 2018-10-08  Tom Tromey  <tom@tromey.com>
2158
2159         * riscv-fbsd-tdep.c (riscv_fbsd_sigframe_init): Remove unused
2160         variable.
2161         (riscv_fbsd_init_abi): Likewise.
2162
2163 2018-10-08  Weimin Pan  <weimin.pan@oracle.com>
2164         * valops.c (value_struct_elt_for_reference): Rename local variable
2165         to work around the shadowing a previous local warning.
2166
2167 2018-10-08  John Baldwin  <jhb@FreeBSD.org>
2168
2169         * Makefile.in (ALLDEPFILES): Add riscv-fbsd-nat.c.
2170         * NEWS: Mention new FreeBSD/riscv native configuration.
2171         * configure.host: Add riscv*-*-freebsd*.
2172         * configure.nat: Likewise.
2173         * riscv-fbsd-nat.c: New file.
2174
2175 2018-10-08  John Baldwin  <jhb@FreeBSD.org>
2176
2177         * Makefile.in (ALL_TARGET_OBS): Add riscv-fbsd-tdep.o.
2178         (HFILES_NO_SRCDIR): Add riscv-fbsd-tdep.h.
2179         (ALLDEPFILES): Add riscv-fbsd-tdep.c.
2180         * NEWS: Mention new FreeBSD/riscv target.
2181         * configure.tgt: Add riscv*-*-freebsd*.
2182         * riscv-fbsd-tdep.c: New file.
2183         * riscv-fbsd-tdep.h: New file.
2184
2185 2018-10-08  John Baldwin  <jhb@FreeBSD.org>
2186
2187         * regcache.h (struct regcache_map_entry): Note that this type can
2188         be used with traditional frame caches.
2189         * trad-frame.c (trad_frame_set_reg_regmap): New.
2190         * trad-frame.h (trad_frame_set_reg_regmap): New.
2191
2192 2018-10-08  Weimin Pan  <weimin.pan@oracle.com>
2193
2194         PR c++/16841
2195         * valops.c (get_virtual_base_offset): New function.
2196         (value_struct_elt_for_reference): Use it to get virtual base offset
2197         and add it in calculating class member address.
2198
2199 2018-10-08  John Darrington  <john@darrington.wattle.id.au>
2200
2201         * dwarf2read.c (dwarf2_cu) <producer_is_codewarrior>: New field.
2202         (check_producer): Check if the producer is codewarrior.
2203         (producer_is_codewarrior): New function.
2204         (lnp_state_machine::record_line): Ignore is_stmt flag for records
2205         produced by codewarrior.
2206         (dwarf2_cu::dwarf2_cu): Initialize producer_is_codewarrior.
2207
2208 2018-10-06  Tom Tromey  <tom@tromey.com>
2209
2210         PR python/19399:
2211         * python/py-inferior.c: Add "architecture" entry.
2212         (infpy_architecture): New function.
2213
2214 2018-10-06  Tom Tromey  <tom@tromey.com>
2215
2216         PR python/21765:
2217         * python/py-symbol.c (gdbpy_initialize_symbols): Redefine
2218         SYMBOL_VARIABLES_DOMAIN, SYMBOL_FUNCTIONS_DOMAIN,
2219         SYMBOL_TYPES_DOMAIN.  Define SYMBOL_MODULE_DOMAIN,
2220         SYMBOL_COMMON_BLOCK_DOMAIN, SYMBOL_LOC_COMMON_BLOCK.
2221
2222 2018-10-06  Tom Tromey  <tom@tromey.com>
2223
2224         PR build/17077:
2225         * Makefile.in (OPCODES_CFLAGS): Remove "-I$(OPCODES_SRC)/..".
2226         * arc-tdep.c, frv-tdep.c, lm32-tdep.c, mep-tdep.c,
2227         microblaze-tdep.c, or1k-tdep.h: Use ../opcodes, not opcodes, in
2228         #include.
2229
2230 2018-10-06  Tom Tromey  <tom@tromey.com>
2231
2232         * python/py-breakpoint.c (bppy_get_location): Handle a
2233         bp_breakpoint without a location.
2234
2235 2018-10-06  Tom Tromey  <tom@tromey.com>
2236
2237         * python/lib/gdb/function/strfns.py (_MemEq, _StrLen, _StrEq)
2238         (_RegEx): Reformat help text.
2239         * python/lib/gdb/function/caller_is.py (CallerIs, CallerMatches)
2240         (AnyCallerIs, AnyCallerMatches): Reformat help text.
2241         * python/lib/gdb/function/as_string.py (_AsString): Reformat help
2242         text.
2243         * python/lib/gdb/command/xmethods.py (InfoXMethod)
2244         (EnableXMethod, DisableXMethod): Remove help indentation.
2245         Capitalize meta-syntactic variables.
2246         * python/lib/gdb/command/unwinders.py (InfoUnwinder)
2247         (EnableUnwinder, DisableUnwinder): Remove help indentation.
2248         Capitalize meta-syntactic variables.
2249         * python/lib/gdb/command/explore.py (ExploreCommand)
2250         (ExploreValueCommand, ExploreTypeCommand): Reformat help text.
2251         * python/lib/gdb/command/type_printers.py (InfoTypePrinter)
2252         (EnableTypePrinter, DisableTypePrinter): Remove help indentation.
2253         * python/lib/gdb/command/pretty_printers.py (InfoPrettyPrinter):
2254         Remove help indentation.
2255         (EnablePrettyPrinter, DisablePrettyPrinter): Likewise.
2256         * python/lib/gdb/command/frame_filters.py (EnableFrameFilter)
2257         (DisableFrameFilter, SetFrameFilterPriority)
2258         (ShowFrameFilterPriority, InfoFrameFilter): Reword help text.
2259
2260 2018-10-06  Tom Tromey  <tom@tromey.com>
2261
2262         PR tui/28819:
2263         * tui/tui-io.c (gdb_wgetch): New function.
2264         (tui_mld_getc, tui_getc): Use it.
2265
2266 2018-10-05  Tom Tromey  <tom@tromey.com>
2267
2268         * sol-thread.c (sol_thread_target::wait): Rename inner
2269         "save_ptid".
2270
2271 2018-10-04  Tom Tromey  <tom@tromey.com>
2272
2273         * configure: Rebuild.
2274         * warning.m4 (AM_GDB_WARNINGS): Add -Wshadow=local.
2275
2276 2018-10-04  Tom Tromey  <tom@tromey.com>
2277
2278         * guile/scm-frame.c (gdbscm_frame_read_var): Remove inner
2279         declaration of "block".
2280
2281 2018-10-04  Tom Tromey  <tom@tromey.com>
2282
2283         * common/filestuff.c (fdwalk): Remove inner declaration of
2284         "result".
2285
2286 2018-10-04  Tom Tromey  <tom@tromey.com>
2287
2288         * msp430-tdep.c (msp430_push_dummy_call): Rename inner
2289         "structs_addr" and hoist declaration.
2290
2291 2018-10-04  Tom Tromey  <tom@tromey.com>
2292
2293         * linux-tdep.c (linux_make_mappings_corefile_notes): Introduce new
2294         variable "size".
2295
2296 2018-10-04  Tom Tromey  <tom@tromey.com>
2297
2298         * mdebugread.c (parse_partial_symbols): Use std::string.
2299
2300 2018-10-04  Tom Tromey  <tom@tromey.com>
2301
2302         * ctf.c (SET_ARRAY_FIELD): Rename "u32".
2303         * p-valprint.c (pascal_val_print): Split inner "i" variable.
2304         * xtensa-tdep.c (xtensa_push_dummy_call): Declare "i" in loop
2305         header.
2306         * xstormy16-tdep.c (xstormy16_push_dummy_call): Declare "val" in
2307         more inner scope.
2308         * xcoffread.c (read_xcoff_symtab): Rename inner "symbol".
2309         * varobj.c (varobj_update): Rename inner "newobj",
2310         "type_changed".
2311         * valprint.c (generic_emit_char): Rename inner "buf".
2312         * valops.c (find_overload_match): Rename inner "temp".
2313         (value_struct_elt_for_reference): Declare "v" in more inner
2314         scope.
2315         * v850-tdep.c (v850_push_dummy_call): Rename "len".
2316         * unittests/array-view-selftests.c (run_tests): Rename inner
2317         "vec".
2318         * tui/tui-stack.c (tui_show_frame_info): Declare "i" in loop
2319         header.
2320         * tracepoint.c (merge_uploaded_trace_state_variables): Declare
2321         "tsv" in more inner scope.
2322         (print_one_static_tracepoint_marker): Rename inner
2323         "tuple_emitter".
2324         * tic6x-tdep.c (tic6x_analyze_prologue): Declare "inst" lower.
2325         (tic6x_push_dummy_call): Don't redeclare "addr".
2326         * target-float.c: Declare "dto" lower.
2327         * symtab.c (lookup_local_symbol): Rename inner "sym".
2328         (find_pc_sect_line): Rename inner "pc".
2329         * stack.c (print_frame): Don't redeclare "gdbarch".
2330         (return_command): Rename inner "gdbarch".
2331         * s390-tdep.c (s390_prologue_frame_unwind_cache): Renam inner
2332         "sp".
2333         * rust-lang.c (rust_internal_print_type): Declare "i" in loop
2334         header.
2335         * rs6000-tdep.c (ppc_process_record): Rename inner "addr".
2336         * riscv-tdep.c (riscv_push_dummy_call): Declare "info" in inner
2337         scope.
2338         * remote.c (remote_target::update_thread_list): Don't redeclare
2339         "tp".
2340         (remote_target::process_initial_stop_replies): Rename inner
2341         "thread".
2342         (remote_target::remote_parse_stop_reply): Don't redeclare "p".
2343         (remote_target::wait_as): Don't redeclare "stop_reply".
2344         (remote_target::get_thread_local_address): Rename inner
2345         "result".
2346         (remote_target::get_tib_address): Likewise.
2347
2348         * regcache.c (cooked_read_test): Rename "regnum".
2349         * record-btrace.c (cmd_record_btrace_start): Rename inner
2350         "exception".
2351         * ppc-sysv-tdep.c (ppc64_sysv_abi_return_value): Declare "i" in
2352         loop header.
2353         * ppc-linux-tdep.c (ppc_linux_syscall_record): Declare "i" in loop
2354         header.
2355         (ppu2spu_sniffer): Rename inner "buf".
2356         * parse.c (operator_check_standard): Rename inner "type",
2357         "objfile".
2358         * p-valprint.c (pascal_val_print): Introduce new scope for
2359         "low_bound", "high_bound".
2360         * p-exp.y (yylex): Declare "i" in loop header.
2361         * objfiles.c (objfile_relocate1): Declare "i" in loop header.
2362         Lower declaration of "s".
2363         * nios2-tdep.c (nios2_analyze_prologue): Declare "i" in loop
2364         header.
2365         (nios2_push_dummy_call): Rename "len".
2366         * nat/linux-osdata.c (linux_xfer_osdata_cpus): Rename static
2367         "buf".
2368         (linux_xfer_osdata_fds, linux_xfer_osdata_shm)
2369         (linux_xfer_osdata_sem, linux_xfer_osdata_msg)
2370         (linux_xfer_osdata_modules): Likewise.
2371         * mips-tdep.c (mips_eabi_push_dummy_call): Rename outer "len".
2372         (mips_n32n64_push_dummy_call, mips_o32_push_dummy_call)
2373         (mips_o64_push_dummy_call): Likewise.
2374         * microblaze-tdep.c (microblaze_analyze_prologue): Rename inner
2375         "op".
2376         * mi/mi-main.c (list_available_thread_groups): Rename inner
2377         "tuple_emitter".
2378         (mi_cmd_data_read_memory): Rename inner "opts".
2379         * mi/mi-cmd-var.c (varobj_update_one): Rename inner
2380         "tuple_emitter".
2381         * mep-tdep.c (mep_analyze_prologue): Declare "rn" in loop header.
2382         * mdebugread.c (parse_symbol): Rename inner "b".  Declare "f" in
2383         more inner scope.
2384         (parse_partial_symbols): Rename inner "pst", "p", "name"
2385         * main.c (captured_main_1): Rename inner "i"s.
2386         * machoread.c (macho_symfile_read_all_oso): Don't redeclare
2387         "oso2".
2388         * linux-tdep.c (linux_info_proc): Rename inner "filename".
2389         * linespec.c (linespec_lexer_lex_string): Rename inner "p".
2390         * infrun.c (handle_no_resumed): Don't redeclare "thread".
2391         (handle_signal_stop): Rename inner "gdbarch".
2392         (handle_command): Declare "signum" in loop header.
2393         * ia64-tdep.c (ia64_pseudo_register_read): Don't redeclare
2394         "status".
2395         (examine_prologue): Rename inner "sol" and "sof".
2396         (ia64_extract_return_value): Rename inner "val".  Declare another
2397         "val" in a more inner scope.
2398         * hppa-bsd-tdep.c (hppabsd_find_global_pointer): Declare "buf" in
2399         inner scope.
2400         * guile/scm-symbol.c (gdbscm_lookup_symbol): Rename inner
2401         "except".
2402         * findvar.c (default_read_var_value): Don't redeclare "addr".
2403         * f-exp.y (yylex): Declare "i" in loop header.
2404         * eval.c (evaluate_subexp_standard): Don't redeclare "type".
2405         Rename inner "type", "expect_type".
2406         (evaluate_subexp_for_sizeof): Rename inner "pc".
2407         * elfread.c (elf_symfile_read): Rename inner "abfd".
2408         * dwarf2read.c (read_debug_names_from_section): Don't redeclare
2409         "bytes_read".
2410         (process_psymtab_comp_unit_reader): Don't redeclare "gdbarch".
2411         (add_partial_subprogram): Rename inner "lowpc" and "highpc".
2412         (dwarf_decode_line_header): Rename inner "lh".
2413         * dwarf2loc.c (dwarf2_compile_expr_to_ax): Don't redeclare
2414         "offset".  Declare "i" in loop header.
2415         (disassemble_dwarf_expression): Rename inner "addr_size".
2416         * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Rename
2417         inner "result".
2418         (dwarf_expr_context::execute_stack_op): Rename inner "offset".
2419         * dwarf2-frame.c (decode_frame_entry_1): Rename inner "length"s.
2420         * disasm.c (do_mixed_source_and_assembly_deprecated): Rename inner
2421         "inner_list_emitter".
2422         (do_mixed_source_and_assembly): Rename inner "tuple_emitter".
2423         * disasm-selftests.c (print_one_insn_test): Wrap "bplen"
2424         declaration in a block.
2425         * csky-tdep.c (csky_analyze_prologue): Declare "offset" lower.
2426         * cp-valprint.c (cp_print_value_fields): Don't redeclare
2427         "obstack_final_size".
2428         * cp-support.c (inspect_type): Declare "i" in loop header.
2429         * compile/compile.c (compile_instance::insert_symbol_error):
2430         Rename inner "e".
2431         * common/agent.c (agent_run_command): Remove inner "ret"
2432         declaration.
2433         * coffread.c (coff_symfile_read): Rename inner "name".
2434         (coff_symfile_read): Rename inner "abfd".
2435         * cli/cli-utils.c (get_number_trailer): Rename inner "val".
2436         * cli/cli-cmds.c (print_disassembly): Rename inner "low" and
2437         "high".
2438         * c-exp.y (lex_one_token): Move "len" declaration lower.
2439         * breakpoint.c (create_longjmp_master_breakpoint): Don't redeclare
2440         "gdbarch".
2441         (create_exception_master_breakpoint): Likewise.  Don't redeclare
2442         "b".
2443         (watch_command_1): Declare "mark" later.
2444         (clear_command): Don't shadow "a" or "b".
2445         (delete_command): Rename inner "b".
2446         (delete_trace_command): Likewise.
2447         * arm-tdep.c (thumb_process_displaced_32bit_insn): Rename inner
2448         "op".
2449         (arm_gdbarch_init): Remove inner "e_flags".
2450         * arch/arm-get-next-pcs.c (thumb_get_next_pcs_raw): Declare
2451         "offset" in inner blocks.
2452
2453 2018-10-04  Simon Marchi  <simon.marchi@ericsson.com>
2454
2455         * dwarf-index-write.c (file_write): Don't write if the vector is
2456         empty.
2457
2458 2018-10-05  Tom de Vries  <tdevries@suse.de>
2459
2460         * python/py-progspace.c (pspy_solib_name): Fix type mismatch in
2461         PyArg_ParseTuple call.
2462
2463 2018-10-05  Tom de Vries  <tdevries@suse.de>
2464
2465         * python/py-record-btrace.c (recpy_bt_goto): Fix type mismatch in
2466         PyArg_ParseTuple call.
2467
2468 2018-10-04  Joel Brobecker  <brobecker@adacore.com>
2469
2470         * psymtab.c (recursively_search_psymtabs): Reformat parameters
2471         to avoid exceeding 80 characters per line limit.
2472
2473 2018-10-04  Tom Tromey  <tom@tromey.com>
2474
2475         * symfile.c (syms_from_objfile_1, finish_new_objfile)
2476         (reread_symbols): Update.
2477         * complaints.h (clear_complaints): Remove argument.
2478         * complaints.c (enum complaint_series): Remove.
2479         (series): Remove global.
2480         (complaint_internal): Update.
2481         (clear_complaints): Remove argument.
2482
2483 2018-10-04  Tom Tromey  <tom@tromey.com>
2484
2485         * symfile.c (symbol_file_add_with_addrs): Do not print "no
2486         debugging symbols" message if there is a separate debug objfile.
2487
2488 2018-10-04  Tom Tromey  <tom@tromey.com>
2489
2490         PR cli/19551:
2491         * symfile.c (symbol_file_add_with_addrs): Update output.
2492         * psymtab.c (require_partial_symbols): Update output.
2493
2494 2018-10-04  Tom Tromey  <tom@tromey.com>
2495
2496         PR cli/22234:
2497         * complaints.c: Emit \n.
2498
2499 2018-10-04  Tom Tromey  <tom@tromey.com>
2500
2501         * symfile.c (symbol_file_add_with_addrs, symbol_file_clear)
2502         (separate_debug_file_exists, find_separate_debug_file)
2503         (add_symbol_file_command, reread_symbols, allocate_symtab)
2504         (allocate_compunit_symtab): Use filtered printing, not
2505         unfiltered.
2506         * psymtab.c (require_partial_symbols, dump_psymtab)
2507         (allocate_psymtab): Use filtered printing, not unfiltered.
2508
2509 2018-10-04  Tom Tromey  <tom@tromey.com>
2510
2511         * complaints.c (complaint_internal): Correctly check complaint
2512         count.
2513
2514 2018-10-04  Tom Tromey  <tom@tromey.com>
2515
2516         * complaints.h (struct complaints): Remove declaration.
2517         * complaints.c (clear_complaints): Remove an unused variable.
2518
2519 2018-10-04  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2520
2521         * MAINTAINERS (Write After Approval): Add self.
2522
2523 2018-10-03  Tom Tromey  <tom@tromey.com>
2524
2525         * guile/scm-value.c (gdbscm_value_to_string): Initialize
2526         "buffer_contents".
2527         * coffread.c (coff_symtab_read): Initialize "newobj".
2528
2529 2018-10-03  Simon Marchi  <simon.marchi@polymtl.ca>
2530
2531         * dwarf2read.c (read_func_scope): Remove struct keyword in
2532         range-based for.
2533
2534 2018-10-03  Tom Tromey  <tom@tromey.com>
2535
2536         * README: Mention --enable-ubsan.
2537         * NEWS: Mention --enable-ubsan.
2538         * acinclude.m4: Include sanitize.m4.
2539         * configure: Rebuild.
2540         * configure.ac: Call AM_GDB_UBSAN.
2541         * sanitize.m4: New file.
2542
2543 2018-10-03  Tom Tromey  <tom@tromey.com>
2544
2545         * expression.h (enum exp_opcode): Use uint8_t as base type.
2546         * expprint.c (op_name): Handle invalid opcodes.
2547
2548 2018-10-03  Tom Tromey  <tom@tromey.com>
2549
2550         * parse.c (prefixify_expression): Add assert.
2551         (parse_exp_in_context_1): Throw exception if the expression is
2552         empty.
2553
2554 2018-10-03  Tom Tromey  <tom@tromey.com>
2555
2556         * dwarf2read.c (read_signed_leb128): Work in ULONGEST.
2557
2558 2018-10-03  Tom Tromey  <tom@tromey.com>
2559
2560         * c-exp.y (parse_number): Work in unsigned.  Remove casts.
2561
2562 2018-10-03  Tom Tromey  <tom@tromey.com>
2563
2564         * dwarf2read.c (read_subrange_type): Make "negative_mask"
2565         unsigned.
2566
2567 2018-10-03  Tom Tromey  <tom@tromey.com>
2568
2569         * findvar.c (extract_integer): Do work in an unsigned type.
2570
2571 2018-10-03  Tom Tromey  <tom@tromey.com>
2572
2573         * common/enum-flags.h (enum_flags::operator~): Add static assert.
2574         * symfile-add-flags.h (enum symfile_add_flag): Use unsigned as
2575         base type.
2576         * objfile-flags.h (enum objfile_flag): Use unsigned as base type.
2577         * gdbtypes.h (enum type_instance_flag_value): Use unsigned as base
2578         type.
2579         * c-lang.h (enum c_string_type_values): Use unsigned as base
2580         type.
2581         * btrace.h (enum btrace_thread_flag): Use unsigned as base type.
2582
2583 2018-10-03  Tom Tromey  <tom@tromey.com>
2584
2585         * dwarf2-frame.h (dwarf2_frame_state_reg_info)
2586         <~dwarf2_frame_state_reg_info>: Update.
2587         <dwarf2_frame_state_reg_info>: Update.
2588         <alloc_regs>: Add assertion.  Update.
2589         <reg>: Now a std::vector.
2590         <num_regs>: Remove.
2591         <swap>: Update.
2592         * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
2593         (execute_cfa_program_test, dwarf2_frame_cache): Update.
2594
2595 2018-10-03  Tom Tromey  <tom@tromey.com>
2596
2597         * namespace.c (add_using_directive): Don't pass NULL to memcpy.
2598
2599 2018-10-03  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
2600
2601         * tid-parse.c (tid_is_in_list): Fix wrong 'See' comment.
2602
2603 2018-10-02  Tom Tromey  <tom@tromey.com>
2604
2605         * aarch64-linux-tdep.c (aarch64_linux_sigframe_init): Use pulongest.
2606
2607 2018-10-02  John Darrington  <john@darrington.wattle.id.au>
2608
2609         * NEWS: Mention changed commands.
2610         * ser-uds.c: New file.
2611         * configure.ac (SER_HARDWIRE): Add ser-uds.o.
2612         * configure: Regenerate.
2613         * Makefile.in: Add new file.
2614         * serial.c (serial_open): Check if filename is a socket
2615         and lookup the appropriate interface accordingly.
2616
2617 2018-10-01  Alan Hayward  <alan.hayward@arm.com>
2618
2619         * aarch64-linux-tdep.c (AARCH64_SIGCONTEXT_RESERVED_OFFSET): Add
2620         define.
2621         (AARCH64_EXTRA_MAGIC): Likewise.
2622         (AARCH64_FPSIMD_MAGIC): Likewise.
2623         (AARCH64_SVE_MAGIC): Likewise.
2624         (AARCH64_EXTRA_DATAP_OFFSET): Likewise.
2625         (AARCH64_FPSIMD_FPSR_OFFSET): Likewise.
2626         (AARCH64_FPSIMD_FPCR_OFFSET): Likewise.
2627         (AARCH64_FPSIMD_V0_OFFSET): Likewise.
2628         (AARCH64_FPSIMD_VREG_SIZE): Likewise.
2629         (AARCH64_SVE_CONTEXT_VL_OFFSET): Likewise.
2630         (AARCH64_SVE_CONTEXT_REGS_OFFSET): Likewise.
2631         (AARCH64_SVE_CONTEXT_P_REGS_OFFSET): Likewise.
2632         (AARCH64_SVE_CONTEXT_FFR_OFFSET): Likewise.
2633         (AARCH64_SVE_CONTEXT_SIZE): Likewise.
2634         (read_aarch64_ctx): Add function.
2635         (aarch64_linux_sigframe_init): Detect FP registers.
2636
2637 2018-10-01  Alan Hayward  <alan.hayward@arm.com>
2638
2639         * aarch64-tdep.c (AARCH64_Q0_REGNUM): Move to here.
2640         (AARCH64_D0_REGNUM): Likewise.
2641         (AARCH64_S0_REGNUM): Likewise.
2642         (AARCH64_H0_REGNUM): Likewise.
2643         (AARCH64_B0_REGNUM): Likewise.
2644         (AARCH64_SVE_V0_REGNUM): Likewise.
2645         * arch/aarch64.h (AARCH64_Q0_REGNUM): Move from here.
2646         (AARCH64_D0_REGNUM): Likewise.
2647         (AARCH64_S0_REGNUM): Likewise.
2648         (AARCH64_H0_REGNUM): Likewise.
2649         (AARCH64_B0_REGNUM): Likewise.
2650         (AARCH64_SVE_V0_REGNUM): Likewise.
2651
2652 2018-10-01  Gary Benson <gbenson@redhat.com>
2653
2654         * gdb_proc_service.h (gdb_prfpregset_t): Remove typedef.
2655         * proc-service.c (ps_lgetfpregs, ps_lsetfpregs): Use
2656         prfpregset_t instead of gdb_prfpregset_t.
2657         * configure.ac (PRFPREGSET_T_BROKEN): Remove check.
2658         * configure, config.in: Rebuild.
2659
2660 2018-10-01  Gary Benson <gbenson@redhat.com>
2661
2662         * common/gdb_proc_service.h: New file, factored out from...
2663         * gdb_proc_service.h: Moved common code to the above file.
2664         * Makefile.in (HFILES_NO_SRCDIR): Add the above new file.
2665
2666 2018-10-01  Gary Benson <gbenson@redhat.com>
2667
2668         * gdb_proc_service.h: Use elf_gregset_t if prgregset_t is
2669         undefined.  Use elf_fpregset_t if prfpregset_t is undefined.
2670
2671 2018-10-01  Gary Benson <gbenson@redhat.com>
2672
2673         * configure.ac: Check if sys/procfs.h defines elf_fpregset_t.
2674         (AC_CHECK_HEADERS): Check for linux/elf.h.
2675         * configure, config.in: Rebuild.
2676         * gdb_proc_service.h: Include linux/elf.h if sys/procfs.h
2677         doesn't define elf_fpregset_t.
2678
2679 2018-10-01  Gary Benson <gbenson@redhat.com>
2680
2681         * gdb_proc_service.h: Whitespace change.
2682
2683 2018-10-01  Tom Tromey  <tom@tromey.com>
2684
2685         * unittests/scoped_mmap-selftests.c: Don't check HAVE_UNISTD_H.
2686         * unittests/scoped_fd-selftests.c: Don't check HAVE_UNISTD_H.
2687         * common/scoped_fd.h: Don't check HAVE_UNISTD_H.
2688
2689 2018-10-01  Tom Tromey  <tom@tromey.com>
2690
2691         * README: Minor change.
2692
2693 2018-09-30  Pedro Alves  <palves@redhat.com>
2694
2695         * darwin-nat-info.c (darwin_debug_regions_recurse)
2696         (info_mach_exceptions_command): Remove unused local variables.
2697         * darwin-nat.c (darwin_decode_notify_message)
2698         (darwin_nat_target::resume, darwin_nat_target::mourn_inferior)
2699         (darwin_stop_inferior, darwin_setup_exceptions)
2700         (darwin_nat_target::kill, darwin_attach_pid, darwin_ptrace_him)
2701         (darwin_nat_target::attach, darwin_nat_target::detach)
2702         (darwin_read_write_inferior, darwin_read_dyld_info): Remove unused
2703         local variables.
2704         * i386-darwin-nat.c (i386_darwin_dr_set): Remove unused local
2705         variables.
2706
2707 2018-09-29  Tom Tromey  <tom@tromey.com>
2708
2709         * README: Remove some leftover text.
2710
2711 2018-09-29  Tom Tromey  <tom@tromey.com>
2712
2713         * PROBLEMS: Rewrite.
2714         * README: Update.
2715
2716 2018-09-28  John Baldwin  <jhb@FreeBSD.org>
2717
2718         * disasm-selftests.c (print_one_insn_test): Add bfd_arch_riscv to
2719         case with explicit breakpoint kind.
2720         * riscv-tdep.c (show_use_compressed_breakpoints): Remove
2721         'additional_info' and related logic.
2722         (riscv_debug_breakpoints): New variable.
2723         (riscv_breakpoint_kind_from_pc): Use the length of the existing
2724         instruction to determine the breakpoint kind.
2725         (_initialize_riscv_tdep): Add 'set/show debug riscv breakpoints'
2726         flag.  Update description of 'set/show riscv
2727         use-compressed-breakpoints' flag.
2728
2729 2018-09-28  Andrew Burgess  <andrew.burgess@embecosm.com>
2730
2731         (NEWS): Mention changes to frame related commands.
2732         * cli/cli-decode.c (add_cmd_suppress_notification): New function.
2733         (add_prefix_cmd_suppress_notification): New function.
2734         (add_com_suppress_notification): Call
2735         add_cmd_suppress_notification.
2736         * command.h (add_cmd_suppress_notification): Declare.
2737         (add_prefix_cmd_suppress_notification): Declare.
2738         * mi/mi-cmd-stack.c: Add 'safe-ctype.h' include.
2739         (parse_frame_specification): Moved from stack.c, with
2740         simplification to handle a single argument.
2741         (mi_cmd_stack_select_frame): Use parse_frame_specification, the
2742         switch to the selected frame.  Add a header comment.
2743         * stack.c: Remove 'safe-ctype.h' include.
2744         (find_frame_for_function): Add declaration.
2745         (find_frame_for_address): New function.
2746         (parse_frame_specification): Moved into mi/mi-cmd-stack.c.
2747         (frame_selection_by_function_completer): New function.
2748         (info_frame_command): Rename to...
2749         (info_frame_command_core): ...this, and update parameter types.
2750         (select_frame_command): Rename to...
2751         (select_frame_command_core): ...this, and update parameter types.
2752         (frame_command): Rename to...
2753         (frame_command_core): ...this, and update parameter types.
2754         (class frame_command_helper): New class to wrap implementations of
2755         frame related sub-commands.
2756         (frame_apply_cmd_list): New static global.
2757         (frame_cmd_list): Make static.
2758         (select_frame_cmd_list): New global for sub-commands.
2759         (info_frame_cmd_list): New global for sub-commands.
2760         (_initialize_stack): Register sub-commands for 'frame',
2761         'select-frame', and 'info frame'.  Update 'frame apply' commands
2762         to use frame_apply_cmd_list.  Move function local static
2763         frame_apply_list to file static frame_apply_cmd_list for
2764         consistency.
2765         * stack.h (select_frame_command): Delete declarationn.
2766         (select_frame_for_mi): Declare new function.
2767
2768 2018-09-26  Andrew Burgess  <andrew.burgess@embecosm.com>
2769
2770         * riscv-tdep.c (riscv_insn::decode): Decode c.lui.
2771         (riscv_scan_prologue): Split handling of AUIPC, LUI, ADD, ADDI,
2772         and NOP.
2773
2774 2018-09-26  Simon Marchi  <simon.marchi@ericsson.com>
2775
2776         * elf32-nds32.c (elf32_nds32_allocate_dynrelocs): Remove.
2777
2778 2018-09-26  Tom Tromey  <tom@tromey.com>
2779
2780         * valops.c (auto_abandon): Remove dead code.
2781
2782 2018-09-26  Tom Tromey  <tom@tromey.com>
2783
2784         * tui/tui-win.c (WIN_HEIGHT_USAGE): Remove extra ">"s.
2785
2786 2018-09-24  Tom Tromey  <tom@tromey.com>
2787
2788         * common/pathstuff.c (get_standard_cache_dir): Make
2789         "xdg_cache_home" and "home" const.
2790         * top.c (init_history): Make "tmpenv" const.
2791         * main.c (get_init_files): Make "homedir" const.
2792
2793 2018-09-23  Tom Tromey  <tom@tromey.com>
2794
2795         PR python/18852:
2796         * python/py-param.c (get_set_value): Use gdbpy_handle_exception.
2797
2798 2018-09-23  Tom Tromey  <tom@tromey.com>
2799
2800         * python/py-function.c (fnpy_call): Use gdbpy_handle_exception.
2801         * python/py-cmd.c (cmdpy_function): Use gdbpy_handle_exception.
2802         * python/python-internal.h (gdbpy_handle_exception): Declare.
2803         * python/py-utils.c (gdbpy_handle_exception): New function.
2804
2805 2018-09-23  Tom Tromey  <tom@tromey.com>
2806
2807         PR python/17284:
2808         * python/py-type.c (typy_template_argument): Check for negative
2809         argument number.
2810
2811 2018-09-23  Tom Tromey  <tom@tromey.com>
2812
2813         PR python/14062:
2814         * python/python.c (gdbpy_run_events): Do not ignore exceptions.
2815
2816 2018-09-23  Tom Tromey  <tom@tromey.com>
2817
2818         PR python/18170:
2819         * python/py-value.c (valpy_int): Allow conversion from pointer
2820         type.
2821
2822 2018-09-23  Tom Tromey  <tom@tromey.com>
2823
2824         PR python/20126:
2825         * python/py-value.c (valpy_int): Respect type sign.
2826
2827 2018-09-23  Tom Tromey  <tom@tromey.com>
2828
2829         PR python/18352;
2830         * python/py-value.c (valpy_float): Allow conversions from int or
2831         char.
2832         (valpy_int, valpy_long): Allow conversions from float.
2833
2834 2018-09-23  Tom Tromey  <tom@tromey.com>
2835
2836         * ctf.c (ctf_start): Use gdb_fopen_cloexec.
2837         * common/scoped_mmap.c (mmap_file): Use gdb_open_cloexec.
2838
2839 2018-09-23  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2840
2841         * amd64-sol2-tdep.c (amd64_sol2_sigtramp_p): Also recognize
2842         __sighndlr.
2843         * i386-sol2-tdep.c (i386_sol2_sigtramp_p): Likewise.
2844
2845 2018-08-02  Jon Turney  <jon.turney@dronecode.org.uk>
2846
2847         * windows-nat.c (windows_nat_target::wait): Remove a spurious
2848         target_terminal::ours().
2849
2850 2018-09-23  Simon Marchi  <simon.marchi@ericsson.com>
2851
2852         * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): Change type
2853         of vl to ULONGEST.
2854
2855 2018-09-21  Yacov Simhony  <ysimhony@gmail.com>
2856
2857         * breakpoint.c (update_inserted_breakpoint_locations): Remove
2858         redundant condition.
2859
2860 2018-09-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2861
2862         * proc-utils.h (PROC_CTL_WORD_TYPE): Remove.
2863
2864         * procfs.c: Don't check for PR_MODEL_NATIVE definition.
2865         * sparc-sol2-nat.c: Likewise.  Remove Linux, __arch64__ references.
2866         * sol-thread.c (ps_pdmodel): Don't guard definition.
2867
2868         * procfs.c: Fix formatting.
2869
2870         * procfs.c (sysset_t_alloc): Remove.
2871         (create_procinfo): Use XNEW instead of sysset_t_alloc.
2872         (procfs_debug_inferior): Likewise.
2873         (procfs_set_exec_trap): Likewise.
2874         (proc_set_traced_sysentry): Don't allocate argp dynamically.
2875         (proc_set_traced_sysexit): Likewise.
2876
2877         * procfs.c (create_procinfo): Use xsnprintf to fix ARI warning.
2878         (dead_procinfo): Likewise.
2879         (proc_warn): Likewise.
2880         (proc_error): Likewise.
2881         (proc_get_LDT_entry): Likewise.
2882         (do_attach): Likewise.
2883         (procfs_target::pid_to_str): Likewise.
2884         (iterate_over_mappings): Likewise.
2885
2886         * procfs.c (create_procinfo): Fix ARI warning.
2887         (proc_get_status): Likewise.
2888         (proc_stop_process): Likewise.
2889         (proc_run_process): Likewise.
2890         (proc_kill): Likewise.
2891         (proc_get_LDT_entry): Likewise.
2892         (procfs_find_LDT_entry): Likewise.
2893         (proc_update_threads): Likewise.
2894         (proc_iterate_over_threads): Likewise.
2895         (do_attach): Likewise.
2896         (procfs_xfer_memory): Likewise.
2897         (invalidate_cache): Likewise.
2898         (procfs_target::resume): Likewise.
2899         (procfs_init_inferior): Likewise.
2900         (procfs_set_exec_trap): Likewise.
2901         (procfs_target::thread_alive): Likewise.
2902         (procfs_target::pid_to_exec_file): Likewise.
2903         (iterate_over_mappings): Likewise.
2904         (procfs_target::make_corefile_notes): Likewise.
2905         * sol-thread.c (sol_thread_target::thread_alive): Likewise.
2906
2907         * procfs.c (procfs_find_LDT_entry): Silence ARI warning.
2908         (procfs_find_LDT_entry): Likewise.
2909         * sol-thread.c (ps_lgetLDT): Likewise.
2910
2911 2018-09-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2912
2913         PR tdep/17903
2914         * procfs.c (procfs_target): Declare pid_to_exec_file.
2915         (procfs_target::pid_to_exec_file): New.
2916
2917 2018-09-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2918
2919         * auxv.c (default_print_auxv_entry): Reflect AT_SUN_CAP_HW1
2920         renaming.
2921         Handle AT_SUN_EMULATOR, AT_SUN_BRANDNAME, AT_SUN_BRAND_AUX1,
2922         AT_SUN_BRAND_AUX2, AT_SUN_BRAND_AUX3, AT_SUN_CAP_HW2.
2923
2924 2018-09-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2925
2926         * i386-v4-nat.c (regmap, supply_gregset, fill_gregset)
2927         (supply_fpregset, fill_fpregset): Move ...
2928         * i386-sol2-nat.c [PR_MODEL_NATIVE != PR_MODEL_LP64]: ... here.
2929         Remove HAVE_GREGSET_T, HAVE_FPREGET_T guards.
2930         Remove references to ioctl-based procfs.
2931         Include <sys/reg.h>.
2932         Remove PR_MODEL_NATIVE guards.
2933         * configure.nat <sol2, i386> (NATDEPFILES): Remove i386-v4-nat.o.
2934         * Makefile.in (ALLDEPFILES): Remove i386-v4-nat.c.
2935
2936 2018-09-19  Xavier Roirand  <roirand@adacore.com>
2937
2938         PR gdb/20981:
2939         * solib-darwin.c (darwin_get_dyld_bfd): New function.
2940         (darwin_solib_get_all_image_info_addr_at_init): Update call.
2941         (darwin_solib_create_inferior_hook): Handle unrelocated dyld.
2942
2943 2018-09-19  John Baldwin  <jhb@FreeBSD.org>
2944
2945         * fbsd-tdep.c (fbsd_print_sockaddr_in): Style fix.
2946         (fbsd_print_sockaddr_in6): Likewise.
2947
2948 2018-09-19  Richard Bunt  <richard.bunt@arm.com>
2949             Chris January  <chris.january@arm.com>
2950
2951         * eval.c (skip_undetermined_arglist): Skip argument list helper.
2952         (evaluate_subexp_standard): Return a dummy type when
2953         honoring EVAL_SKIP in OP_VAR_VALUE and handle skipping in the
2954         OP_F77_UNDETERMINED_ARGLIST case.
2955         * expression.h (enum noside): Update comment.
2956
2957 2018-09-19  George Vasick <george.vasick@oracle.com>
2958
2959         * solib-svr4.c (svr4_same_1): Also handle amd64 ld.so.1.
2960
2961 2018-09-19  Stefan Teleman <stefan.teleman@oracle.com>
2962             April Chin <april.chin@oracle.com>
2963             Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2964
2965         * procfs.c (MAX_PROC_NAME_SIZE): Allow for 6-digit PID_MAX and
2966         uint_t lwpid_t.
2967         (create_procinfo): Print pids in /proc without leading zeros.
2968
2969 2018-09-18  Sandra Loosemore  <sandra@codesourcery.com>
2970
2971         * nios2-tdep.c (nios2_gcc_target_options): New.
2972         (nios2_gdb_arch_init): Install new hook.
2973
2974 2018-09-18  Simon Marchi  <simon.marchi@ericsson.com>
2975
2976         * patches/0001-Fix-PR-gdb-23558-Use-system-s-getcwd-when-cross-comp.patch:
2977         New file.
2978         * update-gnulib.sh: Apply patch.
2979         * configure: Re-generate.
2980
2981 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
2982
2983         * infcmd.c (_initialize_infcmd): Remove "running" from "info proc"
2984         description.  Make "info proc" command descriptions more
2985         consistent.
2986
2987 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
2988
2989         * NEWS: Mention 'info proc files' command.
2990
2991 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
2992
2993         * fbsd-nat.c (fbsd_nat_target::info_proc): List open file
2994         descriptors for IP_FILES and IP_ALL.
2995
2996 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
2997
2998         * fbsd-tdep.c (KF_FLAGS, KF_OFFSET, KF_VNODE_TYPE, KF_SOCK_DOMAIN)
2999         (KF_SOCK_TYPE, KF_SOCK_PROTOCOL, KF_SA_LOCAL, KF_SA_PEER)
3000         (KINFO_FILE_TYPE_SOCKET, KINFO_FILE_TYPE_PIPE)
3001         (KINFO_FILE_TYPE_FIFO, KINFO_FILE_TYPE_KQUEUE)
3002         (KINFO_FILE_TYPE_CRYPTO, KINFO_FILE_TYPE_MQUEUE)
3003         (KINFO_FILE_TYPE_SHM, KINFO_FILE_TYPE_SEM, KINFO_FILE_TYPE_PTS)
3004         (KINFO_FILE_TYPE_PROCDESC, KINFO_FILE_FD_TYPE_ROOT)
3005         (KINFO_FILE_FD_TYPE_JAIL, KINFO_FILE_FD_TYPE_TRACE)
3006         (KINFO_FILE_FD_TYPE_CTTY, KINFO_FILE_FLAG_READ)
3007         (KINFO_FILE_FLAG_WRITE, KINFO_FILE_FLAG_APPEND)
3008         (KINFO_FILE_FLAG_ASYNC, KINFO_FILE_FLAG_FSYNC)
3009         (KINFO_FILE_FLAG_NONBLOCK, KINFO_FILE_FLAG_DIRECT)
3010         (KINFO_FILE_FLAG_HASLOCK, KINFO_FILE_FLAG_EXEC)
3011         (KINFO_FILE_VTYPE_VREG, KINFO_FILE_VTYPE_VDIR)
3012         (KINFO_FILE_VTYPE_VCHR, KINFO_FILE_VTYPE_VLNK)
3013         (KINFO_FILE_VTYPE_VSOCK, KINFO_FILE_VTYPE_VFIFO, FBSD_AF_UNIX)
3014         (FBSD_AF_INET, FBSD_AF_INET6, FBSD_SOCK_STREAM, FBSD_SOCK_DGRAM)
3015         (FBSD_SOCK_SEQPACKET, FBSD_IPPROTO_ICMP, FBSD_IPPROTO_TCP)
3016         (FBSD_IPPROTO_UDP, FBSD_IPPROTO_SCTP): New defines.
3017         (struct fbsd_sockaddr_in, struct fbsd_sockaddr_in6)
3018         (struct fbsd_sockaddr_un): New types.
3019         (fbsd_file_fd, fbsd_file_type, fbsd_file_flags, fbsd_ipproto)
3020         (fbsd_print_sockaddr_in, fbsd_print_sockaddr_in6)
3021         (fbsd_info_proc_files_header, fbsd_info_proc_files_entry)
3022         (fbsd_core_info_proc_files): New functions.
3023         (fbsd_core_info_proc): List open file descriptors for IP_FILES and
3024         IP_ALL.
3025         * fbsd-tdep.h (fbsd_info_proc_files_header)
3026         (fbsd_info_proc_files_entry): New.
3027
3028 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
3029
3030         * defs.h (enum info_proc_what) [IP_FILES]: New value.
3031         * infcmd.c (info_proc_cmd_files): New function.
3032         (_initialize_infcmd): Register 'info proc files' command.
3033
3034 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
3035
3036         * gnulib/aclocal-m4-deps.mk: Re-generate.
3037         * gnulib/aclocal.m4: Re-generate.
3038         * gnulib/config.in: Re-generate.
3039         * gnulib/configure: Re-generate.
3040         * gnulib/import/Makefile.am: Re-generate.
3041         * gnulib/import/Makefile.in: Re-generate.
3042         * gnulib/import/m4/gnulib-cache.m4: Re-generate.
3043         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
3044         * gnulib/import/arpa_inet.in.h: New file.
3045         * gnulib/import/inet_ntop.c: New file.
3046         * gnulib/import/m4/arpa_inet_h.m4: New file.
3047         * gnulib/import/m4/inet_ntop.m4: New file.
3048         * gnulib/import/m4/netinet_in_h.m4: New file.
3049         * gnulib/import/m4/socklen.m4: New file.
3050         * gnulib/import/m4/sockpfaf.m4: New file.
3051         * gnulib/import/m4/stdalign.m4: New file.
3052         * gnulib/import/m4/sys_uio_h.m4: New file.
3053         * gnulib/import/netinet_in.in.h: New file.
3054         * gnulib/import/stdalign.in.h: New file.
3055         * gnulib/import/sys_socket.c: New file.
3056         * gnulib/import/sys_socket.in.h: New file.
3057         * gnulib/import/sys_uio.in.h: New file.
3058         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add inet_ntop
3059         module.
3060
3061 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
3062
3063         * gnulib/aclocal-m4-deps.mk: New file.
3064         * gnulib/update-gnulib.sh: Generate "aclocal-m4-deps.mk"
3065         deterministically.
3066
3067 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
3068
3069         * fbsd-tdep.c (fbsd_core_vnode_path): Use KF_PATH instead of
3070         KVE_PATH.
3071
3072 2018-09-18  Tom Tromey  <tom@tromey.com>
3073
3074         * compile/compile-object-load.c (struct
3075         link_hash_table_cleanup_data): Add constructor and destructor.
3076         Use DISABLE_COPY_AND_ASSIGN.
3077         (~link_hash_table_cleanup_data): Rename from
3078         link_hash_table_free.  Now a destructor.
3079         (copy_sections): Use gdb::unique_xmalloc_ptr.  Remove cleanups.
3080
3081 2018-09-18  Tom Tromey  <tom@tromey.com>
3082
3083         * compile/compile-object-run.c (do_module_cleanup): Use delete.
3084         * compile/compile-object-load.c (struct munmap_list): Move to
3085         header file.
3086         (munmap_list::add): Rename from munmap_list_add; rewrite.
3087         (munmap_list::~munmap_list): Rename from munmap_list_free.
3088         (munmap_listp_free_cleanup): Remove.
3089         (compile_object_load): Update.
3090         * compile/compile-object-load.h (struct munmap_list): Move from
3091         compile-object-load.c.  Rewrite.
3092
3093 2018-09-18  Alan Hayward  <alan.hayward@arm.com>
3094
3095         * aarch64-tdep.c (pass_in_v): Use register size.
3096         (aarch64_extract_return_value): Likewise.
3097         (aarch64_store_return_value): Likewise.
3098
3099 2018-09-18  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
3100
3101         * utils.c (dump_core) [HAVE_SETRLIMIT]: Cast RLIM_INFINITY to
3102         rlim_t.
3103
3104 2018-09-17  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
3105
3106         * python/lib/gdb/command/frame_filters.py (EnableFrameFilter):
3107         Fix short help line.
3108
3109 2018-09-17  Tom Tromey  <tom@tromey.com>
3110
3111         PR python/20445:
3112         * configure: Rebuild.
3113         * configure.ac: Conditionally use -DNDEBUG for Python.
3114
3115 2018-09-17  Tom Tromey  <tom@tromey.com>
3116
3117         * configure: Rebuild.
3118         * configure.ac: Use gmp as a library dependency when checking for
3119         mpfr.
3120
3121 2018-09-17  Pedro Alves  <palves@redhat.com>
3122
3123         * python/py-inferior.c (find_inferior_object): Delete.
3124
3125 2018-09-17  Simon Marchi  <simon.marchi@ericsson.com>
3126
3127         * compile/compile-cplus-types.c
3128         (compile_cplus_instance::enter_scope): Don't use new_scope after
3129         std::move.
3130
3131 2018-09-17  Tom Tromey  <tom@tromey.com>
3132
3133         * common/pathstuff.c (get_standard_cache_dir): Use
3134         ~/Library/Caches on macOS.
3135         * common/pathstuff.h (get_standard_cache_dir): Update comment.
3136
3137 2018-09-17  Simon Marchi  <simon.marchi@polymtl.ca>
3138
3139         PR python/23669
3140         * breakpoint.c (commands_cmd_element): New.
3141         (_initialize_breakpoint): Assign commands_cmd_element.
3142         * breakpoint.h (commands_cmd_element): New.
3143         * cli/cli-script.c (while_cmd_element, if_command,
3144         define_cmd_element): New.
3145         (command_name_equals): Remove.
3146         (process_next_line): Compare commands by pointer, not by name.
3147         (_initialize_cli_script): Assign the various cmd_list_element
3148         variables.
3149         * compile/compile.c (compile_cmd_element): New.
3150         (_initialize_compile): Assign compile_cmd_element.
3151         * compile/compile.h (compile_cmd_element): New.
3152         * guile/guile.c (guile_cmd_element): New.
3153         (install_gdb_commands): Assign guile_cmd_element.
3154         * guile/guile.h (guile_cmd_element): New.
3155         * python/python.c (python_cmd_element): New.
3156         (_initialize_python): Assign python_cmd_element.
3157         * python/python.h (python_cmd_element): New.
3158         * tracepoint.c (while_stepping_cmd_element): New.
3159         (_initialize_tracepoint): Assign while_stepping_cmd_element.
3160         * tracepoint.h (while_stepping_cmd_element): New.
3161
3162 2018-09-17  Tom Tromey  <tom@tromey.com>
3163
3164         * infrun.c (save_infcall_suspend_state): Return
3165         infcall_suspend_state_up.
3166         (save_infcall_control_state): Return infcall_control_state_up.
3167         * inferior.h (save_infcall_suspend_state)
3168         (save_infcall_control_state): Declare later.  Return unique
3169         pointers.
3170
3171 2018-09-17  Tom Tromey  <tom@tromey.com>
3172
3173         * infrun.c (struct stop_context): Declare constructor,
3174         destructor, "changed" method.
3175         (stop_context::stop_context): Rename from save_stop_context.
3176         (stop_context::~stop_context): Rename from
3177         release_stop_context_cleanup.
3178         (normal_stop): Update.
3179         (stop_context::changed): Rename from stop_context_changed.  Return
3180         bool.
3181
3182 2018-09-17  Tom Tromey  <tom@tromey.com>
3183
3184         * inferior.h (struct infcall_suspend_state_deleter): New.
3185         (infcall_suspend_state_up): New typedef.
3186         (struct infcall_control_state_deleter): New.
3187         (infcall_control_state_up): New typedef.
3188         (make_cleanup_restore_infcall_suspend_state)
3189         (make_cleanup_restore_infcall_control_state): Don't declare.
3190         * infcall.c (call_function_by_hand_dummy): Update.
3191         * infrun.c (do_restore_infcall_suspend_state_cleanup)
3192         (make_cleanup_restore_infcall_suspend_state): Remove.
3193         (do_restore_infcall_control_state_cleanup)
3194         (make_cleanup_restore_infcall_control_state): Remove.
3195
3196 2018-09-17  Tom Tromey  <tom@tromey.com>
3197
3198         * gdbthread.h (struct thread_control_state): Add initializer.
3199         (class thread_info) <control>: Remove initializer.
3200         * inferior.h (struct inferior_control_state): Add initializer.
3201         (class inferior) <control>: Remove initializer.
3202         (exit_inferior_1): Update.
3203         * infrun.c (struct infcall_control_state): Add constructors.
3204         (save_infcall_control_state): Use new.
3205         (restore_infcall_control_state, discard_infcall_control_state):
3206         Use delete.
3207
3208 2018-09-17  Tom Tromey  <tom@tromey.com>
3209
3210         * infrun.c (struct infcall_suspend_state) <registers>: Now a
3211         unique_ptr.
3212         <siginfo_data>: Now a unique_xmalloc_ptr.
3213         (save_infcall_suspend_state, restore_infcall_suspend_state)
3214         (discard_infcall_suspend_state)
3215         (get_infcall_suspend_state_regcache): Update.
3216
3217 2018-09-17  Tom Tromey  <tom@tromey.com>
3218
3219         * gdbthread.h (struct thread_suspend_state): Add initializers.
3220         (class thread_info) <suspend>: Remove initializer.
3221         * infrun.c (struct infcall_suspend_state): Add initializers.
3222         (save_infcall_suspend_state): Use new.
3223         (discard_infcall_suspend_state): Use delete.
3224
3225 2018-09-16  Tom Tromey  <tom@tromey.com>
3226
3227         * python/python-internal.h (CPYCHECKER_STEALS_REFERENCE_TO_ARG):
3228         Remove.
3229         * python/py-varobj.c (py_varobj_iter_ctor): Change pyiter to
3230         rvalue reference.  Remove CPYCHECKER_STEALS_REFERENCE_TO_ARG.
3231         (py_varobj_iter_new): Likewise.
3232         (py_varobj_get_iterator): Use gdbpy_ref.
3233
3234 2018-09-16  Tom Tromey  <tom@tromey.com>
3235
3236         * python/py-threadevent.c (py_get_event_thread): Simplify.
3237         * python/py-inferior.c (infpy_thread_from_thread_handle):
3238         Return immediately after calling thread_to_thread_object.  Use
3239         Py_RETURN_NONE.
3240         (thread_to_thread_object): Set the exception on a NULL return.
3241
3242 2018-09-16  Simon Marchi  <simon.marchi@polymtl.ca>
3243
3244         * Makefile.in (LIBGDB_OBS): Sort COMMON_OBS.
3245
3246 2018-09-16  Tom Tromey  <tom@tromey.com>
3247
3248         * python/python-internal.h (CPYCHECKER_RETURNS_BORROWED_REF):
3249         Remove.
3250
3251 2018-09-16  Tom Tromey  <tom@tromey.com>
3252
3253         * python/python-internal.h (thread_to_thread_object): Change
3254         return type.
3255         * python/py-inferior.c (thread_to_thread_object): Return a new
3256         reference.
3257         (infpy_thread_from_thread_handle): Update.
3258         * python/py-infthread.c (gdbpy_selected_thread): Update.
3259         * python/py-stopevent.c (create_stop_event_object): Update.
3260         * python/py-threadevent.c (py_get_event_thread): Return a new
3261         reference.
3262         (py_get_event_thread): Update.
3263         * python/py-event.h (py_get_event_thread): Change return type.
3264         * python/py-continueevent.c (create_continue_event_object):
3265         Update.
3266
3267 2018-09-16  Tom Tromey  <tom@tromey.com>
3268
3269         * python/py-progspace.c (pspy_get_objfiles): Update.
3270         * python/python-internal.h (objfile_to_objfile_object): Change
3271         return type.
3272         * python/py-newobjfileevent.c (create_new_objfile_event_object):
3273         Update.
3274         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers):
3275         Update.
3276         * python/python.c (gdbpy_get_current_objfile): Update.
3277         (gdbpy_objfiles): Update.
3278         * python/py-objfile.c (objfpy_get_owner, gdbpy_lookup_objfile):
3279         Update.
3280         (objfile_to_objfile_object): Return a new reference.
3281         * python/py-symtab.c (stpy_get_objfile): Update.
3282         * python/py-prettyprint.c (find_pretty_printer_from_objfiles):
3283         Update.
3284
3285 2018-09-16  Tom Tromey  <tom@tromey.com>
3286
3287         * python/py-inferior.c (infpy_get_progspace): Update.
3288         * python/python-internal.h (pspace_to_pspace_object): Change
3289         return type.
3290         * python/py-newobjfileevent.c
3291         (create_clear_objfiles_event_object): Update.
3292         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers):
3293         Update.
3294         * python/python.c (gdbpy_get_current_progspace): Update.
3295         (gdbpy_progspaces): Update.
3296         * python/py-progspace.c (pspace_to_pspace_object): Return a new
3297         reference.
3298         * python/py-objfile.c (objfpy_get_progspace): Update.
3299         * python/py-prettyprint.c (find_pretty_printer_from_progspace):
3300         Update.
3301
3302 2018-09-16  Tom Tromey  <tom@tromey.com>
3303
3304         * python/lib/gdb/__init__.py (current_progspace, objfiles)
3305         (solib_name, block_for_pc, find_pc_line): New functions.
3306         (execute_unwinders): Update.
3307         * python/py-block.c (gdbpy_block_for_pc): Remove.
3308         * python/py-inferior.c (infpy_get_progspace): New function.
3309         (inferior_object_getset) <progspace>: Add.
3310         * python/py-progspace.c (pspy_objfiles): Rewrite.
3311         (pspy_solib_name, pspy_block_for_pc)
3312         (pspy_find_pc_line, pspy_is_valid): New functions.
3313         (progspace_object_methods): Add entries for solib_name,
3314         block_for_pc, find_pc_line, is_valid.
3315         * python/python-internal.h (gdbpy_block_for_pc)
3316         (build_objfiles_list): Don't declare.
3317         * python/python.c: Don't include solib.h.
3318         (gdbpy_solib_name, gdbpy_find_pc_line)
3319         (gdbpy_get_current_progspace, build_objfiles_list)
3320         (gdbpy_objfiles): Remove.
3321         (GdbMethods) <current_progspace, objfiles, block_for_pc,
3322         solib_name, find_pc_line>: Remove entries.
3323
3324 2018-09-16  Tom Tromey  <tom@tromey.com>
3325
3326         * top.c (new_ui_command): Use GNU style for metasyntactic
3327         variables.
3328         * breakpoint.c (stopat_command): Use GNU style for metasyntactic
3329         variables.
3330         * maint.c (maintenance_translate_address): Remove "<>" around
3331         text.
3332         * interps.c (interpreter_exec_cmd): Use GNU style for
3333         metasyntactic variables.
3334         * nto-procfs.c (nto_procfs_target_info): Use GNU style for
3335         metasyntactic variables.
3336         * tracepoint.c (tfind_range_command): Use GNU style for
3337         metasyntactic variables.
3338         (tfind_outside_command): Likewise.
3339         (_initialize_tracepoint): Likewise.
3340         * remote.c (extended_remote_target::create_inferior): Use GNU
3341         style for metasyntactic variables.
3342         * sparc64-tdep.c (adi_examine_command): Use GNU style for
3343         metasyntactic variables.
3344         (adi_assign_command): Likewise.
3345
3346 2018-09-16  Tom Tromey  <tom@tromey.com>
3347
3348         * disasm.c (show_disassembler_options_sfunc): Use GNU style for
3349         metasyntactic variables.  Print message if no disassembler options
3350         are available.
3351
3352 2018-09-15  Tom Tromey  <tom@tromey.com>
3353
3354         * infcmd.c (get_inferior_args): Return const char *.
3355         * inferior.h (get_inferior_args): Return type now const.
3356         * linux-tdep.c (linux_fill_prpsinfo): Update.
3357         * procfs.c (procfs_target::make_corefile_notes): Update.
3358
3359 2018-09-07  Tom Tromey  <tom@tromey.com>
3360
3361         * python/python.c (execute_gdb_command): Call bpstat_do_actions
3362         inside the TRY.
3363
3364 2018-09-14  Sandra Loosemore  <sandra@codesourcery.com>
3365
3366         * nios2-tdep.c (nios2_type_align): New.
3367         (nios2_gdb_arch_init): Install type_align hook.
3368
3369 2018-09-10  Andrew Burgess  <andrew.burgess@embecosm.com>
3370
3371         * eval.c (fake_method::fake_method): Call xzalloc directly for a
3372         type that is neither object file owned, nor gdbarch owned.
3373         * gdbtypes.c (get_type_gdbarch): Add an assert that returned
3374         gdbarch is non-NULL.
3375         (alloc_type_instance): Allocate non-objfile owned types on the
3376         gdbarch obstack.
3377         (copy_type_recursive): Allocate TYPE_FIELDS and TYPE_RANGE_DATA
3378         using TYPE_ALLOC to ensure memory is allocated on the correct
3379         obstack.
3380         * gdbtypes.h (TYPE_ALLOC): Allocate space on either the objfile
3381         obstack, or the gdbarch obstack.
3382         (TYPE_ZALLOC): Rewrite using TYPE_ALLOC.
3383
3384 2018-09-14  Tom Tromey  <tom@tromey.com>
3385
3386         * infcall.c (call_function_by_hand_dummy): Remove unnecessary
3387         block.
3388
3389 2018-09-14  Tom Tromey  <tom@tromey.com>
3390
3391         * nat/fork-inferior.c (get_startup_shell): Remove "static".
3392
3393 2018-09-13  Tom Tromey  <tom@tromey.com>
3394
3395         * python/py-inferior.c (infpy_thread_from_thread_handle): Now
3396         static.
3397
3398 2018-09-13  Tom Tromey  <tom@tromey.com>
3399
3400         * exec.c (try_open_exec_file): Use std::string.
3401
3402 2018-09-13  Tom Tromey  <tom@tromey.com>
3403
3404         * utils.h (gdb_bfd_errmsg): Return std::string.
3405         * exec.c (exec_file_attach): Update.
3406         * compile/compile-object-load.c (compile_object_load): Update.
3407         * utils.c (gdb_bfd_errmsg): Return std::string.
3408
3409 2018-09-13  Tom Tromey  <tom@tromey.com>
3410
3411         * procfs.c (struct procinfo_deleter): New.
3412         (procinfo_up): New typedef.
3413         (do_destroy_procinfo_cleanup): Remove.
3414         (procfs_target::info_proc): Use procinfo_up.  Remove cleanups.
3415
3416 2018-09-13  Tom Tromey  <tom@tromey.com>
3417
3418         * source.c (add_path): Use gdb::unique_xmalloc_ptr.
3419
3420 2018-09-13  Simon Marchi  <simon.marchi@ericsson.com>
3421 2018-09-13  Tom Tromey  <tom@tromey.com>
3422
3423         * python/py-progspace.c (PSPY_REQUIRE_VALID): New macro.
3424         (pspy_get_objfiles): New function.
3425         (progspace_object_methods): New.
3426         (pspace_object_type): Add tp_methods callback.
3427         * python/python-internal.h (build_objfiles_list): New
3428         declaration.
3429         * python/python.c (build_objfiles_list): New function.
3430         (gdbpy_objfiles): Implement using build_objfiles_list.
3431         * NEWS: Mention the Progspace.objfiles method.
3432
3433 2018-09-13  Simon Marchi  <simon.marchi@ericsson.com>
3434
3435         * python/py-inferior.c (infpy_get_progspace): New function.
3436         (inferior_object_getset): Add progspace property.
3437         * NEWS: Mention the new property.
3438
3439 2018-09-13  Tom Tromey  <tom@tromey.com>
3440
3441         PR rust/23650:
3442         * rust-lang.c (rust_evaluate_subexp): Use field name, not "foo".
3443
3444 2018-09-13  Tom Tromey  <tom@tromey.com>
3445
3446         PR rust/23626:
3447         * rust-lang.c (rust_enum_variant): Now static.
3448         (rust_empty_enum_p): New function.
3449         (rust_print_enum, rust_evaluate_subexp, rust_print_struct_def):
3450         Handle empty enum.
3451
3452 2018-09-13  Simon Marchi  <simon.marchi@ericsson.com>
3453
3454         * python/py-inferior.c (infpy_repr): New.
3455         (inferior_object_type): Register infpy_repr.
3456         * python/py-objfile.c (objfpy_repr): New.
3457         (objfile_object_type): Register objfpy_repr.
3458
3459 2018-09-12  John Baldwin  <jhb@FreeBSD.org>
3460
3461         * fbsd-nat.c (fbsd_nat_target::info_proc): Remove unused variable.
3462
3463 2018-09-12  John Baldwin  <jhb@FreeBSD.org>
3464
3465         * aarch64-fbsd-tdep.h (AARCH64_FBSD_SIZEOF_GREGSET): Fix comment
3466         typo.
3467
3468 2018-09-12  Sergio Durigan Junior  <sergiodj@redhat.com>
3469
3470         * common/common-utils.c: Don't include '<sys/stat.h>'.
3471         (is_regular_file): Move to...
3472         * common/filestuff.c (is_regular_file): ... here.
3473         * common/common-utils.h (is_regular_file): Move to...
3474         * common/filestuff.h (is_regular_file): ... here.
3475
3476 2018-09-12  Simon Marchi  <simon.marchi@ericsson.com>
3477
3478         * skip.c (debug_skip): New variable.
3479         (skiplist_entry::do_skip_file_p): Add debug output.
3480         (skiplist_entry::do_skip_gfile_p): Likewise.
3481         (skiplist_entry::skip_function_p): Likewise.
3482         (_initialize_step_skip): Create debug command.
3483         * NEWS: Mention set/show debug skip.
3484
3485 2018-09-11  Xavier Roirand  <roirand@adacore.com>
3486
3487         * darwin-nat.c (should_disable_startup_with_shell):
3488         New function.
3489         (darwin_nat_target::create_inferior): Add call.
3490
3491 2018-09-11  Xavier Roirand  <roirand@adacore.com>
3492
3493         * darwin-nat.h (struct darwin_thread_info) <gdb_port,
3494         inf_port, msg_state>: Initialize.
3495         (struct darwin_thread_info) <signaled, single_step>: Change
3496         type and initialize.
3497         (struct darwin_thread_info) <event>: Initialize.
3498
3499 2018-09-10  Sergio Durigan Junior  <sergiodj@redhat.com>
3500
3501         PR gdb/23555
3502         PR gdb/23558
3503         * gnulib/import/m4/getcwd-path-max.m4: Add cross-compilation
3504         guesses.
3505
3506 2018-09-10  Sergio Durigan Junior  <sergiodj@redhat.com>
3507
3508         Revert:
3509         2018-08-29  Sergio Durigan Junior  <sergiodj@redhat.com>
3510
3511         PR gdb/23555
3512         PR gdb/23558
3513         * gnulib/aclocal.m4: Regenerate.
3514         * gnulib/config.in: Regenerate.
3515         * gnulib/configure: Regenerate.
3516         * gnulib/import/Makefile.am: Update.
3517         * gnulib/import/Makefile.in: Update.
3518         * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
3519         * gnulib/import/_Noreturn.h: ... this.
3520         * gnulib/import/alloca.in.h: Update.
3521         * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
3522         * gnulib/import/arg-nonnull.h: ... this.
3523         * gnulib/import/assure.h: Update.
3524         * gnulib/import/at-func.c: Update.
3525         * gnulib/import/basename-lgpl.c: Update.
3526         * gnulib/import/extra/snippet/c++defs.h: Rename to...
3527         * gnulib/import/c++defs.h: ... this.
3528         * gnulib/import/canonicalize-lgpl.c: Update.
3529         * gnulib/import/cdefs.h: Update.
3530         * gnulib/import/chdir-long.c: Update.
3531         * gnulib/import/chdir-long.h: Update.
3532         * gnulib/import/cloexec.c: Update.
3533         * gnulib/import/cloexec.h: Update.
3534         * gnulib/import/close.c: Update.
3535         * gnulib/import/closedir.c: Update.
3536         * gnulib/import/config.charset: Update.
3537         * gnulib/import/dirent-private.h: Update.
3538         * gnulib/import/dirent.in.h: Update.
3539         * gnulib/import/dirfd.c: Update.
3540         * gnulib/import/dirname-lgpl.c: Update.
3541         * gnulib/import/dirname.h: Update.
3542         * gnulib/import/dosname.h: Update.
3543         * gnulib/import/dup-safer-flag.c: Update.
3544         * gnulib/import/dup-safer.c: Update.
3545         * gnulib/import/dup.c: Update.
3546         * gnulib/import/dup2.c: Update.
3547         * gnulib/import/errno.in.h: Update.
3548         * gnulib/import/error.c: Update.
3549         * gnulib/import/error.h: Update.
3550         * gnulib/import/exitfail.c: Update.
3551         * gnulib/import/exitfail.h: Update.
3552         * gnulib/import/extra/update-copyright: Update.
3553         * gnulib/import/fchdir.c: Update.
3554         * gnulib/import/fcntl.c: Update.
3555         * gnulib/import/fcntl.in.h: Update.
3556         * gnulib/import/fd-hook.c: Update.
3557         * gnulib/import/fd-hook.h: Update.
3558         * gnulib/import/fd-safer-flag.c: Update.
3559         * gnulib/import/fd-safer.c: Update.
3560         * gnulib/import/fdopendir.c: Update.
3561         * gnulib/import/filename.h: Update.
3562         * gnulib/import/filenamecat-lgpl.c: Update.
3563         * gnulib/import/filenamecat.h: Update.
3564         * gnulib/import/flexmember.h: Update.
3565         * gnulib/import/float+.h: Update.
3566         * gnulib/import/float.c: Update.
3567         * gnulib/import/float.in.h: Update.
3568         * gnulib/import/fnmatch.c: Update.
3569         * gnulib/import/fnmatch.in.h: Update.
3570         * gnulib/import/fnmatch_loop.c: Update.
3571         * gnulib/import/fpucw.h: Update.
3572         * gnulib/import/frexp.c: Update.
3573         * gnulib/import/frexpl.c: Update.
3574         * gnulib/import/fstat.c: Update.
3575         * gnulib/import/fstatat.c: Update.
3576         * gnulib/import/getcwd-lgpl.c: Update.
3577         * gnulib/import/getcwd.c: Update.
3578         * gnulib/import/getdtablesize.c: Update.
3579         * gnulib/import/getlogin_r.c: Update.
3580         * gnulib/import/getprogname.c: Update.
3581         * gnulib/import/getprogname.h: Update.
3582         * gnulib/import/gettext.h: Update.
3583         * gnulib/import/gettimeofday.c: Update.
3584         * gnulib/import/glob-libc.h: Update.
3585         * gnulib/import/glob.c: Update.
3586         * gnulib/import/glob.in.h: Update.
3587         * gnulib/import/glob_internal.h: Update.
3588         * gnulib/import/glob_pattern_p.c: Update.
3589         * gnulib/import/globfree.c: Update.
3590         * gnulib/import/hard-locale.c: Update.
3591         * gnulib/import/hard-locale.h: Update.
3592         * gnulib/import/intprops.h: Update.
3593         * gnulib/import/inttypes.in.h: Update.
3594         * gnulib/import/isnan.c: Update.
3595         * gnulib/import/isnand-nolibm.h: Update.
3596         * gnulib/import/isnand.c: Update.
3597         * gnulib/import/isnanl-nolibm.h: Update.
3598         * gnulib/import/isnanl.c: Update.
3599         * gnulib/import/itold.c: Update.
3600         * gnulib/import/libc-config.h: Update.
3601         * gnulib/import/limits.in.h: Update.
3602         * gnulib/import/localcharset.c: Update.
3603         * gnulib/import/localcharset.h: Update.
3604         * gnulib/import/localtime-buffer.c: Update.
3605         * gnulib/import/localtime-buffer.h: Update.
3606         * gnulib/import/lstat.c: Update.
3607         * gnulib/import/m4/00gnulib.m4: Update.
3608         * gnulib/import/m4/__inline.m4: Update.
3609         * gnulib/import/m4/absolute-header.m4: Update.
3610         * gnulib/import/m4/alloca.m4: Update.
3611         * gnulib/import/m4/builtin-expect.m4: Update.
3612         * gnulib/import/m4/canonicalize.m4: Update.
3613         * gnulib/import/m4/chdir-long.m4: Update.
3614         * gnulib/import/m4/close.m4: Update.
3615         * gnulib/import/m4/closedir.m4: Update.
3616         * gnulib/import/m4/configmake.m4: Update.
3617         * gnulib/import/m4/d-ino.m4: Update.
3618         * gnulib/import/m4/d-type.m4: Update.
3619         * gnulib/import/m4/dirent_h.m4: Update.
3620         * gnulib/import/m4/dirfd.m4: Update.
3621         * gnulib/import/m4/dirname.m4: Update.
3622         * gnulib/import/m4/double-slash-root.m4: Update.
3623         * gnulib/import/m4/dup.m4: Update.
3624         * gnulib/import/m4/dup2.m4: Update.
3625         * gnulib/import/m4/eealloc.m4: Update.
3626         * gnulib/import/m4/environ.m4: Update.
3627         * gnulib/import/m4/errno_h.m4: Update.
3628         * gnulib/import/m4/error.m4: Update.
3629         * gnulib/import/m4/exponentd.m4: Update.
3630         * gnulib/import/m4/exponentl.m4: Update.
3631         * gnulib/import/m4/extensions.m4: Update.
3632         * gnulib/import/m4/extern-inline.m4: Update.
3633         * gnulib/import/m4/fchdir.m4: Update.
3634         * gnulib/import/m4/fcntl-o.m4: Update.
3635         * gnulib/import/m4/fcntl.m4: Update.
3636         * gnulib/import/m4/fcntl_h.m4: Update.
3637         * gnulib/import/m4/fdopendir.m4: Update.
3638         * gnulib/import/m4/filenamecat.m4: Update.
3639         * gnulib/import/m4/flexmember.m4: Update.
3640         * gnulib/import/m4/float_h.m4: Update.
3641         * gnulib/import/m4/fnmatch.m4: Update.
3642         * gnulib/import/m4/fnmatch_h.m4: Update.
3643         * gnulib/import/m4/fpieee.m4: Update.
3644         * gnulib/import/m4/frexp.m4: Update.
3645         * gnulib/import/m4/frexpl.m4: Update.
3646         * gnulib/import/m4/fstat.m4: Update.
3647         * gnulib/import/m4/fstatat.m4: Update.
3648         * gnulib/import/m4/getcwd-abort-bug.m4: Update.
3649         * gnulib/import/m4/getcwd-path-max.m4: Update.
3650         * gnulib/import/m4/getcwd.m4: Update.
3651         * gnulib/import/m4/getdtablesize.m4: Update.
3652         * gnulib/import/m4/getlogin.m4: Update.
3653         * gnulib/import/m4/getlogin_r.m4: Update.
3654         * gnulib/import/m4/getpagesize.m4: Update.
3655         * gnulib/import/m4/getprogname.m4: Update.
3656         * gnulib/import/m4/gettimeofday.m4: Update.
3657         * gnulib/import/m4/glibc21.m4: Update.
3658         * gnulib/import/m4/glob.m4: Update.
3659         * gnulib/import/m4/glob_h.m4: Update.
3660         * gnulib/import/m4/gnulib-cache.m4: Update.
3661         * gnulib/import/m4/gnulib-common.m4: Update.
3662         * gnulib/import/m4/gnulib-comp.m4: Update.
3663         * gnulib/import/m4/gnulib-tool.m4: Update.
3664         * gnulib/import/m4/hard-locale.m4: Update.
3665         * gnulib/import/m4/include_next.m4: Update.
3666         * gnulib/import/m4/inttypes-pri.m4: Update.
3667         * gnulib/import/m4/inttypes.m4: Update.
3668         * gnulib/import/m4/isnand.m4: Update.
3669         * gnulib/import/m4/isnanl.m4: Update.
3670         * gnulib/import/m4/largefile.m4: Update.
3671         * gnulib/import/m4/limits-h.m4: Update.
3672         * gnulib/import/m4/localcharset.m4: Update.
3673         * gnulib/import/m4/locale-fr.m4: Update.
3674         * gnulib/import/m4/locale-ja.m4: Update.
3675         * gnulib/import/m4/locale-zh.m4: Update.
3676         * gnulib/import/m4/localtime-buffer.m4: Update.
3677         * gnulib/import/m4/longlong.m4: Update.
3678         * gnulib/import/m4/lstat.m4: Update.
3679         * gnulib/import/m4/malloc.m4: Update.
3680         * gnulib/import/m4/malloca.m4: Update.
3681         * gnulib/import/m4/math_h.m4: Update.
3682         * gnulib/import/m4/mbrtowc.m4: Update.
3683         * gnulib/import/m4/mbsinit.m4: Update.
3684         * gnulib/import/m4/mbsrtowcs.m4: Update.
3685         * gnulib/import/m4/mbstate_t.m4: Update.
3686         * gnulib/import/m4/memchr.m4: Update.
3687         * gnulib/import/m4/memmem.m4: Update.
3688         * gnulib/import/m4/mempcpy.m4: Update.
3689         * gnulib/import/m4/memrchr.m4: Update.
3690         * gnulib/import/m4/mkdir.m4: Update.
3691         * gnulib/import/m4/mkstemp.m4: Update.
3692         * gnulib/import/m4/mmap-anon.m4: Update.
3693         * gnulib/import/m4/mode_t.m4: Update.
3694         * gnulib/import/m4/msvc-inval.m4: Update.
3695         * gnulib/import/m4/msvc-nothrow.m4: Update.
3696         * gnulib/import/m4/multiarch.m4: Update.
3697         * gnulib/import/m4/nocrash.m4: Update.
3698         * gnulib/import/m4/off_t.m4: Update.
3699         * gnulib/import/m4/onceonly.m4: Update.
3700         * gnulib/import/m4/open-cloexec.m4: Update.
3701         * gnulib/import/m4/open.m4: Update.
3702         * gnulib/import/m4/openat.m4: Update.
3703         * gnulib/import/m4/opendir.m4: Update.
3704         * gnulib/import/m4/pathmax.m4: Update.
3705         * gnulib/import/m4/rawmemchr.m4: Update.
3706         * gnulib/import/m4/readdir.m4: Update.
3707         * gnulib/import/m4/readlink.m4: Update.
3708         * gnulib/import/m4/realloc.m4: Update.
3709         * gnulib/import/m4/rename.m4: Update.
3710         * gnulib/import/m4/rewinddir.m4: Update.
3711         * gnulib/import/m4/rmdir.m4: Update.
3712         * gnulib/import/m4/save-cwd.m4: Update.
3713         * gnulib/import/m4/secure_getenv.m4: Update.
3714         * gnulib/import/m4/setenv.m4: Update.
3715         * gnulib/import/m4/signal_h.m4: Update.
3716         * gnulib/import/m4/ssize_t.m4: Update.
3717         * gnulib/import/m4/stat-time.m4: Update.
3718         * gnulib/import/m4/stat.m4: Update.
3719         * gnulib/import/m4/std-gnu11.m4: Update.
3720         * gnulib/import/m4/stdbool.m4: Update.
3721         * gnulib/import/m4/stddef_h.m4: Update.
3722         * gnulib/import/m4/stdint.m4: Update.
3723         * gnulib/import/m4/stdio_h.m4: Update.
3724         * gnulib/import/m4/stdlib_h.m4: Update.
3725         * gnulib/import/m4/strchrnul.m4: Update.
3726         * gnulib/import/m4/strdup.m4: Update.
3727         * gnulib/import/m4/strerror.m4: Update.
3728         * gnulib/import/m4/string_h.m4: Update.
3729         * gnulib/import/m4/strstr.m4: Update.
3730         * gnulib/import/m4/strtok_r.m4: Update.
3731         * gnulib/import/m4/sys_socket_h.m4: Update.
3732         * gnulib/import/m4/sys_stat_h.m4: Update.
3733         * gnulib/import/m4/sys_time_h.m4: Update.
3734         * gnulib/import/m4/sys_types_h.m4: Update.
3735         * gnulib/import/m4/tempname.m4: Update.
3736         * gnulib/import/m4/time_h.m4: Update.
3737         * gnulib/import/m4/unistd-safer.m4: Update.
3738         * gnulib/import/m4/unistd_h.m4: Update.
3739         * gnulib/import/m4/warn-on-use.m4: Update.
3740         * gnulib/import/m4/wchar_h.m4: Update.
3741         * gnulib/import/m4/wchar_t.m4: Update.
3742         * gnulib/import/m4/wctype_h.m4: Update.
3743         * gnulib/import/m4/wint_t.m4: Update.
3744         * gnulib/import/malloc.c: Update.
3745         * gnulib/import/malloc/scratch_buffer.h: Update.
3746         * gnulib/import/malloc/scratch_buffer_grow.c: Update.
3747         * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
3748         * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
3749         * gnulib/import/malloca.c: Update.
3750         * gnulib/import/malloca.h: Update.
3751         * gnulib/import/malloca.valgrind: Update.
3752         * gnulib/import/math.in.h: Update.
3753         * gnulib/import/mbrtowc.c: Update.
3754         * gnulib/import/mbsinit.c: Update.
3755         * gnulib/import/mbsrtowcs-impl.h: Update.
3756         * gnulib/import/mbsrtowcs-state.c: Update.
3757         * gnulib/import/mbsrtowcs.c: Update.
3758         * gnulib/import/memchr.c: Update.
3759         * gnulib/import/memmem.c: Update.
3760         * gnulib/import/mempcpy.c: Update.
3761         * gnulib/import/memrchr.c: Update.
3762         * gnulib/import/mkdir.c: Update.
3763         * gnulib/import/mkstemp.c: Update.
3764         * gnulib/import/msvc-inval.c: Update.
3765         * gnulib/import/msvc-inval.h: Update.
3766         * gnulib/import/msvc-nothrow.c: Update.
3767         * gnulib/import/msvc-nothrow.h: Update.
3768         * gnulib/import/open.c: Update.
3769         * gnulib/import/openat-die.c: Update.
3770         * gnulib/import/openat-priv.h: Update.
3771         * gnulib/import/openat-proc.c: Update.
3772         * gnulib/import/openat.c: Update.
3773         * gnulib/import/openat.h: Update.
3774         * gnulib/import/opendir.c: Update.
3775         * gnulib/import/pathmax.h: Update.
3776         * gnulib/import/pipe-safer.c: Update.
3777         * gnulib/import/rawmemchr.c: Update.
3778         * gnulib/import/readdir.c: Update.
3779         * gnulib/import/readlink.c: Update.
3780         * gnulib/import/realloc.c: Update.
3781         * gnulib/import/ref-add.sin: Update.
3782         * gnulib/import/ref-del.sin: Update.
3783         * gnulib/import/rename.c: Update.
3784         * gnulib/import/rewinddir.c: Update.
3785         * gnulib/import/rmdir.c: Update.
3786         * gnulib/import/same-inode.h: Update.
3787         * gnulib/import/save-cwd.c: Update.
3788         * gnulib/import/save-cwd.h: Update.
3789         * gnulib/import/scratch_buffer.h: Update.
3790         * gnulib/import/secure_getenv.c: Update.
3791         * gnulib/import/setenv.c: Update.
3792         * gnulib/import/signal.in.h: Update.
3793         * gnulib/import/stat-time.c: Update.
3794         * gnulib/import/stat-time.h: Update.
3795         * gnulib/import/stat-w32.c: Update.
3796         * gnulib/import/stat-w32.h: Update.
3797         * gnulib/import/stat.c: Update.
3798         * gnulib/import/stdbool.in.h: Update.
3799         * gnulib/import/stddef.in.h: Update.
3800         * gnulib/import/stdint.in.h: Update.
3801         * gnulib/import/stdio.in.h: Update.
3802         * gnulib/import/stdlib.in.h: Update.
3803         * gnulib/import/str-two-way.h: Update.
3804         * gnulib/import/strchrnul.c: Update.
3805         * gnulib/import/strdup.c: Update.
3806         * gnulib/import/streq.h: Update.
3807         * gnulib/import/strerror-override.c: Update.
3808         * gnulib/import/strerror-override.h: Update.
3809         * gnulib/import/strerror.c: Update.
3810         * gnulib/import/string.in.h: Update.
3811         * gnulib/import/stripslash.c: Update.
3812         * gnulib/import/strnlen1.c: Update.
3813         * gnulib/import/strnlen1.h: Update.
3814         * gnulib/import/strstr.c: Update.
3815         * gnulib/import/strtok_r.c: Update.
3816         * gnulib/import/sys_stat.in.h: Update.
3817         * gnulib/import/sys_time.in.h: Update.
3818         * gnulib/import/sys_types.in.h: Update.
3819         * gnulib/import/tempname.c: Update.
3820         * gnulib/import/tempname.h: Update.
3821         * gnulib/import/time.in.h: Update.
3822         * gnulib/import/unistd--.h: Update.
3823         * gnulib/import/unistd-safer.h: Update.
3824         * gnulib/import/unistd.in.h: Update.
3825         * gnulib/import/unsetenv.c: Update.
3826         * gnulib/import/verify.h: Update.
3827         * gnulib/import/extra/snippet/warn-on-use.h: Update.
3828         * gnulib/import/wchar.in.h: Update.
3829         * gnulib/import/wctype.in.h: Update.
3830         * gnulib/import/xalloc-oversized.h: Update.
3831         * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
3832         "53e2c179f26a890fa6685af4b6c1397ee370433b".
3833
3834 2018-09-10  Simon Marchi  <simon.marchi@ericsson.com>
3835
3836         * record-btrace.c (get_thread_current_frame): Remove
3837         old_inferior_ptid.
3838
3839 2018-09-10  Jerome Guitton  <guitton@adacore.com>
3840
3841         * ada-lang.c (ada_value_struct_elt): Call ada_to_fixed_type
3842         with check_tag to 1 if and only if the type is tagged and the
3843         component being searched cannot been found in the current
3844         view. Otherwise, always call ada_to_fixed_type with
3845         check_tag to 0.
3846
3847 2018-09-10  Xavier Roirand  <roirand@adacore.com>
3848
3849         * ada-lang.c (ada_is_access_to_unconstrained_array): Remove static
3850         declaration.
3851         * ada-lang.h: add ada_is_access_to_unconstrained_array prototype.
3852         * ada-varobj.c (ada_varobj_get_number_of_children,
3853         ada_varobj_describe_child, ada_value_is_changeable_p): Cleanup code.
3854
3855 2018-09-10  Xavier Roirand  <roirand@adacore.com>
3856
3857         * ada-valprint.c (ada_value_print): Use type instead of
3858         enclosing type.
3859
3860 2018-09-10  Xavier Roirand  <roirand@adacore.com>
3861
3862         * ada-lang.c (ada_value_subscript): Handle case when parameter is
3863         an array of access to unconstrained array.
3864
3865 2018-09-10  Xavier Roirand  <roirand@adacore.com>
3866
3867         * ada-lang.c (ada_is_access_to_unconstrained_array): New function.
3868         (ada_check_typedef): Use it.
3869
3870 2018-09-10  Xavier Roirand  <roirand@adacore.com>
3871
3872         * ada-varobj.c (ada_varobj_describe_struct_child)
3873         (ada_varobj_describe_child): Handle union case like struct one.
3874
3875 2018-09-10  Tom Tromey  <tom@tromey.com>
3876
3877         PR python/18380:
3878         * python/python.c (_initialize_python): Make example in "python"
3879         help work in Python 3.
3880
3881 2018-09-10  Eli Zaretskii  <eliz@gnu.org>
3882
3883         * Makefile.in (transformed_name): Use INSTALL_SCRIPT instead of
3884         INSTALL_PROGRAM to install gdb-add-index.sh.  Don't append
3885         $(EXEEXT) to the script, as it is not a program.
3886
3887 2018-09-09  Simon Marchi  <simon.marchi@ericsson.com>
3888
3889         * python/py-prettyprint.c (pretty_print_one_value): Return
3890         gdbpy_ref<>.
3891         (print_string_repr): Adjust.
3892         (apply_varobj_pretty_printer): Return gdbpy_ref<>.
3893         * python/python-internal.h (apply_varobj_pretty_printer): Return
3894         gdbpy_ref<>.
3895         * varobj.c (varobj_value_get_print_value): Adjust.
3896
3897 2018-09-08  Tom Tromey  <tom@tromey.com>
3898
3899         PR python/16047:
3900         * python/py-prettyprint.c (pretty_print_one_value): Check for
3901         to_string method.
3902
3903 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
3904
3905         * ada-lang.c (resolve_subexp): Pass correct OPLEN in call to
3906         replace_operator_with_call.
3907
3908 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
3909
3910         * ada-lang.c (ada_value_cast): Remove unnecessary parentheses.
3911
3912 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
3913
3914         * ada-typeprint.c (print_range): Print the bounds using TYPE
3915         rather than its TYPE_TARGET_TYPE.
3916
3917 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
3918
3919         * ada-lang.c (ada_to_fixed_value): Minor reformatting in
3920         call to ada_to_fixed_value_create.
3921
3922 2018-09-08  Jerome Guitton  <guitton@adacore.com>
3923
3924         * ada-lang.c (ada_decode): strip dot prefix in symbol name.
3925
3926 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
3927
3928         * ada-lang.c (ada_exception_sal): Replace gdb_assert calls
3929         by calls to error.
3930
3931 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
3932
3933         * ada-lang.c (ada_unhandled_exception_name_addr_from_raise):
3934         Move update of loop variable "fi".
3935
3936 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
3937
3938         * ada-lang.c (value_assign_to_component): In the case of
3939         big-endian targets, extract the bits of the given VAL
3940         using an src_offset of zero if container is not a scalar.
3941
3942 2018-09-06  Simon Ser  <contact@emersion.fr>
3943
3944         PR gdb/23105
3945         * fbsd-nat.c (fbsd_nat_target::xfer_partial): Add support for
3946         TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
3947         * fbsd-tdep.c (fbsd_make_note_desc): New.
3948         (fbsd_make_corefile_notes): Write NT_PROCSTAT_AUXV,
3949         NT_PROCSTAT_VMMAP and NT_PROCSTAT_PS_STRINGS notes.
3950         * target.h (enum target_object) Add FreeBSD-specific
3951         TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
3952
3953 2018-09-06  Simon Marchi  <simon.marchi@ericsson.com>
3954
3955         * compile/compile-c.h (generate_c_for_variable_locations):
3956         Change reference to pointer.
3957         * compile/compile-c-support.c (compile_program) <compute>:
3958         Likewise.
3959         * compile/compile-c-symbols.c (generate_vla_size): Likewise.
3960         (generate_c_for_for_one_variable): Likewise
3961         (generate_c_for_variable_locations): Likewise
3962         * compile/compile-c-types.c (compile_c_instance::convert_type):
3963         Likewise
3964         * compile/compile-cplus-symbols.c (convert_one_symbol):
3965         std::move the scope passed to enter_scope.
3966         * compile/compile-cplus-types.c
3967         (compile_cplus_instance::enter_scope): Make parameter
3968         rvalue-reference.
3969         (compile_cplus_instance::new_scope): Change reference to
3970         pointer.
3971         (compile_cplus_instance::convert_type): Likewise
3972         (compile_cplus_convert_typedef): std::move the scope passed to
3973         enter_scope.
3974         (compile_cplus_convert_struct_or_union): Likewise.
3975         (compile_cplus_convert_enum): Likewise.
3976         (compile_cplus_convert_namespace): Likewise.
3977         * compile/compile-cplus.h (compile_cplus_instance)
3978         <enter_scope>: Make parameter rvalue-reference.
3979         * compile/compile-internal.h (compile_instance)
3980         <get_cached_type>: Likewise
3981         * compile/compile-loc2c.c (push): Likewise
3982         (pushf): Likewise
3983         (unary): Likewise
3984         (binary): Likewise
3985         (print_label): Likewise
3986         (pushf_register_address): Likewise
3987         (pushf_register): Likewise
3988         (do_compile_dwarf_expr_to_c): Likewise
3989         (compile_dwarf_expr_to_c): Likewise
3990         (compile_dwarf_bounds_to_c): Likewise
3991         * compile/compile.c (compile_instance::get_cached_type):
3992         Likewise
3993         * compile/compile.h (compile_dwarf_expr_to_c): Likewise.
3994         (compile_dwarf_bounds_to_c): Likewise
3995         * dwarf2loc.c (locexpr_generate_c_location): Likewise.
3996         (dwarf2_compile_property_to_c): Likewise
3997         * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise
3998         * symtab.h (struct symbol_computed_ops) <generate_c_location>:
3999         Likewise
4000
4001 2018-09-06  Simon Marchi  <simon.marchi@ericsson.com>
4002
4003         * tui/tui-data.h (struct tui_win_element) <highlight>: Remove.
4004         * tui/tui-data.c (init_content_element): Don't initialize it.
4005
4006 2018-09-06  Simon Marchi  <simon.marchi@ericsson.com>
4007
4008         * tui/tui-data.h (struct tui_win_info)
4009         <detail::opaque>: Remove.
4010         * tui/tui-data.c (init_win_info): Remove assignment.
4011
4012 2018-09-05  Tom Tromey  <tom@tromey.com>
4013
4014         * warning.m4 (AM_GDB_WARNINGS): Add -Wformat when testing
4015         -Wformat-nonliteral.
4016         * target-float.c (host_float_ops<T>::to_string)
4017         (host_float_ops<T>::from_string): Use
4018         DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
4019         * configure: Rebuild.
4020
4021 2018-09-05  Simon Marchi  <simon.marchi@ericsson.com>
4022
4023         * printcmd.c (printf_c_string): Use
4024         DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
4025         (printf_wide_c_string, printf_pointer, ui_printf): Likewise.
4026
4027 2018-09-05  Tom Tromey  <tom@tromey.com>
4028
4029         * cli/cli-cmds.c (shell_escape, edit_command): Remove cast.
4030
4031 2018-09-05  Tom de Vries  <tdevries@suse.de>
4032
4033         * dwarf2loc.c (sect_variable_value): Call indirect_synthetic_pointer
4034         with resolve_abstract_p == true.
4035         (indirect_synthetic_pointer): Add resolve_abstract_p parameter,
4036         defaulting to false. Propagate resolve_abstract_p to
4037         dwarf2_fetch_die_loc_sect_off.
4038         * dwarf2loc.h (dwarf2_fetch_die_loc_sect_off): Add resolve_abstract_p
4039         parameter, defaulting to false.
4040         * dwarf2read.c (read_variable): Add variable to abstract_to_concrete.
4041         (dwarf2_fetch_die_loc_sect_off): Add and handle resolve_abstract_p
4042         parameter.
4043         * dwarf2read.h (struct die_info): Forward-declare.
4044         (die_info_ptr): New typedef.
4045         (struct dwarf2_per_objfile): Add abstract_to_concrete field.
4046
4047 2018-09-05  Joel Brobecker  <brobecker@adacore.com>
4048
4049         GDB 8.2 released.
4050
4051 2018-09-04  Sergio Durigan Junior  <sergiodj@redhat.com>
4052             Pedro Alves  <palves@redhat.com>
4053
4054         * gnulib/Makefile.in (aclocal_m4_deps): Move to
4055         "aclocal-m4-deps.mk".  Include file here.
4056         $(srcdir)/aclocal.m4: Add "configure.ac".
4057         * gnulib/aclocal-m4-deps.mk: New file.
4058         * gnulib/update-gnulib.sh: Automatically update
4059         "aclocal-m4-deps.mk".
4060
4061 2018-09-04  Tom Tromey  <tom@tromey.com>
4062
4063         * configure: Rebuild.
4064         * configure.ac: Remove multi-ice code.
4065
4066 2018-09-04  Tom Tromey  <tom@tromey.com>
4067
4068         * Makefile.in (GDB_WARN_CFLAGS_NO_DEFS): Remove.
4069         (ada-exp.o): Update.
4070
4071 2018-09-04  Tom Tromey  <tom@tromey.com>
4072
4073         * Makefile.in (printcmd.o, target-float.o): Remove.
4074         (GDB_WARN_CFLAGS_NO_FORMAT): Remove.
4075
4076 2018-09-04  Tom Tromey  <tom@tromey.com>
4077
4078         * gnulib/Makefile.in: Remove obsolete comment.
4079         * Makefile.in: Remove obsolete comment.
4080
4081 2018-09-04  Andrew Burgess  <andrew.burgess@embecosm.com>
4082
4083         * riscv-tdep.c (riscv_frame_cache): Fix ARI warning, don't end a
4084         line with '+'.
4085
4086 2018-09-03  Andrew Burgess  <andrew.burgess@embecosm.com>
4087
4088         * riscv-tdep.c: Add 'prologue-value.h' include.
4089         (struct riscv_unwind_cache): New struct.
4090         (riscv_debug_unwinder): New global.
4091         (riscv_scan_prologue): Update arguments, capture register details
4092         from prologue scan.
4093         (riscv_skip_prologue): Reformat arguments line, move end of
4094         prologue calculation into riscv_scan_prologue.
4095         (riscv_frame_cache): Update return type, create
4096         riscv_unwind_cache, scan the prologue, and fill in remaining cache
4097         details.
4098         (riscv_frame_this_id): Use frame id computed in riscv_frame_cache.
4099         (riscv_frame_prev_register): Use the trad_frame within the
4100         riscv_unwind_cache.
4101         (_initialize_riscv_tdep): Add 'set/show debug riscv unwinder'
4102         flag.
4103
4104 2018-09-03  Andrew Burgess  <andrew.burgess@embecosm.com>
4105
4106         * trad-frame.h (trad_frame_set_realreg): Declare.
4107         (trad_frame_set_addr): Declare.
4108         * trad-frame.c (trad_frame_set_realreg): Define new function.
4109         (trad_frame_set_addr): Define new function.
4110         (trad_frame_set_reg_realreg): Use new function.
4111         (trad_frame_set_reg_addr): Use new function.
4112
4113 2018-09-01  Keith Seitz  <keiths@redhat.com>
4114
4115         * compile/compile-cplus-types.c (compile_cplus_debug_output_1): Use
4116         pulongest instead of "%lld".
4117         * compile/compile-cplus-symbols.c (gcc_cplus_convert_symbol): Remove
4118         ATTRIBUTE_UNUSED.
4119
4120 2018-08-31  Tom Tromey  <tom@tromey.com>
4121
4122         * dwarf2read.c (dwarf2_add_field): Set the TYPE_LENGTH of the
4123         variant part type.
4124
4125 2018-08-31  Pedro Alves  <palves@redhat.com>
4126
4127         * gdbarch.h: Regenerate.
4128
4129 2018-08-31  Pedro Alves  <palves@redhat.com>
4130
4131         * gdbarch.sh (have_nonsteppable_watchpoint): Add comment.
4132         * target.h (Hardware watchpoint interfaces): Describe
4133         continuable/steppable/non-steppable watchpoints.
4134         * gdbarch.h, gdbarch.c: Regenerate.
4135
4136 2018-08-31  Pedro Alves  <palves@redhat.com>
4137
4138         * nto-procfs.c (nto_procfs_target::have_continuable_watchpoint):
4139         Delete.
4140         * s390-linux-nat.c
4141         (s390_linux_nat_target::have_continuable_watchpoint): Delete.
4142         * target.h (target_ops::have_continuable_watchpoint): Delete.
4143         (target_have_continuable_watchpoint): Delete.
4144         * x86-nat.h (x86_nat_target::have_continuable_watchpoint): Delete.
4145         * target-delegates.c: Regenerate.
4146
4147 2018-08-31  Sergio Durigan Junior  <sergiodj@redhat.com>
4148
4149         * gnulib/Makefile.in (aclocal_m4_deps): Update according to
4150         the files present in "gnulib/import/m4/".
4151
4152 2018-08-30  Andrew Burgess  <andrew.burgess@embecosm.com>
4153
4154         * riscv-tdep.c (riscv_insn::decode): Decode c.addi4spn, c.sd,
4155         c.sw, c.swsp, and c.sdsp.
4156
4157 2018-08-30  Andrew Burgess  <andrew.burgess@embecosm.com>
4158
4159         * riscv-tdep.c (struct riscv_inferior_data): Delete.
4160         (riscv_read_misa_reg): Don't cache value read into inferior data.
4161         (riscv_new_inferior_data): Delete.
4162         (riscv_inferior_data_cleanup): Delete.
4163         (riscv_inferior_data): Delete.
4164         (riscv_invalidate_inferior_data): Delete.
4165         (_initialize_riscv_tdep): Remove initialisation of inferior data.
4166
4167 2018-08-30  Simon Marchi  <simon.marchi@ericsson.com>
4168
4169         * compile/compile-cplus-types.c
4170         (compile_cplus_instance::leave_scope): Take the address of scope
4171         object.
4172         (compile_cplus_instance::convert_qualified_base): Compare quals
4173         to 0.
4174
4175 2018-08-30  Keith Seitz  <keiths@redhat.com>
4176
4177         * compile/compile-cplus-types.c (compile_cplus_instance::enter_scope):
4178         Use "%s" and host_address_to_string instead of "%p" in printf.
4179
4180 2018-08-29  Keith Seitz  <keiths@redhat.com>
4181
4182         * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Add compile-cplus-symbols.c
4183         and compile-cplus-types.c.
4184         (HFILES_NO_SRCDIR): Add gcc-cp-plugin.h.
4185         * c-lang.c (cplus_language_defn): Set C++ compile functions.
4186         * c-lang.h (cplus_get_compile_context, cplus_compute_program):
4187         Declare.
4188         * compile/compile-c-support.c: Include compile-cplus.h.
4189         (load_libcompile): Templatize.
4190         (get_compile_context): "New" function.
4191         (c_get_compile_context): Use get_compile_context.
4192         (cplus_get_compile_context): New function.
4193         (cplus_push_user_expression, cplus_pop_user_expression)
4194         (cplus_add_code_header, cplus_add_input, cplus_compile_program)
4195         (cplus_compute_program): Define new structs/functions.
4196         * compile/compile-cplus-symmbols.c: New file.
4197         * compile/compile-cplus-types.c: New file.
4198         * compile/compile-cplus.h: New file.
4199         * compile/compile-internal.h (debug_compile_oracle, GCC_TYPE_NONE):
4200         Declare.
4201         * compile/compile-object-load.c (get_out_value_type): Use
4202         strncmp_iw when comparing symbol names.
4203         (compile_object_load): Add mst_bss and mst_data.
4204         * compile/compile.c (_initialize_compile): Remove
4205         -Wno-implicit-function-declaration from `compile_args'.
4206         * compile/gcc-cp-plugin.h: New file.
4207         * NEWS: Mention C++ compile support and new debug options.
4208
4209 2018-08-29  Keith Seitz  <keiths@redhat.com>
4210
4211         * linespec.c (collect_info::add_symbol): Make virtual.
4212         (struct symbol_searcher_collect_info): New struct.
4213         (symbol_searcher::find_all_symbols): New method.
4214         * symtab.h (class symbol_searcher): New class.
4215
4216 2018-08-29  Keith Seitz  <keiths@redhat.com>
4217
4218         * linespec.c (struct linespec) <function_symbols, label_symbols>:
4219         Change to vector of block_symbol.  Update all users.
4220         (struct collect_info) <symbols>: Likewise.
4221         (collect_info::add_symbol): Take block_symbol as argument.
4222         Update all callers.
4223         (decode_compound_collector) <m_symbols>: Change type to vector
4224         of block_symbol.  Update all users.
4225         (decode_compound_collector::operator ()): Change parameter type
4226         to block_symbol.
4227         (find_method, find_function_symbols, find_linespec_symbols)
4228         (find_label_symbols_in_block, find_label_symbols): Change symbol
4229         vectors to block_symbol vectors.
4230         * symtab.h (symbol_found_callback_ftype): Change parameter type to
4231         block_symbol.
4232
4233 2018-08-29  Keith Seitz  <keiths@redhat.com>
4234
4235         * linespec.c (symbolp): Remove typedef and VEC definitions.
4236         (bound_minimal_symbol_d): Likewise.
4237
4238 2018-08-29  Keith Seitz  <keiths@redhat.com>
4239
4240         * linespec.c (decode_compound_collector::decode_compound_collector):
4241         Remove initialization for `m_symtabs'.
4242         (decode_compound_collector::release_symbols): Change return type
4243         to std::vector.  Update all callers.
4244         (class decode_compound_collector) <m_symbols>: Change type to
4245         std::vector.
4246         (lookup_prefix_sym): Change return type to std::vector.  Update all
4247         callers.
4248         (compare_symbols): Remove.
4249         (std_compare_symbols): Rename to `compare_symbols'.
4250         (find_method): Change `sym_classes' parameter to std::vector.
4251         Update all callers.  Use std::sort to sort sym_classes.
4252         (find_linespec_symbols): Remove cleanup.
4253
4254 2018-08-29  Keith Seitz  <keiths@redhat.com>
4255
4256         * linespec.c (struct linespec) <minimal_symbols>: Change type to
4257         std::vector.  Update all users.
4258         (convert_linespec_to_sals): Use std::sort to sort minimal symbols.
4259         (struct collect_info) <minimal_symbols>: Likewise.
4260         (compare_msymbols): Return bool.  Change parameters to const
4261         bound_minimal_symbol references.
4262         (find_method, find_function_symbols, find_linespec_symbols): Change
4263         `minsyms' parameter to std::vector.  Update all callers.
4264
4265 2018-08-29  Keith Seitz  <keiths@redhat.com>
4266
4267         * linespec.c (struct linespec) <label_symbols>: Change type to
4268         std::vector.  Update all users.
4269         (find_label_symbols_in_block): Change `result' parameter to
4270         std::vector.  Update all callers.
4271         (find_label_symbols): Return std::vector.  Update all callers.
4272
4273 2018-08-29  Keith Seitz  <keiths@redhat.com>
4274
4275         * linespec.c (struct linespec) <function_symbols>: Change type to
4276         std::vector.  Update all users.
4277         (struct collect_info) <function_symbols>: Likewise.
4278         (convert_linespec_to_sals): Use std::sort to sort function_symbols.
4279         (std_compare_symbols): New function.
4280         (find_method, find_function_symbols, find_linespec_symbols)
4281         (find_label_symbols_in_block): Change `symbols' parameter to
4282         std::vector.  Update all callers.
4283         (find_label_symbols): Likewise for `function_symbols' and
4284         `label_funcs_ret'.
4285
4286 2018-08-29  Keith Seitz  <keiths@redhat.com>
4287
4288         * linespec.c (symtab_vector_up): Define.
4289         (struct linespec) <file_symtabs>: Change type to std::vector *.
4290         Update all uses.
4291         (struct collect_info) <file_symtabs>: Likewise.
4292         (collect_symtabs_from_filename): Return symtab_vector_up.
4293         Update all callers.
4294         (decode_objc): Remove cleanup.
4295         (symtab_collector::symtab_collector): Initialize `m_symtabs'.
4296         (symtab_collector::release_symtabs): Return symtab_vector_up.
4297         Update all callers.
4298         (class symtab_collector) <m_symtabs>: Change type to symtab_vector_up.
4299         Update all users.
4300         (collect_symtabs_from_filename, symtabs_from_filename): Return
4301         symtab_vector_up.  Update all callers.
4302
4303 2018-08-29  Tom Tromey  <tom@tromey.com>
4304
4305         * csky-tdep.c (csky_analyze_prologue): Use
4306         core_addr_to_string_nz.
4307
4308 2018-08-29  Tom Tromey  <tom@tromey.com>
4309
4310         * windows-nat.c (struct xlate_exception) <them>: Change type to
4311         DWORD.
4312         (xlate): Fix formatting.  Remove last entry.
4313         (struct xlate_exception, xlate): Comment out.
4314         (windows_nat_target::resume): Use ranged for.
4315
4316 2018-08-29  Jim Wilson  <jimw@sifive.com>
4317
4318         * riscv-linux-nat.c: Include elf/common.h instead of elf.h.
4319         (riscv_linux_nat_target::fetch_registers): Use NT_FPREGSET instead
4320         of NT_PRFPREG.
4321         (riscv_linux_nat_target::store_registers): Likewise.
4322
4323 2018-08-29  Sergio Durigan Junior  <sergiodj@redhat.com>
4324
4325         PR gdb/23555
4326         PR gdb/23558
4327         * gnulib/aclocal.m4: Regenerate.
4328         * gnulib/config.in: Regenerate.
4329         * gnulib/configure: Regenerate.
4330         * gnulib/import/Makefile.am: Update.
4331         * gnulib/import/Makefile.in: Update.
4332         * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
4333         * gnulib/import/_Noreturn.h: ... this.
4334         * gnulib/import/alloca.in.h: Update.
4335         * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
4336         * gnulib/import/arg-nonnull.h: ... this.
4337         * gnulib/import/assure.h: Update.
4338         * gnulib/import/at-func.c: Update.
4339         * gnulib/import/basename-lgpl.c: Update.
4340         * gnulib/import/extra/snippet/c++defs.h: Rename to...
4341         * gnulib/import/c++defs.h: ... this.
4342         * gnulib/import/canonicalize-lgpl.c: Update.
4343         * gnulib/import/cdefs.h: Update.
4344         * gnulib/import/chdir-long.c: Update.
4345         * gnulib/import/chdir-long.h: Update.
4346         * gnulib/import/cloexec.c: Update.
4347         * gnulib/import/cloexec.h: Update.
4348         * gnulib/import/close.c: Update.
4349         * gnulib/import/closedir.c: Update.
4350         * gnulib/import/config.charset: Update.
4351         * gnulib/import/dirent-private.h: Update.
4352         * gnulib/import/dirent.in.h: Update.
4353         * gnulib/import/dirfd.c: Update.
4354         * gnulib/import/dirname-lgpl.c: Update.
4355         * gnulib/import/dirname.h: Update.
4356         * gnulib/import/dosname.h: Update.
4357         * gnulib/import/dup-safer-flag.c: Update.
4358         * gnulib/import/dup-safer.c: Update.
4359         * gnulib/import/dup.c: Update.
4360         * gnulib/import/dup2.c: Update.
4361         * gnulib/import/errno.in.h: Update.
4362         * gnulib/import/error.c: Update.
4363         * gnulib/import/error.h: Update.
4364         * gnulib/import/exitfail.c: Update.
4365         * gnulib/import/exitfail.h: Update.
4366         * gnulib/import/extra/update-copyright: Update.
4367         * gnulib/import/fchdir.c: Update.
4368         * gnulib/import/fcntl.c: Update.
4369         * gnulib/import/fcntl.in.h: Update.
4370         * gnulib/import/fd-hook.c: Update.
4371         * gnulib/import/fd-hook.h: Update.
4372         * gnulib/import/fd-safer-flag.c: Update.
4373         * gnulib/import/fd-safer.c: Update.
4374         * gnulib/import/fdopendir.c: Update.
4375         * gnulib/import/filename.h: Update.
4376         * gnulib/import/filenamecat-lgpl.c: Update.
4377         * gnulib/import/filenamecat.h: Update.
4378         * gnulib/import/flexmember.h: Update.
4379         * gnulib/import/float+.h: Update.
4380         * gnulib/import/float.c: Update.
4381         * gnulib/import/float.in.h: Update.
4382         * gnulib/import/fnmatch.c: Update.
4383         * gnulib/import/fnmatch.in.h: Update.
4384         * gnulib/import/fnmatch_loop.c: Update.
4385         * gnulib/import/fpucw.h: Update.
4386         * gnulib/import/frexp.c: Update.
4387         * gnulib/import/frexpl.c: Update.
4388         * gnulib/import/fstat.c: Update.
4389         * gnulib/import/fstatat.c: Update.
4390         * gnulib/import/getcwd-lgpl.c: Update.
4391         * gnulib/import/getcwd.c: Update.
4392         * gnulib/import/getdtablesize.c: Update.
4393         * gnulib/import/getlogin_r.c: Update.
4394         * gnulib/import/getprogname.c: Update.
4395         * gnulib/import/getprogname.h: Update.
4396         * gnulib/import/gettext.h: Update.
4397         * gnulib/import/gettimeofday.c: Update.
4398         * gnulib/import/glob-libc.h: Update.
4399         * gnulib/import/glob.c: Update.
4400         * gnulib/import/glob.in.h: Update.
4401         * gnulib/import/glob_internal.h: Update.
4402         * gnulib/import/glob_pattern_p.c: Update.
4403         * gnulib/import/globfree.c: Update.
4404         * gnulib/import/hard-locale.c: Update.
4405         * gnulib/import/hard-locale.h: Update.
4406         * gnulib/import/intprops.h: Update.
4407         * gnulib/import/inttypes.in.h: Update.
4408         * gnulib/import/isnan.c: Update.
4409         * gnulib/import/isnand-nolibm.h: Update.
4410         * gnulib/import/isnand.c: Update.
4411         * gnulib/import/isnanl-nolibm.h: Update.
4412         * gnulib/import/isnanl.c: Update.
4413         * gnulib/import/itold.c: Update.
4414         * gnulib/import/libc-config.h: Update.
4415         * gnulib/import/limits.in.h: Update.
4416         * gnulib/import/localcharset.c: Update.
4417         * gnulib/import/localcharset.h: Update.
4418         * gnulib/import/localtime-buffer.c: Update.
4419         * gnulib/import/localtime-buffer.h: Update.
4420         * gnulib/import/lstat.c: Update.
4421         * gnulib/import/m4/00gnulib.m4: Update.
4422         * gnulib/import/m4/__inline.m4: Update.
4423         * gnulib/import/m4/absolute-header.m4: Update.
4424         * gnulib/import/m4/alloca.m4: Update.
4425         * gnulib/import/m4/builtin-expect.m4: Update.
4426         * gnulib/import/m4/canonicalize.m4: Update.
4427         * gnulib/import/m4/chdir-long.m4: Update.
4428         * gnulib/import/m4/close.m4: Update.
4429         * gnulib/import/m4/closedir.m4: Update.
4430         * gnulib/import/m4/configmake.m4: Update.
4431         * gnulib/import/m4/d-ino.m4: Update.
4432         * gnulib/import/m4/d-type.m4: Update.
4433         * gnulib/import/m4/dirent_h.m4: Update.
4434         * gnulib/import/m4/dirfd.m4: Update.
4435         * gnulib/import/m4/dirname.m4: Update.
4436         * gnulib/import/m4/double-slash-root.m4: Update.
4437         * gnulib/import/m4/dup.m4: Update.
4438         * gnulib/import/m4/dup2.m4: Update.
4439         * gnulib/import/m4/eealloc.m4: Update.
4440         * gnulib/import/m4/environ.m4: Update.
4441         * gnulib/import/m4/errno_h.m4: Update.
4442         * gnulib/import/m4/error.m4: Update.
4443         * gnulib/import/m4/exponentd.m4: Update.
4444         * gnulib/import/m4/exponentl.m4: Update.
4445         * gnulib/import/m4/extensions.m4: Update.
4446         * gnulib/import/m4/extern-inline.m4: Update.
4447         * gnulib/import/m4/fchdir.m4: Update.
4448         * gnulib/import/m4/fcntl-o.m4: Update.
4449         * gnulib/import/m4/fcntl.m4: Update.
4450         * gnulib/import/m4/fcntl_h.m4: Update.
4451         * gnulib/import/m4/fdopendir.m4: Update.
4452         * gnulib/import/m4/filenamecat.m4: Update.
4453         * gnulib/import/m4/flexmember.m4: Update.
4454         * gnulib/import/m4/float_h.m4: Update.
4455         * gnulib/import/m4/fnmatch.m4: Update.
4456         * gnulib/import/m4/fnmatch_h.m4: Update.
4457         * gnulib/import/m4/fpieee.m4: Update.
4458         * gnulib/import/m4/frexp.m4: Update.
4459         * gnulib/import/m4/frexpl.m4: Update.
4460         * gnulib/import/m4/fstat.m4: Update.
4461         * gnulib/import/m4/fstatat.m4: Update.
4462         * gnulib/import/m4/getcwd-abort-bug.m4: Update.
4463         * gnulib/import/m4/getcwd-path-max.m4: Update.
4464         * gnulib/import/m4/getcwd.m4: Update.
4465         * gnulib/import/m4/getdtablesize.m4: Update.
4466         * gnulib/import/m4/getlogin.m4: Update.
4467         * gnulib/import/m4/getlogin_r.m4: Update.
4468         * gnulib/import/m4/getpagesize.m4: Update.
4469         * gnulib/import/m4/getprogname.m4: Update.
4470         * gnulib/import/m4/gettimeofday.m4: Update.
4471         * gnulib/import/m4/glibc21.m4: Update.
4472         * gnulib/import/m4/glob.m4: Update.
4473         * gnulib/import/m4/glob_h.m4: Update.
4474         * gnulib/import/m4/gnulib-cache.m4: Update.
4475         * gnulib/import/m4/gnulib-common.m4: Update.
4476         * gnulib/import/m4/gnulib-comp.m4: Update.
4477         * gnulib/import/m4/gnulib-tool.m4: Update.
4478         * gnulib/import/m4/hard-locale.m4: Update.
4479         * gnulib/import/m4/include_next.m4: Update.
4480         * gnulib/import/m4/inttypes-pri.m4: Update.
4481         * gnulib/import/m4/inttypes.m4: Update.
4482         * gnulib/import/m4/isnand.m4: Update.
4483         * gnulib/import/m4/isnanl.m4: Update.
4484         * gnulib/import/m4/largefile.m4: Update.
4485         * gnulib/import/m4/limits-h.m4: Update.
4486         * gnulib/import/m4/localcharset.m4: Update.
4487         * gnulib/import/m4/locale-fr.m4: Update.
4488         * gnulib/import/m4/locale-ja.m4: Update.
4489         * gnulib/import/m4/locale-zh.m4: Update.
4490         * gnulib/import/m4/localtime-buffer.m4: Update.
4491         * gnulib/import/m4/longlong.m4: Update.
4492         * gnulib/import/m4/lstat.m4: Update.
4493         * gnulib/import/m4/malloc.m4: Update.
4494         * gnulib/import/m4/malloca.m4: Update.
4495         * gnulib/import/m4/math_h.m4: Update.
4496         * gnulib/import/m4/mbrtowc.m4: Update.
4497         * gnulib/import/m4/mbsinit.m4: Update.
4498         * gnulib/import/m4/mbsrtowcs.m4: Update.
4499         * gnulib/import/m4/mbstate_t.m4: Update.
4500         * gnulib/import/m4/memchr.m4: Update.
4501         * gnulib/import/m4/memmem.m4: Update.
4502         * gnulib/import/m4/mempcpy.m4: Update.
4503         * gnulib/import/m4/memrchr.m4: Update.
4504         * gnulib/import/m4/mkdir.m4: Update.
4505         * gnulib/import/m4/mkstemp.m4: Update.
4506         * gnulib/import/m4/mmap-anon.m4: Update.
4507         * gnulib/import/m4/mode_t.m4: Update.
4508         * gnulib/import/m4/msvc-inval.m4: Update.
4509         * gnulib/import/m4/msvc-nothrow.m4: Update.
4510         * gnulib/import/m4/multiarch.m4: Update.
4511         * gnulib/import/m4/nocrash.m4: Update.
4512         * gnulib/import/m4/off_t.m4: Update.
4513         * gnulib/import/m4/onceonly.m4: Update.
4514         * gnulib/import/m4/open-cloexec.m4: Update.
4515         * gnulib/import/m4/open.m4: Update.
4516         * gnulib/import/m4/openat.m4: Update.
4517         * gnulib/import/m4/opendir.m4: Update.
4518         * gnulib/import/m4/pathmax.m4: Update.
4519         * gnulib/import/m4/rawmemchr.m4: Update.
4520         * gnulib/import/m4/readdir.m4: Update.
4521         * gnulib/import/m4/readlink.m4: Update.
4522         * gnulib/import/m4/realloc.m4: Update.
4523         * gnulib/import/m4/rename.m4: Update.
4524         * gnulib/import/m4/rewinddir.m4: Update.
4525         * gnulib/import/m4/rmdir.m4: Update.
4526         * gnulib/import/m4/save-cwd.m4: Update.
4527         * gnulib/import/m4/secure_getenv.m4: Update.
4528         * gnulib/import/m4/setenv.m4: Update.
4529         * gnulib/import/m4/signal_h.m4: Update.
4530         * gnulib/import/m4/ssize_t.m4: Update.
4531         * gnulib/import/m4/stat-time.m4: Update.
4532         * gnulib/import/m4/stat.m4: Update.
4533         * gnulib/import/m4/std-gnu11.m4: Update.
4534         * gnulib/import/m4/stdbool.m4: Update.
4535         * gnulib/import/m4/stddef_h.m4: Update.
4536         * gnulib/import/m4/stdint.m4: Update.
4537         * gnulib/import/m4/stdio_h.m4: Update.
4538         * gnulib/import/m4/stdlib_h.m4: Update.
4539         * gnulib/import/m4/strchrnul.m4: Update.
4540         * gnulib/import/m4/strdup.m4: Update.
4541         * gnulib/import/m4/strerror.m4: Update.
4542         * gnulib/import/m4/string_h.m4: Update.
4543         * gnulib/import/m4/strstr.m4: Update.
4544         * gnulib/import/m4/strtok_r.m4: Update.
4545         * gnulib/import/m4/sys_socket_h.m4: Update.
4546         * gnulib/import/m4/sys_stat_h.m4: Update.
4547         * gnulib/import/m4/sys_time_h.m4: Update.
4548         * gnulib/import/m4/sys_types_h.m4: Update.
4549         * gnulib/import/m4/tempname.m4: Update.
4550         * gnulib/import/m4/time_h.m4: Update.
4551         * gnulib/import/m4/unistd-safer.m4: Update.
4552         * gnulib/import/m4/unistd_h.m4: Update.
4553         * gnulib/import/m4/warn-on-use.m4: Update.
4554         * gnulib/import/m4/wchar_h.m4: Update.
4555         * gnulib/import/m4/wchar_t.m4: Update.
4556         * gnulib/import/m4/wctype_h.m4: Update.
4557         * gnulib/import/m4/wint_t.m4: Update.
4558         * gnulib/import/malloc.c: Update.
4559         * gnulib/import/malloc/scratch_buffer.h: Update.
4560         * gnulib/import/malloc/scratch_buffer_grow.c: Update.
4561         * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
4562         * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
4563         * gnulib/import/malloca.c: Update.
4564         * gnulib/import/malloca.h: Update.
4565         * gnulib/import/malloca.valgrind: Update.
4566         * gnulib/import/math.in.h: Update.
4567         * gnulib/import/mbrtowc.c: Update.
4568         * gnulib/import/mbsinit.c: Update.
4569         * gnulib/import/mbsrtowcs-impl.h: Update.
4570         * gnulib/import/mbsrtowcs-state.c: Update.
4571         * gnulib/import/mbsrtowcs.c: Update.
4572         * gnulib/import/memchr.c: Update.
4573         * gnulib/import/memmem.c: Update.
4574         * gnulib/import/mempcpy.c: Update.
4575         * gnulib/import/memrchr.c: Update.
4576         * gnulib/import/mkdir.c: Update.
4577         * gnulib/import/mkstemp.c: Update.
4578         * gnulib/import/msvc-inval.c: Update.
4579         * gnulib/import/msvc-inval.h: Update.
4580         * gnulib/import/msvc-nothrow.c: Update.
4581         * gnulib/import/msvc-nothrow.h: Update.
4582         * gnulib/import/open.c: Update.
4583         * gnulib/import/openat-die.c: Update.
4584         * gnulib/import/openat-priv.h: Update.
4585         * gnulib/import/openat-proc.c: Update.
4586         * gnulib/import/openat.c: Update.
4587         * gnulib/import/openat.h: Update.
4588         * gnulib/import/opendir.c: Update.
4589         * gnulib/import/pathmax.h: Update.
4590         * gnulib/import/pipe-safer.c: Update.
4591         * gnulib/import/rawmemchr.c: Update.
4592         * gnulib/import/readdir.c: Update.
4593         * gnulib/import/readlink.c: Update.
4594         * gnulib/import/realloc.c: Update.
4595         * gnulib/import/ref-add.sin: Update.
4596         * gnulib/import/ref-del.sin: Update.
4597         * gnulib/import/rename.c: Update.
4598         * gnulib/import/rewinddir.c: Update.
4599         * gnulib/import/rmdir.c: Update.
4600         * gnulib/import/same-inode.h: Update.
4601         * gnulib/import/save-cwd.c: Update.
4602         * gnulib/import/save-cwd.h: Update.
4603         * gnulib/import/scratch_buffer.h: Update.
4604         * gnulib/import/secure_getenv.c: Update.
4605         * gnulib/import/setenv.c: Update.
4606         * gnulib/import/signal.in.h: Update.
4607         * gnulib/import/stat-time.c: Update.
4608         * gnulib/import/stat-time.h: Update.
4609         * gnulib/import/stat-w32.c: Update.
4610         * gnulib/import/stat-w32.h: Update.
4611         * gnulib/import/stat.c: Update.
4612         * gnulib/import/stdbool.in.h: Update.
4613         * gnulib/import/stddef.in.h: Update.
4614         * gnulib/import/stdint.in.h: Update.
4615         * gnulib/import/stdio.in.h: Update.
4616         * gnulib/import/stdlib.in.h: Update.
4617         * gnulib/import/str-two-way.h: Update.
4618         * gnulib/import/strchrnul.c: Update.
4619         * gnulib/import/strdup.c: Update.
4620         * gnulib/import/streq.h: Update.
4621         * gnulib/import/strerror-override.c: Update.
4622         * gnulib/import/strerror-override.h: Update.
4623         * gnulib/import/strerror.c: Update.
4624         * gnulib/import/string.in.h: Update.
4625         * gnulib/import/stripslash.c: Update.
4626         * gnulib/import/strnlen1.c: Update.
4627         * gnulib/import/strnlen1.h: Update.
4628         * gnulib/import/strstr.c: Update.
4629         * gnulib/import/strtok_r.c: Update.
4630         * gnulib/import/sys_stat.in.h: Update.
4631         * gnulib/import/sys_time.in.h: Update.
4632         * gnulib/import/sys_types.in.h: Update.
4633         * gnulib/import/tempname.c: Update.
4634         * gnulib/import/tempname.h: Update.
4635         * gnulib/import/time.in.h: Update.
4636         * gnulib/import/unistd--.h: Update.
4637         * gnulib/import/unistd-safer.h: Update.
4638         * gnulib/import/unistd.in.h: Update.
4639         * gnulib/import/unsetenv.c: Update.
4640         * gnulib/import/verify.h: Update.
4641         * gnulib/import/extra/snippet/warn-on-use.h: Update.
4642         * gnulib/import/wchar.in.h: Update.
4643         * gnulib/import/wctype.in.h: Update.
4644         * gnulib/import/xalloc-oversized.h: Update.
4645         * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
4646         "53e2c179f26a890fa6685af4b6c1397ee370433b".
4647
4648 2018-08-16  Gary Benson <gbenson@redhat.com>
4649
4650         PR gdb/13000:
4651         * gdb/main.c (captured_main_1): Exit with nonzero status
4652         in batch mode if the last command to be executed failed.
4653         * NEWS: Mention the above.
4654
4655 2018-08-29  Simon Marchi  <simon.marchi@ericsson.com>
4656
4657         * csky-tdep.c (csky_memory_insert_breakpoint): Remove newline at
4658         end of warning message.
4659
4660 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
4661
4662         PR gdb/22943:
4663         * aarch64-tdep.c (is_hfa_or_hva): Remove function.
4664         (aarch64_extract_return_value): Use
4665         aapcs_is_vfp_call_or_return_candidate.
4666         (aarch64_return_in_memory): Likewise.
4667         (aarch64_store_return_value): Likewise.
4668
4669 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
4670
4671         * aarch64-tdep.c
4672         (aapcs_is_vfp_call_or_return_candidate): Make static
4673         (pass_in_v_or_stack): Remove function.
4674         (pass_in_v_vfp_candidate): New function.
4675         (aarch64_push_dummy_call): Check for float register candidates.
4676
4677 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
4678
4679         * aarch64-tdep.c (HA_MAX_NUM_FLDS): New macro.
4680         (aapcs_is_vfp_call_or_return_candidate_1): New function.
4681         (aapcs_is_vfp_call_or_return_candidate): Likewise.
4682
4683 2018-08-28  Simon Marchi  <simon.marchi@polymtl.ca>
4684
4685         PR build/23399
4686         * common/agent.c (IPA_SYM_STRUCT_NAME): Define.
4687         (struct ipa_sym_addresses): Rename to...
4688         (struct ipa_sym_addresses_common): ... this.
4689         * common/agent.h (IPA_SYM): Use IPA_SYM_STRUCT_NAME.
4690
4691 2018-08-28  Tom Tromey  <tom@tromey.com>
4692
4693         * c-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
4694         (token_fifo): Now a std::vector.
4695         (yylex, c_parse): Update.
4696         * d-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
4697         (token_fifo): Now a std::vector.
4698         (yylex, d_parse): Update.
4699         * go-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
4700         (token_fifo): Now a std::vector.
4701         (yylex, go_parse): Update.
4702
4703 2018-08-28  Simon Marchi  <simon.marchi@ericsson.com>
4704
4705         * parser-defs.h (struct type_stack) <elements>: Change type to
4706         std::vector<union type_stack_elt>.
4707         <depth, size>: Remove.
4708         * parse.c (parse_exp_in_context_1): Adjust.
4709         (type_stack_reserve): Remove.
4710         (check_type_stack_depth): Remove.
4711         (insert_into_type_stack): Adjust to std::vector.
4712         (insert_type): Likewise.
4713         (push_type): Likewise.
4714         (push_type_int): Likewise.
4715         (insert_type_address_space): Likewise.
4716         (pop_type): Likewise.
4717         (pop_type_int): Likewise.
4718         (pop_typelist): Likewise.
4719         (pop_type_stack): Likewise.
4720         (append_type_stack): Likewise.
4721         (push_type_stack): Likewise.
4722         (get_type_stack): Likewise.
4723         (type_stack_cleanup): Likewise.
4724         (push_typelist): Likewise.
4725         (follow_types): Likewise.
4726         (_initialize_parse): Likewise.
4727
4728 2018-08-28  Hafiz Abid Qadeer  <abidh@codesourcery.com>
4729
4730         * NEWS: Mention csky target.
4731
4732 2018-08-28  Jiangshuai Li  <jiangshuai_li@c-sky.com>
4733             Hafiz Abid Qadeer  <abidh@codesourcery.com>
4734             Don Breazeal  <donb@codesourcery.com>
4735
4736         * csky-linux-tdep.c: New file.
4737         * csky-tdep.c: Likewise.
4738         * csky-tdep.h: Likewise.
4739         * Makefile.in (ALL_TARGET_OBS): Add csky-linux-tdep.o and
4740         csky-tdep.o.
4741         (HFILES_NO_SRCDIR): Add csky-tdep.h.
4742         (ALLDEPFILES): Add csky-linux-tdep.c and csky-tdep.c
4743         * configure.tgt: Add csky support.
4744
4745 2018-08-27  Jan Vrany  <jan.vrany@fit.cvut.cz>
4746
4747         * python/py-framefilter.c (py_print_frame): Print frame architecture
4748         when printing on an MI output.
4749
4750 2018-08-27  Tom Tromey  <tom@tromey.com>
4751
4752         PR build/23087:
4753         * configure: Rebuild.
4754         * warning.m4 (AM_GDB_WARNINGS): Remove -Wno-narrowing.
4755
4756 2018-08-27  Tom Tromey  <tom@tromey.com>
4757
4758         * aarch64-linux-tdep.c
4759         (aarch64_linux_iterate_over_regset_sections) <sve_regmap>: Add
4760         casts to int.
4761
4762 2018-08-27  Tom Tromey  <tom@tromey.com>
4763
4764         * ppc64-tdep.c (insn_d, insn_ds, insn_xfx): Add casts to
4765         unsigned.
4766         (ppc64_standard_linkage1, ppc64_standard_linkage2)
4767         (ppc64_standard_linkage3, ppc64_standard_linkage4)
4768         (ppc64_standard_linkage5, ppc64_standard_linkage6)
4769         (ppc64_standard_linkage7, ppc64_standard_linkage8): Add casts to
4770         unsigned.
4771
4772 2018-08-27  Tom Tromey  <tom@tromey.com>
4773
4774         * xtensa-tdep.h (XTREG_END): Add cast to unsigned.
4775         (XTENSA_GDBARCH_TDEP_INSTANTIATE): Likewise.
4776
4777 2018-08-27  Tom Tromey  <tom@tromey.com>
4778
4779         * tramp-frame.h (TRAMP_SENTINEL_INSN): Redefine.
4780         * tilegx-linux-tdep.c (tilegx_linux_rt_sigframe): Use
4781         ULONGEST_MAX.
4782         * tic6x-linux-tdep.c (tic6x_linux_rt_sigreturn_tramp_frame): Use
4783         ULONGEST_MAX.
4784         * sparc64-linux-tdep.c (sparc64_linux_rt_sigframe): Use
4785         ULONGEST_MAX.
4786         * sparc-linux-tdep.c (sparc32_linux_sigframe)
4787         (sparc32_linux_rt_sigframe): Use ULONGEST_MAX.
4788         * ppc-nbsd-tdep.c (ppcnbsd_sigtramp, ppcnbsd2_sigtramp): Use
4789         ULONGEST_MAX.
4790         * ppc-linux-tdep.c (ppc32_linux_sigaction_tramp_frame)
4791         (ppc64_linux_sigaction_tramp_frame)
4792         (ppc32_linux_sighandler_tramp_frame)
4793         (ppc64_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
4794         * nios2-linux-tdep.c (nios2_r1_linux_rt_sigreturn_tramp_frame)
4795         (nios2_r2_linux_rt_sigreturn_tramp_frame): Use ULONGEST_MAX.
4796         * mn10300-linux-tdep.c (am33_linux_sigframe)
4797         (am33_linux_rt_sigframe): Use ULONGEST_MAX.
4798         * mips64-obsd-tdep.c (mips64obsd_sigframe): Use ULONGEST_MAX.
4799         * mips-linux-tdep.c (mips_linux_o32_sigframe)
4800         (mips_linux_o32_rt_sigframe, mips_linux_n32_rt_sigframe)
4801         (mips_linux_n64_rt_sigframe, micromips_linux_o32_sigframe)
4802         (micromips_linux_o32_rt_sigframe, micromips_linux_n32_rt_sigframe)
4803         (micromips_linux_n64_rt_sigframe): Use ULONGEST_MAX.
4804         * mips-fbsd-tdep.c (mips_fbsd_sigframe, mipsn32_fbsd_sigframe)
4805         (mips64_fbsd_sigframe): Use ULONGEST_MAX.
4806         * microblaze-linux-tdep.c
4807         (microblaze_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
4808         * i386-nbsd-tdep.c (i386nbsd_sigtramp_sc16, i386nbsd_sigtramp_sc2)
4809         (i386nbsd_sigtramp_si2, i386nbsd_sigtramp_si31)
4810         (i386nbsd_sigtramp_si4): Use ULONGEST_MAX.
4811         * hppa-nbsd-tdep.c (hppanbsd_sigtramp_si4): Use ULONGEST_MAX.
4812         * common/common-types.h (ULONGEST_MAX): New define.
4813         (CORE_ADDR_MAX): Fix formatting.
4814         * bfin-linux-tdep.c (bfin_linux_sigframe): Use ULONGEST_MAX.
4815         * arm-obsd-tdep.c (armobsd_sigframe): Use ULONGEST_MAX.
4816         * arm-linux-tdep.c (arm_linux_sigreturn_tramp_frame)
4817         (arm_linux_rt_sigreturn_tramp_frame)
4818         (arm_eabi_linux_sigreturn_tramp_frame)
4819         (arm_eabi_linux_rt_sigreturn_tramp_frame)
4820         (thumb2_eabi_linux_sigreturn_tramp_frame)
4821         (thumb2_eabi_linux_rt_sigreturn_tramp_frame)
4822         (arm_linux_restart_syscall_tramp_frame)
4823         (arm_kernel_linux_restart_syscall_tramp_frame): Use ULONGEST_MAX.
4824         * arm-fbsd-tdep.c (arm_fbsd_sigframe): Use ULONGEST_MAX.
4825         * aarch64-linux-tdep.c (aarch64_linux_rt_sigframe): Use
4826         ULONGEST_MAX.
4827         * aarch64-fbsd-tdep.c (aarch64_fbsd_sigframe): Use ULONGEST_MAX.
4828
4829 2018-08-27  Tom Tromey  <tom@tromey.com>
4830
4831         * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Use
4832         CORE_ADDR_MAX.
4833         * mips-tdep.c (mips_deal_with_atomic_sequence)
4834         (micromips_deal_with_atomic_sequence): Use CORE_ADDR_MAX.
4835         * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw)
4836         (arm_deal_with_atomic_sequence_raw): Use CORE_ADDR_MAX.
4837         * alpha-tdep.c (alpha_deal_with_atomic_sequence): Use
4838         CORE_ADDR_MAX.
4839         * aarch64-tdep.c (aarch64_software_single_step): Use
4840         CORE_ADDR_MAX.
4841
4842 2018-08-27  Tom Tromey  <tom@tromey.com>
4843
4844         * linespec.c (complete_linespec_component): Add cast to "char".
4845         * completer.c (completion_tracker::build_completion_result): Add
4846         cast to "char".
4847
4848 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
4849
4850         * solist.h (struct solist, struct target_so_ops): Fix
4851         indentation.
4852
4853 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
4854
4855         * ada-tasks.c (ada_task_info_s): Remove typedef.
4856         (DEF_VEC_O(ada_task_info_s)): Remove.
4857         (struct ada_tasks_inferior_data): Initialize fields.
4858         <task_list>: Make an std::vector.
4859         (get_ada_tasks_inferior_data): Allocate with new.
4860         (ada_get_task_number): Adjust.
4861         (get_task_number_from_id): Likewise.
4862         (valid_task_id): Likewise.
4863         (ada_get_task_info_from_ptid): Likewise.
4864         (iterate_over_live_ada_tasks): Likewise.
4865         (add_ada_task): Likewise.
4866         (read_known_tasks): Likewise.
4867         (ada_build_task_list): Likewise.
4868         (print_ada_task_info): Likewise.
4869         (info_task): Likewise.
4870         (task_command_1): Likewise.
4871
4872 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
4873
4874         * ada-lang.c (add_angle_brackets): Return std::string.
4875
4876 2018-08-25  Simon Marchi  <simon.marchi@polymtl.ca>
4877
4878         * python/py-threadevent.c (py_get_event_thread): Initialize
4879         pythread.
4880
4881 2018-08-24  Pedro Alves  <palves@redhat.com>
4882
4883         * python/py-bpevent.c (create_breakpoint_event_object): Use
4884         copy-initialization.
4885         * python/py-continueevent.c (emit_continue_event): Use
4886         copy-initialization.
4887         * python/py-exitedevent.c (create_exited_event_object): Return a
4888         gdbpy_ref<>.
4889         (emit_exited_event): Use copy-initialization.
4890         * python/py-inferior.c (python_new_inferior)
4891         (python_inferior_deleted, add_thread_object): Use
4892         copy-initialization.
4893         * python/py-infevents.c (create_inferior_call_event_object)
4894         (create_register_changed_event_object)
4895         (create_memory_changed_event_object): Return a gdbpy_ref<>.
4896         (emit_inferior_call_event, emit_memory_changed_event)
4897         (emit_register_changed_event): Use copy-initialization.
4898         * python/py-newobjfileevent.c (create_new_objfile_event_object):
4899         Return a gdbpy_ref<>.
4900         (emit_new_objfile_event): Use copy-initialization.
4901         (create_clear_objfiles_event_object): Return a gdbpy_ref<>.
4902         (emit_clear_objfiles_event): Use copy-initialization.
4903         * python/py-signalevent.c (create_signal_event_object): Use
4904         copy-initialization.
4905         * python/py-threadevent.c (create_thread_event_object): Use
4906         copy-initialization.
4907
4908 2018-08-24  Pedro Alves  <palves@redhat.com>
4909             Simon Marchi  <simon.marchi@ericsson.com>
4910
4911         PR gdb/23379
4912         * python/py-continueevent.c: Include "gdbthread.h".
4913         (create_continue_event_object): Add intro comment.  Add 'ptid'
4914         parameter.  Use it to find thread to pass to
4915         create_thread_event_object.
4916         (emit_continue_event): Pass PTID down to
4917         create_continue_event_object.
4918         * python/py-event.h (py_get_event_thread): Declare.
4919         (create_thread_event_object): Remove default from 'thread'
4920         parameter.
4921         * python/py-stopevent.c (create_stop_event_object): Use
4922         py_get_event_thread.
4923         * python/py-threadevent.c (get_event_thread): Rename to ...
4924         (py_get_event_thread): ... this, make extern, add 'ptid' parameter
4925         and use it to find the thread.
4926         (create_thread_event_object): Assert that THREAD isn't null.
4927         Don't find the event thread here.
4928
4929 2018-08-23  Kevin Buettner  <kevinb@redhat.com>
4930
4931         * block.h (blockrange, blockranges): New struct declarations.
4932         (struct block): Add new field named `ranges'.
4933         (BLOCK_RANGES, BLOCK_NRANGES, BLOCK_RANGE, BLOCK_CONTIGUOUS_P)
4934         (BLOCK_RANGE_START, BLOCK_RANGE_END, BLOCK_ENTRY_PC): New
4935         macros for accessing ranges in struct block.
4936         (make_blockranges): New declaration.
4937         block.c (make_blockranges): New function.
4938         * dwarf2read.c (dwarf2_record_block_ranges): Fill in BLOCK_RANGES
4939         for block.
4940         * symtab.h (find_pc_partial_function): Add new parameter `block'.
4941         * blockframe.c (cache_pc_function_block): New static global.
4942         (clear_pc_function_cache): Clear cache_pc_function_block.
4943         (find_pc_partial_function): Move comment to symtab.h.  Add
4944         support for non-contiguous blocks.
4945         * cli/cli-cmds.c (block.h): Include.
4946         (print_disassembly): Handle printing of non-contiguous blocks.
4947         (disassemble_current_function): Likewise.
4948         (disassemble_command): Likewise.
4949
4950         * ax-gdb.c (gen_var_ref): Use BLOCK_ENTRY_PC in place of
4951         BLOCK_START.
4952         * blockframe.c (get_pc_function_start): Likewise.
4953         * compile/compile-c-symbols.c (convert_one_symbol): Likewise.
4954         (gcc_symbol_address): Likewise.
4955         * compile/compile-object-run.c (compile_object_run): Likewise.
4956         * compile/compile.c (get_expr_block_and_pc): Likewise.
4957         * dwarf2loc.c (dwarf2_find_location_expression): Likewise.
4958         (func_addr_to_tail_call_list): Likewise.
4959         * findvar.c (default_read_var_value): Likewise.
4960         * inline-frame.c (inline_frame_this_id): Likewise.
4961         (skip-inline_frames): Likewise.
4962         * infcmd.c (until_next_command): Likewise.
4963         * linespec.c (convert_linespec_to_sals): Likewise.
4964         * parse.c (parse_exp_in_context_1): Likewise.
4965         * printcmd.c (build_address_symbolic): likewise.
4966         (info_address_command): Likewise.
4967         symtab.c (find_function_start_sal): Likewise.
4968         (skip_prologue_sal): Likewise.
4969         (find_function_alias_target): Likewise.
4970         (find_gnu_ifunc): Likewise.
4971         * stack.c (find_frame_funname): Likewise.
4972         * symtab.c (fixup_symbol_section): Likewise.
4973         (find_function_start_sal): Likewise.
4974         (skip_prologue_sal): Likewsie.
4975         (find_function_alias_target): Likewise.
4976         (find_gnu_ifunc): Likewise.
4977         * tracepoint.c (info_scope_command): Likewise.
4978         * value.c (value_fn_field): Likewise.
4979
4980         * infrun.c (fill_in_stop_func): Use find_function_entry_range_from_pc
4981         in place of find_pc_partial_function.
4982         * blockframe.c (find_function_entry_range_from_pc): New function.
4983         * symtab.h (find_function_entry_range_from_pc): Declare and document.
4984         * objfiles.c (objfile_relocate1): Relocate start and end addresses
4985         for each range in a block.
4986
4987
4988 2018-08-23  Xavier Roirand  <roirand@adacore.com>
4989
4990         * machoread.c (macho_symfile_read_all_oso): Remove uneeded
4991         incrementation.
4992
4993 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
4994
4995         * solib-svr4.c (read_program_headers_from_bfd): Return
4996         gdb::optional<gdb::byte_vector>.
4997         (svr4_exec_displacement): Adjust.
4998
4999 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
5000
5001         * solib-svr4.c (read_program_header): Return
5002         gdb::optional<gdb::byte_vector>, remove p_sect_size param.
5003         (find_program_interpreter): Return
5004         gdb::optional<gdb::byte_vector>.
5005         (scan_dyntag_auxv): Adjust.
5006         (enable_break): Adjust.
5007         (svr4_exec_displacement): Adjust.
5008
5009 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
5010
5011         * inf-child.h (inf_child_target) <terminal_save_inferior>: New.
5012         * inf-child.c (inf_child_target::terminal_save_inferior): New.
5013
5014 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
5015
5016         * guile/scm-string.c (gdbscm_scm_from_printf): Use
5017         string_vprintf.
5018         * guile/scm-utils.c (gdbscm_printf): Likewise.
5019         * serial.c (serial_printf): Likewise.
5020         * xml-support.c (gdb_xml_parser::vdebug): Likewise.
5021
5022 2018-08-22  Jan Vrany  <jan.vrany@fit.cvut.cz>
5023
5024         * stack.c (print_frame): Print frame architecture when printing on
5025         an MI output.
5026         * NEWS: Mention new "arch" attribute in frame output.
5027
5028 2018-08-21  Alan Hayward  <alan.hayward@arm.com>
5029
5030         * arch/aarch64.h (aarch64_regnum): Update comment.
5031
5032 2018-08-21  Alan Hayward  <alan.hayward@arm.com>
5033
5034         * NEWS: Add SVE to 8.2 section.
5035
5036 2018-08-21  Pedro Alves  <palves@redhat.com>
5037
5038         * guile/scm-utils.c (gdbscm_parse_function_args_1): New, factored
5039         out from gdbscm_parse_function_args.
5040         (gdbscm_parse_function_args): Rework to use gdbscm_wrap and
5041         gdbscm_parse_function_args_1.
5042
5043 2018-08-21  Simon Marchi  <simon.marchi@ericsson.com>
5044
5045         PR gdb/17816
5046         * m32c-tdep.c (m32c_decode_srcdest4): Remove unnecessary ternary
5047         operator.
5048
5049 2018-08-19  Simon Marchi  <simon.marchi@polymtl.ca>
5050
5051         * solib-svr4.c (svr4_exec_displacement): Fix formatting.
5052
5053 2018-08-19  Michael Spang  <spang@google.com>
5054
5055         PR gdb/11786
5056         * solib-svr4.c (svr4_exec_displacement): Ignore memsz fields
5057         for PT_TLS segments.
5058
5059 2018-08-18  Kevin Buettner  <kevinb@redhat.com>
5060
5061         * dwarf2expr.h (struct dwarf_expr_context): Add virtual method
5062         dwarf_variable_value.
5063         * dwarf2-frame.c (class dwarf_expr_executor):
5064         Add override for dwarf_variable_value.
5065         * dwarf2loc.c (class dwarf_evaluate_loc_desc): Likewise.
5066         (class symbol_needs_eval_context): Likewise.
5067         (indirect_synthetic_pointer): Add forward declaration.
5068         (sect_variable_value): New function.
5069         (dwarf2_compile_expr_to_ax): Add case for DW_OP_GNU_variable_value.
5070         * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Add case
5071         for DW_OP_GNU_variable_value.
5072
5073 2018-08-16  Tom Tromey  <tom@tromey.com>
5074
5075         * top.c (read_command_file): Update.
5076         (command_line_input): Remove "repeat" argument.
5077         * ada-lang.c (get_selections): Update.
5078         * linespec.c (decode_line_2): Update.
5079         * defs.h (command_line_input): Remove argument.
5080         * cli/cli-script.c (read_next_line): Update.
5081         * python/py-gdb-readline.c: Update.
5082
5083 2018-08-17  Tom Tromey  <tom@tromey.com>
5084
5085         * cli/cli-script.c (read_next_line): Pass 0 as repeat argument to
5086         command_line_input.
5087
5088 2018-08-15  Tom Tromey  <tom@tromey.com>
5089
5090         * aarch64-linux-tdep.c (aarch64_linux_core_read_vq): Use pulongest.
5091
5092 2018-08-14  Jan Vrany  <jan.vrany@fit.cvut.cz>
5093
5094         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Add -a option.
5095         If used, use find_pc_partial_function to find address range
5096         to disassemble.
5097         * mi/mi-main.c (mi_cmd_list_features): Report
5098         "data-disassemble-a-option" feature.
5099         * NEWS: Mention new -data-disassemble option -a.
5100
5101 2018-08-13  Tom Tromey  <tom@tromey.com>
5102
5103         * common/common-defs.h (_FORTIFY_SOURCE): Define.
5104
5105 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
5106
5107         * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): New function.
5108         (aarch64_linux_collect_sve_regset): Likewise.
5109         (aarch64_linux_iterate_over_regset_sections): Check for SVE.
5110         * regcache.h (regcache_map_entry_size): New function.
5111
5112 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
5113
5114         * aarch64-linux-tdep.c (SVE_HEADER_SIZE_LENGTH): Add define.
5115         (SVE_HEADER_MAX_SIZE_LENGTH): Likewise.
5116         (SVE_HEADER_VL_LENGTH): Likewise.
5117         (SVE_HEADER_MAX_VL_LENGTH): Likewise.
5118         (SVE_HEADER_FLAGS_LENGTH): Likewise.
5119         (SVE_HEADER_RESERVED_LENGTH): Likewise.
5120         (SVE_HEADER_SIZE_OFFSET): Likewise.
5121         (SVE_HEADER_MAX_SIZE_OFFSET): Likewise.
5122         (SVE_HEADER_VL_OFFSET): Likewise.
5123         (SVE_HEADER_MAX_VL_OFFSET): Likewise.
5124         (SVE_HEADER_FLAGS_OFFSET): Likewise.
5125         (SVE_HEADER_RESERVED_OFFSET): Likewise.
5126         (SVE_HEADER_SIZE): Likewise.
5127         (aarch64_linux_core_read_vq): Add function.
5128         (aarch64_linux_core_read_description): Check for SVE section.
5129
5130 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
5131
5132         * aarch64-fbsd-tdep.c
5133         (aarch64_fbsd_iterate_over_regset_sections): Add supply_size and
5134         collect_size.
5135         * aarch64-linux-tdep.c
5136         (aarch64_linux_iterate_over_regset_sections): Likewise.
5137         * alpha-linux-tdep.c
5138         (alpha_linux_iterate_over_regset_sections):
5139         * alpha-nbsd-tdep.c
5140         (alphanbsd_iterate_over_regset_sections): Likewise.
5141         * amd64-fbsd-tdep.c
5142         (amd64fbsd_iterate_over_regset_sections): Likewise.
5143         * amd64-linux-tdep.c
5144         (amd64_linux_iterate_over_regset_sections): Likewise.
5145         * arm-bsd-tdep.c
5146         (armbsd_iterate_over_regset_sections): Likewise.
5147         * arm-fbsd-tdep.c
5148         (arm_fbsd_iterate_over_regset_sections): Likewise.
5149         * arm-linux-tdep.c
5150         (arm_linux_iterate_over_regset_sections): Likewise.
5151         * corelow.c (get_core_registers_cb): Likewise.
5152         (core_target::fetch_registers): Likewise.
5153         * fbsd-tdep.c (fbsd_collect_regset_section_cb): Likewise.
5154         * frv-linux-tdep.c (frv_linux_iterate_over_regset_sections): Likewise.
5155         * gdbarch.h (void): Regenerate.
5156         * gdbarch.sh: Add supply_size and collect_size.
5157         * hppa-linux-tdep.c (hppa_linux_iterate_over_regset_sections): Likewise.
5158         * hppa-nbsd-tdep.c (hppanbsd_iterate_over_regset_sections): Likewise.
5159         * hppa-obsd-tdep.c (hppaobsd_iterate_over_regset_sections): Likewise.
5160         * i386-fbsd-tdep.c (i386fbsd_iterate_over_regset_sections): Likewise.
5161         * i386-linux-tdep.c (i386_linux_iterate_over_regset_sections): Likewise.
5162         * i386-tdep.c (i386_iterate_over_regset_sections): Likewise.
5163         * ia64-linux-tdep.c (ia64_linux_iterate_over_regset_sections): Likewise.
5164         * linux-tdep.c (linux_collect_regset_section_cb): Likewise.
5165         * m32r-linux-tdep.c (m32r_linux_iterate_over_regset_sections): Likewise.
5166         * m68k-bsd-tdep.c (m68kbsd_iterate_over_regset_sections): Likewise.
5167         * m68k-linux-tdep.c (m68k_linux_iterate_over_regset_sections): Likewise.
5168         * mips-fbsd-tdep.c (mips_fbsd_iterate_over_regset_sections): Likewise.
5169         * mips-linux-tdep.c (mips_linux_iterate_over_regset_sections): Likewise.
5170         * mips-nbsd-tdep.c (mipsnbsd_iterate_over_regset_sections): Likewise.
5171         * mips64-obsd-tdep.c (mips64obsd_iterate_over_regset_sections):
5172         Likewise.
5173         * mn10300-linux-tdep.c (am33_iterate_over_regset_sections): Likewise.
5174         * nios2-linux-tdep.c (nios2_iterate_over_regset_sections): Likewise.
5175         * ppc-fbsd-tdep.c (ppcfbsd_iterate_over_regset_sections): Likewise.
5176         * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections): Likewise.
5177         * ppc-nbsd-tdep.c (ppcnbsd_iterate_over_regset_sections): Likewise.
5178         * ppc-obsd-tdep.c (ppcobsd_iterate_over_regset_sections): Likewise.
5179         * riscv-linux-tdep.c (riscv_linux_iterate_over_regset_sections):
5180         Likewise.
5181         * rs6000-aix-tdep.c (rs6000_aix_iterate_over_regset_sections): Likewise.
5182         * s390-linux-tdep.c (s390_iterate_over_regset_sections): Likewise.
5183         * score-tdep.c (score7_linux_iterate_over_regset_sections): Likewise.
5184         * sh-tdep.c (sh_iterate_over_regset_sections): Likewise.
5185         * sparc-tdep.c (sparc_iterate_over_regset_sections): Likewise.
5186         * tilegx-linux-tdep.c (tilegx_iterate_over_regset_sections): Likewise.
5187         * vax-tdep.c (vax_iterate_over_regset_sections): Likewise.
5188         * xtensa-tdep.c (xtensa_iterate_over_regset_sections): Likewise.
5189
5190 2018-08-10  Simon Marchi  <simon.marchi@ericsson.com>
5191
5192         * nat/linux-osdata.c (commandline_from_pid): Replace xstrprintf
5193         with string_printf.
5194
5195 2018-08-10  Keith Seitz  <keiths@redhat.com>
5196
5197         * compile/compile-c-support.c (add_code_header, add_code_footer):
5198         Move into policy class.
5199         (c_push_user_expression, pop_user_expression_nop)
5200         (c_add_code_header, c_add_code_footer, c_add_input): New policy class.
5201         (compile_program): New host class.
5202         (c_compile_program): New typedef.
5203         (c_compute_porgram): Use c_compile_program.
5204
5205 2018-08-10  Keith Seitz  <keiths@redhat.com>
5206
5207         * compile/compile-internal.h (compile_instance::~compile_instance):
5208         Remove calls to htab_delete.
5209         <m_type_map, m_symbol_err_map>: Switch type to htab_up.
5210         * compile.c (compile_instance::compile_instance): Initialize
5211         htab unique pointers.
5212         (compile_instance::get_cached_type, compile_instance::insert_type)
5213         (compile_instance::error_symbol_once): Update for unique_ptr.
5214
5215 2018-08-10  Keith Seitz  <keiths@redhat.com>
5216
5217         * compile/compile-c-symbols.c (struct symbol_error)
5218         (hash_symbol_error, eq_symbol_error, del_symbol_error)
5219         (compile_instance::insert_symbol_error)
5220         (compile_instance::error_symbol_once): Move to ...
5221         * compile/compile.c: ... here.
5222
5223 2018-08-10  Keith Seitz  <keiths@redhat.com>
5224
5225         * compile/compile-c-support.c (c_get_compile_context): Use `new'
5226         instead of `new_compile_instance'.
5227         * compile/compile-c-symbols.c (compile_instance::insert_symbol_error):
5228         Update description.
5229         If the symbol error map is not initialized, create it.
5230         (generate_c_for_for_one_symbol): Do not check/initialize
5231         the symbol error map.
5232         * compile/compile-c-types.c (compile_c_instance): Make a class.
5233         Update all callers.
5234         (compile_instance::compile_instance): Initialize the type cache.
5235         (get_cached_type): New function.
5236         (insert_type): Update description.
5237         (compile_c_instance::m_default_cflags): Define.
5238         (convert_type): Update description.  Use get_cached_type.
5239         (delete_instance): Moved to destructor.
5240         (new_compile_instance): Moved to constructor.
5241         * compile/compile-c.h (compile_c_instance): Make class inheriting
5242         from compile_instance.
5243         <base>: Remove field.
5244         <type_map, symbol_err_map>: Move to base class.
5245         <c_plugin>: Rename to `m_plugin' and remove pointer type.
5246         * compile/compile-internal.h (compile_instance): Make class.
5247         <type_map_t, symbol_err_map_t>: Define.
5248         <fe>: Rename to `m_gcc_fe'.
5249         <scope, block, gcc_target_options>: Add `m_' prefix.
5250         <m_type_map, m_symbol_err_map>: New fields, moved from
5251         compile_c_instance.
5252         <destroy>: Remove.
5253         (convert_type, new_compile_instance): Remove.
5254         * compile/compile.c (cleanup_compile_instance): Remove.
5255         (compile_to_object): Use unique_ptr to eliminate cleanups.
5256         (compile_instance::set_print_callback, compile_instance::version)
5257         (compile_instance::set_verbose)
5258         (compile_instance::set_driver_filename)
5259         (compile_instance::set_triplet_regexp)
5260         (compile_instance::set_arguments)
5261         (compile_instance::set_source_file)
5262         (compile_instance::compile): Define.
5263
5264 2018-08-10  Keith Seitz  <keiths@redhat.com>
5265
5266         * Makefile.in (HFILES_NO_SRCDIR): Add compile/gcc-c-plugin.h.
5267         * compile/compile-c-types.c: Define GCC_METHODN macros and include
5268         gcc-c-fe.def to define C plugin.
5269         (delete_instance): Delete `c_plugin'.
5270         (new_compile_instance): Initialize `c_plugin'.
5271         * compile/compile-c.h: Include gcc_c_plugin.h.
5272         (struct compile_c_instance) <c_plugin>: New member.
5273         * gcc-c-plugin.h: New file.
5274         Update all callers with API change.
5275
5276 2018-08-10  Keith Seitz  <keiths@redhat.com>
5277
5278         * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Move header files ...
5279         (HFILES_NO_SRCDIR): ... to here.
5280         Add compile-internal.h and compile-c.h.
5281         * compile/compile-c-support.c: Include compile-c.h.
5282         * compile/compile-c-symbols.c: Include compile-c.h.
5283         (generate_c_for_variable_locations): Update comment.
5284         * compile/compile-c-types.c: Include compile-c.h.
5285         * compile/compile-c.h: New file -- moved C language declarations
5286         from other files here.
5287         * compile/compile-internal.h: Do not include hashtab.h or
5288         common/enum-flags.h.
5289         (gcc_qualifiers_flags, struct compile_c_instance, C_CTX)
5290         (gcc_convert_symbol, gcc_symbol_address)
5291         (generate_c_for_variable_locations, c_get_mode_for_size)
5292         (c_get_range_decl_name): Definitions moved to compile-c.h.
5293         * compile/compile-loc2c.c: Include compile-c.h.
5294
5295 2018-08-10  Keith Seitz  <keiths@redhat.com>
5296
5297         * compile/compile-c-symbols.c (symbol_substitution_name): Rename to ...
5298         (c_symbol_substitution_name): ... this.
5299         Update all callers.
5300
5301 2018-08-10  Keith Seitz  <keiths@redhat.com>
5302
5303         * compile/compile-c-support.c (c_compute_program): Use
5304         unique_xmalloc_ptr to eliminate cleanup.
5305         * compile/compile-c-symbols.c (generate_c_for_variable_locations):
5306         Return a unique_xmalloc_ptr and eliminate cleanup.
5307         * compile/compile-internal.h (generate_c_for_variable_locations):
5308         Return unique_xmalloc_ptr and update description.
5309
5310 2018-08-10  Alan Hayward  <alan.hayward@arm.com>
5311
5312         * corelow.c (core_target::get_core_register_section): Rename
5313         min_size to section_min_size.
5314
5315 2018-08-09  Jim Wilson  <jimw@sifive.com>
5316
5317         * Makefile.in (ALL_TARGET_OBS): Add riscv-linux-tdep.c.
5318         (ALLDEPFILES): Add riscv-linux-nat.c, and riscv-linux-tdep.c.
5319         * NEWS: Mention new GNU/Linux RISC-V target.
5320         * configure.host: Add riscv*-*-linux*.
5321         * configure.nat: Add riscv*.
5322         * configure.tgt: Add riscv*-*-linux*.
5323         * riscv-linux-nat.c: New file.
5324         * riscv-linux-tdep.c: New file.
5325
5326 2018-08-09  Andrew Burgess  <andrew.burgess@embecosm.com>
5327
5328         * infrun.c (resume): Make static, add forward declaration.
5329         (proceed): Update header comment.
5330         * infrun.h (resume): Delete declaration.
5331
5332 2018-08-09  Tom Tromey  <tom@tromey.com>
5333
5334         * riscv-tdep.h: Minor formatting fixes.
5335
5336 2018-08-09  Simon Marchi  <simon.marchi@ericsson.com>
5337
5338         * common/scoped_mmap.c (mmap_file): Silence ARI warning.
5339         * dwarf-index-cache.c (create_dir_and_check): Likewise.
5340         (test_mkdir_recursive): Likewise.
5341         * dwarf-index-write.c (write_psymtabs_to_index): Likewise.
5342
5343 2018-08-09  Andrew Burgess  <andrew.burgess@embecosm.com>
5344
5345         * valarith.c (value_subscripted_rvalue): If an array is not in
5346         memory, and we don't know the upper bound, then we can't know that
5347         the requested element exists or not.
5348
5349 2018-08-08  Simon Marchi  <simon.marchi@ericsson.com>
5350
5351         * target.c (str_comma_list_concat_elem): Fix typo in comment.
5352         (target_options_to_string): Add comment.
5353
5354 2018-08-08  Tom Tromey  <tom@tromey.com>
5355
5356         * unittests/scoped_mmap-selftests.c: Check result of "write".
5357
5358 2018-08-08  Jim Wilson  <jimw@sifive.com>
5359
5360         * riscv-tdep.c (enum opcode): Add jump, branch, lr, and sc opcodes.
5361         (decode_register_index_short): New.
5362         (decode_j_type_insn, decode_cj_type_insn): New.
5363         (decode_b_type_insn, decode_cb_type_insn): New.
5364         (riscv_insn::decode): Add support for jumps, branches, lr, and sc.  New
5365         local xlen.  Check xlen when decoding ambiguous compressed insns.  In
5366         compressed decode, use is_c_lui_insn instead of is_lui_insn, and
5367         is_c_sw_insn instead of is_sw_insn.
5368         (riscv_next_pc, riscv_next_pc_atomic_sequence): New.
5369         (riscv_software_single_step): New.
5370         * riscv-tdep.h (riscv_software_single_step): Declare.
5371
5372         * riscv-tdep.c (riscv_isa_xlen): Drop static.
5373         * riscv-tdep.h (riscv_isa_xlen): Add extern declaration.
5374
5375 2018-08-08  Andrew Burgess  <andrew.burgess@embecosm.com>
5376
5377         PR gdb/18050:
5378         * target.c (dispose_inferior): Don't dispose of inferiors that are
5379         already killed.
5380
5381 2018-08-08  Szabolcs Nagy  <szabolcs.nagy@arm.com>
5382
5383         * remote.c (remote_target::download_tracepoint): Change char* to
5384         const char*.
5385
5386 2018-08-07  Simon Marchi  <simon.marchi@polymtl.ca>
5387
5388         * target.h (target_options_to_string): Return an std::string.
5389         * target.c (str_comma_list_concat_elem): Return void, use
5390         std::string.
5391         (do_option): Likewise.
5392         (target_options_to_string): Return an std::string.
5393         * linux-nat.c (linux_nat_target::wait): Adjust.
5394         * target-debug.h (target_debug_print_options): Adjust.
5395
5396 2018-08-07  Tom Tromey  <tom@tromey.com>
5397
5398         * Makefile.in (CPPFLAGS): New variable.
5399         (INTERNAL_CPPFLAGS): Use it.
5400
5401 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
5402
5403         * NEWS: Mention the index cache.
5404
5405 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
5406
5407         * common/pathstuff.h (get_standard_cache_dir): New.
5408         * common/pathstuff.c (get_standard_cache_dir): New.
5409         * build-id.h (build_id_to_string): New.
5410         * dwarf-index-common.h (INDEX4_SUFFIX, INDEX5_SUFFIX,
5411         DEBUG_STR_SUFFIX): Move to here.
5412         * dwarf-index-write.c (INDEX4_SUFFIX, INDEX5_SUFFIX,
5413         DEBUG_STR_SUFFIX): Move from there.
5414         (write_psymtabs_to_index): Make non-static, add basename
5415         parameter.  Write to temporary files, rename when done.
5416         (save_gdb_index_command): Adjust call to
5417         write_psymtabs_to_index.
5418         * dwarf2read.h (dwarf2_per_objfile) <index_cache_res>: New
5419         field.
5420         * dwarf2read.c (dwz_file) <index_cache_res>: New field.
5421         (get_gdb_index_contents_from_cache): New.
5422         (get_gdb_index_contents_from_cache_dwz): New.
5423         (dwarf2_initialize_objfile): Read index from cache.
5424         (dwarf2_build_psymtabs): Save to index.
5425         * dwarf-index-cache.h: New file.
5426         * dwarf-index-cache.c: New file.
5427         * dwarf-index-write.h: New file.
5428
5429 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
5430
5431         * gnulib/aclocal.m4: Re-generate.
5432         * gnulib/config.in: Re-generate.
5433         * gnulib/configure: Re-generate.
5434         * gnulib/import/Makefile.am: Re-generate.
5435         * gnulib/import/Makefile.in: Re-generate.
5436         * gnulib/import/m4/gnulib-cache.m4: Re-generate.
5437         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
5438         * gnulib/import/m4/mkdir.m4: New file.
5439         * gnulib/import/mkdir.c: New file.
5440         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkdir
5441         module.
5442
5443 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
5444
5445         * Makefile.in (COMMON_SFILES): Add common/scoped_mmap.c.
5446         * common/scoped_mmap.c: New file.
5447         * common/scoped_mmap.h (destroy): New method.
5448         (~scoped_mmap, reset): Use destroy.
5449         (scoped_mmap): New move constructor.
5450         (mmap_file): New declaration.
5451         * unittests/scoped_mmap-selftests.c (test_normal,
5452         test_invalid_filename, run_tests): New functions.
5453         (_initialize_scoped_mmap_selftests): Register selftest.
5454
5455 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
5456
5457         * dwarf2read.c (read_gdb_index_from_section): Rename to...
5458         (read_gdb_index_from_buffer): ... this.  Remove section
5459         parameter, add buffer parameter.
5460         (get_gdb_index_contents_ftype,
5461         get_gdb_index_contents_dwz_ftype): New typedefs.
5462         (dwarf2_read_gdb_index): Add callback parameters to get the
5463         index contents.
5464         (get_gdb_index_contents_from_section): New.
5465         (dwarf2_initialize_objfile): Update call to
5466         dwarf2_read_gdb_index.
5467
5468 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
5469
5470         * common/filestuff.h (gdb_fopen_cloexec): New overload.
5471         (gdb_open_cloexec): Likewise.
5472         * nat/linux-osdata.c (command_from_pid): Use string_printf.
5473         (commandline_from_pid): Likewise.
5474         (linux_xfer_osdata_threads): Likewise.
5475         (linux_xfer_osdata_fds): Likewise.
5476         * ada-lang.c (is_package_name): Likewise.
5477         * auxv.c (procfs_xfer_auxv): Likewise.
5478         * breakpoint.c (print_one_breakpoint_location): Use
5479         uiout::field_fmt.
5480         (print_one_catch_solib): Use string_printf.
5481         * coff-pe-read.c (add_pe_exported_sym): Likewise.
5482         (add_pe_forwarded_sym): Likewise.
5483         * dwarf2read.c (create_type_unit_group): Likewise.
5484         (build_error_marker_type): Likewise.
5485         * infcall.c (get_function_name): Likewise.
5486         * valprint.c (print_converted_chars_to_obstack): Likewise.
5487         * xtensa-tdep.c (xtensa_register_type): Likewise.
5488
5489 2018-08-06  Simon Marchi  <simon.marchi@ericsson.com>
5490
5491         * remote.c (remote_target::download_tracepoint): Fix format
5492         string errors.
5493
5494 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
5495
5496         * tracefile.c: Include common/byte-vector.h.
5497         (trace_save): Change type of buf to gdb::byte_vector.  Initialize
5498         with trace_regblock_size if needed.  Update uses of buf.
5499
5500 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
5501
5502         * tracepoint.h (collection_list) <m_regs_mask>: Change type to
5503         std::vector<unsigned char>.
5504         * tracepoint.c (collection_list::collection_list): Remove
5505         m_regs_mask initializer from initializer list.  Resize
5506         m_regs_mask using the largest remote register number.
5507         (collection_list::add_remote_register): Remove size check on
5508         m_regs_mask.  Use at to access element.
5509         (collection_list::stringify): Change type of temp_buf to
5510         gdb::char_vector.  Update uses of temp_buf.  Resize if needed to
5511         stringify the register mask.  Use pack_hex_byte for the register
5512         mask.
5513
5514 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
5515
5516         * tracepoint.h (class collection_list) <add_register>: Remove.
5517         <add_remote_register, add_ax_registers, add_local_register>:
5518         Declare.
5519         <add_memrange>: Add scope parameter.
5520         * tracepoint.c (encode_actions_1): Likewise.
5521         (collection_list::add_register): Rename to ...
5522         (collection_list::add_remote_register): ... this.  Update
5523         comment.
5524         (collection_list::add_ax_registers, add_local_register): New
5525         methods.
5526         (collection_list::add_memrange): Add scope parameter.  Call
5527         add_local_register instead of add_register.
5528         (finalize_tracepoint_aexpr): New function.
5529         (collection_list::collect_symbol): Update calls to add_memrange.
5530         Call add_local_register instead of add_register.  Call
5531         add_ax_registers.  Call finalize_tracepoint_aexpr.
5532         (encode_actions_1): Get remote regnos for $reg action.  Call
5533         add_remote_register, add_ax_registers, and add_local_register.
5534         Update call to add_memrange.  Call finalize_tracepoint_aexpr.
5535         (validate_actionline): Call finalize_tracepoint_aexpr.
5536
5537 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
5538
5539         * remote.c (remote_target::download_tracepoint): Remove BUF_SIZE.
5540         Replace array buf with gdb::char_vector buf, of size
5541         get_remote_packet_size ().  Replace references to buf and
5542         BUF_SIZE to buf.data () and buf.size ().  Replace strcpy, strcat
5543         and xsnprintf with snprintf.  Raise errors if the buffer is too
5544         small.
5545
5546 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
5547
5548         * remote.c (remote_target::download_tracepoint): Fix the has_more
5549         predicate in the QTDP action list iteration.
5550
5551 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
5552
5553         * remote.c (remote_target::download_tracepoint): Fix indentation
5554         in for block.
5555
5556 2018-08-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
5557
5558         * proc-api.c (_initialize_proc_api): Remove c, unused.
5559         * procfs.c (procfs_init_inferior): Remove signals, unused.
5560         (procfs_target::make_corefile_notes): Remove old_chain, fpregs,
5561         unused.
5562
5563 2018-08-06  Sergey Korolev  <s.korolev@ndmsystems.com>
5564             Andrew Burgess  <andrew.burgess@embecosm.com>
5565
5566         * linux-nat.c (linux_nat_target::follow_fork): Avoid using
5567         'W_STOPCODE (0)' as this could be ambiguous.
5568
5569 2018-08-03  Sergio Durigan Junior  <sergiodj@redhat.com>
5570
5571         * ser-tcp.c (net_open): Fix thinko when deciding whether to
5572         disable TCP's Nagle algorithm (use "ai_protocol" instead of
5573         "ai_socktype").
5574
5575 2018-08-02  Tom Tromey  <tom@tromey.com>
5576
5577         PR symtab/16842.
5578         * dwarf2read.c (read_func_scope): Set symtab on template parameter
5579         symbols.
5580         (process_structure_scope): Likewise.
5581
5582 2018-08-02  Xavier Roirand  <roirand@adacore.com>
5583
5584         PR gdb/22629:
5585         * darwin-nat.c (darwin_kill_inferior): Fix handling of
5586         kill inferior.
5587
5588 2018-08-02  Tom Tromey  <tom@tromey.com>
5589
5590         * darwin-nat.c (find_inferior_task_it, darwin_find_thread)
5591         (darwin_suspend_inferior, darwin_resume_inferior)
5592         (darwin_decode_notify_message, darwin_resume_inferior_threads)
5593         (darwin_check_new_threads): Check result of get_darwin_inferior.
5594
5595 2018-07-31  Joel Brobecker  <brobecker@adacore.com>
5596
5597         GDB 8.1.1 released.
5598
5599 2018-07-31  Jan Vrany  <jan.vrany@fit.cvut.cz>
5600
5601         * varobj.c (varobj_get_path_expr_parent): Report an error if
5602         parent is a dynamic varobj.
5603
5604 2018-07-31  Simon Marchi  <simon.marchi@ericsson.com>
5605
5606         * gnulib/aclocal.m4: Re-generate.
5607         * gnulib/config.in: Re-generate.
5608         * gnulib/configure: Re-generate.
5609         * gnulib/import/Makefile.in: Re-generate.
5610         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
5611         * gnulib/import/m4/onceonly.m4: Re-generate.
5612
5613 2018-07-31  Simon Marchi  <simon.marchi@ericsson.com>
5614
5615         * target-descriptions.c (struct xml_test_tdesc): New.
5616         (xml_tdesc): Change type to std::vector<xml_test_tdesc>.
5617         (record_xml_tdesc): Update.
5618         (maintenance_check_xml_descriptions): Update.
5619         * target-descriptions.h (record_xml_tdesc): Update comment.
5620
5621 2018-07-30  Andrew Burgess  <andrew.burgess@embecosm.com>
5622
5623         * eval.c (evaluate_subexp_for_sizeof): Check for array type before
5624         checking array bounds are defined.
5625
5626 2018-07-30  Tom Tromey  <tom@tromey.com>
5627
5628         * nat/linux-osdata.c (pid_pgid_entry::operator<): Fix
5629         irreflexivity violation.
5630
5631 2018-07-30  Tom Tromey  <tom@tromey.com>
5632
5633         * cli/cli-decode.c (lookup_cmd): Remove lint code.
5634         * value.c (unpack_long): Remove lint code.
5635         * valops.c (value_ind): Remove lint code.
5636         * valarith.c (value_x_binop, value_x_unop, value_equal)
5637         (value_pos): Remove lint code.
5638
5639 2018-07-28  Tom de Vries  <tdevries@suse.de>
5640
5641         * eval.c (evaluate_subexp_for_sizeof): Interpret size of dynamic type
5642         with undefined upper bound as <optimized out>.
5643
5644 2018-07-27  Sergio Durigan Junior  <sergiodj@redhat.com>
5645
5646         * gcore.in: Rename variable "name" to "prefix".  Expand
5647         "usage" text.
5648
5649 2018-07-14  Jon Turney  <jon.turney@dronecode.org.uk>
5650
5651         * windows-nat.c (windows_nat_target::create_inferior): Update to
5652         call close() in global namespace.
5653
5654 2018-07-26  Tom Tromey  <tom@tromey.com>
5655
5656         * dwarf-index-write.c (add_address_entry): Don't add objfile
5657         offsets.
5658         * dbxread.c (find_stab_function): Rename from
5659         find_stab_function_addr.  Return a bound_minimal_symbol.
5660         (read_dbx_symtab): Use raw_text_low, raw_text_high.
5661         Don't add objfile offsets.
5662         (end_psymtab): Use raw_text_low, raw_text_high,
5663         MSYMBOL_VALUE_RAW_ADDRESS.
5664         (read_ofile_symtab): Update.
5665         (process_one_symbol): Update.
5666         * dwarf2read.c (create_addrmap_from_index): Don't add objfile
5667         offsets.
5668         (dw2_relocate): Remove.
5669         (dw2_find_pc_sect_symtab): Bias PC by the text offset before
5670         searching addrmap.
5671         (dwarf2_gdb_index_functions, dwarf2_debug_names_functions):
5672         Update.
5673         (process_psymtab_comp_unit_reader, add_partial_symbol)
5674         (add_partial_subprogram, dwarf2_ranges_read): Update.
5675         (load_partial_dies): Update.
5676         (add_address_entry): Don't add objfile offsets.
5677         (dwarf2_build_include_psymtabs): Update.
5678         (create_addrmap_from_aranges): Don't add objfile offsets.
5679         (dw2_find_pc_sect_compunit_symtab): Update.
5680         * mdebugread.c (parse_symbol): Don't add objfile offsets.
5681         (parse_lines): Remove 'pst' parameter, replace with 'textlow'.
5682         Update.
5683         (parse_partial_symbols): Don't add objfile offsets.  Use
5684         raw_text_low, raw_text_high.  Update.
5685         (handle_psymbol_enumerators, psymtab_to_symtab_1): Update.
5686         * objfiles.c (objfile_relocate1): Don't relocate psymtabs_addrmap
5687         or call 'relocate' quick function.  Clear psymbol_map.
5688         * psympriv.h (struct partial_symbol) <address>: Add section
5689         offset.
5690         <set_unrelocated_address>: Rename from set_address.
5691         <raw_text_low, raw_text_high>: New methods.
5692         <text_low, text_high>: Add objfile parameter.
5693         (add_psymbol_to_bcache): Add 'section' parameter.  Call
5694         set_unrelocated_address.
5695         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
5696         (find_pc_psymbol): Update.
5697         (fixup_psymbol_section, relocate_psymtabs): Remove.
5698         (dump_psymtab, psym_functions): Update.
5699         (add_psymbol_to_bcache, add_psymbol_to_list): Add 'section'
5700         parameter.
5701         (maintenance_info_psymtabs, maintenance_check_psymtabs): Update.
5702         (start_psymtab_common): Update.
5703         * symfile-debug.c (debug_qf_relocate): Remove.
5704         (debug_sym_quick_functions): Update.
5705         * symfile.h (struct quick_symbol_functions) <relocate>: Remove.
5706         * xcoffread.c (scan_xcoff_symtab): Don't add objfile offsets.
5707         Update.
5708
5709 2018-07-26  Tom Tromey  <tromey@redhat.com>
5710
5711         * dbxread.c (end_psymtab): Use text_high_valid and
5712         text_low_valid.
5713         * mdebugread.c (parse_partial_symbols): Use text_low_valid.
5714         (psymtab_to_symtab_1): Use text_high_valid and text_low_valid.
5715         * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
5716         Update comment.
5717         <text_low_valid, text_high_valid>: New fields.
5718         <set_text_low, set_text_high>: Update.
5719         * xcoffread.c (scan_xcoff_symtab): Use text_low_valid.
5720
5721 2018-07-26  Tom Tromey  <tom@tromey.com>
5722
5723         * dbxread.c (read_dbx_symtab, end_psymtab, read_ofile_symtab):
5724         Update.
5725         * dwarf2read.c (dwarf2_create_include_psymtab): Don't initialize
5726         textlow and texthigh fields.
5727         (process_psymtab_comp_unit_reader, dwarf2_build_include_psymtabs):
5728         Update.
5729         * mdebugread.c (parse_lines, parse_partial_symbols)
5730         (psymtab_to_symtab_1): Update.
5731         * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
5732         Rename fields.  Update comment.  Now private.
5733         <text_low, text_high, set_text_low, set_text_high>: New methods.
5734         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
5735         (find_pc_sect_psymbol, relocate_psymtabs, dump_psymtab)
5736         (start_psymtab_common, maintenance_info_psymtabs)
5737         (maintenance_check_psymtabs): Update.
5738         * xcoffread.c (xcoff_end_psymtab): Don't initialize textlow and
5739         texthigh fields.
5740         (scan_xcoff_symtab): Update.
5741
5742 2018-07-26  Tom Tromey  <tromey@redhat.com>
5743
5744         * psympriv.h (struct partial_symbol) <unrelocated_address,
5745         address, set_address>: New methods.
5746         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymbol)
5747         (fixup_psymbol_section, relocate_psymtabs): Update.
5748         (print_partial_symbols): Add 'objfile' parameter.  Update.
5749         (dump_psymtab, add_psymbol_to_bcache, psym_fill_psymbol_map):
5750         Update.
5751
5752 2018-07-26  Tom Tromey  <tom@tromey.com>
5753
5754         * dwarf-index-write.c (write_psymbols, debug_names::insert)
5755         (debug_names::write_psymbols): Update.
5756         * psympriv.h (struct partial_symbol): Derive from
5757         general_symbol_info.
5758         <obj_section>: New method.
5759         (PSYMBOL_DOMAIN, PSYMBOL_CLASS): Remove.n
5760         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
5761         (find_pc_sect_psymbol, fixup_psymbol_section)
5762         (match_partial_symbol, lookup_partial_symbol, relocate_psymtabs)
5763         (print_partial_symbols, recursively_search_psymtabs)
5764         (compare_psymbols, psymbol_hash, psymbol_compare)
5765         (add_psymbol_to_bcache, maintenance_check_psymtabs)
5766         (psymbol_name_matches, psym_fill_psymbol_map): Update.
5767
5768 2018-07-26  Tom Tromey  <tromey@redhat.com>
5769
5770         * dbxread.c (end_psymtab): Remove dead code.
5771
5772 2018-07-26  Andrew Burgess  <andrew.burgess@embecosm.com>
5773
5774         * dwarf2-frame-tailcall.c (tailcall_frame_sniffer): Exit early if
5775         DWARF unwinders are disabled.
5776         * dwarf2-frame.c: Add dwarf2read.h include.
5777         (dwarf2_frame_sniffer): Exit early if DWARF unwinders are
5778         disabled.
5779         (dwarf2_frame_unwinders_enabled_p): Define.
5780         (show_dwarf_unwinders_enabled_p): New function.
5781         (_initialize_dwarf2_frame): Register switch to control DWARF
5782         unwinder use.
5783         * dwarf2-frame.h (dwarf2_frame_unwinders_enabled_p): Declare.
5784         * dwarf2read.c (set_dwarf_cmdlist): Remove static keyword.
5785         (show_dwarf_cmdlist): Remove static keyword.
5786         * dwarf2read.h (set_dwarf_cmdlist): Declare.
5787         (show_dwarf_cmdlist): Declare.
5788         * NEWS: Document new feature.
5789
5790 2018-07-26  Tom de Vries  <tdevries@suse.de>
5791
5792         PR breakpoints/23366
5793         * infcmd.c (info_program_command): Handle ptid == minus_one_ptid.
5794
5795 2018-07-26  Tom de Vries  <tdevries@suse.de>
5796
5797         * dwarf2read.c (read_subrange_type): Warn if DW_AT_upper_bound or
5798         DW_AT_count can't be translated to a dynamic prop.
5799
5800 2018-07-25  Tom de Vries  <tdevries@suse.de>
5801
5802         * dwarf2loc.c (dwarf2_locexpr_baton_eval): Wrap ctx.eval call in
5803         try/catch.
5804
5805 2018-07-25  Jan Vrany  <jan.vrany@fit.cvut.cz>
5806
5807         * breakpoint.c (enable_disable_bp_num_loc): Notify observers.
5808
5809 2018-07-25  Joel Brobecker  <brobecker@adacore.com>
5810
5811         * MAINTAINERS (Global Maintainers): Add Tom Tromey.
5812
5813 2018-07-24  Keith Seitz  <keiths@redhat.comt
5814
5815         PR symtab/23010
5816         * dwarf2read.c (dw2_add_symbol_to_list): New function.
5817         (fixup_go_packaging, new_symbol): Use dw2_add_symbol_to_list
5818         instead of add_symbol_to_list.
5819         (read_file_scope): Call prepare_one_comp_unit before reading
5820         any other DIEs.
5821
5822 2018-07-24  Simon Marchi  <simon.marchi@ericsson.com>
5823
5824         * common/scoped_mmap.h (class scoped_mmap): Fix indentation.
5825
5826 2018-07-24  Tom Tromey  <tom@tromey.com>
5827
5828         * utils.c (malloc, realloc, free): Don't declare.
5829         * configure, config.in: Rebuild.
5830         * configure.ac: Don't check for declarations of free, malloc, or
5831         realloc.
5832
5833 2018-07-22  Simon Marchi  <simon.marchi@polymtl.ca>
5834
5835         * aarch64-linux-nat.c
5836         (aarch64_linux_nat_target::stopped_data_address): Remove unused
5837         variable.
5838         * arm-linux-nat.c (fetch_regs): Likewise.
5839         (store_regs): Likewise.
5840         (fetch_vfp_regs): Likewise.
5841         (store_vfp_regs): Likewise.
5842         (arm_linux_nat_target::insert_hw_breakpoint): Likewise.
5843         (arm_linux_nat_target::remove_hw_breakpoint): Likewise.
5844         (arm_linux_nat_target::insert_watchpoint): Likewise.
5845         (arm_linux_nat_target::remove_watchpoint): Likewise.
5846         * mips-linux-nat.c (mips_linux_nat_target::insert_watchpoint):
5847         Likewise.
5848         * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs):
5849         Likewise.
5850         * ppc-linux-nat.c (fetch_register): Likewise.
5851         (fetch_all_gp_regs): Likewise.
5852         (fetch_ppc_registers): Likewise.
5853         (store_all_gp_regs): Likewise.
5854         (store_ppc_registers): Likewise.
5855         (hwdebug_insert_point): Likewise.
5856         (can_use_watchpoint_cond_accel): Likewise.
5857         * remote-sim.c (gdb_os_write_stdout): Likewise.
5858
5859 2018-07-22  Simon Marchi  <simon.marchi@polymtl.ca>
5860             Tom Tromey  <tom@tromey.com>
5861
5862         * warning.m4 (AM_GDB_WARNINGS): Add -Wunused-variable and special
5863         test for it.
5864         * configure: Rebuild.
5865
5866 2018-07-22  Tom Tromey  <tom@tromey.com>
5867
5868         * regformats/regdat.sh: Define xmltarget_${name} inside
5869         #ifndef IN_PROCESS_AGENT.
5870
5871 2018-07-22  Tom Tromey  <tom@tromey.com>
5872
5873         * value.c (value_fetch_lazy_bitfield): Remove unused variable.
5874
5875 2018-07-22  Tom Tromey  <tom@tromey.com>
5876
5877         * symfile.c (reread_symbols): Notify iter, not objfile.
5878
5879 2018-07-22  Tom Tromey  <tom@tromey.com>
5880
5881         * ravenscar-thread.c (ravenscar_thread_target::store_registers):
5882         Use arch_ops.
5883         (ravenscar_thread_target::prepare_to_store): Likewise.
5884
5885 2018-07-22  Tom Tromey  <tom@tromey.com>
5886
5887         * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Remove
5888         unused variable.  Call value_fetch_lazy when needed.
5889         * guile/scm-pretty-print.c (gdbscm_apply_val_pretty_printer):
5890         Remove unused variable.  Call value_fetch_lazy when needed.
5891
5892 2018-07-22  Tom Tromey  <tom@tromey.com>
5893
5894         * m32c-tdep.c (mark_dma): Return void.
5895         (make_regs): Remove unused declarations.
5896
5897 2018-07-22  Tom Tromey  <tom@tromey.com>
5898
5899         * guile/scm-cmd.c (gdbscm_dont_repeat): Call
5900         cmdscm_get_valid_command_smob_arg_unsafe for effect.
5901         * guile/scm-block.c (gdbscm_make_block_syms_iter): Call
5902         bkscm_get_valid_block_smob_arg_unsafe for effect.
5903
5904 2018-07-22  Tom Tromey  <tom@tromey.com>
5905
5906         * bfin-tdep.c (bfin_push_dummy_call): Use arg_type, not
5907         value_type.
5908
5909 2018-07-22  Tom Tromey  <tom@tromey.com>
5910
5911         * windows-nat.c (saved_context): Conditionally define.
5912         * remote.c (remote_target::remote_btrace_maybe_reopen):
5913         Conditionally declare "warned".
5914         * inflow.c (sigquit_ours): Conditionally define.
5915         (new_tty): Move "tty" declaration inside #if.
5916         * guile/guile.c (guile_datadir): Conditionally define.
5917         * charset.c (set_be_le_names): Move some declarations inside #if.
5918         * btrace.c (parse_xml_btrace): Move "errcode" declaration inside
5919         #if.
5920         (parse_xml_btrace_conf): Likewise.
5921
5922 2018-07-22  Tom Tromey  <tom@tromey.com>
5923
5924         * spu-tdep.c (spu_get_overlay_table): Remove unused variable.
5925
5926 2018-07-22  Tom Tromey  <tom@tromey.com>
5927
5928         * guile/scm-value.c (gdbscm_value_call): Remove unused variables.
5929         * guile/scm-math.c (vlscm_unop_gdbthrow, vlscm_binop_gdbthrow)
5930         (vlscm_convert_typed_value_from_scheme): Remove unused variable.
5931         * buildsym-legacy.c (get_macro_table): Remove unused variable.
5932         * stack.c (frame_apply_level_command): Remove unused variable.
5933         * tic6x-tdep.c (tic6x_push_dummy_call): Remove unused variable.
5934         * sparc64-tdep.c (adi_examine_command): Remove unused variable.
5935         * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Remove
5936         unused variable.
5937         * nios2-tdep.c (nios2_push_dummy_call): Remove unused variable.
5938         * mep-tdep.c (mep_push_dummy_call): Remove unused variable.
5939         * ada-lang.c (ada_lookup_symbol_list_worker): Remove unused
5940         variable.
5941         * amd64-tdep.c (amd64_supply_xsave): Remove unused variable.
5942         * arm-tdep.c (arm_record_data_proc_misc_ld_str): Remove unused
5943         variable.
5944         * breakpoint.c (check_no_tracepoint_commands, update_watchpoint):
5945         Remove unused variable.
5946         * cli/cli-script.c (recurse_read_control_structure): Remove unused
5947         variable.
5948         * common/tdesc.c (print_xml_feature::visit): Remove unused
5949         variable.
5950         * compile/compile-object-load.c (store_regs): Remove unused
5951         variables.
5952         * complaints.c (clear_complaints): Remove unused variable.
5953         * corelow.c (core_target_open): Remove unused variable.
5954         * fbsd-tdep.c (fbsd_core_info_proc_status): Remove unused
5955         variable.
5956         * guile/scm-frame.c (gdbscm_frame_read_var): Remove unused
5957         variable.
5958         * guile/scm-symtab.c (stscm_print_sal_smob): Remove unused
5959         variable.
5960         * guile/scm-type.c (gdbscm_field_baseclass_p): Remove unused
5961         variable.
5962         * guile/scm-utils.c (gdbscm_parse_function_args): Remove unused
5963         variable.
5964         * hppa-tdep.c (hppa_stub_frame_unwind_cache): Remove unused
5965         variable.
5966         * ia64-tdep.c (examine_prologue): Remove unused variable.
5967         * infcall.c (run_inferior_call): Remove unused variable.
5968         * inferior.c (exit_inferior): Remove unused variable.
5969         * infrun.c (infrun_thread_ptid_changed): Remove unused variable.
5970         * linespec.c (decode_line_2): Remove unused variable.
5971         * linux-nat.c (super_close): Remove.
5972         * linux-tdep.c (linux_info_proc): Remove unused variable.
5973         * mi/mi-main.c (mi_execute_command): Remove unused variable.
5974         * microblaze-linux-tdep.c (microblaze_linux_sigtramp_cache):
5975         Remove unused variable.
5976         * parse.c (find_minsym_type_and_address): Remove unused variable.
5977         * printcmd.c (info_symbol_command, printf_floating): Remove unused
5978         variable.
5979         * python/py-breakpoint.c (bppy_set_commands): Remove unused
5980         variable.
5981         * python/py-unwind.c (unwind_infopy_dealloc): Remove unused
5982         variables.
5983         * record-btrace.c (record_btrace_target::store_registers): Remove
5984         unused variable.
5985         (cmd_show_record_btrace_cpu): Remove unused variable.
5986         * riscv-tdep.c (riscv_register_reggroup_p)
5987         (riscv_push_dummy_call, riscv_return_value): Remove unused
5988         variable.
5989         * rust-exp.y (literal): Remove unused variable.
5990         * rust-lang.c (rust_evaluate_subexp) <OP_RUST_ARARAY>: Remove
5991         unused variable.
5992         <STRUCTOP_ANONYMOUS>: Likewise.
5993         * s390-linux-tdep.c (s390_linux_init_abi_31)
5994         (s390_linux_init_abi_64): Remove unused variable.
5995         * ser-ming2.c (ser_windows_read_prim, pipe_select_thread)
5996         (file_select_thread, net_windows_open, _initialize_ser_windows):
5997         Remove unused variables.
5998         * symtab.c (find_pc_sect_line): Remove unused variable.
5999         * target-memory.c (compute_garbled_blocks): Remove unused
6000         variable.
6001         (target_write_memory_blocks): Remove unused variable.
6002         * target.c (target_stack::unpush): Remove unused variables.
6003         * tracepoint.c (start_tracing, all_tracepoint_actions)
6004         (merge_uploaded_trace_state_variables)
6005         (print_one_static_tracepoint_marker): Remove unused variable.
6006         * unittests/basic_string_view/element_access/char/1.cc (test01):
6007         Remove unused variable.
6008         * windows-nat.c (windows_continue, windows_add_all_dlls)
6009         (do_initial_windows_stuff, windows_nat_target::create_inferior):
6010         Remove unused variables.
6011
6012 2018-07-21  Simon Marchi  <simon.marchi@polymtl.ca>
6013
6014         * arm-tdep.c (arm_gdbarch_init): Declare attr_arch and
6015         attr_profile in HAVE_ELF.
6016         * rs6000-tdep.c (bfd_uses_spe_extensions): Declare vector_abi in
6017         HAVE_ELF.
6018
6019 2018-07-20  Simon Marchi  <simon.marchi@polymtl.ca>
6020
6021         * frame.c (frame_register_unwind): Change parameter name.
6022         (frame_unwind_register): Likewise.
6023         (frame_unwind_register_value): Likewise.
6024         (frame_unwind_register_signed): Likewise.
6025         (frame_unwind_register_unsigned): Likewise.
6026         * frame.h (frame_register_unwind): Likewise.
6027         (frame_unwind_register): Likewise.
6028         (frame_unwind_register_value): Likewise.
6029         (frame_unwind_register_signed): Likewise.
6030         (frame_unwind_register_unsigned): Likewise.
6031         (frame_unwind_arch): Likewise.
6032
6033 2018-07-20  Maciej W. Rozycki  <macro@mips.com>
6034
6035         * MAINTAINERS: Update my e-mail address, downgrade to MIPS I-IV
6036         ISA maintenance.
6037
6038 2018-07-20  Maciej W. Rozycki  <macro@mips.com>
6039
6040         * mips-linux-nat.c (mips_linux_nat_target::read_description):
6041         Call `get_ptrace_pid' rather than extracting the ptrace PID by
6042         hand.
6043
6044 2018-07-20  Keith Seitz  <keiths@redhat.com>
6045
6046         * buildsym.h (struct buildsym_compunit) <m_objfile, m_subfiles,
6047         m_main_subfile, m_comp_dir, m_producer, m_debugformat,
6048         m_compunit_symtab, m_language>: Add "m_" prefix.
6049         Update all uses.
6050         * buildsym.c: Update all uses.
6051
6052 2018-07-20  Tom Tromey  <tom@tromey.com>
6053
6054         * buildsym-legacy.h (record_line): Don't use record_line_ftype.
6055         * buildsym.h (record_line_ftype): Remove typedef.
6056
6057 2018-07-20  Tom Tromey  <tom@tromey.com>
6058
6059         * buildsym-legacy.h (augment_type_symtab): Don't declare.
6060         (end_expandable_symtab): Likewise.
6061         (end_symtab_get_static_block): Likewise.
6062         (end_symtab_from_static_block): Likewise.
6063         * buildsym-legacy.c (augment_type_symtab): Remove.
6064         (end_expandable_symtab): Remove.
6065         (end_symtab_get_static_block): Remove.
6066         (end_symtab_from_static_block): Remove.
6067
6068 2018-07-20  Tom Tromey  <tom@tromey.com>
6069
6070         * dwarf2read.c: Include buildsym.h.
6071         (struct dwarf2_cu) <builder>: New method.
6072         (fixup_go_packaging): Update.
6073         (process_full_comp_unit, process_full_type_unit): Update.  Don't
6074         use scoped_free_pendings.
6075         (using_directives): Add "cu" parameter, remove "language".
6076         (read_import_statement, setup_type_unit_groups, )
6077         (read_func_scope, read_lexical_block_scope)
6078         (dwarf2_record_block_ranges, read_namespace): Update.
6079         (lnp_state_machine::lnp_state_machine): Add cu parameter.
6080         (lnp_state_machine::handle_end_sequence): Update.
6081         (class lnp_state_machine) <m_cu>: New member.
6082         <m_record_line_callback>: Remove.
6083         <m_currently_recording_lines>: New member.
6084         (lnp_state_machine::handle_set_file): Update.
6085         (noop_record_line): Remove.
6086         (dwarf_record_line_p): Add cu parameter.
6087         (dwarf_record_line_1, dwarf_finish_line): Likewise.
6088         (lnp_state_machine::record_line)
6089         (lnp_state_machine::lnp_state_machine)
6090         (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
6091         (dwarf_decode_lines): Update.
6092         (dwarf2_start_subfile): Add cu parameter.
6093         (dwarf2_start_symtab, new_symbol): Update.
6094         (macro_start_file, dwarf_decode_macro_bytes): Add cu parameter.
6095         Remove dwarf2_per_objfile parameter.
6096         (dwarf_decode_macros): Update.
6097
6098 2018-07-20  Tom Tromey  <tom@tromey.com>
6099
6100         * stabsread.c (define_symbol): Update.
6101         * buildsym-legacy.h (get_buildsym_compunit): Declare.
6102         * dwarf2read.c (new_symbol): Update.
6103         * cp-support.h (cp_scan_for_anonymous_namespaces): Update.
6104         * cp-namespace.c: Include buildsym.h.
6105         (cp_scan_for_anonymous_namespaces): Add "compunit" parameter.
6106         * buildsym-legacy.c (get_buildsym_compunit): New function.
6107
6108 2018-07-20  Tom Tromey  <tom@tromey.com>
6109
6110         * xcoffread.c: Include buildsym-legacy.h.
6111         * windows-nat.c: Include buildsym-legacy.h.
6112         * stabsread.c: Include buildsym-legacy.h.
6113         * mdebugread.c: Include buildsym-legacy.h.
6114         * buildsym-legacy.h: New file.
6115         * buildsym-legacy.c: New file, from buildsym.c.
6116         * go32-nat.c: Include buildsym-legacy.h.
6117         * dwarf2read.c: Include buildsym-legacy.h.
6118         * dbxread.c: Include buildsym-legacy.h.
6119         * cp-namespace.c: Include buildsym-legacy.h.
6120         * coffread.c: Include buildsym-legacy.h.
6121         * buildsym.h: Move some contents to buildsym-legacy.h.
6122         * buildsym.c: Include buildsym-legacy.h.  Move many functions to
6123         buildsym-legacy.c.
6124         * Makefile.in (HFILES_NO_SRCDIR): Add buildsym-legacy.h.
6125
6126 2018-07-20  Tom Tromey  <tom@tromey.com>
6127
6128         * buildsym.h (struct buildsym_compunit): Move from buildsym.c.
6129         * buildsym.c (struct buildsym_compunit): Move to buildsym.h.
6130         (buildsym_compunit::buildsym_compunit)
6131         (buildsym_compunit::~buildsym_compunit)
6132         (buildsym_compunit::get_macro_table): Define.
6133
6134 2018-07-20  Tom Tromey  <tom@tromey.com>
6135
6136         * buildsym.c (reset_symtab_globals): Remove.
6137         (buildsym_compunit::end_symtab_from_static_block): Update.
6138         (buildsym_compunit::augment_type_symtab): Update.
6139         (end_symtab_from_static_block): Call free_buildsym_compunit.
6140         (augment_type_symtab, end_symtab, end_expandable_symtab):
6141         Likewise.
6142
6143 2018-07-20  Tom Tromey  <tom@tromey.com>
6144
6145         * arch-utils.c: Do not include buildsym.h.
6146         * mipsread.c: Do not include buildsym.h.
6147         * machoread.c: Do not include buildsym.h.
6148         * elfread.c: Do not include buildsym.h.
6149
6150 2018-07-20  Tom Tromey  <tom@tromey.com>
6151
6152         * buildsym.c (buildsym_compunit::buildsym_compunit): Do more
6153         initialization.
6154         (buildsym_compunit): Add new constructor.
6155         (struct buildsym_compunit) <get_last_source_file, finish_block,
6156         record_block_range, start_subfile, patch_subfile_names,
6157         push_subfile, pop_subfile, record_line, get_compunit_symtab,
6158         set_last_source_start_addr, get_last_source_start_addr,
6159         get_local_using_directives, set_local_using_directives,
6160         get_global_using_directives, outermost_context_p,
6161         get_current_context_stack, get_context_stack_depth,
6162         get_current_subfile, get_local_symbols, get_file_symbols,
6163         get_global_symbols, record_debugformat, record_producer,
6164         push_context, pop_context, end_symtab_get_static_block,
6165         end_symtab_from_static_block, end_symtab, end_expandable_symtab>:
6166         New public methods.
6167         <record_pending_block, finish_block_internal, make_blockvector,
6168         watch_main_source_file_lossage, end_symtab_with_blockvector>: New
6169         private methods.
6170         Update all users.
6171
6172 2018-05-22  Tom Tromey  <tom@tromey.com>
6173
6174         * buildsym.c (record_pending_block): Move earlier.  Remove objfile
6175         parameter.
6176         (finish_block_internal): Update.
6177
6178 2018-07-20  Tom Tromey  <tom@tromey.com>
6179
6180         * buildsym.c (record_pending_block): Move earlier.  Remove objfile
6181         parameter.
6182         (finish_block_internal): Update.
6183
6184 2018-07-20  Tom Tromey  <tom@tromey.com>
6185
6186         * buildsym.h (EXTERN): Don't define or undef.
6187         * buildsym.c (EXTERN): Don't define.
6188
6189 2018-07-20  Tom Tromey  <tom@tromey.com>
6190
6191         * buildsym.c: Remove TODO comment.
6192
6193 2018-07-20  Tom Tromey  <tom@tromey.com>
6194
6195         * coffread.c (coff_symtab_read): Update.
6196         * xcoffread.c (xcoff_psymtab_to_symtab_1): Update.
6197         (xcoff_new_init): Update.
6198         * mipsread.c (mipscoff_new_init): Update.
6199         * mdebugread.c (mdebug_build_psymtabs): Update.
6200         * elfread.c (elf_new_init): Update.
6201         * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
6202         Update.
6203         * dbxread.c (dbx_new_init, dbx_psymtab_to_symtab_1)
6204         (coffstab_build_psymtabs, elfstab_build_psymtabs)
6205         (stabsect_build_psymtabs): Update.
6206         * buildsym.h (buildsym_init): Don't declare.
6207         * buildsym.c: Update comment.
6208         (prepare_for_building): Remove.
6209         (start_symtab, restart_symtab): Update.
6210         (reset_symtab_globals): Update comment.
6211         (buildsym_init): Remove.
6212
6213 2018-07-20  Tom Tromey  <tom@tromey.com>
6214
6215         * xcoffread.c (read_xcoff_symtab, process_xcoff_symbol): Update.
6216         * stabsread.c (patch_block_stabs, define_symbol, read_type)
6217         (read_enum_type, common_block_start, common_block_end)
6218         (cleanup_undefined_types_1, finish_global_stabs): Update.
6219         * mdebugread.c (psymtab_to_symtab_1): Update.
6220         * dwarf2read.c (fixup_go_packaging, read_func_scope)
6221         (read_lexical_block_scope, new_symbol): Update.
6222         * dbxread.c (process_one_symbol): Update.
6223         * coffread.c (coff_symtab_read, process_coff_symbol)
6224         (coff_read_enum_type): Update.
6225         * buildsym.h (file_symbols, global_symbols, local_symbols): Don't
6226         declare.
6227         (get_local_symbols, get_file_symbols, get_global_symbols): New
6228         functions.
6229         * buildsym.c (~buildsym_compunit): Clean up m_file_symbols and
6230         m_global_symbols.
6231         <m_file_symbols, m_local_symbols, m_global_symbols>: New members.
6232         (~scoped_free_pendings): Update.
6233         (finish_block, prepare_for_building, reset_symtab_globals)
6234         (end_symtab_get_static_block, end_symtab_with_blockvector)
6235         (augment_type_symtab, push_context): Update.
6236         (get_local_symbols, get_file_symbols, get_global_symbols): New
6237         functions.
6238         (buildsym_init): Update.
6239
6240 2018-07-20  Tom Tromey  <tom@tromey.com>
6241
6242         * dwarf2read.c (process_full_comp_unit): Do not set list_in_scope.
6243         (process_full_type_unit): Likewise.
6244         (dwarf2_start_symtab): Set list_in_scope.
6245
6246 2018-07-20  Tom Tromey  <tom@tromey.com>
6247
6248         * dwarf2read.c (process_psymtab_comp_unit_reader)
6249         (build_type_psymtabs_reader): Do not set list_in_scope.
6250
6251 2018-07-20  Tom Tromey  <tom@tromey.com>
6252
6253         * buildsym.c (free_pendings): Remove.
6254         (add_symbol_to_list, scoped_free_pendings)
6255         (finish_block_internal, buildsym_init): Update.
6256
6257 2018-07-20  Tom Tromey  <tom@tromey.com>
6258
6259         * xcoffread.c (read_xcoff_symtab): Update.
6260         * dwarf2read.c (read_func_scope, read_lexical_block_scope):
6261         Update.
6262         * dbxread.c (process_one_symbol): Update.
6263         * coffread.c (coff_symtab_read): Update.
6264         * buildsym.h (finish_block): Update.
6265         * buildsym.c (finish_block): Remove "listhead" argument.
6266         (end_symtab_get_static_block): Update.
6267
6268 2018-07-20  Tom Tromey  <tom@tromey.com>
6269
6270         * buildsym.h (class scoped_free_pendings): Remove constructor.
6271         * buildsym.c (struct buildsym_compunit) <free_pending_blocks>: New
6272         method.
6273         <m_pending_block_obstack, m_pending_blocks>: New members.
6274         (pending_block_obstack, pending_blocks): Remove.
6275         (scoped_free_pendings::scoped_free_pendings): Default.
6276         (~scoped_free_pendings): Update.
6277         (free_pending_blocks): Remove.
6278         (finish_block_internal, record_pending_block, make_blockvector)
6279         (end_symtab_get_static_block, augment_type_symtab, push_context)
6280         (buildsym_init): Update.
6281
6282 2018-07-20  Tom Tromey  <tom@tromey.com>
6283
6284         * buildsym.c (struct buildsym_compunit) <m_pending_addrmap,
6285         m_pending_addrmap_obstack, m_pending_addrmap_interesting>: New
6286         members.
6287         (pending_addrmap, pending_addrmap_obstack)
6288         (pending_addrmap_interesting): Remove.
6289         (scoped_free_pendings, record_block_range, make_blockvector)
6290         (prepare_for_building, reset_symtab_globals, buildsym_init):
6291         Update.
6292
6293 2018-07-20  Tom Tromey  <tom@tromey.com>
6294
6295         * xcoffread.c (process_linenos): Update.
6296         * stabsread.c (define_symbol, read_type, read_enum_type): Update.
6297         * mdebugread.c (psymtab_to_symtab_1): Update.
6298         * dwarf2read.c (setup_type_unit_groups)
6299         (lnp_state_machine::handle_set_file, dwarf_record_line_p)
6300         (lnp_state_machine::record_line, dwarf_decode_lines): Update.
6301         * dbxread.c (process_one_symbol): Update.
6302         * coffread.c (coff_symtab_read, enter_linenos)
6303         (process_coff_symbol): Update.
6304         * buildsym.h (current_subfile): Don't declare.
6305         (get_current_subfile): Declare.
6306         * buildsym.c (struct buildsym_compunit) <m_current_subfile>: New
6307         member.
6308         (start_subfile, free_buildsym_compunit, push_subfile)
6309         (prepare_for_building, start_symtab): Update.
6310         (get_current_subfile): New function.
6311
6312 2018-07-20  Tom Tromey  <tom@tromey.com>
6313
6314         * coffread.c (coff_symtab_read): Update.
6315         * xcoffread.c (read_xcoff_symtab): Update.
6316         * dwarf2read.c (new_symbol): Update.
6317         (read_func_scope, read_lexical_block_scope): Update.
6318         * dbxread.c (process_one_symbol): Update.
6319         * buildsym.h (context_stack, context_stack_depth): Don't declare.
6320         (outermost_context_p): Remove macro.
6321         (outermost_context_p, get_current_context_stack)
6322         (get_context_stack_depth): Declare.
6323         (pop_context): Return struct context_stack.
6324         * buildsym.c (struct buildsym_compunit) <m_context_stack: New
6325         member.
6326         (context_stack_size): Remove.
6327         (INITIAL_CONTEXT_STACK_SIZE): Remove.
6328         (prepare_for_building, end_symtab_get_static_block)
6329         (augment_type_symtab, push_context): Update.
6330         (pop_context): Return struct context_stack.
6331         (outermost_context_p, get_current_context_stack)
6332         (get_context_stack_depth): New functions.
6333         (buildsym_init): Update.
6334
6335 2018-07-20  Tom Tromey  <tom@tromey.com>
6336
6337         * rust-exp.y: Now a pure parser.  Update all rules.
6338         (%union): Move earlier.
6339         (current_parser, work_obstack): Remove globals.
6340         (rust_parser, ~rust_parser): Update.
6341         (class rust_parser) <copy_name, concat3, crate_name, super_name,
6342         lex_character, lex_number, lex_string, lex_identifier,
6343         rust_lookup_type, convert_params_to_types, convert_ast_to_type,
6344         convert_name, convert_params_to_expression,
6345         convert_ast_to_expression, ast_basic_type, ast_operation,
6346         ast_compound_assignment, rust_op, ast_literal, ast_dliteral,
6347         ast_structop, ast_structop_anonymous, ast_unary, ast_cast,
6348         ast_call_ish, ast_path, ast_string, ast_struct, ast_range,
6349         ast_array_type, ast_slice_type, ast_reference_type,
6350         ast_pointer_type, ast_function_type, ast_tuple_type>: New methods.
6351         (rust_parse): Update.
6352         (rustyyerror, rustyylex): Add parser parameter.
6353         (rust_lex_test_one, rust_lex_int_test, rust_lex_exception_test)
6354         (rust_lex_stringish_test, rust_lex_test_sequence)
6355         (rust_lex_test_trailing_dot, rust_lex_test_completion)
6356         (rust_lex_test_push_back, rust_lex_tests): Update.
6357
6358 2018-07-19  Pedro Alves  <palves@redhat.com>
6359
6360         * guile/guile-internal.h (gdbscm_scm_to_c_string): Now returns a
6361         gdb::unique_xmalloc_ptr.
6362         * guile/scm-breakpoint.c (gdbscm_set_breakpoint_condition_x):
6363         Adjust to use dbscm_wrap and gdb::unique_xmalloc_ptr.
6364         * guile/scm-exception.c (gdbscm_exception_message_to_string): Use
6365         copy-initialization.
6366         * guile/scm-pretty-print.c (ppscm_print_children): Use
6367         gdb::unique_xmalloc_ptr instead of cleanups.
6368         (gdbscm_apply_val_pretty_printer): Remove cleanups.
6369         * guile/scm-string.c (gdbscm_scm_to_c_string): Now returns a
6370         gdb::unique_xmalloc_ptr.
6371         * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
6372         Adjust to use gdb::unique_xmalloc_ptr.
6373         * guile/scm-utils.c (extract_arg): Adjust.
6374         * guile/scm-value.c (gdbscm_value_field): Adjust to use
6375         gdb::unique_xmalloc_ptr instead of a cleanup.
6376
6377 2018-07-19  Tom Tromey  <tom@tromey.com>
6378
6379         * utils.c (do_value_free_to_mark)
6380         (make_cleanup_value_free_to_mark): Remove.
6381         * utils.h (make_cleanup_value_free_to_mark): Remove.
6382
6383 2018-07-19  Pedro Alves  <palves@redhat.com>
6384
6385         * guile/guile-internal.h (gdbscm_wrap): Really make 'args' a
6386         forwarding reference.
6387
6388 2018-07-18  Pedro Alves  <palves@redhat.com>
6389
6390         * guile/guile.c (gdbscm_execute_gdb_command): Adjust to use
6391         gdbscm_wrap.  Use gdb::unique_xmalloc_ptr<char> instead of a
6392         cleanup.
6393
6394 2018-07-18  Pedro Alves  <palves@redhat.com>
6395
6396         * guile/guile-internal.h: Add comment about mixing GDB and Scheme
6397         exceptions.
6398         (GDBSCM_HANDLE_GDB_EXCEPTION_WITH_CLEANUPS): Delete.
6399         (gdbscm_wrap): New.
6400         * guile/scm-frame.c (gdbscm_frame_read_register): Use xfree
6401         directly instead of a cleanup.
6402         * guile/scm-math.c (vlscm_unop_gdbthrow): New, factored out from ...
6403         (vlscm_unop): ... this.  Reimplement using gdbscm_wrap.
6404         (vlscm_binop_gdbthrow): New, factored out from ...
6405         (vlscm_binop): ... this.  Reimplement using gdbscm_wrap.
6406         (vlscm_rich_compare): Use gdbscm_wrap.
6407         * guile/scm-symbol.c (gdbscm_lookup_symbol): Use xfree directly
6408         instead of a cleanup.
6409         (gdbscm_lookup_global_symbol): Use xfree directly instead of a
6410         cleanup.
6411         * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
6412         Use xfree directly instead of a cleanup.
6413         * guile/scm-value.c (gdbscm_make_value, gdbscm_make_lazy_value):
6414         Adjust to use gdbscm_wrap and scoped_value_mark.
6415         (gdbscm_value_optimized_out_p): Adjust to use gdbscm_wrap.
6416         (gdbscm_value_address, gdbscm_value_dereference)
6417         (gdbscm_value_referenced_value): Adjust to use gdbscm_wrap and
6418         scoped_value_mark.
6419         (gdbscm_value_dynamic_type): Use scoped_value_mark.
6420         (vlscm_do_cast, gdbscm_value_field): Adjust to use gdbscm_wrap and
6421         scoped_value_mark.
6422         (gdbscm_value_subscript, gdbscm_value_call): Adjust to use
6423         gdbscm_wrap and scoped_value_mark.
6424         (gdbscm_value_to_string): Use xfree directly instead of a
6425         cleanup.  Move 'buffer' unique_ptr to TRY scope.
6426         (gdbscm_value_to_lazy_string): Use xfree directly instead of a
6427         cleanup.  Move 'buffer' unique_ptr to TRY scope.  Use
6428         scoped_value_mark.
6429         (gdbscm_value_fetch_lazy_x): Use gdbscm_wrap.
6430         (gdbscm_parse_and_eval): Adjust to use gdbscm_wrap and
6431         scoped_value_mark.
6432         (gdbscm_history_ref, gdbscm_history_append_x): Adjust to use
6433         gdbscm_wrap.
6434
6435 2018-07-18  Tom de Vries  <tdevries@suse.de>
6436
6437         * findvar.c (default_read_var_value): Also resolve dynamic type for
6438         LOC_OPTIMIZED_OUT vars.
6439
6440 2018-07-18  Maciej W. Rozycki  <macro@mips.com>
6441
6442         * mips-tdep.c (micromips_next_pc): Add SYSCALL instruction
6443         decoding.
6444
6445 2018-07-17  Tom Tromey  <tom@tromey.com>
6446
6447         * guile/scm-param.c (pascm_set_func, pascm_show_func)
6448         (compute_enum_list, pascm_set_param_value_x)
6449         (gdbscm_parameter_value): Update.
6450         * guile/guile-internal.h (gdbscm_scm_to_string): Update.
6451         (gdbscm_scm_to_host_string): Update.
6452         * guile/scm-math.c (vlscm_convert_typed_value_from_scheme):
6453         Update.
6454         * guile/scm-cmd.c (cmdscm_add_completion): Update.
6455         * guile/scm-pretty-print.c (ppscm_print_string_repr): Update.
6456         * guile/scm-string.c (gdbscm_scm_to_string): Return
6457         unique_xmalloc_ptr.
6458         (gdbscm_scm_to_host_string): Likewise.
6459
6460 2018-07-17  Tom Tromey  <tom@tromey.com>
6461
6462         * guile/guile.c (gdbscm_eval_from_control_command): Update.
6463         * guile/guile-internal.h (gdbscm_safe_eval_string): Update.
6464         * guile/scm-objfile.c (gdbscm_execute_objfile_script): Update.
6465         * guile/scm-safe-call.c (gdbscm_safe_eval_string): Return
6466         unique_xmalloc_ptr.
6467
6468 2018-07-17  Tom Tromey  <tom@tromey.com>
6469
6470         * guile/scm-param.c (pascm_signal_setshow_error): Update.
6471         * guile/guile-internal.h (gdbscm_exception_message_to_string):
6472         Update.
6473         * guile/scm-cmd.c (cmdscm_function): Update.
6474         * guile/scm-pretty-print.c
6475         (ppscm_print_exception_unless_memory_error): Update.
6476         * guile/scm-exception.c (gdbscm_exception_message_to_string):
6477         Return unique_xmalloc_ptr.
6478
6479 2018-07-17  Tom Tromey  <tom@tromey.com>
6480
6481         * guile/scm-pretty-print.c (ppscm_make_pp_type_error_exception):
6482         Use string_printf.
6483
6484 2018-07-17  Jim Wilson  <jimw@sifive.com>
6485
6486         * riscv-tdep.c (riscv_has_feature): Delete comment that refers to
6487         set_gdbarch_decr_pc_after_break.  Call riscv_read_misa_reg always.
6488         (riscv_gdbarch_init): Delete local has_compressed_isa.  Delete now
6489         unecessary braces after EF_RISCV_RVC test.  Delete call to
6490         set_gdbarch_decr_pc_after_break.
6491
6492         * riscv-tdep.h (DECLARE_CSR): Use RISCV_FIRST_CSR_REGNUM instead of
6493         RISCV_LAST_FP_REGNUM + 1.
6494         (RSICV_CSR_LEGACY_MISA_REGNUM): Add RISCV_FIRST_CSR_REGNUM.
6495
6496 2018-07-17  Tom Tromey  <tom@tromey.com>
6497
6498         * configure.ac: Remove --disable-gdbcli.
6499         * configure: Rebuild.
6500         * Makefile.in (SUBDIR_CLI_DEPS, SUBDIR_CLI_LDFLAGS)
6501         (SUBDIR_CLI_CFLAGS): Remove.
6502         (SFILES): Use SUBDIR_CLI_SRCS.
6503         (COMMON_OBS): Use SUBDIR_CLI_OBS.
6504
6505 2018-07-17  Tom Tromey  <tom@tromey.com>
6506
6507         PR gdb/18624:
6508         * coffread.c (coff_symtab_read): Use scoped_free_pendings.
6509
6510 2018-07-16  Jim Wilson  <jimw@sifive.com>
6511
6512         * riscv-tdep.c (riscv_gdbarch_init): Call gdbarch_init_osabi.
6513
6514 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
6515
6516         * ia64-libunwind-tdep.c (libunwind_frame_cache): Remove unused
6517         variable.
6518         (libunwind_frame_sniffer): Likewise.
6519         (libunwind_frame_prev_register): Likewise.
6520         (libunwind_sigtramp_frame_sniffer): Likewise.
6521         * ia64-tdep.c (ia64_access_reg): Likewise.
6522         (ia64_access_rse_reg): Likewise.
6523         (ia64_libunwind_sigtramp_frame_this_id): Likewise.
6524         * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Likewise.
6525
6526 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
6527
6528         * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Add cast.
6529
6530 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
6531
6532         * remote-sim.c (gdbsim_target::close,
6533         gdbsim_target::mourn_inferior): Remove unused variables.
6534
6535 2018-07-16  Simon Marchi  <simon.marchi@polymtl.ca>
6536
6537         * ia64-tdep.c (ktab_buf): New global.
6538         (getunwind_table): Return a gdb::optional<gdb::byte_vector>.
6539         (get_kernel_table): Adjust.
6540
6541 2018-07-16  Tom Tromey  <tom@tromey.com>
6542
6543         * xcoffread.c (read_xcoff_symtab): Use outermost_context_p.
6544         * dwarf2read.c (using_directives, new_symbol): Use
6545         outermost_context_p.
6546         * dbxread.c (process_one_symbol): Use outermost_context_p.
6547         * coffread.c (coff_symtab_read): Use outermost_context_p.
6548
6549 2018-07-16  Tom Tromey  <tom@tromey.com>
6550
6551         * dwarf2read.c (using_directives, read_func_scope)
6552         (read_lexical_block_scope): Update.
6553         * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
6554         * buildsym.h (local_using_directives, global_using_directives):
6555         Don't declare.
6556         (get_local_using_directives, set_local_using_directives)
6557         (get_global_using_directives): Declare.
6558         * buildsym.c (struct buildsym_compunit) <m_local_using_directives,
6559         m_global_using_directives>: New members.
6560         (finish_block_internal, prepare_for_building)
6561         (reset_symtab_globals, end_symtab_get_static_block)
6562         (push_context): Update.
6563         (get_local_using_directives, set_local_using_directives)
6564         (get_global_using_directives): New functions.
6565         (buildsym_init): Update.
6566
6567 2018-07-16  Tom Tromey  <tom@tromey.com>
6568
6569         * xcoffread.c (xcoff_initial_scan): Don't call
6570         free_pending_blocks.
6571         * dbxread.c (dbx_symfile_read): Don't call free_pending_blocks.
6572         * buildsym.h (class scoped_free_pendings): Add constructor.
6573         (free_pending_blocks): Don't declare.
6574         * buildsym.c (scoped_free_pendings::scoped_free_pendings): New.
6575         (free_pending_blocks): Now static.
6576
6577 2018-07-16  Tom Tromey  <tom@tromey.com>
6578
6579         * buildsym.h (push_subfile, pop_subfile): Update declarations.
6580         * buildsym.c (struct buildsym_compunit) <m_subfile_stack>: New
6581         member.
6582         (struct subfile_stack): Remove.
6583         (subfile_stack): Remove.
6584         (push_subfile, pop_subfile, buildsym_init): Update.
6585
6586 2018-07-16  Tom Tromey  <tom@tromey.com>
6587
6588         * buildsym.c (push_subfile): Use gdb_assert.
6589         (pop_subfile): Use gdb_assert.
6590
6591 2018-07-16  Tom Tromey  <tom@tromey.com>
6592
6593         * buildsym.h (merge_symbol_lists): Remove.
6594         * buildsym.c (merge_symbol_lists): Remove.
6595
6596 2018-07-16  Tom Tromey  <tom@tromey.com>
6597
6598         * stabsread.c (scan_file_globals): Update comment.
6599         * stabsread.h (scan_file_globals): Move from buildsym.h.
6600         * buildsym.h (scan_file_globals): Move to stabsread.h.
6601
6602 2018-07-16  Tom Tromey  <tom@tromey.com>
6603
6604         * xcoffread.c (xcoff_new_init): Update.
6605         * mipsread.c (mipscoff_new_init): Update.
6606         * mdebugread.c (mdebug_build_psymtabs): Update.
6607         * elfread.c (elf_new_init): Update.
6608         * dbxread.c (dbx_new_init, coffstab_build_psymtabs)
6609         (elfstab_build_psymtabs, stabsect_build_psymtabs): Update.
6610         * buildsym.h (buildsym_new_init): Don't declare.
6611         * buildsym.c (buildsym_new_init): Remove.
6612
6613 2018-07-16  Tom Tromey  <tom@tromey.com>
6614
6615         * stabsread.h (within_function): Move from buildsym.h.
6616         * stabsread.c (start_stabs): Clear within_function.
6617         * coffread.c (coff_start_symtab): Clear within_function.
6618         * buildsym.h (within_function): Move to stabsread.h.
6619         * buildsym.c (prepare_for_building): Update.
6620
6621 2018-07-16  Tom Tromey  <tom@tromey.com>
6622
6623         * stabsread.h (processing_gcc_compilation): Move from buildsym.h.
6624         * dwarf2read.c (dwarf2_start_symtab): Don't set
6625         processing_gcc_compilation.
6626         * buildsym.h (processing_gcc_compilation): Move to stabsread.h.
6627
6628 2018-07-16  Tom Tromey  <tom@tromey.com>
6629
6630         * stabsread.h (HASHSIZE, hashname, symnum, next_symbol_text)
6631         (next_symbol_text_func): Move from buildsym.h.
6632         * stabsread.c (hashname): Move from buildsym.c.
6633         * buildsym.h (HASHSIZE, symnum, next_symbol_text)
6634         (next_symbol_text_func, hashname): Move to stabsread.h.
6635         * buildsym.c: Don't include bcache.h
6636         (hashname): Move to stasbread.c.
6637
6638 2018-07-16  Tom Tromey  <tom@tromey.com>
6639
6640         * buildsym.h (context_stack_size): Don't declare.
6641         * buildsym.c (context_stack_size): New global.
6642
6643 2018-07-16  Tom Tromey  <tom@tromey.com>
6644
6645         * dbxread.c (processing_acc_compilation): New global.
6646         * buildsym.h (processing_acc_compilation): Don't declare.
6647
6648 2018-07-16  Tom Tromey  <tom@tromey.com>
6649
6650         * xcoffread.c (aix_process_linenos, complete_symtab): Update.
6651         * dbxread.c (read_ofile_symtab): Update.
6652         * coffread.c (coff_start_symtab, coff_end_symtab): Update.
6653         * buildsym.h (last_source_start_addr): Remove.
6654         (set_last_source_start_addr, get_last_source_start_addr):
6655         Declare.
6656         * buildsym.c (buildsym_compunit::buildsym_compunit): Add last_addr
6657         parameter.
6658         (struct buildsym_compunit) <m_last_source_start_addr>: New
6659         member.
6660         (prepare_for_building): Remove start_addr parameter.
6661         (start_symtab, restart_symtab, end_symtab_get_static_block)
6662         (end_symtab_with_blockvector): Update.
6663         (set_last_source_start_addr, get_last_source_start_addr): New
6664         functions.
6665
6666 2018-07-16  Tom Tromey  <tom@tromey.com>
6667
6668         * buildsym.c (struct buildsym_compunit) <m_have_line_numbers>: New
6669         member.
6670         (have_line_numbers): Remove.
6671         (record_line, prepare_for_building, end_symtab_get_static_block)
6672         (augment_type_symtab): Update.
6673
6674 2018-07-16  Tom Tromey  <tom@tromey.com>
6675
6676         * buildsym.c (~buildsym_compunit): Free the macro table.
6677         (struct buildsym_compunit) <get_macro_table, release_macros>: New
6678         methods.
6679         <m_pending_macros>: New member.
6680         (pending_macros): Remove.
6681         (~scoped_free_pendings, get_macro_table, prepare_for_building)
6682         (reset_symtab_globals, end_symtab_get_static_block)
6683         (end_symtab_with_blockvector, augment_type_symtab)
6684         (buildsym_init): Update.
6685
6686 2018-07-16  Tom Tromey  <tom@tromey.com>
6687
6688         * buildsym.c (buildsym_compunit::buildsym_compunit): Add name
6689         parameter.
6690         (buildsym_compunit::set_last_source_file): New method.
6691         <m_last_source_file>: New member.
6692         (prepare_for_building): Remove "name" parameter.
6693         (start_symtab, restart_symtab, reset_symtab_globals): Update.
6694         (last_source_file): Remove.
6695         (set_last_source_file, get_last_source_file): Update.
6696
6697 2018-07-16  Tom Tromey  <tom@tromey.com>
6698
6699         * buildsym.c (prepare_for_building): Add assert.
6700
6701 2018-07-16  Tom Tromey  <tom@tromey.com>
6702
6703         * buildsym.c (~buildsym_compunit): Update.
6704         (struct buildsym_compunit) <comp_unit>: Now a unique_xmalloc_ptr.
6705         (start_subfile, patch_subfile_names)
6706         (end_symtab_with_blockvector): Update.
6707
6708 2018-07-16  Tom Tromey  <tom@tromey.com>
6709
6710         * buildsym.c (struct buildsym_compunit): Add constructor,
6711         destructor, initializers.
6712         (start_buildsym_compunit): Remove.
6713         (free_buildsym_compunit): Use "delete".
6714         (start_symtab, restart_symtab): Use "new".
6715
6716 2018-07-13  Simon Marchi  <simon.marchi@polymtl.ca>
6717
6718         * symfile.c (set_objfile_default_section_offset): Remove struct
6719         keyword.
6720
6721 2018-07-14  Stafford Horne  <shorne@gmail.com>
6722
6723         * (Responsible Maintainers): Add myself as or1k maintainer.
6724
6725 2018-07-13  Tom Tromey  <tom@tromey.com>
6726
6727         * symfile.c (set_objfile_default_section_offset): Use extra braces
6728         around initializer.
6729
6730 2018-07-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6731
6732         * s390-tdep.c (s390_displaced_step_fixup): Adjust PC for a
6733         non-branching basr.
6734
6735 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
6736
6737         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6738         unittests/cli-utils-selftests.c
6739         * unittests/cli-utils-selftests.c: New file.
6740
6741 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
6742
6743         * NEWS: Mention new commands. Mention change to 'thread apply'.
6744
6745 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
6746
6747         * thread.c (thr_try_catch_cmd): New function.
6748         (thread_apply_all_command): Handle qcs flags.
6749         (thread_apply_command): Handle qcs flags.
6750         (taas_command): New function.
6751         (tfaas_command): New function.
6752         (_initialize_thread): Update to setup the new commands 'taas
6753         and 'tfaas'. Change doc string for 'thread apply'.
6754
6755 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
6756
6757         * stack.c: (trailing_outermost_frame): New function, mostly
6758         extracted from backtrace_command_1.
6759         (leading_innermost_frame): New function.
6760         (backtrace_command_1): Update to call trailing_outermost_frame.
6761         (frame_apply_command_count): New function.
6762         (frame_apply_level_command): New function.
6763         (frame_apply_all_command): New function.
6764         (frame_apply_command): New function.
6765         (faas_command): New function.
6766         (frame_cmd_list): New variable.
6767         (_initialize_stack): Update to setup the new commands 'frame apply'
6768         and 'faas'.
6769
6770 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
6771
6772         * cli-utils.c (number_or_range_parser::get_number): Only handle
6773         numbers or convenience var as numbers.
6774         (parse_flags): New function.
6775         (parse_flags_qcs): New function.
6776         (number_or_range_parser::finished): Ensure parsing end is detected
6777         before end of string.
6778         * cli-utils.h (parse_flags): New function.
6779         (parse_flags_qcs): New function.
6780         (number_or_range_parser): Remove m_finished bool.
6781         (number_or_range_parser::skip_range): Set m_in_range to false.
6782
6783 2018-07-12  Sergio Durigan Junior  <sergiodj@redhat.com>
6784
6785         * ser-tcp.c (try_connect): Declare 'ioarg' as 'u_long' if building
6786         on Windows.
6787
6788 2018-07-11  Sergio Durigan Junior  <sergiodj@redhat.com>
6789             Jan Kratochvil  <jan.kratochvil@redhat.com>
6790             Paul Fertser  <fercerpav@gmail.com>
6791             Tsutomu Seki  <sekiriki@gmail.com>
6792             Pedro Alves  <palves@redhat.com>
6793
6794         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6795         'unittests/parse-connection-spec-selftests.c'.
6796         (COMMON_SFILES): Add 'common/netstuff.c'.
6797         (HFILES_NO_SRCDIR): Add 'common/netstuff.h'.
6798         * NEWS (Changes since GDB 8.2): Mention IPv6 support.
6799         * common/netstuff.c: New file.
6800         * common/netstuff.h: New file.
6801         * ser-tcp.c: Include 'netstuff.h' and 'wspiapi.h'.
6802         (wait_for_connect): Update comment.  New parameter
6803         'gdb::optional<int> sock' instead of 'struct serial *scb'.
6804         Use 'sock' directly instead of 'scb->fd'.
6805         (try_connect): New function, with code from 'net_open'.
6806         (net_open): Rewrite main loop to deal with multiple
6807         sockets/addresses.  Handle IPv6-style hostnames; implement
6808         support for IPv6 connections.
6809         * unittests/parse-connection-spec-selftests.c: New file.
6810
6811 2018-07-11  Pedro Alves  <palves@redhat.com>
6812
6813         PR gdb/23377
6814         * remote.c (remote_target::remote_detach_pid): Call
6815         set_current_process.
6816
6817 2018-07-11  Pedro Alves  <palves@redhat.com>
6818
6819         * h8300-tdep.c (h8300_gdbarch_init): Remove
6820         set_gdbarch_ecoff_reg_to_regnum calls.
6821
6822 2018-07-11  Sergio Durigan Junior  <sergiodj@redhat.com>
6823
6824         PR c++/23373
6825         * c-typeprint.c (c_type_print_base_struct_union): Don't print
6826         offsets/sizes for static members of a class/struct.
6827
6828 2018-07-11  Alan Hayward  <alan.hayward@arm.com>
6829
6830         * target-descriptions.c (tdesc_register_bitsize): Rename.
6831         * target-descriptions.h (tdesc_register_bitsize): Likewise.
6832         * rs6000-tdep.c (rs6000_gdbarch_init): Use new name.
6833         * aarch64-tdep.c (aarch64_get_tdesc_vq): Convert size.
6834
6835 2018-07-10  Tom Tromey  <tom@tromey.com>
6836
6837         * breakpoint.c (moribund_locations): Now static and a
6838         std::vector.
6839         (breakpoint_init_inferior, moribund_breakpoint_here_p)
6840         (build_bpstat_chain, update_global_location_list)
6841         (breakpoint_retire_moribund): Update.
6842         * breakpoint.h (bp_location_p): Remove typedef.  Don't declare
6843         VEC.
6844
6845 2018-07-10  Andrew Burgess  <andrew.burgess@embecosm.com>
6846
6847         * riscv-tdep.c (riscv_is_fp_regno_p): New function.
6848         (riscv_register_reggroup_p): Use new function, remove unneeded
6849         parenthesis.
6850         (riscv_push_dummy_call): Extend assert to compare against xlen or
6851         flen based on register type.
6852
6853 2018-07-10  Andrew Burgess  <andrew.burgess@embecosm.com>
6854
6855         * riscv-tdep.c (riscv_print_arg_location): Use TYPE_SAFE_NAME.
6856
6857 2018-07-09  Andrew Burgess  <andrew.burgess@embecosm.com>
6858
6859         * remote.c (show_hardware_watchpoint_limit): New function.
6860         (show_hardware_watchpoint_length_limit): New function.
6861         (show_hardware_breakpoint_limit): New function.
6862         (_initialize_remote): Use add_setshow_zuinteger_unlimited_cmd
6863         where appropriate, update help text.
6864
6865 2018-07-09  Tom Tromey  <tom@tromey.com>
6866
6867         * Makefile.in (CDEPS): Don't mention XM_CDEPS.
6868         (CLIBS): Don't mention NAT_CLIBS.
6869
6870 2018-07-09  Tom Tromey  <tom@tromey.com>
6871
6872         * Makefile.in (ADD_FILES, ADD_DEPS): Remove.
6873         (LIBGDB_OBS, clean mostlyclean): Update.
6874         (gdb$(EXEEXT), insight$(EXEEXT)): Update.
6875
6876 2018-07-09  Tom Tromey  <tom@tromey.com>
6877
6878         * Makefile.in (%.c: %.y): Use ECHO_YACC.
6879         (%.c: %.l): Use ECHO_LEX.  Just fail if flex not available.
6880         * silent-rules.mk (ECHO_YACC, ECHO_LEX): New variables.
6881
6882 2018-07-09  Tom Tromey  <tom@tromey.com>
6883
6884         * Makefile.in (ALLDEPFILES): Remove exec.c.
6885         (COMMON_OBS): Remove exec.o.
6886         (COMMON_SFILES): Add exec.c.
6887
6888 2018-07-09  Tom Tromey  <tom@tromey.com>
6889
6890         * Makefile.in (LINT, LINTFLAGS, LINTFILES, lint): Remove.
6891
6892 2018-07-09  Tom Tromey  <tom@tromey.com>
6893
6894         * Makefile.in (clean mostlyclean): Remove stamp-version.
6895         (version.c): Depend on stamp-version.
6896         (stamp-version): New rule, from version.c rule.
6897
6898 2018-07-09  Tom Tromey  <tom@tromey.com>
6899
6900         * Makefile.in (init.c): Depend on stamp-init.
6901         (stamp-init): New rule, from init.c rule.
6902         (clean mostlyclean): Remove stamp-init.
6903
6904 2018-07-09  Tom Tromey  <tom@tromey.com>
6905
6906         * Makefile.in (INIT_FILES): Remove CONFIG_SRCS,
6907         SUBDIR_GCC_COMPILE_SRCS.
6908
6909 2018-07-09  Tom Tromey  <tom@tromey.com>
6910
6911         * Makefile.in (init.c): Remove some unused sed rules.
6912
6913 2018-07-09  Tom Tromey  <tom@tromey.com>
6914
6915         * Makefile.in (TSOBS): Remove.
6916         (INIT_FILES): Update.
6917         (LIBGDB_OBS): Update.
6918         (COMMON_SFILES): Add inflow.c.
6919         (SFILES): Remove inflow.c.
6920
6921 2018-07-07  Jan Kratochvil  <jan.kratochvil@redhat.com>
6922
6923         * contrib/gdb-add-index.sh ($dwarf5): New, use it.
6924
6925 2018-07-07  Simon Marchi  <simon.marchi@polymtl.ca>
6926
6927         * ia64-libunwind-tdep.c (get_reg_name, get_fpreg_name,
6928         get_saveloc_name, is_signal_frame_name, step_name,
6929         init_remote_name, create_addr_space_name,
6930         destroy_addr_space_name, search_unwind_table_name,
6931         find_dyn_list_name): Constify.
6932
6933 2018-07-05  Simon Marchi  <simon.marchi@polymtl.ca>
6934
6935         * darwin-nat.c (darwin_pthread_kill): New function.
6936         (darwin_resume_thread): Use darwin_pthread_kill.
6937
6938 2018-07-05  Tom de Vries  <tdevries@suse.de>
6939
6940         * macroexp.c (macro_buffer) <operator=>: New member function.
6941
6942 2018-07-04  Tom Tromey  <tom@tromey.com>
6943
6944         * darwin-nat.c (darwin_attach_pid): Use exit_inferior.
6945
6946 2018-07-04  Simon Marchi  <simon.marchi@polymtl.ca>
6947
6948         * common/common-defs.h (HAVE_USEFUL_SBRK): Define.
6949         * main.c: Use HAVE_USEFUL_SBRK instead of HAVE_SBRK.
6950         * maint.c: Likewise.
6951         * top.c: Likewise.
6952
6953 2018-07-04  Joel Brobecker  <brobecker@adacore.com>
6954
6955         * NEWS: Create a new section for the next release branch.
6956         Rename the section of the current branch, now that it has
6957         been cut.
6958
6959 2018-07-04  Joel Brobecker  <brobecker@adacore.com>
6960
6961         GDB 8.2 branch created (1b919490e8ba30bf1d6941df0ed112b0e557017e):
6962         * version.in: Bump version to 8.2.50.DATE-git.
6963
6964 2018-07-04  Vyacheslav Barinov  <v.barinov@samsung.com>
6965             Pedro Alves  <palves@redhat.com>
6966
6967         * linux-nat.c (linux_init_ptrace): Rename to ...
6968         (linux_init_ptrace_procfs): ... this.  Call
6969         linux_proc_init_warnings.
6970         (linux_nat_target::post_attach)
6971         (linux_nat_target::post_startup_inferior): Adjust.
6972         * nat/linux-procfs.c (linux_proc_init_warnings): Define function.
6973         * nat/linux-procfs.h (linux_proc_init_warnings): Declare function.
6974
6975 2018-07-04  Tom de Vries  <tdevries@suse.de>
6976
6977         * dwarf2read.c (error_check_comp_unit_head): Move dwarf version
6978         check ...
6979         (read_comp_unit_head): ... here.
6980
6981 2018-07-03  Tom Tromey  <tom@tromey.com>
6982
6983         * tracepoint.c (process_tracepoint_on_disconnect, start_tracing)
6984         (stop_tracing, tstatus_command)
6985         (find_matching_tracepoint_location, merge_uploaded_tracepoints)
6986         (print_one_static_tracepoint_marker): Update.
6987         * breakpoint.c (static_tracepoints_here, all_tracepoints): Return
6988         std::vector.
6989         * breakpoint.h (breakpoint_p): Remove typedef.  Don't declare
6990         VEC.
6991         (all_tracepoints, static_tracepoints_here): Return std::vector.
6992
6993 2018-07-03  Tom Tromey  <tom@tromey.com>
6994
6995         * common/ptid.c (ptid_equal): Remove.
6996         * common/ptid.h (ptid_equal): Don't declare.
6997         * ada-tasks.c: Update.
6998         * breakpoint.c: Update.
6999         * common/agent.c: Update.
7000         * corelow.c: Update.
7001         * darwin-nat-info.c: Update.
7002         * darwin-nat.c: Update.
7003         * dcache.c: Update.
7004         * dtrace-probe.c: Update.
7005         * dummy-frame.c: Update.
7006         * fbsd-nat.c: Update.
7007         * frame.c: Update.
7008         * gdbthread.h: Update.
7009         * gnu-nat.c: Update.
7010         * go32-nat.c: Update.
7011         * inf-loop.c: Update.
7012         * inf-ptrace.c: Update.
7013         * infcall.c: Update.
7014         * infcmd.c: Update.
7015         * inflow.c: Update.
7016         * infrun.c: Update.
7017         * linux-fork.c: Update.
7018         * linux-nat.c: Update.
7019         * linux-thread-db.c: Update.
7020         * mi/mi-cmd-var.c: Update.
7021         * mi/mi-interp.c: Update.
7022         * mi/mi-main.c: Update.
7023         * nto-procfs.c: Update.
7024         * ppc-linux-tdep.c: Update.
7025         * procfs.c: Update.
7026         * python/py-inferior.c: Update.
7027         * python/py-record-btrace.c: Update.
7028         * python/py-record.c: Update.
7029         * ravenscar-thread.c: Update.
7030         * regcache.c: Update.
7031         * remote-sim.c: Update.
7032         * remote.c: Update.
7033         * sol-thread.c: Update.
7034         * solib.c: Update.
7035         * target.c: Update.
7036         * tui/tui-stack.c: Update.
7037         * varobj.c: Update.
7038         * windows-nat.c: Update.
7039         * windows-tdep.c: Update.
7040
7041 2018-07-03  Tom Tromey  <tom@tromey.com>
7042
7043         * common/ptid.c (ptid_match): Remove.
7044         * common/ptid.h (ptid_match): Don't declare.
7045         * fbsd-nat.c: Update.
7046         * infcmd.c: Update.
7047         * infrun.c: Update.
7048         * linux-nat.c: Update.
7049         * record-btrace.c: Update.
7050         * regcache.c: Update.
7051         * remote.c: Update.
7052
7053 2018-07-03  Tom Tromey  <tom@tromey.com>
7054
7055         * common/ptid.c (ptid_tid_p): Remove.
7056         * common/ptid.h (ptid_tid_p): Don't declare.
7057         * sol-thread.c: Update.
7058
7059 2018-07-03  Tom Tromey  <tom@tromey.com>
7060
7061         * common/ptid.c (ptid_lwp_p): Remove.
7062         * common/ptid.h (ptid_lwp_p): Don't declare.
7063         * fbsd-nat.c: Update.
7064         * linux-nat.c: Update.
7065         * nat/linux-procfs.c: Update.
7066         * nat/x86-linux-dregs.c: Update.
7067         * sol-thread.c: Update.
7068
7069 2018-07-03  Tom Tromey  <tom@tromey.com>
7070
7071         * common/ptid.c (ptid_is_pid): Remove.
7072         * common/ptid.h (ptid_is_pid): Don't declare.
7073         * infrun.c: Update.
7074         * linux-nat.c: Update.
7075         * mi/mi-interp.c: Update.
7076         * remote.c: Update.
7077         * thread.c: Update.
7078
7079 2018-07-03  Tom Tromey  <tom@tromey.com>
7080
7081         * common/ptid.c (ptid_get_tid): Remove.
7082         * common/ptid.h (ptid_get_tid): Don't declare.
7083         * ada-tasks.c: Update.
7084         * aix-thread.c: Update.
7085         * bsd-uthread.c: Update.
7086         * darwin-nat.c: Update.
7087         * fbsd-nat.c: Update.
7088         * i386-darwin-nat.c: Update.
7089         * infrun.c: Update.
7090         * linux-tdep.c: Update.
7091         * nto-procfs.c: Update.
7092         * ppc-ravenscar-thread.c: Update.
7093         * python/py-infthread.c: Update.
7094         * ravenscar-thread.c: Update.
7095         * sol-thread.c: Update.
7096         * sparc-ravenscar-thread.c: Update.
7097         * windows-nat.c: Update.
7098
7099 2018-07-03  Tom Tromey  <tom@tromey.com>
7100
7101         * common/ptid.c (ptid_get_lwp): Remove.
7102         * common/ptid.h (ptid_get_lwp): Don't declare.
7103         * aarch64-linux-nat.c: Update.
7104         * ada-tasks.c: Update.
7105         * aix-thread.c: Update.
7106         * amd64-linux-nat.c: Update.
7107         * arm-linux-nat.c: Update.
7108         * corelow.c: Update.
7109         * fbsd-nat.c: Update.
7110         * fbsd-tdep.c: Update.
7111         * gnu-nat.c: Update.
7112         * i386-cygwin-tdep.c: Update.
7113         * i386-gnu-nat.c: Update.
7114         * i386-linux-nat.c: Update.
7115         * ia64-linux-nat.c: Update.
7116         * inf-ptrace.c: Update.
7117         * infrun.c: Update.
7118         * linux-fork.c: Update.
7119         * linux-nat.c: Update.
7120         * linux-tdep.c: Update.
7121         * linux-thread-db.c: Update.
7122         * mips-linux-nat.c: Update.
7123         * nat/aarch64-linux-hw-point.c: Update.
7124         * nat/aarch64-linux.c: Update.
7125         * nat/linux-btrace.c: Update.
7126         * nat/linux-osdata.c: Update.
7127         * nat/linux-procfs.c: Update.
7128         * nat/x86-linux-dregs.c: Update.
7129         * obsd-nat.c: Update.
7130         * ppc-fbsd-nat.c: Update.
7131         * ppc-linux-nat.c: Update.
7132         * procfs.c: Update.
7133         * python/py-infthread.c: Update.
7134         * ravenscar-thread.c: Update.
7135         * remote.c: Update.
7136         * s390-linux-nat.c: Update.
7137         * sol-thread.c: Update.
7138         * sol2-tdep.c: Update.
7139         * spu-linux-nat.c: Update.
7140         * x86-linux-nat.c: Update.
7141         * xtensa-linux-nat.c: Update.
7142
7143 2018-07-03  Tom Tromey  <tom@tromey.com>
7144
7145         * common/ptid.c (ptid_get_pid): Remove.
7146         * common/ptid.h (ptid_get_pid): Don't declare.
7147         * aarch64-linux-nat.c: Update.
7148         * ada-lang.c: Update.
7149         * aix-thread.c: Update.
7150         * alpha-bsd-nat.c: Update.
7151         * amd64-fbsd-nat.c: Update.
7152         * amd64-linux-nat.c: Update.
7153         * arm-linux-nat.c: Update.
7154         * arm-nbsd-nat.c: Update.
7155         * auxv.c: Update.
7156         * break-catch-syscall.c: Update.
7157         * breakpoint.c: Update.
7158         * bsd-uthread.c: Update.
7159         * corelow.c: Update.
7160         * ctf.c: Update.
7161         * darwin-nat.c: Update.
7162         * fbsd-nat.c: Update.
7163         * fbsd-tdep.c: Update.
7164         * gcore.c: Update.
7165         * gnu-nat.c: Update.
7166         * hppa-nbsd-nat.c: Update.
7167         * hppa-obsd-nat.c: Update.
7168         * i386-fbsd-nat.c: Update.
7169         * ia64-linux-nat.c: Update.
7170         * inf-ptrace.c: Update.
7171         * infcmd.c: Update.
7172         * inferior.c: Update.
7173         * inferior.h: Update.
7174         * inflow.c: Update.
7175         * infrun.c: Update.
7176         * linux-fork.c: Update.
7177         * linux-nat.c: Update.
7178         * linux-tdep.c: Update.
7179         * linux-thread-db.c: Update.
7180         * m68k-bsd-nat.c: Update.
7181         * mi/mi-interp.c: Update.
7182         * mi/mi-main.c: Update.
7183         * mips-linux-nat.c: Update.
7184         * mips-nbsd-nat.c: Update.
7185         * mips64-obsd-nat.c: Update.
7186         * nat/aarch64-linux-hw-point.c: Update.
7187         * nat/aarch64-linux.c: Update.
7188         * nat/linux-btrace.c: Update.
7189         * nat/linux-osdata.c: Update.
7190         * nat/linux-procfs.c: Update.
7191         * nat/x86-linux-dregs.c: Update.
7192         * nto-procfs.c: Update.
7193         * obsd-nat.c: Update.
7194         * ppc-linux-nat.c: Update.
7195         * ppc-nbsd-nat.c: Update.
7196         * ppc-obsd-nat.c: Update.
7197         * proc-service.c: Update.
7198         * procfs.c: Update.
7199         * python/py-inferior.c: Update.
7200         * python/py-infthread.c: Update.
7201         * ravenscar-thread.c: Update.
7202         * record.c: Update.
7203         * remote-sim.c: Update.
7204         * remote.c: Update.
7205         * rs6000-nat.c: Update.
7206         * s390-linux-nat.c: Update.
7207         * sh-nbsd-nat.c: Update.
7208         * sol-thread.c: Update.
7209         * sparc-nat.c: Update.
7210         * sparc64-tdep.c: Update.
7211         * spu-linux-nat.c: Update.
7212         * spu-tdep.c: Update.
7213         * target-debug.h: Update.
7214         * target.c: Update.
7215         * thread.c: Update.
7216         * tid-parse.c: Update.
7217         * tracefile-tfile.c: Update.
7218         * vax-bsd-nat.c: Update.
7219         * windows-nat.c: Update.
7220         * x86-linux-nat.c: Update.
7221         * x86-nat.c: Update.
7222
7223 2018-07-03  Tom Tromey  <tom@tromey.com>
7224
7225         * common/ptid.c (pid_to_ptid): Remove.
7226         * common/ptid.h (pid_to_ptid): Don't declare.
7227         * aix-thread.c: Update.
7228         * arm-linux-nat.c: Update.
7229         * common/ptid.c: Update.
7230         * common/ptid.h: Update.
7231         * corelow.c: Update.
7232         * ctf.c: Update.
7233         * darwin-nat.c: Update.
7234         * fbsd-nat.c: Update.
7235         * fork-child.c: Update.
7236         * gnu-nat.c: Update.
7237         * go32-nat.c: Update.
7238         * inf-ptrace.c: Update.
7239         * infcmd.c: Update.
7240         * inferior.c: Update.
7241         * infrun.c: Update.
7242         * linux-fork.c: Update.
7243         * linux-nat.c: Update.
7244         * nat/aarch64-linux-hw-point.c: Update.
7245         * nat/fork-inferior.c: Update.
7246         * nat/x86-linux-dregs.c: Update.
7247         * nto-procfs.c: Update.
7248         * obsd-nat.c: Update.
7249         * procfs.c: Update.
7250         * progspace.c: Update.
7251         * remote.c: Update.
7252         * rs6000-nat.c: Update.
7253         * s390-linux-nat.c: Update.
7254         * sol-thread.c: Update.
7255         * spu-linux-nat.c: Update.
7256         * target.c: Update.
7257         * top.c: Update.
7258         * tracefile-tfile.c: Update.
7259         * windows-nat.c: Update.
7260
7261 2018-07-03  Tom Tromey  <tom@tromey.com>
7262
7263         * common/ptid.h (ptid_build): Don't declare.
7264         * common/ptid.c (ptid_build): Remove.
7265         * aix-thread.c: Update.
7266         * bsd-kvm.c: Update.
7267         * bsd-uthread.c: Update.
7268         * common/agent.c: Update.
7269         * common/ptid.c: Update.
7270         * common/ptid.h: Update.
7271         * corelow.c: Update.
7272         * darwin-nat.c: Update.
7273         * fbsd-nat.c: Update.
7274         * gnu-nat.c: Update.
7275         * linux-fork.c: Update.
7276         * linux-nat.c: Update.
7277         * linux-thread-db.c: Update.
7278         * nat/linux-osdata.c: Update.
7279         * nat/linux-procfs.c: Update.
7280         * nto-procfs.c: Update.
7281         * obsd-nat.c: Update.
7282         * proc-service.c: Update.
7283         * procfs.c: Update.
7284         * ravenscar-thread.c: Update.
7285         * remote-sim.c: Update.
7286         * remote.c: Update.
7287         * sol-thread.c: Update.
7288         * target.c: Update.
7289         * windows-nat.c: Update.
7290
7291 2018-07-03  Tom Tromey  <tom@tromey.com>
7292
7293         * infrun.c (follow_exec): Use exit_inferior_silent.
7294         * inferior.c (exit_inferior_num_silent): Remove.
7295         * inferior.h (exit_inferior_num_silent): Don't declare.
7296
7297 2018-07-03  Tom Tromey  <tom@tromey.com>
7298
7299         PR cli/23340:
7300         * darwin-nat.c (darwin_attach_pid): Reset inferior and
7301         inferior_ptid on error.
7302
7303 2018-07-02  Maciej W. Rozycki  <macro@mips.com>
7304             Simon Marchi  <simon.marchi@polymtl.ca>
7305
7306         PR tdep/8282
7307         * disasm.h (gdb_disassembler): Add
7308         `m_disassembler_options_holder'. member
7309         * disasm.c (get_all_disassembler_options): New function.
7310         (gdb_disassembler::gdb_disassembler): Use it.
7311         (gdb_buffered_insn_length_init_dis): Likewise.
7312         (gdb_buffered_insn_length): Adjust accordingly.
7313         (set_disassembler_options): Handle options with arguments.
7314         (show_disassembler_options_sfunc): Likewise.  Add a leading new
7315         line if showing options with descriptions.
7316         (disassembler_options_completer): Adapt to using the
7317         `disasm_options_and_args_t' structure.
7318         * mips-tdep.c (mips_disassembler_options): New variable.
7319         (mips_disassembler_options_o32): Likewise.
7320         (mips_disassembler_options_n32): Likewise.
7321         (mips_disassembler_options_n64): Likewise.
7322         (gdb_print_insn_mips): Don't set `disassembler_options'.
7323         (gdb_print_insn_mips_n32, gdb_print_insn_mips_n64): Remove
7324         functions.
7325         (mips_gdbarch_init): Always set `gdbarch_print_insn' to
7326         `gdb_print_insn_mips'.  Set `gdbarch_disassembler_options',
7327         `gdbarch_disassembler_options_implicit' and
7328         `gdbarch_valid_disassembler_options'.
7329         * arm-tdep.c (_initialize_arm_tdep): Adapt to using the
7330         `disasm_options_and_args_t' structure.
7331         * gdbarch.sh (disassembler_options_implicit): New `gdbarch'
7332         method.
7333         (valid_disassembler_options): Switch from `disasm_options_t' to
7334         the `disasm_options_and_args_t' structure.
7335         * NEWS: Document `set disassembler-options' support for the MIPS
7336         target.
7337         * gdbarch.h: Regenerate.
7338         * gdbarch.c: Regenerate.
7339
7340 2018-07-02  Sebastian Huber  <sebastian.huber@embedded-brains.de>
7341
7342         * riscv-tdep.c (riscv_register_aliases): Swap "fp" and "s0" entries.
7343
7344 2018-06-29  Joel Brobecker  <brobecker@adacore.com>
7345
7346         * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Add missing
7347         parameter in call to amd64_target_description.
7348         * amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise.
7349         * amd64-fbsd-tdep.c (amd64fbsd_core_read_description)
7350         (amd64fbsd_init_abi): Likewise.
7351         * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
7352         * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
7353         * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
7354         * amd64-fbsd-nat.c (amd64_fbsd_nat_target): Likewise.
7355
7356 2018-06-29  Pedro Alves  <palves@redhat.com>
7357
7358         * gdb/amd64-tdep.h (amd64_create_target_description): Add
7359         "segments" parameter.
7360         * gdb/amd64-tdep.c (amd64_none_init_abi, amd64_x32_none_init_abi)
7361         (_initialize_amd64_tdep): Update call to
7362         amd64_create_target_description.
7363         (amd64_target_description): Add "segments" parameter.  Adjust
7364         the implementation to use it.
7365         * gdb/amd64-linux-tdep.c (amd64_linux_read_description): Update
7366         call to amd64_create_target_description.
7367         * gdb/amd64-windows-tdep.c (amd64_windows_init_abi): Likewise.
7368         * gdb/arch/amd64.h (amd64_create_target_description): Add
7369         "segments" register.
7370         * gdb/arch/amd64.c (amd64_create_target_description): Add
7371         "segments" parameter.  Call create_feature_i386_64bit_segments
7372         only if SEGMENTS is true.
7373         * gdb/gdbserver/win32-i386-low.c (i386_arch_setup): Update
7374         call to amd64_create_target_description.
7375
7376 2018-06-29  Pedro Alves  <palves@redhat.com>
7377
7378         * thread.c (thread_target_id_str): New, factored out from ...
7379         (print_thread_info_1): ... here.  Use it to compute the max
7380         "Target Id" column width.
7381
7382 2018-06-29  Pedro Alves  <palves@redhat.com>
7383
7384         * remote.c (remote_target::extra_thread_info): Delete
7385         'display_buf' and 'n' locals.  from the cache, regardless of
7386         packet mechanims is in use.  Use cache for qThreadExtra and qP
7387         methods too.
7388
7389 2018-06-29  Pedro Alves  <palves@redhat.com>
7390
7391         * blockframe.c (find_pc_sect_containing_function): New function.
7392         * breakpoint.c (print_breakpoint_location): Don't call
7393         find_pc_sect_function.
7394         * linespec.c (create_sals_line_offset): Record the location's
7395         symbol in the sal.
7396         * linespec.c (convert_address_location_to_sals): Fill in sal's
7397         symbol with find_pc_sect_containing_function.
7398         * symtab.c (find_function_start_sal): Rename to ...
7399         (find_function_start_sal_1): ... this.
7400         (find_function_start_sal): Reimplement as wrapper around
7401         find_function_start_sal_1, and use
7402         find_pc_sect_containing_function to fill in the sal's symbol.
7403         (find_function_start_sal(symbol*, bool)): Adjust.
7404         * symtab.h (find_pc_function, find_pc_sect_function): Adjust
7405         comments.
7406         (find_pc_sect_containing_function): Declare.
7407
7408 2018-06-29  Pedro Alves  <palves@redhat.com>
7409
7410         * inline-frame.c (stopped_by_user_bp_inline_frame): Return
7411         true if the the location has no symbol.
7412
7413 2018-06-28  Tom Tromey  <tom@tromey.com>
7414
7415         * NEWS: Mention --enable-codesign.
7416         * silent-rules.mk (ECHO_SIGN): New variable.
7417         * configure.ac: Add --enable-codesign.
7418         * configure: Rebuild.
7419         * Makefile.in (CODESIGN, CODESIGN_CERT): New variables.
7420         (gdb$(EXEEXT)): Optionally invoke codesign.
7421
7422 2018-06-28  Pedro Alves  <palves@redhat.com>
7423
7424         * gdbthread.h (struct thread_suspend_state) <stop_pc>: Extend
7425         comments.
7426         (switch_to_thread_no_regs): Adjust comment.
7427         * infcmd.c (stop_pc): Delete.
7428         (post_create_inferior, info_program_command): Replace references
7429         to stop_pc with references to thread_info->suspend.stop_pc.
7430         * inferior.h (stop_pc): Delete declaration.
7431         * infrun.c (proceed, handle_syscall_event, fill_in_stop_func)
7432         (handle_inferior_event_1, handle_signal_stop)
7433         (process_event_stop_test, keep_going_stepped_thread)
7434         (handle_step_into_function, handle_step_into_function_backward)
7435         (print_stop_location): Replace references to stop_pc with
7436         references to thread_info->suspend.stop_pc.
7437         (struct infcall_suspend_state) <stop_pc>: Delete field.
7438         (save_infcall_suspend_state, restore_infcall_suspend_state):
7439         Remove references to inf_stat->stop_pc.
7440         * linux-fork.c (fork_load_infrun_state): Likewise.
7441         * record-btrace.c (record_btrace_set_replay): Likewise.
7442         * record-full.c (record_full_goto_entry): Likewise.
7443         * remote.c (print_one_stopped_thread): Likewise.
7444         * target.c (target_resume): Extend comment.
7445         * thread.c (set_executing_thread): New.
7446         (set_executing): Use it.
7447         (switch_to_thread_no_regs, switch_to_no_thread, switch_to_thread):
7448         Remove references to stop_pc.
7449
7450 2018-06-28  Pedro Alves  <palves@redhat.com>
7451
7452         * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>:
7453         Moving fetching stop_pc until after ecs->event_thread is refreshed.
7454
7455 2018-06-28  Tom Tromey  <tom@tromey.com>
7456
7457         * coffread.c (coff_symfile_finish): Update.
7458         * xcoffread.c (xcoff_symfile_finish): Update.
7459         * elfread.c (elf_symfile_finish): Update.
7460         * symfile.h (dwarf2_free_objfile): Don't declare.
7461         * dwarf2read.c (_initialize_dwarf2_read): Use
7462         register_objfile_data_with_cleanup.
7463         (dwarf2_free_objfile): Now static.  Change signature.
7464
7465 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
7466
7467         * symfile.c (add_symbol_file_command, _initialize_symfile): Add
7468         option "-o" to add-symbol-file-load to add an offset to each
7469         section's load address.
7470         * symfile.c (set_objfile_default_section_offset): New function.
7471
7472 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
7473
7474         * symfile.c (add_symbol_file_command): Make sure that sections
7475         with the same name are sorted in the same order.
7476
7477 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
7478
7479         * symfile.c (add_symbol_file_command, _initialize_symfile): Do not
7480         require the second argument.  If omitted, load sections at the
7481         addresses specified in the file.
7482
7483 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
7484
7485         * symfile.c (symbol_file_command, symbol_file_add_main_1)
7486         (_initialize_symfile): Add option "-o" to symbol-file to add an
7487         offset to each section of the symbol file.
7488
7489 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
7490
7491         * MAINTAINERS (Write After Approval): Add Petr Tesarik.
7492
7493 2018-06-27  Tom Tromey  <tom@tromey.com>
7494
7495         * stack.c (_initialize_stack): Update "func" help text.
7496
7497 2018-06-27  Tom Tromey  <tom@tromey.com>
7498
7499         * python/py-unwind.c (unwind_info_object) <saved_regs>: Now a
7500         std::vector.
7501         (unwind_infopy_str, pyuw_create_unwind_info)
7502         (unwind_infopy_add_saved_register, pyuw_sniffer)
7503         (unwind_infopy_dealloc, unwind_infopy_add_saved_register):
7504         Update.
7505         (struct saved_reg): Add constructor.
7506         <value>: Now a gdbpy_ref<>.
7507
7508 2018-06-27  Tom Tromey  <tom@tromey.com>
7509
7510         * machoread.c (macho_symfile_read): Define "symbol_table" earlier.
7511
7512 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
7513
7514         * gdb-gdb.py.in: Format using autopep8.
7515
7516 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
7517
7518         * gdb-gdb.py.in (CoreAddrPrettyPrinter): New class.
7519         (type_lookup_function): Recognize CORE_ADDR values.
7520
7521 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
7522
7523         * gdb-gdb.py.in (StructMainTypePrettyPrinter) <to_string>: Don't
7524         print tag_name.
7525
7526 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
7527
7528         * gdb-gdb.py.in (TypeFlag) <__cmp__>: Remove.
7529         <__lt__>: Add.
7530
7531 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
7532
7533         * gdb-gdb.py: Move to...
7534         * gdb-gdb.py.in: ... here.
7535         * configure.ac (AC_CONFIG_FILES): Add gdb-gdb.py.
7536         * Makefile.in (all): Add gdb-gdb.gdb and gdb-gdb.py as
7537         dependencies.
7538         (distclean): Remove gdb-gdb.py when cleaning.
7539         (gdb-gdb.py, gdb-gdb.gdb): New rules.
7540         * configure: Re-generate.
7541
7542 2018-06-27  Pedro Alves  <palves@redhat.com>
7543
7544         * proc-service.c (get_ps_regcache): New.
7545         (ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
7546         (ps_lsetfpregs): Use it.
7547
7548 2018-06-27  Omair Javaid  <omair.javaid@linaro.org>
7549
7550         PR gdb/21695
7551         * dwarf2read.c (lnp_state_machine::check_line_address): Update
7552         declaration.
7553         (dwarf_decode_lines_1): Adjust.
7554
7555 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
7556
7557         * fbsd-nat.h (class fbsd_nat_target) <find_memory_regions>: Add
7558         override.
7559         <info_proc>: Likewise.
7560
7561 2018-06-26  Joel Brobecker  <brobecker@adacore.com>
7562
7563         * windows-nat.c (do_windows_fetch_inferior_registers): Rename
7564         to windows_fetch_one_register, and only handle the case of
7565         fetching one register.  Move the code that reloads the context
7566         and iterates over all registers if R is negative to...
7567         (windows_nat_target::fetch_registers): ... here.
7568         (do_windows_store_inferior_registers): Rename to
7569         windows_store_one_register, and only handle the case of storing
7570         one register.  Move the code that handles the case where r is
7571         negative to...
7572         (windows_nat_target::store_registers) ... here.
7573
7574 2018-06-26  Tom Tromey  <tom@tromey.com>
7575
7576         PR rust/22574:
7577         * typeprint.c (whatis_exp): Allow ptype/o for Rust.
7578         * rust-lang.c (rust_print_struct_def): Add podata parameter.
7579         Update.
7580         (rust_internal_print_type): Add podata parameter.
7581         (rust_print_type): Update.
7582
7583 2018-06-26  Tom Tromey  <tom@tromey.com>
7584
7585         * typeprint.h (struct print_offset_data) <update, finish,
7586         maybe_print_hole>: New methods.
7587         <indentation>: New constant.
7588         * typeprint.c (print_offset_data::indentation): Define.
7589         (print_offset_data::maybe_print_hole, print_offset_data::update)
7590         (print_offset_data::finish): Move from c-typeprint.c and rename.
7591         * c-typeprint.c (OFFSET_SPC_LEN): Remove.
7592         (print_spaces_filtered_with_print_options): Update.
7593         (c_print_type_union_field_offset, maybe_print_hole)
7594         (c_print_type_struct_field_offset): Move to typeprint.c and
7595         rename.
7596         (c_type_print_base_struct_union): Update.
7597
7598 2018-06-25  Pedro Alves  <palves@redhat.com>
7599
7600         * gdbthread.h (thread_info_ref, delete_thread)
7601         (delete_thread_silent, first_thread_of_inferior)
7602         (any_thread_of_inferior, switch_to_thread)
7603         (enable_thread_stack_temporaries)
7604         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
7605         (get_last_thread_stack_temporary)
7606         (value_in_thread_stack_temporaries, can_access_registers_thread):
7607         Spell out "struct thread_info" instead of just "thread_info".
7608         * inferior.h (notice_new_inferior): Likewise.
7609
7610 2018-06-25  Pedro Alves  <palves@redhat.com>
7611
7612         * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
7613         pass thread_info pointer to delete_thread.
7614         (windows_nat_target::detach): Pass inferior pointer to
7615         detach_inferior.
7616         * aix-thread.c (sync_threadlists): Pass thread_info pointer to
7617         delete_thread.
7618         * bsd-kvm.c (bsd_kvm_target::close): Use discard_all_inferiors.
7619         * darwin-nat.c (darwin_check_new_threads): Use find_thread_ptid
7620         and pass a thread_info pointer to delete_thread.
7621         * fbsd-nat.c (fbsd_nat_target::wait): Use find_thread_ptid and
7622         pass thread_info pointer to delete_thread.
7623         * go32-nat.c (go32_nat_target::mourn_inferior): Remove
7624         delete_thread_silent call.
7625         * procfs.c (procfs_target::detach): Pass inferior pointer to
7626         detach_inferior.
7627         (procfs_target::wait): Pass thread_info pointer to delete_thread.
7628         * remote-sim.c (gdbsim_target::mourn_inferior): Remove
7629         delete_thread_silent call.
7630         * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
7631         pass thread_info pointer to delete_thread.
7632         (windows_nat_target::detach): Pass inferior pointer to
7633         delete_inferior.
7634
7635 2018-06-22  Alan Hayward  <alan.hayward@arm.com>
7636
7637         * regcache.c (readable_regcache::read_part): Fix asserts.
7638         (reg_buffer::raw_collect_part): New function.
7639         (regcache::write_part): Fix asserts.
7640         (reg_buffer::raw_supply_part): New function.
7641         (regcache::transfer_regset_register): New helper function.
7642         (regcache::transfer_regset): Call new functions.
7643         (regcache_supply_regset): Use gdb_byte*.
7644         (regcache::supply_regset): Likewise.
7645         (regcache_collect_regset): Likewise.
7646         (regcache::collect_regset): Likewise.
7647         * regcache.h (reg_buffer::raw_collect_part): New declaration.
7648         (reg_buffer::raw_supply_part): Likewise.
7649         (regcache::transfer_regset_register): Likewise.
7650         (regcache::transfer_regset): Use gdb_byte*.
7651
7652 2018-06-22  Alan Hayward  <alan.hayward@arm.com>
7653
7654         * nat/aarch64-sve-linux-ptrace.h (HAS_SVE_STATE): Use &.
7655
7656 2018-06-21  Pedro Alves  <palves@redhat.com>
7657
7658         * ada-lang.h (ada_get_task_number): Take a thread_info pointer
7659         instead of a ptid_t.  All callers adjusted.
7660         * ada-tasks.c (ada_get_task_number): Likewise.  All callers
7661         adjusted.
7662         (print_ada_task_info, display_current_task_id, task_command_1):
7663         Adjust.
7664         * breakpoint.c (watchpoint_in_thread_scope): Adjust to use
7665         inferior_thread.
7666         (breakpoint_kind): Adjust.
7667         (remove_breakpoints_pid): Rename to ...
7668         (remove_breakpoints_inf): ... this.  Adjust to take an inferior
7669         pointer.  All callers adjusted.
7670         (bpstat_clear_actions): Use inferior_thread.
7671         (get_bpstat_thread): New.
7672         (bpstat_do_actions): Use it.
7673         (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust
7674         to take a thread_info pointer.  All callers adjusted.
7675         (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint)
7676         (breakpoint_re_set_thread): Use inferior_thread.
7677         * breakpoint.h (struct inferior): Forward declare.
7678         (bpstat_stop_status): Update.
7679         (remove_breakpoints_pid): Delete.
7680         (remove_breakpoints_inf): New.
7681         * bsd-uthread.c (bsd_uthread_target::wait)
7682         (bsd_uthread_target::update_thread_list): Use find_thread_ptid.
7683         * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch)
7684         (maint_btrace_packet_history_cmd)
7685         (maint_btrace_clear_packet_history_cmd): Adjust.
7686         (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use
7687         inferior_thread.
7688         * cli/cli-interp.c: Include "inferior.h".
7689         * common/refcounted-object.h (struct
7690         refcounted_object_ref_policy): New.
7691         * compile/compile-object-load.c: Include gdbthread.h.
7692         (store_regs): Use inferior_thread.
7693         * corelow.c (core_target::close): Use current_inferior.
7694         (core_target_open): Adjust to use first_thread_of_inferior and use
7695         the current inferior.
7696         * ctf.c (ctf_target::close): Adjust to use current_inferior.
7697         * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ...
7698         <thread>: ... this new field.  All references adjusted.
7699         (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor):
7700         Take a thread_info pointer instead of a ptid_t.
7701         * dummy-frame.h (dummy_frame_push, dummy_frame_pop)
7702         (dummy_frame_discard, register_dummy_frame_dtor): Take a
7703         thread_info pointer instead of a ptid_t.
7704         * elfread.c: Include "inferior.h".
7705         (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop):
7706         Use inferior_thread.
7707         * eval.c (evaluate_subexp): Likewise.
7708         * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use
7709         inferior_thread.
7710         * gdb_proc_service.h (struct thread_info): Forward declare.
7711         (struct ps_prochandle) <ptid>: Delete, replaced by ...
7712         <thread>: ... this new field.  All references adjusted.
7713         * gdbarch.h, gdbarch.c: Regenerate.
7714         * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a
7715         'thread' parameter.  All implementations and callers adjusted.
7716         * gdbthread.h (thread_info) <set_running>: New method.
7717         (delete_thread, delete_thread_silent): Take a thread_info pointer
7718         instead of a ptid.
7719         (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete.
7720         (first_thread_of_process): Delete, replaced by ...
7721         (first_thread_of_inferior): ... this new function.  All callers
7722         adjusted.
7723         (any_live_thread_of_process): Delete, replaced by ...
7724         (any_live_thread_of_inferior): ... this new function.  All callers
7725         adjusted.
7726         (switch_to_thread, switch_to_no_thread): Declare.
7727         (is_executing): Delete.
7728         (enable_thread_stack_temporaries): Update comment.
7729         <enable_thread_stack_temporaries>: Take a thread_info pointer
7730         instead of a ptid_t.  Incref the thread.
7731         <~enable_thread_stack_temporaries>: Decref the thread.
7732         <m_ptid>: Delete
7733         <m_thr>: New.
7734         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
7735         (get_last_thread_stack_temporary)
7736         (value_in_thread_stack_temporaries, can_access_registers_thread):
7737         Take a thread_info pointer instead of a ptid_t.  All callers
7738         adjusted.
7739         * infcall.c (get_call_return_value): Use inferior_thread.
7740         (run_inferior_call): Work with thread pointers instead of ptid_t.
7741         (call_function_by_hand_dummy): Work with thread pointers instead
7742         of ptid_t.  Use thread_info_ref.
7743         * infcmd.c (proceed_thread_callback): Access thread's state
7744         directly.
7745         (ensure_valid_thread, ensure_not_running): Use inferior_thread,
7746         access thread's state directly.
7747         (continue_command): Use inferior_thread.
7748         (info_program_command): Use find_thread_ptid and access thread
7749         state directly.
7750         (proceed_after_attach_callback): Use thread state directly.
7751         (notice_new_inferior): Take a thread_info pointer instead of a
7752         ptid_t.  All callers adjusted.
7753         (exit_inferior): Take an inferior pointer instead of a pid.  All
7754         callers adjusted.
7755         (exit_inferior_silent): New.
7756         (detach_inferior): Delete.
7757         (valid_gdb_inferior_id, pid_to_gdb_inferior_id)
7758         (gdb_inferior_id_to_pid, in_inferior_list): Delete.
7759         (detach_inferior_command, kill_inferior_command): Use
7760         find_inferior_id instead of valid_gdb_inferior_id and
7761         gdb_inferior_id_to_pid.
7762         (inferior_command): Use inferior and thread pointers.
7763         * inferior.h (struct thread_info): Forward declare.
7764         (notice_new_inferior): Take a thread_info pointer instead of a
7765         ptid_t.  All callers adjusted.
7766         (detach_inferior): Delete declaration.
7767         (exit_inferior, exit_inferior_silent): Take an inferior pointer
7768         instead of a pid.  All callers adjusted.
7769         (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
7770         (valid_gdb_inferior_id): Delete.
7771         * infrun.c (follow_fork_inferior, proceed_after_vfork_done)
7772         (handle_vfork_child_exec_or_exit, follow_exec): Adjust.
7773         (struct displaced_step_inferior_state) <pid>: Delete, replaced by
7774         ...
7775         <inf>: ... this new field.
7776         <step_ptid>: Delete, replaced by ...
7777         <step_thread>: ... this new field.
7778         (get_displaced_stepping_state): Take an inferior pointer instead
7779         of a pid.  All callers adjusted.
7780         (displaced_step_in_progress_any_inferior): Adjust.
7781         (displaced_step_in_progress_thread): Take a thread pointer instead
7782         of a ptid_t.  All callers adjusted.
7783         (displaced_step_in_progress, add_displaced_stepping_state): Take
7784         an inferior pointer instead of a pid.  All callers adjusted.
7785         (get_displaced_step_closure_by_addr): Adjust.
7786         (remove_displaced_stepping_state): Take an inferior pointer
7787         instead of a pid.  All callers adjusted.
7788         (displaced_step_prepare_throw, displaced_step_prepare)
7789         (displaced_step_fixup): Take a thread pointer instead of a ptid_t.
7790         All callers adjusted.
7791         (start_step_over): Adjust.
7792         (infrun_thread_ptid_changed): Remove bit updating ptids in the
7793         displaced step queue.
7794         (do_target_resume): Adjust.
7795         (fetch_inferior_event): Use inferior_thread.
7796         (context_switch, get_inferior_stop_soon): Take an
7797         execution_control_state pointer instead of a ptid_t.  All callers
7798         adjusted.
7799         (switch_to_thread_cleanup): Delete.
7800         (stop_all_threads): Use scoped_restore_current_thread.
7801         * inline-frame.c: Include "gdbthread.h".
7802         (inline_state) <inline_state>: Take a thread pointer instead of a
7803         ptid_t.  All callers adjusted.
7804         <ptid>: Delete, replaced by ...
7805         <thread>: ... this new field.
7806         (find_inline_frame_state): Take a thread pointer instead of a
7807         ptid_t.  All callers adjusted.
7808         (skip_inline_frames, step_into_inline_frame)
7809         (inline_skipped_frames, inline_skipped_symbol): Take a thread
7810         pointer instead of a ptid_t.  All callers adjusted.
7811         * inline-frame.h (skip_inline_frames, step_into_inline_frame)
7812         (inline_skipped_frames, inline_skipped_symbol): Likewise.
7813         * linux-fork.c (delete_checkpoint_command): Adjust to use thread
7814         pointers directly.
7815         * linux-nat.c (get_detach_signal): Likewise.
7816         * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter.
7817         (thread_db_notice_clone): Adjust.
7818         (thread_db_find_new_threads_silently)
7819         (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take
7820         a thread pointer instead of a ptid_t.  All callers adjusted.
7821         * mi/mi-cmd-var.c: Include "inferior.h".
7822         (mi_cmd_var_update_iter): Update to use thread pointers.
7823         * mi/mi-interp.c (mi_new_thread): Update to use the thread's
7824         inferior directly.
7825         (mi_output_running_pid, mi_inferior_count): Delete, bits factored
7826         out to ...
7827         (mi_output_running): ... this new function.
7828         (mi_on_resume_1): Adjust to use it.
7829         (mi_user_selected_context_changed): Adjust to use inferior_thread.
7830         * mi/mi-main.c (proceed_thread): Adjust to use thread pointers
7831         directly.
7832         (interrupt_thread_callback): : Adjust to use thread and inferior
7833         pointers.
7834         * proc-service.c: Include "gdbthread.h".
7835         (ps_pglobal_lookup): Adjust to use the thread's inferior directly.
7836         * progspace-and-thread.c: Include "inferior.h".
7837         * progspace.c: Include "inferior.h".
7838         * python/py-exitedevent.c (create_exited_event_object): Adjust to
7839         hold a reference to an inferior_object.
7840         * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use
7841         inferior_thread.
7842         * python/py-inferior.c (struct inferior_object): Give the type a
7843         tag name instead of a typedef.
7844         (python_on_normal_stop): No need to check if the current thread is
7845         listed.
7846         (inferior_to_inferior_object): Change return type to
7847         inferior_object.  All callers adjusted.
7848         (find_thread_object): Delete, bits factored out to ...
7849         (thread_to_thread_object): ... this new function.
7850         * python/py-infthread.c (create_thread_object): Use
7851         inferior_to_inferior_object.
7852         (thpy_is_stopped): Use thread pointer directly.
7853         (gdbpy_selected_thread): Use inferior_thread.
7854         * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete
7855         field, replaced with ...
7856         <thread>: ... this new field.  All users adjusted.
7857         (btpy_insn_or_gap_new): Drop const.
7858         (btpy_list_new): Take a thread pointer instead of a ptid_t.  All
7859         callers adjusted.
7860         * python/py-record.c: Include "gdbthread.h".
7861         (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
7862         a ptid_t.  All callers adjusted.
7863         (gdbpy_current_recording): Use inferior_thread.
7864         * python/py-record.h (recpy_record_object) <ptid>: Delete
7865         field, replaced with ...
7866         <thread>: ... this new field.  All users adjusted.
7867         (recpy_element_object) <ptid>: Delete
7868         field, replaced with ...
7869         <thread>: ... this new field.  All users adjusted.
7870         (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
7871         a ptid_t.  All callers adjusted.
7872         * python/py-threadevent.c: Include "gdbthread.h".
7873         (get_event_thread): Use thread_to_thread_object.
7874         * python/python-internal.h (struct inferior_object): Forward
7875         declare.
7876         (find_thread_object, find_inferior_object): Delete declarations.
7877         (thread_to_thread_object, inferior_to_inferior_object): New
7878         declarations.
7879         * record-btrace.c: Include "inferior.h".
7880         (require_btrace_thread): Use inferior_thread.
7881         (record_btrace_frame_sniffer)
7882         (record_btrace_tailcall_frame_sniffer): Use inferior_thread.
7883         (get_thread_current_frame): Use scoped_restore_current_thread and
7884         switch_to_thread.
7885         (get_thread_current_frame): Use thread pointer directly.
7886         (record_btrace_replay_at_breakpoint): Use thread's inferior
7887         pointer directly.
7888         * record-full.c: Include "inferior.h".
7889         * regcache.c: Include "gdbthread.h".
7890         (get_thread_arch_regcache): Use the inferior's address space
7891         directly.
7892         (get_thread_regcache, registers_changed_thread): New.
7893         * regcache.h (get_thread_regcache(thread_info *thread)): New
7894         overload.
7895         (registers_changed_thread): New.
7896         (remote_target) <remote_detach_1>: Swap order of parameters.
7897         (remote_add_thread): <remote_add_thread>: Return the new thread.
7898         (get_remote_thread_info(ptid_t)): New overload.
7899         (remote_target::remote_notice_new_inferior): Use thread pointers
7900         directly.
7901         (remote_target::process_initial_stop_replies): Use
7902         thread_info::set_running.
7903         (remote_target::remote_detach_1, remote_target::detach)
7904         (extended_remote_target::detach): Adjust.
7905         * stack.c (frame_show_address): Use inferior_thread.
7906         * target-debug.h (target_debug_print_thread_info_pp): New.
7907         * target-delegates.c: Regenerate.
7908         * target.c (default_thread_address_space): Delete.
7909         (memory_xfer_partial_1): Use current_inferior.
7910         (target_detach): Use current_inferior.
7911         (target_thread_address_space): Delete.
7912         (generic_mourn_inferior): Use current_inferior.
7913         * target.h (struct target_ops) <thread_address_space>: Delete.
7914         (target_thread_address_space): Delete.
7915         * thread.c (init_thread_list): Use ALL_THREADS_SAFE.  Use thread
7916         pointers directly.
7917         (delete_thread_1, delete_thread, delete_thread_silent): Take a
7918         thread pointer instead of a ptid_t.  Adjust all callers.
7919         (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete.
7920         (first_thread_of_process): Delete, replaced by ...
7921         (first_thread_of_inferior): ... this new function.  All callers
7922         adjusted.
7923         (any_thread_of_process): Rename to ...
7924         (any_thread_of_inferior): ... this, and take an inferior pointer.
7925         (any_live_thread_of_process): Rename to ...
7926         (any_live_thread_of_inferior): ... this, and take an inferior
7927         pointer.
7928         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
7929         (value_in_thread_stack_temporaries)
7930         (get_last_thread_stack_temporary): Take a thread pointer instead
7931         of a ptid_t.  Adjust all callers.
7932         (thread_info::set_running): New.
7933         (validate_registers_access): Use inferior_thread.
7934         (can_access_registers_ptid): Rename to ...
7935         (can_access_registers_thread): ... this, and take a thread
7936         pointer.
7937         (print_thread_info_1): Adjust to compare thread pointers instead
7938         of ptids.
7939         (switch_to_no_thread, switch_to_thread): Make extern.
7940         (scoped_restore_current_thread::~scoped_restore_current_thread):
7941         Use m_thread pointer directly.
7942         (scoped_restore_current_thread::scoped_restore_current_thread):
7943         Use inferior_thread.
7944         (thread_command): Use thread pointer directly.
7945         (thread_num_make_value_helper): Use inferior_thread.
7946         * top.c (execute_command): Use inferior_thread.
7947         * tui/tui-interp.c: Include "inferior.h".
7948         * varobj.c (varobj_create): Use inferior_thread.
7949         (value_of_root_1): Use find_thread_global_id instead of
7950         global_thread_id_to_ptid.
7951
7952 2018-06-21  Alan Hayward  <alan.hayward@arm.com>
7953
7954         * regcache.c (readable_regcache::read_part): Avoid memcpy when
7955         possible.
7956         (regcache::write_part): Likewise.
7957         (readable_regcache::cooked_read_part): Update comment.
7958         (readable_regcache::cooked_write_part): Likewise.
7959         * regcache.h: (readable_regcache::read_part): Likewise.
7960         (regcache::write_part): Likewise.
7961
7962 2018-06-21  Richard Bunt  <richard.bunt@arm.com>
7963             Dirk Schubert  <dirk.schubert@arm.com>
7964
7965         * aarch64-linux-nat.c (post_attach): New.
7966         (aarch64_linux_nat_target::post_attach): Override post_attach to
7967         record the number of hardware debug registers.
7968
7969 2018-06-20  Tom Tromey  <tom@tromey.com>
7970
7971         * python/py-param.c (add_setshow_generic): Make parameters const.
7972         (parmpy_init): Update.
7973
7974 2018-06-20  Simon Marchi  <simon.marchi@polymtl.ca>
7975
7976         * regcache.h (regcache_cooked_read_ftype): Rename to...
7977         (register_read_ftype): ...this, change type to function_view.
7978         (class reg_buffer) <save>: Remove src parameter.
7979         (readonly_detached_regcache) <readonly_detached_regcache>: Make
7980         parameter non-const in first overload.  Remove src parameter in
7981         second overload.
7982         * regcache.c (do_cooked_read): Remove.
7983         (readonly_detached_regcache::readonly_detached_regcache): Make
7984         parameter non-const, adjust call to other constructor.
7985         (reg_buffer::save): Remove src parameter.
7986         * frame.c (do_frame_register_read): Remove.
7987         (frame_save_as_regcache): Use lambda function.
7988         * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
7989         parameter to ppu2spu_data *.
7990         (ppu2spu_sniffer): Use lambda function.
7991
7992 2018-06-20  Simon Marchi  <simon.marchi@polymtl.ca>
7993
7994         * record-full.c (record_full_target::insert_breakpoint): Remove
7995         "struct" keyword, add const.
7996
7997 2018-06-19  Simon Marchi  <simon.marchi@ericsson.com>
7998
7999         * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
8000         PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
8001         * configure.ac: Remove AC_PREREQ, add missing quoting.
8002         * gnulib/configure.ac: Modernize usage of
8003         AC_INIT/AM_INIT_AUTOMAKE.  Remove AC_PREREQ.
8004         * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
8005         (AUTOMAKE_VERSION): Bump to 1.15.1.
8006         * configure: Re-generate.
8007         * config.in: Re-generate.
8008         * aclocal.m4: Re-generate.
8009         * gnulib/aclocal.m4: Re-generate.
8010         * gnulib/config.in: Re-generate.
8011         * gnulib/configure: Re-generate.
8012         * gnulib/import/Makefile.in: Re-generate.
8013
8014 2018-06-19  Pedro Alves  <palves@redhat.com>
8015
8016         * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
8017         (lookup_minimal_symbol_by_pc_section): ... here with
8018         gdb_assert_not_reached added.
8019
8020 2018-06-19  Pedro Alves  <palves@redhat.com>
8021
8022         * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
8023         parameter with a block parameter.  Compare location's block symbol
8024         with the frame's block instead of addresses.
8025         (skip_inline_frames): Pass the current block instead of the
8026         frame's address.  Break out as soon as we determine the frame
8027         should not be skipped.
8028
8029 2018-06-18  Tom Tromey  <tom@tromey.com>
8030
8031         * solib-aix.c (solib_aix_get_section_offsets): Return
8032         unique_xmalloc_ptr.
8033         (solib_aix_solib_create_inferior_hook): Update.
8034
8035 2018-06-18  Tom Tromey  <tom@tromey.com>
8036
8037         * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
8038
8039 2018-06-18  Tom Tromey  <tom@tromey.com>
8040
8041         * solib-frv.c (frv_relocate_main_executable): Use
8042         unique_xmalloc_ptr.
8043         * solib-dsbt.c (dsbt_relocate_main_executable): Use
8044         unique_xmalloc_ptr.
8045
8046 2018-06-18  Tom Tromey  <tom@tromey.com>
8047
8048         * objfiles.h (inhibit_section_map_updates): Update.
8049         (resume_section_map_updates, resume_section_map_updates_cleanup):
8050         Remove.
8051         * solib-svr4.c (svr4_handle_solib_event): Update.
8052         * objfiles.c (inhibit_section_map_updates): Return
8053         scoped_restore_tmpl<int>.
8054         (resume_section_map_updates, resume_section_map_updates_cleanup):
8055         Remove.
8056
8057 2018-06-18  Tom Tromey  <tom@tromey.com>
8058
8059         * valprint.h (read_string): Update.
8060         * valprint.c (read_string): Change type of "buffer".
8061         (val_print_string): Update.
8062         * python/py-value.c (valpy_string): Update.
8063         * language.h (struct language_defn) <la_get_string>: Change
8064         type of "buffer".
8065         (default_get_string, c_get_string): Update.
8066         * language.c (default_get_string): Change type of "buffer".
8067         * guile/scm-value.c (gdbscm_value_to_string): Update.
8068         * c-lang.c (c_get_string): Change type of "buffer".
8069
8070 2018-06-18  Tom Tromey  <tom@tromey.com>
8071
8072         * ser-mingw.c (struct pipe_state_destroyer): New.
8073         (pipe_state_up): New typedef.
8074         (cleanup_pipe_state): Remove.
8075         (pipe_windows_open): Use pipe_state_up.  Don't release argv.
8076
8077 2018-06-18  Tom Tromey  <tom@tromey.com>
8078
8079         * rust-lang.h (rust_yyerror): Don't declare.
8080         * rust-lang.c (rust_language_defn): Update.
8081         * rust-exp.y (yyerror): Now static.
8082         * parse.c (parse_exp_in_context_1): Update.
8083         * p-lang.h (p_yyerror): Don't declare.
8084         * p-lang.c (p_language_defn): Update.
8085         * p-exp.y (yyerror): Now static.
8086         * opencl-lang.c (opencl_language_defn): Update.
8087         * objc-lang.c (objc_language_defn): Update.
8088         * m2-lang.h (m2_yyerror): Don't declare.
8089         * m2-lang.c (m2_language_defn): Update.
8090         * m2-exp.y (yyerror): Now static.
8091         * language.h (struct language_defn) <la_error>: Remove.
8092         * language.c (unk_lang_error): Remove.
8093         (unknown_language_defn, auto_language_defn): Remove.
8094         * go-lang.h (go_yyerror): Don't declare.
8095         * go-lang.c (go_language_defn): Update.
8096         * go-exp.y (yyerror): Now static.
8097         * f-lang.h (f_yyerror): Don't declare.
8098         * f-lang.c (f_language_defn): Update.
8099         * f-exp.y (yyerror): Now static.
8100         * d-lang.h (d_yyerror): Don't declare.
8101         * d-lang.c (d_language_defn): Update.
8102         * d-exp.y (yyerror): Now static.
8103         * c-lang.h (c_yyerror): Don't declare.
8104         * c-lang.c (c_language_defn, cplus_language_defn)
8105         (asm_language_defn, minimal_language_defn): Update.
8106         * c-exp.y (yyerror): Now static.
8107         * ada-lang.h (ada_yyerror): Don't declare.
8108         * ada-lang.c (ada_language_defn): Update.
8109         * ada-exp.y (yyerror): Now static.
8110
8111 2018-06-18  Alan Hayward  <alan.hayward@arm.com>
8112
8113         * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
8114         (store_sveregs_to_thread): Likewise.
8115         (aarch64_linux_fetch_inferior_registers): Check for SVE.
8116         (aarch64_linux_store_inferior_registers): Likewise.
8117         * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
8118         function.
8119         (aarch64_sve_regs_copy_to_regcache): Likewise.
8120         (aarch64_sve_regs_copy_from_regcache): Likewise.
8121         * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
8122         declaration.
8123         (aarch64_sve_regs_copy_to_regcache): Likewise.
8124         (aarch64_sve_regs_copy_from_regcache): Likewise.
8125         (sve_context): Structure from Linux headers.
8126         (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
8127         (SVE_SIG_ZREG_SIZE): Likewise.
8128         (SVE_SIG_PREG_SIZE): Likewise.
8129         (SVE_SIG_FFR_SIZE): Likewise.
8130         (SVE_SIG_REGS_OFFSET): Likewise.
8131         (SVE_SIG_ZREGS_OFFSET): Likewise.
8132         (SVE_SIG_ZREG_OFFSET): Likewise.
8133         (SVE_SIG_ZREGS_SIZE): Likewise.
8134         (SVE_SIG_PREGS_OFFSET): Likewise.
8135         (SVE_SIG_PREG_OFFSET): Likewise.
8136         (SVE_SIG_PREGS_SIZE): Likewise.
8137         (SVE_SIG_FFR_OFFSET): Likewise.
8138         (SVE_SIG_REGS_SIZE): Likewise.
8139         (SVE_SIG_CONTEXT_SIZE): Likewise.
8140         (SVE_PT_REGS_MASK): Likewise.
8141         (SVE_PT_REGS_FPSIMD): Likewise.
8142         (SVE_PT_REGS_SVE): Likewise.
8143         (SVE_PT_VL_INHERIT): Likewise.
8144         (SVE_PT_VL_ONEXEC): Likewise.
8145         (SVE_PT_REGS_OFFSET): Likewise.
8146         (SVE_PT_FPSIMD_OFFSET): Likewise.
8147         (SVE_PT_FPSIMD_SIZE): Likewise.
8148         (SVE_PT_SVE_ZREG_SIZE): Likewise.
8149         (SVE_PT_SVE_PREG_SIZE): Likewise.
8150         (SVE_PT_SVE_FFR_SIZE): Likewise.
8151         (SVE_PT_SVE_FPSR_SIZE): Likewise.
8152         (SVE_PT_SVE_FPCR_SIZE): Likewise.
8153         (__SVE_SIG_TO_PT): Likewise.
8154         (SVE_PT_SVE_OFFSET): Likewise.
8155         (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
8156         (SVE_PT_SVE_ZREG_OFFSET): Likewise.
8157         (SVE_PT_SVE_ZREGS_SIZE): Likewise.
8158         (SVE_PT_SVE_PREGS_OFFSET): Likewise.
8159         (SVE_PT_SVE_PREG_OFFSET): Likewise.
8160         (SVE_PT_SVE_PREGS_SIZE): Likewise.
8161         (SVE_PT_SVE_FFR_OFFSET): Likewise.
8162         (SVE_PT_SVE_FPSR_OFFSET): Likewise.
8163         (SVE_PT_SVE_FPCR_OFFSET): Likewise.
8164         (SVE_PT_SVE_SIZE): Likewise.
8165         (SVE_PT_SIZE): Likewise.
8166         (HAS_SVE_STATE): New define.
8167
8168 2018-06-18  Alan Hayward  <alan.hayward@arm.com>
8169
8170         * nat/aarch64-sve-linux-sigcontext.h: New file.
8171         * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
8172         new files.
8173         (SVE_VQ_MIN): Likewise.
8174         (SVE_VQ_MAX): Likewise.
8175         (SVE_VL_MIN): Likewise.
8176         (SVE_VL_MAX): Likewise.
8177         (SVE_NUM_ZREGS): Likewise.
8178         (SVE_NUM_PREGS): Likewise.
8179         (sve_vl_valid): Likewise.
8180         (struct user_sve_header): Likewise.
8181
8182 2018-06-16  Andrew Burgess  <andrew.burgess@embecosm.com>
8183             Richard Bunt <Richard.Bunt@arm.com>
8184
8185         * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
8186         was requested by GDB.
8187
8188 2018-06-15  Tom de Vries  <tdevries@suse.de>
8189
8190         * MAINTAINERS (Write After Approval): Add Tom de Vries.
8191
8192 2018-06-14  Simon Marchi  <simon.marchi@polymtl.ca>
8193
8194         * gnulib/update-gnulib.sh: Print expected versions of
8195         autoconf/aclocal.
8196
8197 2018-06-14  Simon Marchi  <simon.marchi@ericsson.com>
8198
8199         * arch-utils.c (default_type_align): Use type_length_units.
8200         * gdbtypes.c (type_align): Use type_length_units.
8201
8202 2018-06-14  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
8203
8204         * cli/cli-script.c (_initialize_cli_script): Fix online documentation
8205         of 'define' command.
8206
8207 2018-06-14  Tom de Vries  <tdevries@suse.de>
8208
8209         PR cli/22573
8210         * infcmd.c (print_return_value_1): Use get_user_print_options instead of
8211         get_no_prettyformat_print_options.
8212
8213 2018-06-13  Simon Marchi  <simon.marchi@ericsson.com>
8214
8215         * sparc-nat.h: Include target.h.
8216         * sparc64-linux-nat.c (class sparc64_linux_nat_target)
8217         <fetch_registers>: Remove this argument in function call.
8218         <store_registers>: Remove this argument in function call, remove
8219         extra semicolon.
8220         <low_forget_process>: Call sparc64_forget_process instead of
8221         sparc_forget_process.
8222
8223 2018-06-13  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
8224
8225         * procfs.c (_initialize_procfs): Use add_inf_child_target.
8226         (procfs_target::make_corefile_notes): Adjust to new
8227         target_read_alloc return type.
8228
8229 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
8230             Stephen Roberts  <stephen.roberts@arm.com>
8231
8232         PR gdb/22882
8233         * infrun.c (fetch_inferior_event): If GDB is not proceeding then
8234         run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
8235         Move should_notify_stop local into more inner scope.
8236
8237 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
8238             Stephen Roberts  <stephen.roberts@arm.com>
8239
8240         PR gdb/22882
8241         * infrun.c (resume_1): Add call to mark_async_event_handler.
8242
8243 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
8244
8245         * infrun.c (do_target_wait): Change old version of $pc printed.
8246
8247 2018-06-11  Simon Marchi  <simon.marchi@ericsson.com>
8248
8249         * dwarf2read.c (read_index_from_section): Rename to...
8250         (read_gdb_index_from_section): ... this, update all callers.
8251         (dwarf2_read_index): Rename to...
8252         (dwarf2_read_gdb_index): ... this, update all callers.
8253
8254 2018-06-11  John David Anglin  <danglin@gcc.gnu.org>
8255
8256         * hppa-linux-nat.c
8257         (hppa_linux_nat_target::fetch_inferior_registers): Rename to
8258         hppa_linux_nat_target::fetch_registers.
8259
8260 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
8261
8262         * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
8263         * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
8264         (AARCH64_DWARF_SVE_FFR): Likewise.
8265         (AARCH64_DWARF_SVE_P0): Likewise.
8266         (AARCH64_DWARF_SVE_Z0): Likewise.
8267
8268 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
8269
8270         * common/common-regcache.h (raw_compare): New function.
8271         * regcache.c (regcache::raw_compare): Likewise.
8272         * regcache.h (regcache::raw_compare): New declaration.
8273
8274 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
8275
8276         * common/common-regcache.h (reg_buffer_common): New structure.
8277         * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
8278         (reg_buffer::raw_supply): Likewise.
8279         (reg_buffer::raw_supply_integer): Likewise.
8280         (reg_buffer::raw_supply_zeroed): Likewise.
8281         (reg_buffer::raw_collect): Likewise.
8282         (reg_buffer::raw_collect_integer): Likewise.
8283         * regcache.h (reg_buffer::invalidate): Move from detached_regcache.
8284         (reg_buffer::raw_supply): Likewise.
8285         (reg_buffer::raw_supply_integer): Likewise.
8286         (reg_buffer::raw_supply_zeroed): Likewise.
8287         (reg_buffer::raw_collect): Likewise.
8288         (reg_buffer::raw_collect_integer): Likewise.
8289
8290 2018-06-10  Tom Tromey  <tom@tromey.com>
8291
8292         * remote.c (stop_reply_p): Remove typedef.  Don't declare queue.
8293         (class remote_state) <stop_reply_queue>: Now std::vector.
8294         (remote_state::~remote_state)
8295         (remote_target::stop_reply_queue_length): Update.
8296         (struct queue_iter_param, remove_child_of_pending_fork)
8297         (struct check_pending_event_prevents_wildcard_vcont_callback_data)
8298         (check_pending_event_prevents_wildcard_vcont_callback)
8299         (remove_stop_reply_for_inferior)
8300         (remove_stop_reply_of_remote_state)
8301         (remote_notif_remove_once_on_match)
8302         (stop_reply_match_ptid_and_ws)
8303         (remote_kill_child_of_pending_fork): Remove.
8304         (remote_target::remove_new_fork_children)
8305         (remote_target::check_pending_events_prevent_wildcard_vcont)
8306         (remote_target::discard_pending_stop_replies)
8307         (remote_target::discard_pending_stop_replies_in_queue)
8308         (remote_target::remote_notif_remove_queued_reply)
8309         (remote_target::queued_stop_reply)
8310         (remote_target::push_stop_reply, remote_target::peek_stop_reply)
8311         (remote_target::wait, remote_target::kill_new_fork_children)
8312         (remote_target::async): Update.
8313
8314 2018-06-10  Tom Tromey  <tom@tromey.com>
8315
8316         * record-full.c (record_full_arch_list_cleanups): Remove.
8317         (record_full_message): Use try/catch.
8318         (record_full_wait_cleanups): Remove.
8319         (record_full_wait_1): Use try/catch.
8320         (record_full_restore): Likewise.
8321
8322 2018-06-10  Tom Tromey  <tom@tromey.com>
8323
8324         * record-full.c (record_full_breakpoint_p): Remove typedef.  Don't
8325         declare VEC.  Add constructor.
8326         <in_target_beneath>: Now bool.
8327         (record_full_breakpoints): Now a std::vector, static.
8328         (record_full_sync_record_breakpoints)
8329         (record_full_init_record_breakpoints)
8330         (record_full_target::insert_breakpoint)
8331         (record_full_target::remove_breakpoint): Update.  Don't use XNEW.
8332
8333 2018-06-10  Simon Marchi  <simon.marchi@polymtl.ca>
8334
8335         * dwarf2read.c (process_cu_includes): Remove struct keyword.
8336         * serial.c (serial_interface_lookup): Remove struct keyword.
8337
8338 2018-06-10  Tom Tromey  <tom@tromey.com>
8339
8340         * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
8341         method.
8342         * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
8343         a method.
8344         * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
8345         method.
8346         * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
8347         "beneath" as a method.
8348         * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
8349         Use "beneath" as a method.
8350
8351 2018-06-10  Tom Tromey  <tom@tromey.com>
8352
8353         * tracefile.c (struct trace_file_writer_deleter): New.
8354         <operator()>: Rename from trace_file_writer_xfree.
8355         (trace_file_writer_up): New typedef.
8356         (tsave_command, trace_save_tfile, trace_save_ctf): Update.
8357
8358 2018-06-09  Simon Marchi  <simon.marchi@ericsson.com>
8359
8360         * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
8361         <m_registers, m_register_status>: Change type to
8362         std::unique_ptr.
8363         * regcache.c (reg_buffer::reg_buffer): Use new instead of
8364         XCNEWVEC.
8365
8366 2018-06-09  Simon Marchi  <simon.marchi@ericsson.com>
8367
8368         * common/common-regcache.h (enum register_status): Add
8369         underlying type "signed char".
8370         * regcache.h (reg_buffer) <m_register_status>: Change type to
8371         register_status *.
8372         * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
8373         register_status instead of signed char.
8374         (reg_buffer::save): Use REG_UNKNOWN instead of 0.
8375         (reg_buffer::get_register_status): Remove cast.
8376         (readable_regcache::raw_read): Remove cast.
8377         (readable_regcache::cooked_read): Remove cast.
8378
8379 2018-06-09  Tom Tromey  <tom@tromey.com>
8380
8381         * source.c (reverse_search_command, forward_search_command): Use
8382         scoped_fd.
8383
8384 2018-06-09  Tom Tromey  <tom@tromey.com>
8385
8386         * serial.c (serial_ops_p): Remove typedef.  Don't declare VEC.
8387         (serial_ops_list): Now static, std::vector.
8388         (serial_interface_lookup, serial_add_interface): Update.
8389
8390 2018-06-09  Tom Tromey  <tom@tromey.com>
8391
8392         * dwarf2read.c (process_cu_includes): Update.
8393         (process_full_comp_unit): Update.
8394         * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
8395         std::vector.
8396
8397 2018-06-08  Paul Koning  <paul_koning@dell.com>
8398
8399         PR gdb/23252
8400
8401         * python/python.c (do_start_initialization):
8402         Avoid call to internal Python API.
8403         (init__gdb_module): New function.
8404
8405 2018-06-08  Gary Benson <gbenson@redhat.com>
8406
8407         * linux-thread-db.c (valprint.h): New include.
8408         (struct check_thread_db_info): New structure.
8409         (check_thread_db_on_load, tdb_testinfo): New static globals.
8410         (check_thread_db, check_thread_db_callback): New functions.
8411         (try_thread_db_load_1): Run integrity checks if requested.
8412         (maintenance_check_libthread_db): New function.
8413         (_initialize_thread_db): Register "maint check libthread-db"
8414         and "maint set/show check-libthread-db".
8415         * NEWS: Mention the above new commands.
8416
8417 2018-06-08  Tom Tromey  <tom@tromey.com>
8418
8419         * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
8420         now a method.
8421
8422 2018-06-08  Tom Tromey  <tom@tromey.com>
8423
8424         * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
8425
8426 2018-06-08  Tom Tromey  <tom@tromey.com>
8427
8428         * common/btrace-common.h (struct btrace_data): Add constructor,
8429         destructor, move assignment operator.
8430         <empty, clear, fini>: New methods.
8431         <format>: Initialize.
8432         (btrace_data_init, btrace_data_fini, btrace_data_clear)
8433         (btrace_data_empty): Don't declare.
8434         * common/btrace-common.c (btrace_data_init): Remove.
8435         (btrace_data::fini): Rename from btrace_data_fini.
8436         (btrace_data::empty): Rename from btrace_data_empty.
8437         (btrace_data::clear): Rename from btrace_data_clear.  Return
8438         bool.
8439         * btrace.h (make_cleanup_btrace_data): Don't declare.
8440         * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
8441         (parse_xml_btrace): Update.
8442         (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
8443         (maint_btrace_clear_packet_history_cmd): Update.
8444
8445 2018-06-07  Pedro Alves  <palves@redhat.com>
8446
8447         * target.h (target_ops) <beneath>: Now a method.  All references
8448         updated.
8449         (class target_stack): New.
8450         * target.c (g_target_stack): New.
8451         (g_current_top_target): Delete.
8452         (current_top_target): Get the top target out of g_target_stack.
8453         (target_stack::push, target_stack::unpush): New.
8454         (push_target, unpush_target): Reimplement.
8455         (target_is_pushed): Reimplement in terms of g_target_stack.
8456         (target_ops::beneath, target_stack::find_beneath): New.
8457
8458 2018-06-07  Pedro Alves  <palves@redhat.com>
8459
8460         * target.h (find_target_beneath): Delete declaration.
8461         * target.c (find_target_beneath): Delete definition.
8462         * aix-thread.c: All callers of find_target_beneath adjusted to
8463         call target_ops::beneath instead.
8464         * bsd-uthread.c: Likewise.
8465         * linux-thread-db.c: Likewise.
8466         * ravenscar-thread.c: Likewise.
8467         * sol-thread.c: Likewise.
8468         * spu-multiarch.c: Likewise.
8469
8470 2018-06-07  Pedro Alves  <palves@redhat.com>
8471
8472         * target.h (target_ops) <beneath>: Now a method.  All references
8473         updated.
8474         (target_ops) <m_beneath>: New.
8475         * target.c (target_ops::beneath): New.
8476         * corelow.c: Adjust all references to target_ops::beneath.
8477         * linux-thread-db.c: Likewise.
8478         * make-target-delegates: Likewise.
8479         * record-btrace.c: Likewise.
8480         * record-full.c: Likewise.
8481         * remote.c: Likewise.
8482         * target.c: Likewise.
8483         * target-delegates.c: Regenerate.
8484
8485 2018-06-07  Pedro Alves  <palves@redhat.com>
8486
8487         * target.h (target_stack): Delete.
8488         (current_top_target): Declare function.
8489         * target.c (target_stack): Delete.
8490         (g_current_top_target): New.
8491         (current_top_target): New function.
8492         * auxv.c: Use current_top_target instead of target_stack
8493         throughout.
8494         * avr-tdep.c: Likewise.
8495         * breakpoint.c: Likewise.
8496         * corefile.c: Likewise.
8497         * elfread.c: Likewise.
8498         * eval.c: Likewise.
8499         * exceptions.c: Likewise.
8500         * frame.c: Likewise.
8501         * gdbarch-selftests.c: Likewise.
8502         * gnu-v3-abi.c: Likewise.
8503         * ia64-tdep.c: Likewise.
8504         * ia64-vms-tdep.c: Likewise.
8505         * infcall.c: Likewise.
8506         * infcmd.c: Likewise.
8507         * infrun.c: Likewise.
8508         * linespec.c: Likewise.
8509         * linux-tdep.c: Likewise.
8510         * minsyms.c: Likewise.
8511         * ppc-linux-nat.c: Likewise.
8512         * ppc-linux-tdep.c: Likewise.
8513         * procfs.c: Likewise.
8514         * regcache.c: Likewise.
8515         * remote.c: Likewise.
8516         * rs6000-tdep.c: Likewise.
8517         * s390-linux-nat.c: Likewise.
8518         * s390-tdep.c: Likewise.
8519         * solib-aix.c: Likewise.
8520         * solib-darwin.c: Likewise.
8521         * solib-dsbt.c: Likewise.
8522         * solib-spu.c: Likewise.
8523         * solib-svr4.c: Likewise.
8524         * solib-target.c: Likewise.
8525         * sparc-tdep.c: Likewise.
8526         * sparc64-tdep.c: Likewise.
8527         * spu-tdep.c: Likewise.
8528         * symfile.c: Likewise.
8529         * symtab.c: Likewise.
8530         * target-descriptions.c: Likewise.
8531         * target-memory.c: Likewise.
8532         * target.c: Likewise.
8533         * target.h: Likewise.
8534         * tracefile-tfile.c: Likewise.
8535         * tracepoint.c: Likewise.
8536         * valops.c: Likewise.
8537         * valprint.c: Likewise.
8538         * value.c: Likewise.
8539         * windows-tdep.c: Likewise.
8540         * mi/mi-main.c: Likewise.
8541
8542 2018-06-07  Tom Tromey  <tom@tromey.com>
8543
8544         * valprint.h (build_address_symbolic): Declare.
8545         * printcmd.c (print_address_symbolic): Update.
8546         (build_address_symbolic): Change "name" and "filename" to
8547         std::string.
8548         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
8549         Update.
8550         * defs.h (build_address_symbolic): Remove declaration.
8551
8552 2018-06-07  Alan Hayward  <alan.hayward@arm.com>
8553
8554         * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
8555         (aarch64_vnv_type): Add function.
8556         (aarch64_pseudo_register_name): Add V regs for SVE.
8557         (aarch64_pseudo_register_type): Likewise.
8558         (aarch64_pseudo_register_reggroup_p): Likewise.
8559         (aarch64_pseudo_read_value_2): Use V0 offset for SVE
8560         (aarch64_pseudo_read_value): Add V regs for SVE.
8561         (aarch64_pseudo_write_2): Use V0 offset for SVE
8562         (aarch64_pseudo_write): Add V regs for SVE.
8563         * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
8564
8565 2018-06-06  Sergio Durigan Junior  <sergiodj@redhat.com>
8566
8567         * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
8568         (sve_vl_from_vq): Likewise.
8569
8570 2018-06-05  Tom Tromey  <tom@tromey.com>
8571
8572         * cli/cli-cmds.c (show_version): Update.
8573         * top.c (print_gdb_version): Add "interactive" parameter.
8574         Update.
8575         * main.c (captured_main_1): Update.
8576         * top.h (print_gdb_version): Add "interactive" parameter and a
8577         comment.
8578
8579 2018-06-05  David Malcolm  <dmalcolm@redhat.com>
8580
8581         * common/enum-flags.h: Add trailing semicolon to example in
8582         comment.
8583
8584 2018-06-05  Tom Tromey  <tom@tromey.com>
8585
8586         PR cli/12326:
8587         * NEWS: Add entry about pager.
8588         * utils.c (pagination_disabled_for_command): New global.
8589         (prompt_for_continue): Allow "c" response to prompt.
8590         (reinitialize_more_filter): Clear
8591         pagination_disabled_for_command.
8592         (fputs_maybe_filtered): Check pagination_disabled_for_command.
8593
8594 2018-06-04  Tom Tromey  <tom@tromey.com>
8595
8596         * ada-lang.h (ada_lookup_symbol_list): Update.
8597         * ada-lang.c (resolve_subexp): Update.
8598         (symbols_are_identical_enums): Change type of syms.  Remove nsyms
8599         parameter.
8600         (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
8601         (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
8602         results parameter to std::vector.
8603         (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
8604         Update.
8605         * ada-exp.y (block_lookup): Update.
8606         (select_possible_type_sym): Change type of syms.  Remove nsyms
8607         parameter.
8608         (write_var_or_type, write_name_assoc): Update.
8609
8610 2018-06-04  Joel Brobecker  <brobecker@adacore.com>
8611
8612         * windows-nat.c (windows_nat_target::xfer_partial): Return
8613         TARGET_XFER_E_IO if we need to delegate to the target beneath
8614         but BENEATH is NULL.
8615
8616 2018-06-04  Simon Marchi  <simon.marchi@ericsson.com>
8617
8618         * Makefile.in (config.status): Add configure.nat as a
8619         dependency.
8620
8621 2018-06-04  Tom Tromey  <tom@tromey.com>
8622
8623         * cp-name-parser.y (cpname_state): Add method declarations.
8624         (HANDLE_QUAL): Update.
8625         (cpname_state::d_grab, cpname_state::fill_comp)
8626         (cpname_state::make_operator, cpname_state::make_dtor)
8627         (cpname_state::make_builtin_type, cpname_state::make_name)
8628         (cpname_state::d_qualify, cpname_state::d_int_type)
8629         (cpname_state::d_unary, cpname_state::d_binary): Now methods.
8630         (%union): Move earlier.
8631
8632 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
8633
8634         * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
8635
8636 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
8637
8638         * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
8639         (aarch64_pseudo_write_1): Likewise.
8640         (aarch64_pseudo_read_value): Use helper.
8641         (aarch64_pseudo_write): Likewise.
8642
8643 2018-06-04  Pedro Alves  <palves@redhat.com>
8644
8645         * darwin-nat.c (darwin_ops): Delete.
8646         (darwin_attach_pid): Use get_native_target.
8647
8648 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
8649
8650         * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
8651         * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
8652
8653 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
8654
8655         * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
8656         * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
8657         (aarch64_gdbarch_init): Check for SVE.
8658         * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
8659
8660 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
8661
8662         * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
8663         * aarch64-tdep.h (aarch64_read_description): Likewise.
8664         * arch/aarch64.c (aarch64_create_target_description): Likewise.
8665         * arch/aarch64.h (aarch64_create_target_description): Likewise.
8666         * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
8667         * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
8668         * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
8669
8670 2018-06-02  Simon Marchi  <simon.marchi@ericsson.com>
8671
8672         * value.c (value_fetch_lazy_bitfield): New.
8673         (value_fetch_lazy_memory): New.
8674         (value_fetch_lazy_register): New.
8675         (value_fetch_lazy): Factor out to smaller functions.
8676
8677 2018-06-01  Tom Tromey  <tom@tromey.com>
8678
8679         * cp-name-parser.y (backslashable, represented): Now const.
8680
8681 2018-06-01  Tom Tromey  <tom@tromey.com>
8682
8683         * cp-name-parser.y: Include parser-defs.h.
8684         (parser_fprintf): Remove declaration.
8685
8686 2018-06-01  Tom Tromey  <tom@tromey.com>
8687
8688         * cp-name-parser.y: Use %pure-parser, %lex-param, and
8689         %parse-param.
8690         (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
8691         (global_result): Remove globals.
8692         (struct cpname_state): New.
8693         (yyparse): Don't declare.
8694         (yylex, yyerror): Move declarations after %union.
8695         (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
8696         (make_name): Add state parameter.
8697         Update all callers.
8698         (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
8699         parameter.
8700         (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
8701         Update.
8702         (yylex): Add lvalp, state parameters.
8703         (yyerror): Add state parameter.
8704         (cp_demangled_name_to_comp): Update.
8705
8706 2018-06-01  Tom Tromey  <tom@tromey.com>
8707
8708         * cp-name-parser.y (parser_fprintf): Declare.
8709         (GDB_YY_REMAP_PREFIX): Define.
8710         Include yy-remap.h.  Don't redefine yy* identifiers.
8711
8712 2018-06-01  Tom Tromey  <tom@tromey.com>
8713
8714         * python/py-type.c (typy_legacy_template_argument): Update.
8715         * cp-support.h (cp_demangled_name_to_comp): Update.
8716         * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
8717         parameter to be a "std::string *".
8718         (main): Update.
8719
8720 2018-06-01  H.J. Lu  <hongjiu.lu@intel.com>
8721
8722         * ada-lex.l: Include "diagnostics.h" instead of
8723         "common/diagnostics.h".
8724         * unittests/environ-selftests.c: Likewise.
8725         * common/diagnostics.h: Moved to ../include.
8726
8727 2018-06-01  Joel Brobecker  <brobecker@adacore.com>
8728
8729         * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
8730         to language_mode_manual while calling breakpoint_re_set_one.
8731
8732 2018-06-01  Tom Tromey  <tom@tromey.com>
8733
8734         * valops.c (value_cast_structs, destructor_name_p): Update.
8735         * symtab.c (gdb_mangle_name): Update.
8736         * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
8737         Update.
8738         * p-valprint.c (pascal_object_is_vtbl_ptr_type)
8739         (pascal_object_print_value_fields, pascal_object_print_value):
8740         Update.
8741         * p-typeprint.c (pascal_type_print_derivation_info): Update.
8742         * linespec.c (find_methods): Update.
8743         * gdbtypes.h (type_name_no_tag): Remove.
8744         (type_name_or_error): Rename from type_name_no_tag_or_error.
8745         * gdbtypes.c (type_name_no_tag): Remove.
8746         (type_name_or_error): Rename from type_name_no_tag_or_error.
8747         (lookup_struct_elt_type, check_typedef): Update.
8748         * expprint.c (print_subexp_standard): Update.
8749         * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
8750         * d-namespace.c (d_lookup_nested_symbol): Update.
8751         * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
8752         (cp_print_class_member): Update.
8753         * cp-namespace.c (cp_lookup_nested_symbol): Update.
8754         * completer.c (add_struct_fields): Update.
8755         * c-typeprint.c (cp_type_print_derivation_info)
8756         (c_type_print_varspec_prefix, c_type_print_base_struct_union):
8757         Update.
8758         * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
8759         (ada_prefer_type, ada_is_exception_sym): Update.
8760
8761 2018-06-01  Tom Tromey  <tom@tromey.com>
8762
8763         * valops.c (enum_constant_from_type, value_namespace_elt)
8764         (value_maybe_namespace_elt): Update.
8765         * valarith.c (find_size_for_pointer_math): Update.
8766         * target-descriptions.c (make_gdb_type): Update.
8767         * symmisc.c (print_symbol): Update.
8768         * stabsread.c (define_symbol, read_type)
8769         (complain_about_struct_wipeout, add_undefined_type)
8770         (cleanup_undefined_types_1): Update.
8771         * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
8772         (rust_range_type_p, val_print_struct, rust_print_struct_def)
8773         (rust_internal_print_type, rust_composite_type)
8774         (rust_evaluate_funcall, rust_evaluate_subexp)
8775         (rust_inclusive_range_type_p): Update.
8776         * python/py-type.c (typy_get_tag): Update.
8777         * p-typeprint.c (pascal_type_print_base): Update.
8778         * mdebugread.c (parse_symbol, parse_type): Update.
8779         * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
8780         Update.
8781         * guile/scm-type.c (gdbscm_type_tag): Update.
8782         * go-lang.c (sixg_string_p): Update.
8783         * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
8784         Update.
8785         * gdbtypes.h (struct main_type) <tag_name>: Remove.
8786         (TYPE_TAG_NAME): Remove.
8787         * gdbtypes.c (type_name_no_tag): Simplify.
8788         (check_typedef, check_types_equal, recursive_dump_type)
8789         (copy_type_recursive, arch_composite_type): Update.
8790         * f-typeprint.c (f_type_print_base): Update.  Print "Type" prefix
8791         in summary mode when needed.
8792         * eval.c (evaluate_funcall): Update.
8793         * dwarf2read.c (fixup_go_packaging, read_structure_type)
8794         (process_structure_scope, read_enumeration_type)
8795         (read_namespace_type, read_module_type, determine_prefix): Update.
8796         * cp-support.c (inspect_type): Update.
8797         * coffread.c (process_coff_symbol, decode_base_type): Update.
8798         * c-varobj.c (c_is_path_expr_parent): Update.
8799         * c-typeprint.c (c_type_print_base_struct_union): Update.
8800         (c_type_print_base_1): Update.  Print struct/class/union/enum in
8801         summary when using C language.
8802         * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
8803         (gen_maybe_namespace_elt): Update.
8804         * ada-lang.c (ada_type_name): Simplify.
8805         (empty_record, ada_template_to_fixed_record_type_1)
8806         (template_to_static_fixed_type)
8807         (to_record_with_fixed_variant_part, ada_check_typedef): Update.
8808
8809 2018-06-01  Tom Tromey  <tom@tromey.com>
8810
8811         * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
8812         c_print_type.
8813         * c-typeprint.c (c_print_type_1): Add "language" parameter.
8814         (c_print_type): Update.
8815         (c_print_type): New overload.
8816         (c_type_print_varspec_prefix, c_type_print_args)
8817         (c_type_print_varspec_suffix, c_print_type_no_offsets)
8818         (c_type_print_base_struct_union, c_type_print_base_1)
8819         (cp_type_print_method_args): Add "language" parameter.
8820         (c_type_print_base): Update.
8821         * c-lang.h (c_print_type): Add new overload.
8822
8823 2018-06-01  Tom Tromey  <tom@tromey.com>
8824
8825         * typeprint.h (c_type_print_varspec_suffix): Don't declare.
8826         * c-typeprint.c (c_type_print_varspec_suffix): Now static.
8827
8828 2018-06-01  Alan Hayward  <alan.hayward@arm.com>
8829
8830         * aarch64-tdep.c (aarch64_sve_register_names): New const
8831         var.
8832         * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
8833         (AARCH64_SVE_Z_REGS_NUM): New define.
8834         (AARCH64_SVE_P_REGS_NUM): Likewise.
8835         (AARCH64_SVE_NUM_REGS): Likewise.
8836
8837 2018-05-31  Uros Bizjak  <ubizjak@gmail.com>
8838
8839         * nat/linux-ptrace.h [__alpha__]
8840         (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
8841         definitions.
8842
8843 2018-05-31  Maciej W. Rozycki  <macro@mips.com>
8844
8845         * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
8846         the endianness selected.
8847         * NEWS: Document `set endian auto' mode operation update.
8848
8849 2018-05-31  Alan Hayward  <alan.hayward@arm.com>
8850
8851         * Makefile.in: Add new header.
8852         * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
8853         (sve_vl_from_vg): Likewise.
8854         (sve_vq_from_vl): Likewise.
8855         (sve_vl_from_vq): Likewise.
8856         (sve_vq_from_vg): Likewise.
8857         (sve_vg_from_vq): Likewise.
8858         * configure.nat: Add new c file.
8859         * nat/aarch64-sve-linux-ptrace.c: New file.
8860         * nat/aarch64-sve-linux-ptrace.h: New file.
8861
8862 2018-05-31  Alan Hayward  <alan.hayward@arm.com>
8863
8864         * aarch64-linux-nat.c (aarch64_linux_read_description):
8865         Add parmeter zero.
8866         * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
8867         Likewise.
8868         * aarch64-tdep.c (tdesc_aarch64_list): Add.
8869         (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
8870         (aarch64_gdbarch_init): Add parmeter zero.
8871         * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
8872         * arch/aarch64.c (aarch64_create_target_description): Check VQ.
8873         * arch/aarch64.h (aarch64_create_target_description): Add VQ.
8874         parmeter.
8875         * doc/gdb.texinfo: Describe SVE feature
8876         * features/aarch64-sve.c: New file.
8877
8878 2018-05-31  Omair Javaid  <omair.javaid@linaro.org>
8879
8880         PR gdb/23210
8881         * gdbarch.sh (significant_addr_bit): Default to zero when
8882         not set by target architecture.
8883         * gdbarch.c: Re-generated.
8884         * utils.c (address_significant): Update.
8885
8886 2018-05-30  Joel Brobecker  <brobecker@adacore.com>
8887
8888         * stack.c (func_command): Remove trailing newline in call to error.
8889
8890 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
8891
8892         * regcache.h (regcache_raw_collect): Remove, update callers to
8893         use regcache::raw_collect.
8894         * regcache.c (regcache_raw_collect): Remove.
8895
8896 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
8897
8898         * regcache.h (regcache_raw_supply): Remove, update callers to
8899         use detached_regcache::raw_supply.
8900         * regcache.c (regcache_raw_supply): Remove.
8901
8902 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
8903
8904         * regcache.h (regcache_cooked_write_part): Remove, update
8905         callers to use regcache::cooked_write_part.
8906         * regcache.c (regcache_cooked_write_part): Remove.
8907
8908 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
8909
8910         * regcache.h (regcache_cooked_read_part): Remove, update callers
8911         to use readable_regcache::cooked_read_part.
8912         * regcache.c (regcache_cooked_read_part): Remove.
8913
8914 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
8915
8916         * regcache.h (regcache_cooked_read_value): Remove, update
8917         callers to use readable_regcache::cooked_read_value.
8918         * regcache.c (regcache_cooked_read_value): Remove.
8919
8920 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
8921
8922         * regcache.h (regcache_cooked_write): Remove, update callers to
8923         use regcache::cooked_write.
8924         * regcache.c (regcache_cooked_write): Remove.
8925
8926 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
8927
8928         * regcache.h (regcache_invalidate): Remove, update callers to
8929         use detached_regcache::invalidate instead.
8930         * regcache.c (regcache_invalidate): Remove.
8931
8932 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
8933
8934         * regcache.h (regcache_raw_write_part): Remove, update callers
8935         to use regcache::raw_write_part instead.
8936         * regcache.c (regcache_raw_write_part): Remove.
8937
8938 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
8939
8940         * regcache.h (regcache_raw_read_part): Remove, update callers to
8941         use readable_regcache::raw_read_part instead.
8942         * regcache.c (regcache_raw_read_part): Remove.
8943
8944 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
8945
8946         * regcache.h (regcache_cooked_read): Remove, update callers to
8947         use readable_regcache::cooked_read instead.
8948         * regcache.c (regcache_cooked_read): Remove.
8949
8950 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
8951
8952         * regcache.h (regcache_raw_write): Remove, update callers to use
8953         regcache::raw_write instead.
8954         * regcache.c (regcache_raw_write): Remove.
8955
8956 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
8957
8958         * regcache.h (regcache_raw_read): Remove, update callers to use
8959         readable_regcache::raw_read instead.
8960         * regcache.c (regcache_raw_read): Remove.
8961
8962 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
8963
8964         * regcache.h (regcache_raw_update): Remove, update callers to
8965         use readable_regcache::raw_update instead.
8966         * regcache.c (regcache_raw_update): Remove.
8967
8968 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
8969
8970         * regcache.h (regcache_register_status): Remove, update callers
8971         to use reg_buffer::get_register_status directly instead.
8972         * regcache.c (regcache_register_status): Remove.
8973
8974 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
8975
8976         * regcache.h (regcache_get_ptid): Remove, update all callers to
8977         call regcache::ptid instead.
8978         * regcache.c (regcache_get_ptid): Remove.
8979
8980 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
8981
8982         * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
8983
8984 2018-05-30  Pedro Alves  <palves@redhat.com>
8985
8986         * common/common-exceptions.h (exception_rethrow): Use
8987         ATTRIBUTE_NORETURN.
8988
8989 2018-05-29  Simon Marchi  <simon.marchi@polymtl.ca>
8990
8991         * breakpoint.c (print_solib_event, check_status_catch_solib):
8992         Remove struct keyword in range-based for loops.
8993         * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
8994         * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
8995         Likewise.
8996         * linespec.c (find_superclass_methods, search_minsyms_for_name):
8997         Likewise.
8998         * symfile.c (addr_info_make_relative): Likewise.
8999         * thread.c (value_in_thread_stack_temporaries): Likewise.
9000
9001 2018-06-12  Weimin Pan  <weimin.pan@oracle.com>
9002
9003         PR gdb/16841
9004         * valops.c (value_struct_elt_for_reference): Call check_typedef on
9005         aggregate type to get its real type before accessing it.
9006
9007 2018-05-29  Weimin Pan  <weimin.pan@oracle.com>
9008
9009         * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
9010         * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
9011         * coff-pe-read.c (add_pe_forwarded_sym): Replace
9012         lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
9013         * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
9014         * jit.c (jit_breakpoint_re_set_internal): Likewise.
9015         * printcmd.c (info_address_command): Likewise.
9016
9017 2018-05-29  Tom Tromey  <tom@tromey.com>
9018
9019         * windows-nat.c (handle_exception): Update fall-through comment.
9020
9021 2018-05-29  Tom Tromey  <tom@tromey.com>
9022
9023         * progspace.h (so_list_ptr): Remove typedef.  Don't declare VEC.
9024         (struct program_space) <added_solibs>: Now a std::vector.
9025         * breakpoint.c (print_solib_event): Update.
9026         (check_status_catch_solib): Update.
9027         * progspace.c (clear_program_space_solib_cache): Update.
9028         * solib.c (update_solib_list): Update.
9029
9030 2018-05-29  Tom Tromey  <tom@tromey.com>
9031
9032         * python/py-type.c (typy_richcompare): Update.
9033         * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
9034         * gdbtypes.h (types_deeply_equal): Return bool.
9035         (types_equal): Likewise.
9036         * gdbtypes.c (type_equality_entry_d): Remove typedef.  Don't
9037         declare VEC.
9038         (check_types_equal): Change worklist to std::vector.  Return
9039         bool.
9040         (struct type_equality_entry): Add constructor.
9041         (compare_maybe_null_strings): Return bool.
9042         (check_types_worklist): Return bool.  Change worklist to
9043         std::vector.
9044         (types_deeply_equal): Use std::vector.
9045         (types_equal): Return bool.
9046         (compare_maybe_null_strings): Simplify.
9047
9048 2018-05-29  Tom Tromey  <tom@tromey.com>
9049
9050         * record-btrace.c (tp_t): Remove typedef.  Don't declare VEC.
9051
9052 2018-05-29  Tom Tromey  <tom@tromey.com>
9053
9054         * objc-lang.h: Don't include cp-support.h.
9055         * common/gdb_vecs.h (const_char_ptr): Remove typedef.  Don't
9056         declare VEC.
9057
9058 2018-05-27  Tom Tromey  <tom@tromey.com>
9059
9060         * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
9061
9062 2018-05-25  Tom Tromey  <tom@tromey.com>
9063
9064         * value.c (value::location): Initialize.
9065
9066 2018-05-25  Tom Tromey  <tom@tromey.com>
9067
9068         * dbxread.c (init_bincl_list): Remove.
9069         (bincl_list): Now a std::vector.
9070         (bincls_allocated, next_bincl): Remove.
9071         (free_bincl_list, do_free_bincl_list_cleanup)
9072         (make_cleanup_free_bincl_list): Remove.
9073         (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
9074         unique_xmalloc_ptr.
9075         (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
9076         (struct header_file_location): Add constructor.
9077         (add_bincl_to_list): Remove.
9078
9079 2018-05-25  Tom Tromey  <tom@tromey.com>
9080
9081         * tui/tui.c (tui_enable): Update.
9082         * mi/mi-interp.c (mi_interp::init): Update.
9083         * interps.h (class interp) <name>: New method.
9084         <m_name>: Rename from name.
9085         (~scoped_restore_interp): Update.
9086         * interps.c (interp::interp): Update.
9087         (interp_add, interp_set, interp_lookup_existing)
9088         (current_interp_named_p): Update.
9089
9090 2018-05-25  Tom Tromey  <tom@tromey.com>
9091
9092         * interps.c (interp_name): Remove.
9093         * mi/mi-interp.c (mi_interp::init): Update.
9094         * interps.h (interp_name): Remove.
9095         (~scoped_restore_interp): Update.
9096         * tui/tui.c (tui_enable): Update.
9097
9098 2018-05-25  Tom Tromey  <tom@tromey.com>
9099
9100         * utils.c (fputs_maybe_filtered): Update.
9101         * linespec.c (decode_line_full): Update.
9102         * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
9103         (mi_print_breakpoint_for_event, mi_solib_loaded)
9104         (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
9105         (mi_user_selected_context_changed): Update.
9106         * mi/mi-main.c (mi_execute_command): Update.
9107         * cli/cli-script.c (execute_control_command): Update.
9108         * python/python.c (execute_gdb_command): Update.
9109         * solib.c (info_sharedlibrary_command): Update.
9110         * interps.c (interp_ui_out): Remove.
9111         * interps.h (interp_ui_out): Remove.
9112
9113 2018-05-25  Tom Tromey  <tom@tromey.com>
9114
9115         * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
9116         * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
9117         * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
9118
9119 2018-05-25  Tom Tromey  <tom@tromey.com>
9120
9121         * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
9122         * interps.c (interp_exec): Use scoped_restore.
9123
9124 2018-05-25  Tom Tromey  <tom@tromey.com>
9125
9126         * remote.c (remote_target::remote_file_get): Use
9127         gdb::byte_vector.
9128         (remote_target::remote_file_put): Likewise.
9129
9130 2018-05-25  Tom Tromey  <tom@tromey.com>
9131
9132         * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
9133         a std::string.
9134         (get_pe_section_index, add_pe_exported_sym): Update.
9135         (read_pe_exported_syms): Use gdb::def_vector.
9136
9137 2018-05-25  Tom Tromey  <tom@tromey.com>
9138
9139         * frame.c (remove_prev_frame): Remove.
9140         (get_prev_frame_if_no_cycle): Use TRY/CATCH.
9141
9142 2018-05-25  Maciej W. Rozycki  <macro@mips.com>
9143
9144         * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
9145         Remove prototypes.
9146         * mips-linux-nat.c (supply_fpregset): Always call
9147         `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
9148         (fill_fpregset): Always call `mips64_fill_fpregset' rather than
9149         `mips_fill_fpregset'.
9150         * mips-linux-tdep.c (mips_supply_fpregset)
9151         (mips_supply_fpregset_wrapper, mips_fill_fpregset)
9152         (mips_fill_fpregset_wrapper): Remove functions.
9153         (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
9154         (mips_linux_fpregset): Remove variable.
9155         (mips_linux_iterate_over_regset_sections): Use
9156         `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
9157         (mips_linux_o32_sigframe_init): Remove comment.
9158
9159 2018-05-25  Pedro Alves  <palves@redhat.com>
9160
9161         * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
9162         (struct readahead_cache, struct packet_reg, struct
9163         remote_arch_state, class remote_state): Move higher up in the
9164         file.
9165         (remote_target::m_remote_state): Now an object instead of a pointer.
9166         (remote_target::get_remote_state): Adjust.
9167
9168 2018-05-24  Andrew Burgess  <andrew.burgess@embecosm.com>
9169
9170         * stack.c (select_and_print_frame): Delete.
9171         (struct function_bounds): Move struct within function.
9172         (func_command): Most content moved into new function
9173         find_frame_for_function, use new function, print result, add
9174         function comment.
9175         (find_frame_for_function): New function, now returns a result.
9176
9177 2018-05-24  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
9178
9179         * stack.c (iterate_over_block_arg_vars): Fix comment.
9180         (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
9181
9182 2018-05-24  Andrew Burgess  <andrew.burgess@embecosm.com>
9183
9184         PR gdb/23203
9185         * frame.c
9186         (scoped_restore_selected_frame::scoped_restore_selected_frame):
9187         Define.
9188         (scoped_restore_selected_frame::~scoped_restore_selected_frame):
9189         Define.
9190         * frame.h (class scoped_restore_selected_frame): New class.
9191         * stack.c (print_frame_local_vars): Remove catching and rethrowing
9192         of any exception, use scoped_restore_selected_frame to restore the
9193         frame instead.
9194
9195 2018-05-24  Pedro Alves  <palves@redhat.com>
9196
9197         * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
9198         override.
9199
9200 2018-05-23  Tom Tromey  <tom@tromey.com>
9201
9202         * complaints.c (struct complaints): Remove.
9203         (symfile_complaint_book): Remove.
9204         (series): New global.
9205         (complaint_internal): Update.
9206         (clear_complaints): Update.
9207
9208 2018-05-23  Tom Tromey  <tom@tromey.com>
9209
9210         * complaints.c (counters): New global.
9211         (struct complain): Remove.
9212         (struct complaints) <root>: Remove.
9213         (complaint_sentinel): Remove.
9214         (symfile_complaint_book): Update.
9215         (find_complaint) Remove.
9216         (complaint_internal, clear_complaints): Update.
9217
9218 2018-05-23  Tom Tromey  <tom@tromey.com>
9219
9220         * complaints.c (struct complain) <file, line>: Remove.
9221         (find_complaint): Remove file, line parameters.
9222         (complaint_internal): Update.
9223
9224 2018-05-23  Tom Tromey  <tom@tromey.com>
9225
9226         * complaints.c (vcomplaint): Remove.
9227         (complaint_internal) Merge in contents of vcomplaint.
9228
9229 2018-05-23  Tom Tromey  <tom@tromey.com>
9230
9231         * complaints.c (struct complaints) <explanation>: Remove.
9232         (symfile_explanations): Remove.
9233         (symfile_complaint_book): Update.
9234         (vcomplaint): Update.
9235         (struct explanation): Remove.
9236
9237 2018-05-23  Tom Tromey  <tom@tromey.com>
9238
9239         * complaints.c (symfile_complaints): Remove.
9240         (complaint_internal): Remove "complaints" parameter.
9241         (clear_complaints, vcomplaint): Remove "c" parameter.
9242         (get_complaints): Remove.
9243         * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
9244         (dwarf2_debug_line_missing_file_complaint)
9245         (dwarf2_debug_line_missing_end_sequence_complaint)
9246         (dwarf2_complex_location_expr_complaint)
9247         (dwarf2_const_value_length_mismatch_complaint)
9248         (dwarf2_section_buffer_overflow_complaint)
9249         (dwarf2_macro_malformed_definition_complaint)
9250         (dwarf2_invalid_attrib_class_complaint)
9251         (create_addrmap_from_index, dw2_symtab_iter_next)
9252         (dw2_expand_marked_cus)
9253         (dw2_debug_names_iterator::find_vec_in_debug_names)
9254         (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
9255         (create_debug_type_hash_table, init_cutu_and_read_dies)
9256         (partial_die_parent_scope, add_partial_enumeration)
9257         (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
9258         (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
9259         (read_import_statement, read_file_scope, create_dwo_cu_reader)
9260         (create_cus_hash_table, create_dwp_hash_table)
9261         (inherit_abstract_dies, read_func_scope, read_call_site_scope)
9262         (dwarf2_rnglists_process, dwarf2_ranges_process)
9263         (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
9264         (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
9265         (handle_struct_member_die, process_structure_scope)
9266         (read_array_type, read_common_block, read_module_type)
9267         (read_tag_pointer_type, read_typedef, read_base_type)
9268         (read_subrange_type, load_partial_dies, partial_die_info::read)
9269         (partial_die_info::read, partial_die_info::read)
9270         (partial_die_info::read, read_checked_initial_length_and_offset)
9271         (dwarf2_string_attr, read_formatted_entries)
9272         (dwarf_decode_line_header)
9273         (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
9274         (new_symbol, dwarf2_const_value_attr, lookup_die_type)
9275         (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
9276         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
9277         (get_signatured_type, get_DW_AT_signature_type)
9278         (decode_locdesc, file_file_name, consume_improper_spaces)
9279         (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
9280         (dwarf_decode_macro_bytes, dwarf_decode_macros)
9281         (dwarf2_symbol_mark_computed, set_die_type)
9282         (read_attribute_value): Update.
9283         * stap-probe.c (handle_stap_probe, get_stap_base_address):
9284         Update.
9285         * dbxread.c (unknown_symtype_complaint)
9286         (lbrac_mismatch_complaint, repeated_header_complaint)
9287         (set_namestring, function_outside_compilation_unit_complaint)
9288         (read_dbx_symtab, process_one_symbol): Update.
9289         * gdbtypes.c (stub_noname_complaint): Update.
9290         * windows-nat.c (handle_unload_dll): Update.
9291         * coffread.c (coff_symtab_read, enter_linenos, decode_type)
9292         (decode_base_type): Update.
9293         * xcoffread.c (bf_notfound_complaint, ef_complaint)
9294         (eb_complaint, record_include_begin, record_include_end)
9295         (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
9296         (process_xcoff_symbol, read_symbol)
9297         (function_outside_compilation_unit_complaint)
9298         (scan_xcoff_symtab): Update.
9299         * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
9300         * buildsym.c (finish_block_internal, make_blockvector)
9301         (end_symtab_get_static_block, augment_type_symtab): Update.
9302         * dtrace-probe.c (dtrace_process_dof)
9303         (dtrace_static_probe_ops::get_probes): Update.
9304         * complaints.h (struct complaint): Don't declare.
9305         (symfile_complaints): Remove.
9306         (complaint_internal): Remove "complaints" parameter.
9307         (complaint): Likewise.
9308         (clear_complaints): Likewise.
9309         * symfile.c (syms_from_objfile_1, finish_new_objfile)
9310         (reread_symbols): Update.
9311         * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
9312         (dwarf2_frame_cache, decode_frame_entry): Update.
9313         * dwarf2loc.c (dwarf_reg_to_regnum): Update.
9314         * objc-lang.c (lookup_objc_class, lookup_child_selector)
9315         (info_selectors_command): Update.
9316         * macrotab.c (macro_include, check_for_redefinition)
9317         (macro_undef): Update.
9318         * objfiles.c (filter_overlapping_sections): Update.
9319         * stabsread.c (invalid_cpp_abbrev_complaint)
9320         (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
9321         (define_symbol, error_type, read_type, rs6000_builtin_type)
9322         (stabs_method_name_from_physname, read_member_functions)
9323         (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
9324         (attach_fields_to_type, complain_about_struct_wipeout)
9325         (read_range_type, read_args, common_block_start)
9326         (common_block_end, cleanup_undefined_types_1, scan_file_globals):
9327         Update.
9328         * mdebugread.c (index_complaint, unknown_ext_complaint)
9329         (basic_type_complaint, bad_tag_guess_complaint)
9330         (bad_rfd_entry_complaint, unexpected_type_code_complaint)
9331         (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
9332         (parse_procedure, parse_lines)
9333         (function_outside_compilation_unit_complaint)
9334         (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
9335         (bad_tag_guess_complaint, reg_value_complaint): Update.
9336         * cp-support.c (demangled_name_complaint): Update.
9337         * macroscope.c (sal_macro_scope): Update.
9338         * dwarf-index-write.c (class debug_names): Update.
9339
9340 2018-05-23  Tom Tromey  <tom@tromey.com>
9341
9342         * complaints.c (clear_complaints): Remove "noisy" parameter.
9343         * complaints.h (clear_complaints): Update.
9344         * symfile.c (syms_from_objfile_1, finish_new_objfile)
9345         (reread_symbols): Update.
9346
9347 2018-05-23  Tom Tromey  <tom@tromey.com>
9348
9349         * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
9350         SUBSEQUENT_MESSAGE.
9351         (vcomplaint, clear_complaints): Update.
9352         (symfile_explanations): Remove some messages.
9353
9354 2018-05-23  Tom Tromey  <tom@tromey.com>
9355
9356         * complaints.c (internal_complaint): Remove.
9357         * complaints.h (internal_complaint): Remove.
9358
9359 2018-05-22  Maciej W. Rozycki  <macro@mips.com>
9360
9361         * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
9362
9363 2018-05-22  Pedro Alves  <palves@redhat.com>
9364
9365         * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
9366         (remote_fileio_badfd, remote_fileio_return_errno)
9367         (remote_fileio_return_success, remote_fileio_func_open)
9368         (remote_fileio_func_open, remote_fileio_func_close)
9369         (remote_fileio_func_read, remote_fileio_func_write)
9370         (remote_fileio_func_lseek, remote_fileio_func_rename)
9371         (remote_fileio_func_unlink, remote_fileio_func_stat)
9372         (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
9373         (remote_fileio_func_isatty, remote_fileio_func_system): Add
9374         remote_target parameter.
9375         (remote_fio_func_map) <func>: Add remote_target parameter.
9376         (do_remote_fileio_request, remote_fileio_request):
9377         * remote-fileio.h (remote_fileio_request):
9378         * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
9379         remote_target parameter.
9380         (remote_notif_process, handle_notification): Adjust to pass down
9381         the remote.
9382         (remote_notif_state_allocate): Add remote_target parameter.  Save
9383         it.
9384         * remote-notif.h (struct remote_target): Forward declare.
9385         (struct notif_client) <parse, ack, can_get_pending_events>: Add
9386         remote_target parameter.
9387         (struct remote_notif_state) <remote>: New field.
9388         (remote_notif_ack, remote_notif_parse): Add remote_target
9389         parameter.
9390         (remote_notif_state_allocate, remote_notif_state_allocate): Add
9391         remote_target parameter.
9392         * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
9393         (threads_listing_context, rmt_thread_action, protocol_feature)
9394         (packet_reg, stop_reply, stop_reply_p, enum packet_support)
9395         (packet_result, struct threads_listing_context, remote_state):
9396         Move definitions and declarations higher up.
9397         (remote_target) <~remote_target>: Declare.
9398         (remote_download_command_source, remote_file_put, remote_file_get)
9399         (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
9400         (remote_hostio_pread_vFile, remote_hostio_send_command)
9401         (remote_hostio_set_filesystem, remote_hostio_open)
9402         (remote_hostio_close, remote_hostio_unlink, remote_state)
9403         (get_remote_state, get_remote_packet_size, get_memory_packet_size)
9404         (get_memory_write_packet_size, get_memory_read_packet_size)
9405         (append_pending_thread_resumptions, remote_detach_1)
9406         (append_resumption, remote_resume_with_vcont)
9407         (add_current_inferior_and_thread, wait_ns, wait_as)
9408         (process_stop_reply, remote_notice_new_inferior)
9409         (process_initial_stop_replies, remote_add_thread)
9410         (btrace_sync_conf, remote_btrace_maybe_reopen)
9411         (remove_new_fork_children, kill_new_fork_children)
9412         (discard_pending_stop_replies, stop_reply_queue_length)
9413         (check_pending_events_prevent_wildcard_vcont)
9414         (discard_pending_stop_replies_in_queue, stop_reply)
9415         (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
9416         (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
9417         (remote_interrupt_as, remote_interrupt_ns)
9418         (remote_get_noisy_reply, remote_query_attached)
9419         (remote_add_inferior, remote_current_thread, get_current_thread)
9420         (set_thread, set_general_thread, set_continue_thread)
9421         (set_general_process, write_ptid)
9422         (remote_unpack_thread_info_response, remote_get_threadinfo)
9423         (parse_threadlist_response, remote_get_threadlist)
9424         (remote_threadlist_iterator, remote_get_threads_with_ql)
9425         (remote_get_threads_with_qxfer)
9426         (remote_get_threads_with_qthreadinfo, extended_remote_restart)
9427         (get_offsets, remote_check_symbols, remote_supported_packet)
9428         (remote_query_supported, remote_packet_size)
9429         (remote_serial_quit_handler, remote_detach_pid)
9430         (remote_vcont_probe, remote_resume_with_hc)
9431         (send_interrupt_sequence, interrupt_query)
9432         (remote_notif_get_pending_events, fetch_register_using_p)
9433         (send_g_packet, process_g_packet, fetch_registers_using_g)
9434         (store_register_using_P, store_registers_using_G)
9435         (set_remote_traceframe, check_binary_download)
9436         (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
9437         (remote_xfer_live_readonly_partial, remote_read_bytes)
9438         (remote_send_printf, remote_flash_write, readchar)
9439         (remote_serial_write, putpkt, putpkt_binary, skip_frame)
9440         (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
9441         (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
9442         (extended_remote_disable_randomization, extended_remote_run)
9443         (send_environment_packet, extended_remote_environment_support)
9444         (extended_remote_set_inferior_cwd, remote_write_qxfer)
9445         (remote_read_qxfer, push_stop_reply, vcont_r_supported)
9446         (packet_command): Now methods of ...
9447         (remote_target): ... this class.
9448         (m_remote_state) <remote_target>: New field.
9449         (struct remote_state) <stop_reply_queue,
9450         remote_async_inferior_event_token, wait_forever_enabled_p>: New
9451         fields.
9452         (remote_state::remote_state): Allocate stop_reply_queue.
9453         (remote_state): Delete global.
9454         (get_remote_state_raw): Delete.
9455         (remote_target::get_remote_state): Allocate m_remote_state on
9456         demand.
9457         (get_current_remote_target): New.
9458         (remote_ops, extended_remote_ops): Delete.
9459         (wait_forever_enabled_p, remote_async_inferior_event_token):
9460         Delete, moved to struct remote_state.
9461         (remote_target::close): Delete self.  Destruction bits split to
9462         ...
9463         (remote_target::~remote_target): ... this.
9464         (show_memory_packet_size): Adjust to use
9465         get_current_remote_target.
9466         (struct protocol_feature) <func>: Add remote_target parameter.
9467         All callers adjusted.
9468         (curr_quit_handler_target): New.
9469         (remote_serial_quit_handler): Reimplement.
9470         (remote_target::open_1): Adjust to use get_current_remote_target.
9471         Heap-allocate remote_target/extended_remote_target instances.
9472         (vcont_builder::vcont_builder): Add remote_target parameter, and
9473         save it in m_remote.  All callers adjusted.
9474         (vcont_builder::m_remote): New field.
9475         (vcont_builder::restart, vcont_builder::flush)
9476         (vcont_builder::push_action): Use it.
9477         (remote_target::commit_resume): Use it.
9478         (struct queue_iter_param) <remote>: New field.
9479         (remote_target::remove_new_fork_children): Fill in 'remote' field.
9480         (check_pending_event_prevents_wildcard_vcont_callback_data): New.
9481         (check_pending_event_prevents_wildcard_vcont_callback)
9482         (remote_target::check_pending_events_prevent_wildcard_vcont)
9483         (remote_target::discard_pending_stop_replies)
9484         (remote_target::discard_pending_stop_replies_in_queue)
9485         (remote_target::remote_notif_remove_queued_reply): Fill in
9486         'remote' field.
9487         (remote_notif_get_pending_events): New.
9488         (remote_target::readchar, remote_target::remote_serial_write):
9489         Save/restore curr_quit_handler_target.
9490         (putpkt): New.
9491         (kill_new_fork_children): Fill in 'remote' field.
9492         (packet_command): Use get_current_remote_target, defer to
9493         remote_target method of same name.
9494         (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
9495         parameter, and save it in m_remote.  All callers adjusted.
9496         (scoped_remote_fd::release): Use m_remote.
9497         (scoped_remote_fd::m_remote): New field.
9498         (remote_file_put, remote_file_get, remote_file_delete): Use
9499         get_current_remote_target, defer to remote_target method of same
9500         name.
9501         (remote_btrace_reset): Add remote_state paremeter.  Update all
9502         callers.
9503         (remote_async_inferior_event_handler). Pass down 'data'.
9504         (remote_new_objfile): Use get_current_remote_target.
9505         (remote_target::vcont_r_supported): New.
9506         (set_range_stepping): Use get_current_remote_target and
9507         remote_target::vcont_r_supported.
9508         (_initialize_remote): Don't allocate 'remote_state' and
9509         'stop_reply_queue' globals.
9510         * remote.h (struct remote_target): Forward declare.
9511         (getpkt, putpkt, remote_notif_get_pending_events): Add
9512         'remote_target' parameter.
9513
9514 2018-05-22  Pedro Alves  <palves@redhat.com>
9515
9516         * remote.c (vcont_builder): Now a class.  Make all data members
9517         private.
9518         (vcont_builder) <vcont_builder, restart, flush, push_action>:
9519         Declare methods.
9520         (vcont_builder_restart): Rename to ...
9521         (vcont_builder::restart): ... this.
9522         (vcont_builder_flush): Rename to ...
9523         (vcont_builder::flush): ... this.
9524         (vcont_builder_push_action): Rename to ...
9525         (vcont_builder::push_action): ... this.
9526         (remote_target::commit_resume): Adjust.
9527
9528 2018-05-22  Pedro Alves  <palves@redhat.com>
9529
9530         * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
9531         (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
9532         (get_fixed_memory_packet_size): New.
9533         (get_memory_packet_size): Use it.
9534         (set_memory_packet_size): Don't override the config size with
9535         DEFAULT_MAX_MEMORY_PACKET_SIZE.
9536         (show_memory_packet_size): Use get_fixed_memory_packet_size.
9537         Don't refer to get_memory_packet_size if not connected to a remote
9538         target.  Show "(default)" if configured size is 0.
9539
9540 2018-05-22  Pedro Alves  <palves@redhat.com>
9541
9542         * remote.c (remote_target::mourn_inferior): Move
9543         discard_pending_stop_replies call here from ...
9544         (_initialize_remote): ... here.
9545
9546 2018-05-22  Pedro Alves  <palves@redhat.com>
9547
9548         * remote.c (compare_section_command): Remove set_general_process
9549         call.
9550
9551 2018-05-22  Pedro Alves  <palves@redhat.com>
9552
9553         * remote.c (struct packet_reg, struct remote_arch_state):
9554         Move higher up in the file.
9555         (remote_state) <m_arch_states>: Store remote_arch_state values
9556         instead of remote_arch_state pointers.
9557         (remote_state::get_remote_arch_state): Adjust.
9558
9559 2018-05-22  Pedro Alves  <palves@redhat.com>
9560
9561         * remote.c: Include <unordered_map>.
9562         (remote_state): Now a class.
9563         (remote_state) <get_remote_arch_state>: Declare method.
9564         <get_remote_arch_state>: New field.
9565         (remote_arch_state) <remote_arch_state>: Declare ctor.
9566         <regs>: Now a unique_ptr.
9567         (remote_gdbarch_data_handle): Delete.
9568         (get_remote_arch_state): Delete.
9569         (remote_state::get_remote_arch_state): New.
9570         (get_remote_state): Adjust to call remote_state's
9571         get_remote_arch_state method.
9572         (init_remote_state): Delete, bits factored out to ...
9573         (remote_arch_state::remote_arch_state): ... this new method.
9574         (get_remote_packet_size, get_memory_packet_size)
9575         (process_g_packet, remote_target::fetch_registers)
9576         (remote_target::prepare_to_store, store_registers_using_G)
9577         (remote_target::store_registers, remote_target::get_trace_status):
9578         Adjust to call remote_state's method.
9579         (_initialize_remote): Remove reference to
9580         remote_gdbarch_data_handle.
9581
9582 2018-05-22  Pedro Alves  <palves@redhat.com>
9583
9584         * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
9585         pread>: New method declarations.
9586         (remote_target::open_1): Adjust.
9587         (readahead_cache_invalidate): Rename to ...
9588         (readahead_cache::invalidate): ... this, and adjust to be a class
9589         method.
9590         (readahead_cache_invalidate_fd): Rename to ...
9591         (readahead_cache::invalidate_fd): ... this, and adjust to be a
9592         class method.
9593         (remote_hostio_pwrite): Adjust.
9594         (remote_hostio_pread_from_cache): Rename to ...
9595         (readahead_cache::pread): ... this, and adjust to be a class
9596         method.
9597         (remote_hostio_close): Adjust.
9598
9599 2018-05-22  Pedro Alves  <palves@redhat.com>
9600
9601         * remote.c (remote_hostio_close_cleanup): Delete.
9602         (class scoped_remote_fd): New.
9603         (remote_file_put, remote_file_get): Use it.
9604
9605 2018-05-22  Pedro Alves  <palves@redhat.com>
9606
9607         (struct vCont_action_support): Use bool and initialize all fields.
9608         (struct readahead_cache): Initialize all fields.
9609         (remote_state): Use bool and initialize all fields.
9610         (remote_state::remote_state, remote_state::~remote_state): New.
9611         (new_remote_state): Delete.
9612         (_initialize_remote): Use new to allocate remote_state.
9613
9614 2018-05-22  Pedro Alves  <palves@redhat.com>
9615             張俊芝  <zjz@zjz.name>
9616
9617         PR gdb/22973
9618         * c-exp.y: Include "c-support.h".
9619         (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
9620         of tolower.  Use c_ident_is_alpha to scan names.
9621         * c-lang.c: Include "c-support.h".
9622         (convert_ucn, convert_octal, convert_hex, convert_escape): Use
9623         ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
9624         * c-support.h: New file, with bits factored out from ...
9625         * cp-name-parser.y: ... this file.
9626         Include "c-support.h".
9627         (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
9628         c-support.h and renamed.
9629         (symbol_end, yylex): Adjust.
9630
9631 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
9632
9633         * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
9634         parameter type to CORE_ADDR.
9635         * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
9636         parameter type in declaration to CORE_ADDR.
9637         * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
9638         target_auxv_search to get AT_HWCAP and use the result to get the
9639         target description.
9640         * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
9641         to CORE_ADDR. Remove the cast of the return value to unsigned
9642         long. Fix error predicate of target_auxv_search.
9643         (ppc_linux_nat_target::read_description): Change the type of the
9644         hwcap variable to CORE_ADDR.
9645
9646 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
9647
9648         * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
9649         if the size of fpscr is larger than 32 bits.
9650
9651 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
9652
9653         * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
9654         (ppc32_linux_vsxregmap): New global.
9655         (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
9656         regcache_supply_regset, and regcache_collect_regset.
9657         * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
9658         * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
9659         (fetch_vsx_register, store_vsx_register): Remove.
9660         (fetch_vsx_registers): Add regno parameter. Get regset using
9661         ppc_linux_vsxregset. Use regset to supply registers.
9662         (store_vsx_registers): Add regno parameter. Get regset using
9663         ppc_linux_vsxregset. Use regset to collect registers.
9664         (fetch_register): Call fetch_vsx_registers instead of
9665         fetch_vsx_register.
9666         (store_register): Call store_vsx_registers instead of
9667         store_vsx_register.
9668         (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
9669         new regno parameter.
9670         (store_ppc_registers): Call store_vsx_registers with -1 for the
9671         new regno parameter.
9672         * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
9673         (ppc_collect_vsxregset): Remove.
9674
9675 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
9676
9677         * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
9678         offset fields.
9679         * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
9680         for vector register offset fields.
9681         (ppc64_fbsd_reg_offsets): Likewise.
9682         * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
9683         to vector register offset fields.
9684         * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
9685         to vector register offset fields.
9686         * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
9687         vector register offset fields.
9688         * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
9689         initializers for vector register offset fields.
9690         (rs6000_aix64_reg_offsets): Likewise.
9691         * rs6000-tdep.c (ppc_vrreg_offset): Remove.
9692         (ppc_supply_vrregset): Remove.
9693         (ppc_collect_vrregset): Remove.
9694         * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
9695         (ppc_linux_vrregset) : New function.
9696         (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
9697         (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
9698         (ppc32_linux_vrregset): Remove.
9699         (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
9700         and use result instead of ppc32_linux_vrregset.
9701         (ppc32_linux_reg_offsets): Remove initializers for vector register
9702         offset fields.
9703         (ppc64_linux_reg_offsets): Likewise.
9704         * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
9705         * ppc-linux-nat.c: Include regset.h.
9706         (gdb_vrregset_t): Adjust comment to account for little-endian
9707         mode.
9708         (supply_vrregset, fill_vrregset): Remove.
9709         (fetch_altivec_register, store_altivec_register): Remove.
9710         (fetch_altivec_registers): Add regno parameter. Get regset using
9711         ppc_linux_vrregset. Use regset to supply registers.
9712         (store_altivec_registers): Add regno parameter. Get regset using
9713         ppc_linux_vrregset. Use regset to collect registers.
9714         (fetch_register): Call fetch_altivec_registers instead of
9715         fetch_altivec_register.
9716         (store_register): Call store_altivec_registers instead of
9717         store_altivec_register.
9718         (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
9719         the new regno parameter.
9720         (store_ppc_registers): Call store_altivec_registers with -1 for
9721         the new regno parameter.
9722
9723 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
9724
9725         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
9726         (PPC_LINUX_SIZEOF_VSXREGSET): Define.
9727         * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
9728         (gdb_vrregset_t): Change array type size to
9729         PPC_LINUX_SIZEOF_VRREGSET.
9730         (gdb_vsxregset_t): Change array type size to
9731         PPC_LINUX_SIZEOF_VSXREGSET.
9732         * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
9733         Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
9734         PPC_LINUX_SIZEOF_VSXREGSET.
9735
9736 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
9737
9738         * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
9739         * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
9740         nat/ppc-linux.c.
9741         (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
9742         ppc_linux_target_wordsize with tid.
9743         (ppc_linux_nat_target::read_description): Call ppc_linux_target
9744         wordsize with tid.
9745         * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
9746         (ppc64_64bit_inferior_p): Add static and inline specifiers.
9747         (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
9748         tid parameter. Remove static specifier.
9749         * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
9750         (ppc_linux_target_wordsize): New declaration.
9751
9752 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
9753
9754         * arch/ppc-linux-common.c: New file.
9755         * arch/ppc-linux-common.h: New file.
9756         * arch/ppc-linux-tdesc.h: New file.
9757         * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
9758         * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
9759         (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
9760         arch/ppc-linux-tdesc.h.
9761         * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
9762         arch/ppc-linux-tdesc.h.
9763         (ppc_linux_nat_target::read_description): Remove target
9764         description matching code. Fill a ppc_linux_features struct and
9765         call ppc_linux_match_description with it. Move comment about ISA
9766         2.05 to ppc-linux-common.c.
9767         * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
9768         arch/ppc-linux-tdesc.h.
9769         (ppc_linux_core_read_description): Remove target description
9770         matching code. Fill a ppc_linux_features struct and call
9771         ppc_linux_match_description with it.
9772         * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
9773         (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
9774         (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
9775         (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
9776         (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
9777         (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
9778         (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
9779         (tdesc_powerpc_e500l): Remove.
9780
9781 2018-05-22  Joel Brobecker  <brobecker@adacore.com>
9782
9783         * ada-lang.c (catch_assert_command): Pass empty string instead
9784         of NULL for excep_string argument.
9785
9786 2018-05-22  Maciej W. Rozycki  <macro@mips.com>
9787
9788         * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
9789         the width of the requested register exceeds the width of the
9790         `ptrace' data type.
9791
9792 2018-05-21  Tom Tromey  <tom@tromey.com>
9793
9794         * printcmd.c (output_command): Remove.
9795         (output_command_const): Rename to output_command.
9796         * valprint.h (output_command): Rename from output_command_const.
9797         * tracepoint.c (trace_dump_actions): Call output_command.
9798
9799 2018-05-21  Tom Tromey  <tom@tromey.com>
9800
9801         * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
9802         (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
9803         * ada-lang.h (create_ada_exception_catchpoint): Update.
9804         * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
9805         std::string.
9806         (create_excep_cond_exprs, ~ada_catchpoint)
9807         (should_stop_exception, print_one_exception)
9808         (print_mention_exception, print_recreate_exception): Update.
9809         (ada_get_next_arg): Remove.
9810         (catch_ada_exception_command_split): Use std::string.  Change type
9811         of "excep_string", "cond_string".
9812         (catch_ada_exception_command): Update.
9813         (create_ada_exception_catchpoint): Change type of excep_string.
9814         (ada_exception_sal): Remove excep_string parameter.
9815         (~ada_catchpoint): Remove.
9816
9817 2018-05-21  Tom Tromey  <tom@tromey.com>
9818
9819         * ada-lang.c (ada_collect_symbol_completion_matches): Remove
9820         cleanup.
9821
9822 2018-05-21  Tom Tromey  <tom@tromey.com>
9823
9824         * ada-lang.c (ada_exception_message_1, ada_exception_message):
9825         Return unique_xmalloc_ptr.
9826         (print_it_exception): Update.
9827
9828 2018-05-21  Tom Tromey  <tom@tromey.com>
9829
9830         * tracepoint.c (trace_dump_actions): Use std::string.
9831
9832 2018-05-21  Tom Tromey  <tom@tromey.com>
9833
9834         * symfile.c (reread_symbols): Use std::string for original_name.
9835
9836 2018-05-21  Tom Tromey  <tom@tromey.com>
9837
9838         * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
9839         (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN.  Default
9840         constructor.
9841
9842 2018-05-20  Simon Marchi  <simon.marchi@polymtl.ca>
9843
9844         * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
9845         instance to...
9846         (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
9847         * objfiles.c (get_objfile_bfd_data): Allocate
9848         objfile_per_bfd_storage with obstack_new when allocating on
9849         obstack.
9850
9851 2018-05-20  Simon Marchi  <simon.marchi@ericsson.com>
9852
9853         * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
9854         OBSTACK_ZALLOC.
9855         * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
9856         * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
9857         * mdebugread.c (mdebug_build_psymtabs): Likewise.
9858         (add_pending): Likewise.
9859         (parse_symbol): Likewise.
9860         (parse_partial_symbols): Likewise.
9861         (psymtab_to_symtab_1): Likewise.
9862         (new_psymtab): Likewise.
9863         (elfmdebug_build_psymtabs): Likewise.
9864         * minsyms.c (terminate_minimal_symbol_table): Likewise.
9865         * objfiles.c (get_objfile_bfd_data): Likewise.
9866         (objfile_register_static_link): Likewise.
9867         * psymtab.c (allocate_psymtab): Likewise.
9868         * stabsread.c (read_member_functions): Likewise.
9869         * xcoffread.c (xcoff_end_psymtab): Likewise.
9870
9871 2018-05-20  Simon Marchi  <simon.marchi@ericsson.com>
9872
9873         * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
9874         compiler supports std::is_trivially_constructible.
9875         * common/poison.h: Include obstack.h.
9876         (IsMallocable): Define to is_trivially_constructible if the
9877         compiler supports it, define to true_type otherwise.
9878         (xobnew): New.
9879         (XOBNEW): Redefine.
9880         (xobnewvec): New.
9881         (XOBNEWVEC): Redefine.
9882         * gdb_obstack.h (obstack_zalloc): New.
9883         (OBSTACK_ZALLOC): Redefine.
9884         (obstack_calloc): New.
9885         (OBSTACK_CALLOC): Redefine.
9886         (obstack_new): New.
9887         * gdbarch.sh: Include gdb_obstack in gdbarch.h.
9888         (gdbarch_obstack): New declaration in gdbarch.h, definition in
9889         gdbarch.c.
9890         (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
9891         obstack_calloc/obstack_zalloc.
9892         (gdbarch_obstack_zalloc): Remove.
9893         * target-descriptions.c (tdesc_data_init): Use obstack_new.
9894
9895 2018-05-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
9896
9897         * stack.c (backtrace_command_1): Remove useless variable int i.
9898
9899 2018-05-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
9900
9901         * stack.c (print_frame_info): Fix comment.
9902
9903 2018-05-18  Tom Tromey  <tom@tromey.com>
9904
9905         * dwarf2read.c (struct dwz_file): Add constructor, initializers.
9906         <dwz_bfd>: Now a gdb_bfd_ref_ptr.
9907         (~dwarf2_per_objfile): Update
9908         (dwarf2_get_dwz_file): Use new.
9909         * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
9910         unique_ptr.
9911
9912 2018-05-18  Tom Tromey  <tom@tromey.com>
9913
9914         * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
9915         unique_ptr.
9916         * dwarf2read.c (struct dwp_file): Add constructor and
9917         initializers.
9918         (open_and_init_dwp_file): Return a unique_ptr.
9919         (dwarf2_per_objfile, create_dwp_hash_table)
9920         (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
9921         (lookup_dwo_unit_in_dwp): Update.
9922         (open_and_init_dwp_file, get_dwp_file): Update.
9923
9924 2018-05-18  Tom Tromey  <tom@tromey.com>
9925
9926         * dwarf2read.c (dwarf2_per_objfile): Update.
9927         (struct mapped_index): Add initializers.
9928         (dwarf2_read_index): Use new.
9929         (dw2_symtab_iter_init): Update.
9930         * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
9931         unique_ptr.
9932
9933 2018-05-18  Simon Marchi  <simon.marchi@ericsson.com>
9934
9935         * dwarf2read.c (mapped_index) <total_size>: Remove.
9936
9937 2018-05-18  Simon Marchi  <simon.marchi@ericsson.com>
9938
9939         * unittests/format_pieces-selftests.c (test_format_specifier):
9940         Add ARI comments.
9941
9942 2018-05-18  Tom Tromey  <tom@tromey.com>
9943
9944         * c-typeprint.c (maybe_print_hole): New function.
9945         (c_print_type_struct_field_offset): Update.
9946         (c_type_print_base_struct_union): Call maybe_print_hole.
9947
9948 2018-05-17  Keith Seitz  <keiths@redhat.com>
9949
9950         * breakpoint.c (build_bpstat_chain): New function, moved from
9951         bpstat_stop_status.
9952         (bpstat_stop_status): Add optional parameter, `stop_chain'.
9953         If no stop chain is passed, call build_bpstat_chain to build it.
9954         * breakpoint.h (build_bpstat_chain): Declare.
9955         (bpstat_stop_status): Move documentation here from breakpoint.c.
9956         * infrun.c (handle_signal_stop): Before eliding inlined frames,
9957         build the stop chain and pass it to skip_inline_frames.
9958         Pass this stop chain to bpstat_stop_status.
9959         * inline-frame.c: Include breakpoint.h.
9960         (stopped_by_user_bp_inline_frame): New function.
9961         (skip_inline_frames): Add parameter `stop_chain'.
9962         Move documention to inline-frame.h.
9963         If non-NULL, use stopped_by_user_bp_inline_frame to determine
9964         whether the frame should be elided.
9965         * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
9966         Add moved documentation and update for new parameter.
9967
9968 2018-05-17  Simon Marchi  <simon.marchi@ericsson.com>
9969
9970         PR cli/14975
9971         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9972         unittests/format_pieces-selftests.c.
9973         * common/format.h (format_piece) <operator==>: New.
9974         (format_pieces) <operator[]>: Remove.
9975         * common/format.c (format_pieces::format_pieces): Handle \e.
9976         * unittests/format_pieces-selftests.c: New.
9977
9978 2018-05-17  Tom Tromey  <tom@tromey.com>
9979
9980         PR symtab/23010:
9981         * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
9982         (dw2_instantiate_symtab): Add skip_partial parameter.
9983         (dw2_find_last_source_symtab, dw2_map_expand_apply)
9984         (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
9985         (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
9986         (dw2_expand_symtabs_matching_one)
9987         (dw2_find_pc_sect_compunit_symtab)
9988         (dw2_debug_names_lookup_symbol)
9989         (dw2_debug_names_expand_symtabs_for_function): Update.
9990         (init_cutu_and_read_dies): Add skip_partial parameter.
9991         (process_psymtab_comp_unit, build_type_psymtabs_1)
9992         (process_skeletonless_type_unit, load_partial_comp_unit)
9993         (psymtab_to_symtab_1): Update.
9994         (load_full_comp_unit): Add skip_partial parameter.
9995         (process_imported_unit_die, dwarf2_read_addr_index)
9996         (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
9997         (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
9998         (read_signatured_type): Update.
9999
10000 2018-05-17  Simon Marchi  <simon.marchi@ericsson.com>
10001
10002         * value.c (release_value): Remove unused variable.
10003         (record_latest_value): Likewise.
10004         (access_value_history): Likewise.
10005         (preserve_values): Likewise.
10006
10007 2018-05-17  Tom Tromey  <tom@tromey.com>
10008
10009         * extension.h (struct ext_lang_type_printers) <py_type_printers>:
10010         Initialize.
10011
10012 2018-05-16  Maciej W. Rozycki  <macro@mips.com>
10013
10014         PR gdb/22286
10015         * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
10016         Also handle registers whose width is not a multiple of
10017         PTRACE_TYPE_RET.
10018         (linux_nat_trad_target::store_register): Likewise.
10019
10020 2018-05-16  Tom Tromey  <tom@tromey.com>
10021
10022         * gdbcore.h (core_bfd): Redefine.
10023         * corelow.c (core_target::close): Update.
10024         (core_target_open): Update.
10025         * progspace.h (struct program_space) <cbfd>: Now a
10026         gdb_bfd_ref_ptr.
10027
10028 2018-05-16  Tom Tromey  <tom@tromey.com>
10029
10030         PR cli/19551:
10031         * symfile-add-flags.h (enum symfile_add_flags)
10032         <SYMFILE_NOT_FILENAME>: New constant.
10033         * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME.  Get
10034         objfile name from BFD.
10035         (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
10036         * minidebug.c (find_separate_debug_file_in_section): Put
10037         ".gnu_debugdata" into BFD's file name.
10038
10039 2018-05-16  Simon Marchi  <simon.marchi@ericsson.com>
10040
10041         * regcache.c (regcache_read_ftype, regcache_write_ftype):
10042         Remove.
10043
10044 2018-05-15  Tamar Christina  <tamar.christina@arm.com>
10045
10046         PR binutils/21446
10047         * aarch64-tdep.c (aarch64_analyze_prologue,
10048         aarch64_software_single_step, aarch64_displaced_step_copy_insn):
10049         Indicate not interested in errors.
10050
10051 2018-05-15  Maciej W. Rozycki  <macro@mips.com>
10052
10053         * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
10054         Supply the MIPS_ZERO_REGNUM register.
10055
10056 2018-05-15  Maciej W. Rozycki  <macro@mips.com>
10057
10058         * mips-tdep.c (mask_address_var): Make variable static.
10059
10060 2018-05-14  Tom Tromey  <tom@tromey.com>
10061
10062         * dwarf2read.c (rust_union_quirks): Clear rust_unions.
10063
10064 2018-05-11  Andrew Burgess  <andrew.burgess@embecosm.com>
10065
10066         * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
10067         FXSAVE_ADDR for the mxcsr register.
10068
10069 2018-05-11  Max Filippov  <jcmvbkbc@gmail.com>
10070
10071         * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
10072
10073 2018-05-11  Pedro Alves  <palves@redhat.com>
10074
10075         * corelow.c (core_target) <core_target>: No longer inline.
10076         Initialize m_core_gdbarch, m_core_vec and build the section table
10077         here.
10078         <~core_target>: New.
10079         <core_gdbarch, get_core_register_section>: New methods.
10080         <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
10081         factored out from ...
10082         <core_data, core_vec, core_gdbarch>: ... these deleted globals.
10083         (core_ops): Delete.
10084         (sniff_core_bfd): Add gdbarch parameter.
10085         (core_close): Delete, merged into ...
10086         (core_target::close): ... here.  Delete self.
10087         (core_close_cleanup): Delete.
10088         (core_target_open): Allocate a core_target on the heap.  Use a
10089         unique_ptr instead of a cleanup.  Bits moved into the core_target
10090         ctor.  Adjust to use core_target methods instead of globals.
10091         (get_core_register_section): Rename to ...
10092         (core_target::get_core_register_section): ... this and adjust.
10093         (struct get_core_registers_cb_data): New.
10094         (get_core_registers_cb): Use it.  Use bool.
10095         (core_target::fetch_registers, core_target::files_info)
10096         (core_target::xfer_partial, core_target::read_description)
10097         (core_target::pid_to, core_target::thread_name): Adjust to
10098         reference class fields instead of globals.
10099         * target.h (struct target_ops_deleter, target_ops_up): New.
10100
10101 2018-05-11  Pedro Alves  <palves@redhat.com>
10102
10103         * corefile.c (core_file_command): Move to corelow.c.
10104         * corelow.c (the_core_target): Delete.
10105         (core_file_command): Moved from corefile.c.  Check exec_bfd
10106         instead of the_core_target.  Use target_detach instead of calling
10107         into the_core_target directly.
10108         (maybe_say_no_core_file_now): New.
10109         (core_target::detach): Use it.
10110         (_initialize_corelow): Remove references to the_core_target.
10111         * gdbcore.h (the_core_target): Delete.
10112
10113 2018-05-11  Tom Tromey  <tromey@redhat.com>
10114             Pedro Alves  <palves@redhat.com>
10115
10116         * corefile.c (core_bfd): Remove.
10117         * gdbcore.h (core_bfd): Now a macro.
10118         * progspace.h (struct program_space) <cbfd>: New field.
10119
10120 2018-05-11  Tom Tromey  <tom@tromey.com>
10121
10122         * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
10123         gdb::def_vector.
10124
10125 2018-05-10  Tom Tromey  <tom@tromey.com>
10126
10127         * configure: Rebuild.
10128         * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
10129
10130 2018-05-10  Joel Brobecker  <brobecker@adacore.com>
10131
10132         PR server/23158:
10133         * regformats/regdat.sh: Adjust script, following the addition
10134         of the new expedite_regs parameter to init_target_desc.
10135
10136 2018-05-10  Omair Javaid  <omair.javaid@linaro.org>
10137     
10138         PR gdb/23127
10139         * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
10140         set_gdbarch_significant_addr_bit.
10141         * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
10142         set_gdbarch_significant_addr_bit.
10143         * utils.c (address_significant): Update to sign extend addr.
10144
10145 2018-05-09  Max Filippov  <jcmvbkbc@gmail.com>
10146
10147         * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
10148         (xtensa_linux_init_abi): Limit tdep->num_regs by
10149         tdep->num_nopriv_regs.
10150         * xtensa-tdep.c (xtensa_derive_tdep): Calculate
10151         tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
10152         not initialized.
10153
10154 2018-05-08  Simon Marchi  <simon.marchi@ericsson.com>
10155
10156         * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
10157
10158 2018-05-08  Andrew Burgess  <andrew.burgess@embecosm.com>
10159
10160         * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
10161         (I387_MXCSR_INIT_VAL): New constant.
10162         * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
10163         buffer if it was supplied by the inferior.
10164         * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
10165         (i387_xsave_get_clear_bv): New function.
10166         (i387_supply_xsave): Only read x87 control registers from the
10167         xsave buffer if the feature is enabled, and the state will have
10168         been written, otherwise, provide a suitable default.
10169         (i387_collect_xsave): Pre-clear all registers in xsave buffer,
10170         including x87 control registers.  Update control registers if they
10171         have changed from the default value, and mark features as enabled
10172         as required.
10173         * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
10174
10175 2018-05-08  Ulrich Weigand  <uweigand@de.ibm.com>
10176
10177         * spu-tdep.c (info_spu_event_command): Fix output formatting.
10178
10179 2018-05-07  Tom Tromey  <tom@tromey.com>
10180
10181         * configure: Rebuild.
10182         * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
10183
10184 2018-05-07  Tom Tromey  <tom@tromey.com>
10185
10186         PR tdep/20362:
10187         * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
10188         bit.  Use correct value for VDIV.
10189
10190 2018-05-04  Tom Tromey  <tom@tromey.com>
10191
10192         * configure: Rebuild.
10193         * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
10194
10195 2018-05-04  Tom Tromey  <tom@tromey.com>
10196
10197         * linux-record.c (record_linux_system_call) <case
10198         RECORD_SYS_RECVFROM>: Add "break".
10199
10200 2018-05-04  Tom Tromey  <tom@tromey.com>
10201
10202         * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
10203         Add missing "break".
10204         * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
10205         Add missing "break".
10206
10207 2018-05-04  Tom Tromey  <tom@tromey.com>
10208
10209         * rs6000-tdep.c (ppc_process_record_op4)
10210         (ppc_process_record_op63): Add fall-through comment.
10211
10212 2018-05-04  Tom Tromey  <tom@tromey.com>
10213
10214         * i386-tdep.c (i386_process_record): Add fall-through comment.
10215
10216 2018-05-04  Tom Tromey  <tom@tromey.com>
10217
10218         * stabsread.c (define_symbol) <case 'p'>: Add fall-through
10219         comment.
10220
10221 2018-05-04  Tom Tromey  <tom@tromey.com>
10222
10223         * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
10224         * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
10225         * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
10226         comment.
10227         * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
10228         comment.
10229         * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
10230         comment.
10231
10232 2018-05-04  Tom Tromey  <tom@tromey.com>
10233
10234         * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
10235
10236 2018-05-04  Tom Tromey  <tom@tromey.com>
10237
10238         * s390-tdep.c (s390_process_record): Fix fall-through comments.
10239         * xcoffread.c (scan_xcoff_symtab): Move comment later.
10240         * symfile.c (section_is_mapped): Fix fall-through comment.
10241         * stabsread.c (define_symbol, read_member_functions): Fix
10242         fall-through comment.
10243         * s390-linux-tdep.c (s390_process_record): Fix fall-through
10244         comment.
10245         * remote.c (remote_wait_as): Fix fall-through comment.
10246         * p-exp.y (yylex): Fix fall-through comment.
10247         * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
10248         comment.
10249         * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
10250         * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
10251         * jv-exp.y (yylex): Fix fall-through comment.
10252         * go-exp.y (lex_one_token): Fix fall-through comment.
10253         * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
10254         fall-through comment.
10255         * f-exp.y (yylex): Fix fall-through comment.
10256         * dwarf2read.c (process_die): Fix fall-through comments.
10257         * dbxread.c (process_one_symbol): Fix fall-through comment.
10258         * d-exp.y (lex_one_token): Fix fall-through comment.
10259         * cp-name-parser.y (yylex): Fix fall-through comment.
10260         * coffread.c (coff_symtab_read): Fix fall-through comment.
10261         * c-exp.y (lex_one_token): Fix fall-through comment.
10262         * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
10263         comment.
10264         * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
10265         comment.
10266
10267 2018-05-04  Tom Tromey  <tom@tromey.com>
10268
10269         PR python/22730:
10270         * NEWS: Mention gdb.execute change.
10271         * gdbcmd.h (execute_control_command): Don't declare.
10272         * python/python.c (execute_gdb_command): Use read_command_lines_1,
10273         execute_control_commands, execute_control_commands_to_string.
10274         * cli/cli-script.h (execute_control_commands)
10275         (execute_control_commands_to_string): Declare.
10276         (execute_control_command): Add from_tty parameter.
10277         * cli/cli-script.c (execute_control_commands)
10278         (execute_control_commands_to_string): New functions.
10279         (execute_user_command): Use execute_control_commands.
10280         (execute_control_command_1): Add "from_tty" parameter.  Update.
10281         (execute_control_command): Likewise.
10282
10283 2018-05-04  Tom Tromey  <tom@tromey.com>
10284
10285         PR python/22731:
10286         * NEWS: Mention that breakpoint commands are writable.
10287         * python/py-breakpoint.c (bppy_set_commands): New function.
10288         (breakpoint_object_getset) <"commands">: Use it.
10289
10290 2018-05-04  Tom Tromey  <tom@tromey.com>
10291
10292         * tracepoint.c (actions_command): Update.
10293         * mi/mi-cmd-break.c (mi_command_line_array)
10294         (mi_command_line_array_cnt, mi_command_line_array_ptr)
10295         (mi_read_next_line): Remove.
10296         (mi_cmd_break_commands): Update.
10297         * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
10298         function_view.
10299         * cli/cli-script.c (get_command_line): Update.
10300         (process_next_line): Use function_view.  Constify.
10301         (recurse_read_control_structure, read_command_lines)
10302         (read_command_lines_1): Change argument types to function_view.
10303         (do_define_command, document_command): Update.
10304         * breakpoint.h (check_tracepoint_command): Don't declare.
10305         * breakpoint.c (check_tracepoint_command): Remove.
10306         (commands_command_1, create_tracepoint_from_upload): Update.
10307
10308 2018-05-04  Tom Tromey  <tom@tromey.com>
10309
10310         PR gdb/11750:
10311         * cli/cli-script.h (enum command_control_type) <define_control>:
10312         New constant.
10313         * cli/cli-script.c (multi_line_command_p): Handle define_control.
10314         (build_command_line, execute_control_command_1)
10315         (process_next_line): Likewise.
10316         (do_define_command): New function, extracted from define_command.
10317         (define_command): Use it.
10318
10319 2018-05-04  Tom Tromey  <tom@tromey.com>
10320
10321         * tracepoint.c (actions_command): Update.
10322         * cli/cli-script.h (read_command_lines): Update.
10323         * cli/cli-script.c (read_command_lines): Constify prompt_arg.
10324         (MAX_TMPBUF): Remove define.
10325         (define_command): Use string_printf.
10326         (document_command): Likewise.
10327         * breakpoint.c (commands_command_1): Update.
10328
10329 2018-05-04  Tom Tromey  <tom@tromey.com>
10330
10331         * top.c (execute_command): Update.
10332         * cli/cli-script.h (print_command_lines): Now varargs.
10333         * cli/cli-script.c (print_command_lines): Now varargs.
10334         (execute_control_command_1) <case while_control, case if_control>:
10335         Update.
10336
10337 2018-05-04  Tom Tromey  <tom@tromey.com>
10338
10339         * tracepoint.c (all_tracepoint_actions): Rename from
10340         all_tracepoint_actions_and_cleanup.  Change return type.
10341         (actions_command, encode_actions_1, encode_actions)
10342         (trace_dump_actions, tdump_command): Update.
10343         * remote.c (remote_download_command_source): Update.
10344         * python/python.c (gdbpy_eval_from_control_command)
10345         (python_command, python_interactive_command): Update.
10346         * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
10347         * guile/guile.c (guile_command)
10348         (gdbscm_eval_from_control_command, guile_command): Update.
10349         * compile/compile.c (compile_code_command)
10350         (compile_print_command, compile_to_object): Update.
10351         * cli/cli-script.h (struct command_lines_deleter): New.
10352         (counted_command_line): New typedef.
10353         (struct command_line): Add constructor, destructor.
10354         <body_list>: Remove.
10355         <body_list_0, body_list_1>: New members.
10356         (command_line_up): Remove typedef.
10357         (read_command_lines, read_command_lines_1, get_command_line):
10358         Update.
10359         (copy_command_lines): Don't declare.
10360         * cli/cli-script.c (build_command_line): Use "new".
10361         (get_command_line): Return counted_command_line.
10362         (print_command_lines, execute_user_command)
10363         (execute_control_command_1, while_command, if_command): Update.
10364         (realloc_body_list): Remove.
10365         (process_next_line, recurse_read_control_structure): Update.
10366         (read_command_lines, read_command_lines_1): Return counted_command_line.
10367         (free_command_lines): Use "delete".
10368         (copy_command_lines): Remove.
10369         (define_command, document_command, show_user_1): Update.
10370         * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
10371         a counted_command_line.
10372         * breakpoint.h (counted_command_line): Remove typedef.
10373         (breakpoint_set_commands): Update.
10374         * breakpoint.c (check_no_tracepoint_commands)
10375         (validate_commands_for_breakpoint): Update.
10376         (breakpoint_set_commands): Change commands to be a
10377         counted_command_line.
10378         (commands_command_1, update_dprintf_command_list)
10379         (create_tracepoint_from_upload): Update.
10380
10381 2018-05-04  Tom Tromey  <tom@tromey.com>
10382
10383         * cli/cli-decode.h (cmd_list_element): New constructor.
10384         (~cmd_list_element): New destructor.
10385         (struct cmd_list_element): Add initializers.
10386         * cli/cli-decode.c (do_add_cmd): Use "new".
10387         (delete_cmd): Use "delete".
10388
10389 2018-05-04  Jan Kratochvil  <jan.kratochvil@redhat.com>
10390             Pedro Alves <palves@redhat.com>
10391
10392         PR breakpoints/19806 and support for PR external/20207.
10393         * NEWS: Mention Aarch64 watchpoint improvements.
10394         * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
10395         watchpoints and PR external/20207 watchpoints.
10396         * nat/aarch64-linux-hw-point.c
10397         (kernel_supports_any_contiguous_range): New.
10398         (aarch64_watchpoint_offset): New.
10399         (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
10400         (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
10401         (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
10402         (aarch64_align_watchpoint): New parameters aligned_offset_p and
10403         next_addr_orig_p.  Support PR external/20207 watchpoints.
10404         (aarch64_downgrade_regs): New.
10405         (aarch64_dr_state_insert_one_point): New parameters offset and
10406         addr_orig.
10407         (aarch64_dr_state_remove_one_point): Likewise.
10408         (aarch64_handle_breakpoint): Update caller.
10409         (aarch64_handle_aligned_watchpoint): Likewise.
10410         (aarch64_handle_unaligned_watchpoint): Support addr_orig and
10411         aligned_offset.
10412         (aarch64_linux_set_debug_regs): Remove const from state.  Call
10413         aarch64_downgrade_regs.
10414         (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
10415         * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
10416         (DR_CONTROL_MASK): ... this.
10417         (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
10418         (unsigned int aarch64_watchpoint_offset): New prototype.
10419         (aarch64_linux_set_debug_regs): Remove const from state.
10420         * utils.c (align_up, align_down): Move to ...
10421         * common/common-utils.c (align_up, align_down): ... here.
10422         * utils.h (align_up, align_down): Move to ...
10423         * common/common-utils.h (align_up, align_down): ... here.
10424
10425 2018-05-04  Joel Brobecker  <brobecker@adacore.com>
10426
10427         * sparc-tdep.c (sparc_structure_return_p): Re-implement to
10428         match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
10429         (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
10430         Re-implement to match the ABI as summarized in GCC's
10431         gcc/config/sparc/sparc.c.  All callers updated.
10432         (sparc32_store_arguments): Remove assertion.
10433
10434 2018-05-04  Tom Tromey  <tom@tromey.com>
10435
10436         * printcmd.c: Don't include tui.h.
10437         (decode_format): Use skip_spaces.
10438
10439 2018-05-04  Tom Tromey  <tom@tromey.com>
10440
10441         PR gdb/22619:
10442         * printcmd.c (last_count): New global.
10443         (x_command): Use saved count when repeating.
10444
10445 2018-05-04  Tom Tromey  <tom@tromey.com>
10446
10447         * nto-procfs.c (do_closedir_cleanup): Remove.
10448         (procfs_pidlist): Use gdb_dir_up.
10449         * procfs.c (do_closedir_cleanup): Remove.
10450         (proc_update_threads): Use gdb_dir_up.
10451         * common/filestuff.h (struct gdb_dir_deleter): New.
10452         (gdb_dir_up): New typedef.
10453
10454 2018-05-04  Tom Tromey  <tom@tromey.com>
10455
10456         * ada-lang.c (print_mention_exception): Use std::string.
10457
10458 2018-05-04  Tom Tromey  <tom@tromey.com>
10459
10460         * ada-lang.c (create_excep_cond_exprs): Update.
10461         (ada_exception_catchpoint_cond_string): Use std::string.
10462
10463 2018-05-04  Tom Tromey  <tom@tromey.com>
10464
10465         * ada-lang.c (xget_renaming_scope): Return std::string.
10466         (old_renaming_is_invisible): Update.
10467
10468 2018-05-04  Tom Tromey  <tom@tromey.com>
10469
10470         * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
10471         (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
10472
10473 2018-05-04  Ulrich Weigand  <uweigand@de.ibm.com>
10474
10475         * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
10476
10477 2018-05-04  Tom Tromey  <tom@tromey.com>
10478
10479         * remote.c (remote_query_supported_append): Change type.
10480         (remote_check_symbols): Update.
10481
10482 2018-05-04  Paul Pluzhnikov  <ppluzhnikov@google.com>
10483
10484         PR gdb/11420
10485         * configure.ac: Prepend libpython.
10486         * python/python-config.py: Likewise.
10487         * configure: Regenerate.
10488
10489 2018-05-03  Simon Marchi  <simon.marchi@ericsson.com>
10490
10491         * Makefile.in (%.c: %.l): Use -t instead of --stdout.
10492
10493 2018-05-03  Pedro Alves  <palves@redhat.com>
10494
10495         * s390-linux-nat.c
10496         (s390_linux_nat_target::have_continuable_watchpoint): Mark with
10497         override.  Write 'true' instead of '1'.
10498         (s390_linux_nat_target::watchpoint_addr_within_range): Remove
10499         declaration.
10500
10501 2018-05-02  Pedro Alves  <palves@redhat.com>
10502
10503         * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
10504         add_inf_child_target.
10505         * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
10506         add_inf_child_target.
10507         * aix-thread.c (aix_thread_target_info): New.
10508         (aix_thread_target) <shortname, longname, doc>: Delete.
10509         <info>: New.
10510         * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
10511         add_inf_child_target.
10512         * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
10513         add_inf_child_target.
10514         * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
10515         add_inf_child_target.
10516         * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
10517         add_inf_child_target.
10518         * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
10519         add_inf_child_target.
10520         * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
10521         add_inf_child_target.
10522         * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
10523         add_inf_child_target.
10524         * arm-linux-nat.c (_initialize_arm_linux_nat): Use
10525         add_inf_child_target.
10526         * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
10527         add_inf_child_target.
10528         * bfd-target.c (target_bfd_target_info): New.
10529         (target_bfd) <shortname, longname, doc>: Delete.
10530         <info>: New.
10531         * bsd-kvm.c (bsd_kvm_target_info): New.
10532         (bsd_kvm_target) <shortname, longname, doc>: Delete.
10533         <info>: New.
10534         (bsd_kvm_target::open): Rename to ...
10535         (bsd_kvm_target_open): ... this.  Adjust.
10536         * bsd-uthread.c (bsd_uthread_target_info): New.
10537         (bsd_uthread_target) <shortname, longname, doc>: Delete.
10538         <info>: New.
10539         * corefile.c (core_file_command): Adjust.
10540         * corelow.c (core_target_info): New.
10541         (core_target) <shortname, longname, doc>: Delete.
10542         <info>: New.
10543         (core_target::open): Rename to ...
10544         (core_target_open): ... this.  Adjust.
10545         * ctf.c (ctf_target_info): New.
10546         (ctf_target) <shortname, longname, doc>: Delete.
10547         <info>: New.
10548         (ctf_target::open): Rename to ...
10549         (ctf_target_open): ... this.
10550         (_initialize_ctf): Adjust.
10551         * exec.c (exec_target_info): New.
10552         (exec_target) <shortname, longname, doc>: Delete.
10553         <info>: New.
10554         (exec_target::open): Rename to ...
10555         (exec_target_open): ... this.
10556         * gdbcore.h (core_target_open): Declare.
10557         * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
10558         * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
10559         add_inf_child_target.
10560         * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
10561         add_inf_child_target.
10562         * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
10563         add_inf_child_target.
10564         * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
10565         add_inf_child_target.
10566         * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
10567         add_inf_child_target.
10568         * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
10569         add_inf_child_target.
10570         * i386-linux-nat.c (_initialize_i386_linux_nat): Use
10571         add_inf_child_target.
10572         * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
10573         add_inf_child_target.
10574         * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
10575         add_inf_child_target.
10576         * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
10577         add_inf_child_target.
10578         * inf-child.c (inf_child_target_info): New.
10579         (inf_child_target::info): New.
10580         (inf_child_open_target): Remove 'target' parameter.  Use
10581         get_native_target instead.
10582         (inf_child_target::open): Delete.
10583         (add_inf_child_target): New.
10584         * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
10585         Delete.
10586         <info>: New.
10587         (add_inf_child_target): Declare.
10588         (inf_child_open_target): Declare.
10589         * linux-thread-db.c (thread_db_target_info): New.
10590         (thread_db_target) <shortname, longname, doc>: Delete.
10591         <info>: New.
10592         * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
10593         add_inf_child_target.
10594         * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
10595         add_inf_child_target.
10596         * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
10597         add_inf_child_target.
10598         * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
10599         add_inf_child_target.
10600         * make-target-delegates (print_class): Adjust.
10601         * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
10602         add_inf_child_target.
10603         * mips-linux-nat.c (_initialize_mips_linux_nat): Use
10604         add_inf_child_target.
10605         * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
10606         add_inf_child_target.
10607         * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
10608         add_inf_child_target.
10609         * nto-procfs.c (nto_native_target_info): New.
10610         (nto_procfs_target_native) <shortname, longname, doc>:
10611         Delete.
10612         <info>: New.
10613         (nto_procfs_target_info): New.
10614         (nto_procfs_target_procfs) <shortname, longname, doc>:
10615         Delete.
10616         <info>: New.
10617         (init_procfs_targets): Adjust.
10618         * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
10619         add_inf_child_target.
10620         * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
10621         add_inf_child_target.
10622         * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
10623         add_inf_child_target.
10624         * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
10625         add_inf_child_target.
10626         * ravenscar-thread.c (ravenscar_target_info): New.
10627         (ravenscar_thread_target) <shortname, longname, doc>:
10628         Delete.
10629         <info>: New.
10630         * record-btrace.c (record_btrace_target_info):
10631         (record_btrace_target) <shortname, longname, doc>: Delete.
10632         <info>: New.
10633         (record_btrace_target::open): Rename to ...
10634         (record_btrace_target_open): ... this.  Adjust.
10635         * record-full.c (record_longname, record_doc): New.
10636         (record_full_base_target) <shortname, longname, doc>: Delete.
10637         <info>: New.
10638         (record_full_target_info): New.
10639         (record_full_target): <shortname>: Delete.
10640         <info>: New.
10641         (record_full_core_open_1, record_full_open_1): Update comments.
10642         (record_full_base_target::open): Rename to ...
10643         (record_full_open): ... this.
10644         (cmd_record_full_restore): Update.
10645         (_initialize_record_full): Update.
10646         * remote-sim.c (remote_sim_target_info): New.
10647         (gdbsim_target) <shortname, longname, doc>: Delete.
10648         <info>: New.
10649         (gdbsim_target::open): Rename to ...
10650         (gdbsim_target_open): ... this.
10651         (_initialize_remote_sim): Adjust.
10652         * remote.c (remote_doc): New.
10653         (remote_target_info): New.
10654         (remote_target) <shortname, longname, doc>: Delete.
10655         <info>: New.
10656         (extended_remote_target_info): New.
10657         (extended_remote_target) <shortname, longname, doc>: Delete.
10658         <info>: New.
10659         (remote_target::open_1): Make static.  Adjust.
10660         * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
10661         * s390-linux-nat.c (_initialize_s390_nat): Use
10662         add_inf_child_target.
10663         * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
10664         add_inf_child_target.
10665         * sol-thread.c (thread_db_target_info): New.
10666         (sol_thread_target) <shortname, longname, doc>: Delete.
10667         <info>: New.
10668         * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
10669         add_inf_child_target.
10670         * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
10671         add_inf_child_target.
10672         * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
10673         add_inf_child_target.
10674         * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
10675         add_inf_child_target.
10676         * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
10677         add_inf_child_target.
10678         * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
10679         add_inf_child_target.
10680         * spu-linux-nat.c (_initialize_spu_nat): Use
10681         add_inf_child_target.
10682         * spu-multiarch.c (spu_multiarch_target_info): New.
10683         (spu_multiarch_target) <shortname, longname, doc>: Delete.
10684         <info>: New.
10685         * target-delegates.c: Regenerate.
10686         * target.c: Include <unordered_map>.
10687         (target_ops_p): Delete.
10688         (DEF_VEC_P(target_ops_p)): Delete.
10689         (target_factories): New.
10690         (test_target_info): New.
10691         (test_target_ops::info): New.
10692         (open_target): Adjust to use target_factories.
10693         (add_target_with_completer): Rename to ...
10694         (add_target): ... this.  Change prototype.  Register target_info
10695         and open callback in target_factories.  Register target_info in
10696         command context instead of target_ops.
10697         (add_target): Delete old implementation.
10698         (add_deprecated_target_alias): Change prototype.  Adjust.
10699         (the_native_target): New.
10700         (set_native_target, get_native_target): New.
10701         (find_default_run_target): Use the_native_target.
10702         (find_attach_target, find_run_target): Simplify.
10703         (target_ops::open): Delete.
10704         (dummy_target_info): New.
10705         (dummy_target::shortname, dummy_target::longname)
10706         (dummy_target::doc): Delete.
10707         (dummy_target::info): New.
10708         (debug_target::shortname, debug_target::longname)
10709         (debug_target::doc): Delete.
10710         (debug_target::info): New.
10711         * target.h (struct target_info): New.
10712         (target_ops::~target_ops): Add comment.
10713         (target_ops::info): New.
10714         (target_ops::shortname, target_ops::longname, target_ops::doc): No
10715         longer virtual.  Implement in terms of target_info.
10716         (set_native_target, get_native_target): Declare.
10717         (target_open_ftype): New.
10718         (add_target, add_target_with_completer)
10719         (add_deprecated_target_alias): Change prototype.
10720         (test_target) <shortname, longname, doc>: Delete.
10721         <info>: New.
10722         * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
10723         add_inf_child_target.
10724         * tracefile-tfile.c (tfile_target_info): New.
10725         (tfile_target) <shortname, longname, doc>: Delete.
10726         <info>: New.
10727         (tfile_target::open): Rename to ...
10728         (tfile_target_open): ... this.
10729         (_initialize_tracefile_tfile): Adjust.
10730         * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
10731         add_inf_child_target.
10732         * windows-nat.c (_initialize_windows_nat): Use
10733         add_inf_child_target.
10734         * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
10735         add_inf_child_target.
10736
10737 2018-05-02  Pedro Alves  <palves@redhat.com>
10738
10739         * linux-nat.h (linux_nat_target) <low_new_thread,
10740         low_delete_thread, low_new_fork, low_forget_process,
10741         low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
10742         New virtual methods.
10743         (linux_nat_set_new_thread, linux_nat_set_delete_thread)
10744         (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
10745         (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
10746         (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
10747         (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
10748         Delete.
10749         * linux-fork.c (delete_fork): Adjust to call low method.
10750         * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
10751         (linux_nat_new_fork, linux_nat_forget_process_hook)
10752         (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
10753         (linux_nat_status_is_event):
10754         (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
10755         (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
10756         to call low method.
10757         (sigtrap_is_event): Rename to ...
10758         (linux_nat_target::low_status_is_event): ... this.
10759         (linux_nat_set_status_is_event): Delete.
10760         (save_stop_reason, linux_nat_wait_1)
10761         (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
10762         low methods.
10763         (linux_nat_set_new_thread, linux_nat_set_delete_thread)
10764         (linux_nat_set_new_fork, linux_nat_set_forget_process)
10765         (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
10766         (linux_nat_set_prepare_to_resume): Delete.
10767         * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
10768         low virtual methods.
10769         * amd64-linux-nat.c: Likewise.
10770         * arm-linux-nat.c: Likewise.
10771         * i386-linux-nat.c: Likewise.
10772         * ia64-linux-nat.c: Likewise.
10773         * mips-linux-nat.c: Likewise.
10774         * ppc-linux-nat.c: Likewise.
10775         * s390-linux-nat.c: Likewise.
10776         * sparc64-linux-nat.c: Likewise.
10777         * x86-linux-nat.c: Likewise.
10778         * x86-linux-nat.h: Include "nat/x86-linux.h".
10779         (x86_linux_nat_target) <low_new_fork, low_forget_process,
10780         low_prepare_to_resume, low_new_thread, low_delete_thread>:
10781         Override methods.
10782
10783 2018-05-02  Pedro Alves  <palves@redhat.com>
10784
10785         * target.h (target_ops)
10786         <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
10787         stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
10788         stopped_by_watchpoint, have_continuable_watchpoint,
10789         stopped_data_address, watchpoint_addr_within_range,
10790         can_accel_watchpoint_condition, can_run, thread_alive,
10791         has_all_memory, has_memory, has_stack, has_registers,
10792         has_execution, can_async_p, is_async_p, supports_non_stop,
10793         always_non_stop_p, can_execute_reverse, supports_multi_process,
10794         supports_enable_disable_tracepoint,
10795         supports_disable_randomization, supports_string_tracing,
10796         supports_evaluation_of_breakpoint_conditions,
10797         can_run_breakpoint_commands, filesystem_is_local,
10798         can_download_tracepoint, get_trace_state_variable_value,
10799         set_trace_notes, get_tib_address, use_agent, can_use_agent,
10800         record_is_replaying, record_will_replay,
10801         augmented_libraries_svr4_read>: Adjust to return bool.
10802         * aarch64-linux-nat.c: All implementations adjusted.
10803         * aix-thread.c: All implementations adjusted.
10804         * arm-linux-nat.c: All implementations adjusted.
10805         * breakpoint.c: All implementations adjusted.
10806         * bsd-kvm.c: All implementations adjusted.
10807         * bsd-uthread.c: All implementations adjusted.
10808         * corelow.c: All implementations adjusted.
10809         * ctf.c: All implementations adjusted.
10810         * darwin-nat.c: All implementations adjusted.
10811         * darwin-nat.h: All implementations adjusted.
10812         * exec.c: All implementations adjusted.
10813         * fbsd-nat.c: All implementations adjusted.
10814         * fbsd-nat.h: All implementations adjusted.
10815         * gnu-nat.c: All implementations adjusted.
10816         * gnu-nat.h: All implementations adjusted.
10817         * go32-nat.c: All implementations adjusted.
10818         * ia64-linux-nat.c: All implementations adjusted.
10819         * inf-child.c: All implementations adjusted.
10820         * inf-child.h: All implementations adjusted.
10821         * inf-ptrace.c: All implementations adjusted.
10822         * inf-ptrace.h: All implementations adjusted.
10823         * linux-nat.c: All implementations adjusted.
10824         * linux-nat.h: All implementations adjusted.
10825         * mips-linux-nat.c: All implementations adjusted.
10826         * nto-procfs.c: All implementations adjusted.
10827         * ppc-linux-nat.c: All implementations adjusted.
10828         * procfs.c: All implementations adjusted.
10829         * ravenscar-thread.c: All implementations adjusted.
10830         * record-btrace.c: All implementations adjusted.
10831         * record-full.c: All implementations adjusted.
10832         * remote-sim.c: All implementations adjusted.
10833         * remote.c: All implementations adjusted.
10834         * s390-linux-nat.c: All implementations adjusted.
10835         * sol-thread.c: All implementations adjusted.
10836         * spu-multiarch.c: All implementations adjusted.
10837         * target-delegates.c: All implementations adjusted.
10838         * target.c: All implementations adjusted.
10839         * target.h: All implementations adjusted.
10840         * tracefile-tfile.c: All implementations adjusted.
10841         * tracefile.c: All implementations adjusted.
10842         * tracefile.h: All implementations adjusted.
10843         * windows-nat.c: All implementations adjusted.
10844         * x86-linux-nat.h: All implementations adjusted.
10845         * x86-nat.h: All implementations adjusted.
10846
10847 2018-05-02  Pedro Alves  <palves@redhat.com>
10848
10849         * make-target-delegates (scan_target_h): Don't trim lines here.
10850         Replace sequences of tabs and/or whitespace with a single
10851         whitespace.
10852         (top level, parsing methods): Trim each line before processing it
10853         here.
10854
10855 2018-05-02  Pedro Alves  <palves@redhat.com>
10856             John Baldwin  <jhb@freebsd.org>
10857
10858         * target.h (enum strata) <debug_stratum>: New.
10859         (struct target_ops) <all delegation methods>: Replace by C++
10860         virtual methods, and drop "to_" prefix.  All references updated
10861         throughout.
10862         <to_shortname, to_longname, to_doc, to_data,
10863         to_have_steppable_watchpoint, to_have_continuable_watchpoint,
10864         to_has_thread_control, to_attach_no_wait>: Delete, replaced by
10865         virtual methods.  All references updated throughout.
10866         <can_attach, supports_terminal_ours, can_create_inferior,
10867         get_thread_control_capabilities, attach_no_wait>: New
10868         virtual methods.
10869         <insert_breakpoint, remove_breakpoint>: Now
10870         TARGET_DEFAULT_NORETURN methods.
10871         <info_proc>: Now returns bool.
10872         <to_magic>: Delete.
10873         (OPS_MAGIC): Delete.
10874         (current_target): Delete.  All references replaced by references
10875         to ...
10876         (target_stack): ... this.  New.
10877         (target_shortname, target_longname): Adjust.
10878         (target_can_run): Now a function declaration.
10879         (default_child_has_all_memory, default_child_has_memory)
10880         (default_child_has_stack, default_child_has_registers)
10881         (default_child_has_execution): Remove target_ops parameter.
10882         (complete_target_initialization): Delete.
10883         (memory_breakpoint_target): New template class.
10884         (test_target_ops): Refactor as a C++ class with virtual methods.
10885         * make-target-delegates (NAME_PART): Tighten.
10886         (POINTER_PART, CP_SYMBOL): New.
10887         (SIMPLE_RETURN_PART): Reimplement.
10888         (VEC_RETURN_PART): Expect less.
10889         (RETURN_PART, VIRTUAL_PART): New.
10890         (METHOD): Adjust to C++ virtual methods.
10891         (scan_target_h): Remove reference to C99.
10892         (dname): Output "target_ops::" prefix.
10893         (write_function_header): Adjust to output a C++ class method.
10894         (write_declaration): New.
10895         (write_delegator): Adjust to output a C++ class method.
10896         (tdname): Output "dummy_target::" prefix.
10897         (write_tdefault, write_debugmethod): Adjust to output a C++ class
10898         method.
10899         (tdefault_names, debug_names): Delete.
10900         (return_types, tdefaults, styles, argtypes_array): New.
10901         (top level): All methods are delegators.
10902         (print_class): New.
10903         (top level): Print dummy_target and debug_target classes.
10904         * target-delegates.c: Regenerate.
10905         * target-debug.h (target_debug_print_enum_info_proc_what)
10906         (target_debug_print_thread_control_capabilities)
10907         (target_debug_print_thread_info_p): New.
10908         * target.c (dummy_target): Delete.
10909         (the_dummy_target, the_debug_target): New.
10910         (target_stack): Now extern.
10911         (set_targetdebug): Push/unpush debug target.
10912         (default_child_has_all_memory, default_child_has_memory)
10913         (default_child_has_stack, default_child_has_registers)
10914         (default_child_has_execution): Remove target_ops parameter.
10915         (complete_target_initialization): Delete.
10916         (add_target_with_completer): No longer call
10917         complete_target_initialization.
10918         (target_supports_terminal_ours): Use regular delegation.
10919         (update_current_target): Delete.
10920         (push_target): No longer check magic number.  Don't call
10921         update_current_target.
10922         (unpush_target): Don't call update_current_target.
10923         (target_is_pushed): No longer check magic number.
10924         (target_require_runnable): Skip for all stratums over
10925         process_stratum.
10926         (target_ops::info_proc): New.
10927         (target_info_proc): Use find_target_at and
10928         find_default_run_target.
10929         (target_supports_disable_randomization): Use regular delegation.
10930         (target_get_osdata): Use find_target_at.
10931         (target_ops::open, target_ops::close, target_ops::can_attach)
10932         (target_ops::attach, target_ops::can_create_inferior)
10933         (target_ops::create_inferior, target_ops::can_run)
10934         (target_can_run): New.
10935         (default_fileio_target): Use regular delegation.
10936         (target_ops::fileio_open, target_ops::fileio_pwrite)
10937         (target_ops::fileio_pread, target_ops::fileio_fstat)
10938         (target_ops::fileio_close, target_ops::fileio_unlink)
10939         (target_ops::fileio_readlink): New.
10940         (target_fileio_open_1, target_fileio_unlink)
10941         (target_fileio_readlink): Always call the target method.  Handle
10942         FILEIO_ENOSYS.
10943         (return_zero, return_zero_has_execution): Delete.
10944         (init_dummy_target): Delete.
10945         (dummy_target::dummy_target, dummy_target::shortname)
10946         (dummy_target::longname, dummy_target::doc)
10947         (debug_target::debug_target, debug_target::shortname)
10948         (debug_target::longname, debug_target::doc): New.
10949         (target_supports_delete_record): Use regular delegation.
10950         (setup_target_debug): Delete.
10951         (maintenance_print_target_stack): Skip debug_stratum.
10952         (initialize_targets): Instantiate the_dummy_target and
10953         the_debug_target.
10954         * auxv.c (target_auxv_parse): Remove 'ops' parameter.  Adjust to
10955         use target_stack.
10956         (target_auxv_search, fprint_target_auxv): Adjust.
10957         (info_auxv_command): Adjust to use target_stack.
10958         * auxv.h (target_auxv_parse): Remove 'ops' parameter.
10959         * exceptions.c (print_flush): Handle a NULL target_stack.
10960         * regcache.c (target_ops_no_register): Refactor as class with
10961         virtual methods.
10962
10963         * exec.c (exec_target): New class.
10964         (exec_ops): Now an exec_target.
10965         (exec_open, exec_close_1, exec_get_section_table)
10966         (exec_xfer_partial, exec_files_info, exec_has_memory)
10967         (exec_make_note_section): Refactor as exec_target methods.
10968         (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
10969         Delete.
10970         (exec_target::find_memory_regions): New.
10971         (_initialize_exec): Don't call init_exec_ops.
10972         * gdbcore.h (exec_file_clear): Delete.
10973
10974         * corefile.c (core_target): Delete.
10975         (core_file_command): Adjust.
10976         * corelow.c (core_target): New class.
10977         (the_core_target): New.
10978         (core_close): Remove target_ops parameter.
10979         (core_close_cleanup): Adjust.
10980         (core_target::close): New.
10981         (core_open, core_detach, get_core_registers, core_files_info)
10982         (core_xfer_partial, core_thread_alive, core_read_description)
10983         (core_pid_to_str, core_thread_name, core_has_memory)
10984         (core_has_stack, core_has_registers, core_info_proc): Rework as
10985         core_target methods.
10986         (ignore, core_remove_breakpoint, init_core_ops): Delete.
10987         (_initialize_corelow): Initialize the_core_target.
10988         * gdbcore.h (core_target): Delete.
10989         (the_core_target): New.
10990
10991         * ctf.c: (ctf_target): New class.
10992         (ctf_ops): Now a ctf_target.
10993         (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
10994         (ctf_xfer_partial, ctf_get_trace_state_variable_value)
10995         (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
10996         methods.
10997         (init_ctf_ops): Delete.
10998         (_initialize_ctf): Don't call it.
10999         * tracefile-tfile.c (tfile_target): New class.
11000         (tfile_ops): Now a tfile_target.
11001         (tfile_open, tfile_close, tfile_files_info)
11002         (tfile_get_tracepoint_status, tfile_trace_find)
11003         (tfile_fetch_registers, tfile_xfer_partial)
11004         (tfile_get_trace_state_variable_value, tfile_traceframe_info):
11005         Refactor as tfile_target methods.
11006         (tfile_xfer_partial_features): Remove target_ops parameter.
11007         (init_tfile_ops): Delete.
11008         (_initialize_tracefile_tfile): Don't call it.
11009         * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
11010         (tracefile_has_stack, tracefile_has_registers)
11011         (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
11012         tracefile_target methods.
11013         (init_tracefile_ops): Delete.
11014         (tracefile_target::tracefile_target): New.
11015         * tracefile.h: Include "target.h".
11016         (tracefile_target): New class.
11017         (init_tracefile_ops): Delete.
11018
11019         * spu-multiarch.c (spu_multiarch_target): New class.
11020         (spu_ops): Now a spu_multiarch_target.
11021         (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
11022         (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
11023         (spu_search_memory, spu_mourn_inferior): Refactor as
11024         spu_multiarch_target methods.
11025         (init_spu_ops): Delete.
11026         (_initialize_spu_multiarch): Remove references to init_spu_ops,
11027         complete_target_initialization.
11028
11029         * ravenscar-thread.c (ravenscar_thread_target): New class.
11030         (ravenscar_ops): Now a ravenscar_thread_target.
11031         (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
11032         (ravenscar_thread_alive, ravenscar_pid_to_str)
11033         (ravenscar_fetch_registers, ravenscar_store_registers)
11034         (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
11035         (ravenscar_stopped_by_hw_breakpoint)
11036         (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
11037         (ravenscar_mourn_inferior, ravenscar_core_of_thread)
11038         (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
11039         methods.
11040         (init_ravenscar_thread_ops): Delete.
11041         (_initialize_ravenscar): Remove references to
11042         init_ravenscar_thread_ops and complete_target_initialization.
11043
11044         * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
11045         (bsd_uthread_target): New class.
11046         (bsd_uthread_ops): Now a bsd_uthread_target.
11047         (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
11048         (bsd_uthread_close, bsd_uthread_mourn_inferior)
11049         (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
11050         (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
11051         (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
11052         (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
11053         (bsd_uthread_target): Delete function.
11054         (_initialize_bsd_uthread): Remove reference to
11055         complete_target_initialization.
11056
11057         * bfd-target.c (target_bfd_data): Delete.  Fields folded into ...
11058         (target_bfd): ... this new class.
11059         (target_bfd_xfer_partial, target_bfd_get_section_table)
11060         (target_bfd_close): Refactor as target_bfd methods.
11061         (target_bfd::~target_bfd): New.
11062         (target_bfd_reopen): Adjust.
11063         (target_bfd::close): New.
11064
11065         * record-btrace.c (record_btrace_target): New class.
11066         (record_btrace_ops): Now a record_btrace_target.
11067         (record_btrace_open, record_btrace_stop_recording)
11068         (record_btrace_disconnect, record_btrace_close)
11069         (record_btrace_async, record_btrace_info)
11070         (record_btrace_insn_history, record_btrace_insn_history_range)
11071         (record_btrace_insn_history_from, record_btrace_call_history)
11072         (record_btrace_call_history_range)
11073         (record_btrace_call_history_from, record_btrace_record_method)
11074         (record_btrace_is_replaying, record_btrace_will_replay)
11075         (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
11076         (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
11077         (record_btrace_store_registers, record_btrace_prepare_to_store)
11078         (record_btrace_to_get_unwinder)
11079         (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
11080         (record_btrace_commit_resume, record_btrace_wait)
11081         (record_btrace_stop, record_btrace_can_execute_reverse)
11082         (record_btrace_stopped_by_sw_breakpoint)
11083         (record_btrace_supports_stopped_by_sw_breakpoint)
11084         (record_btrace_stopped_by_hw_breakpoint)
11085         (record_btrace_supports_stopped_by_hw_breakpoint)
11086         (record_btrace_update_thread_list, record_btrace_thread_alive)
11087         (record_btrace_goto_begin, record_btrace_goto_end)
11088         (record_btrace_goto, record_btrace_stop_replaying_all)
11089         (record_btrace_execution_direction)
11090         (record_btrace_prepare_to_generate_core)
11091         (record_btrace_done_generating_core): Refactor as
11092         record_btrace_target methods.
11093         (init_record_btrace_ops): Delete.
11094         (_initialize_record_btrace): Remove reference to
11095         init_record_btrace_ops.
11096         * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
11097         the execution_direction global.
11098         (record_full_base_target, record_full_target)
11099         (record_full_core_target): New classes.
11100         (record_full_ops): Now a record_full_target.
11101         (record_full_core_ops): Now a record_full_core_target.
11102         (record_full_target::detach, record_full_target::disconnect)
11103         (record_full_core_target::disconnect)
11104         (record_full_target::mourn_inferior, record_full_target::kill):
11105         New.
11106         (record_full_open, record_full_close, record_full_async): Refactor
11107         as methods of the record_full_base_target class.
11108         (record_full_resume, record_full_commit_resume): Refactor
11109         as methods of the record_full_target class.
11110         (record_full_wait, record_full_stopped_by_watchpoint)
11111         (record_full_stopped_data_address)
11112         (record_full_stopped_by_sw_breakpoint)
11113         (record_full_supports_stopped_by_sw_breakpoint)
11114         (record_full_stopped_by_hw_breakpoint)
11115         (record_full_supports_stopped_by_hw_breakpoint): Refactor as
11116         methods of the record_full_base_target class.
11117         (record_full_store_registers, record_full_xfer_partial)
11118         (record_full_insert_breakpoint, record_full_remove_breakpoint):
11119         Refactor as methods of the record_full_target class.
11120         (record_full_can_execute_reverse, record_full_get_bookmark)
11121         (record_full_goto_bookmark, record_full_execution_direction)
11122         (record_full_record_method, record_full_info, record_full_delete)
11123         (record_full_is_replaying, record_full_will_replay)
11124         (record_full_goto_begin, record_full_goto_end, record_full_goto)
11125         (record_full_stop_replaying): Refactor as methods of the
11126         record_full_base_target class.
11127         (record_full_core_resume, record_full_core_kill)
11128         (record_full_core_fetch_registers)
11129         (record_full_core_prepare_to_store)
11130         (record_full_core_store_registers, record_full_core_xfer_partial)
11131         (record_full_core_insert_breakpoint)
11132         (record_full_core_remove_breakpoint)
11133         (record_full_core_has_execution): Refactor
11134         as methods of the record_full_core_target class.
11135         (record_full_base_target::supports_delete_record): New.
11136         (init_record_full_ops): Delete.
11137         (init_record_full_core_ops): Delete.
11138         (record_full_save): Refactor as method of the
11139         record_full_base_target class.
11140         (_initialize_record_full): Remove references to
11141         init_record_full_ops and init_record_full_core_ops.
11142
11143         * remote.c (remote_target, extended_remote_target): New classes.
11144         (remote_ops): Now a remote_target.
11145         (extended_remote_ops): Now an extended_remote_target.
11146         (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
11147         (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
11148         (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
11149         (remote_pass_signals, remote_set_syscall_catchpoint)
11150         (remote_program_signals, )
11151         (remote_thread_always_alive): Remove target_ops parameter.
11152         (remote_thread_alive, remote_thread_name)
11153         (remote_update_thread_list, remote_threads_extra_info)
11154         (remote_static_tracepoint_marker_at)
11155         (remote_static_tracepoint_markers_by_strid)
11156         (remote_get_ada_task_ptid, remote_close, remote_start_remote)
11157         (remote_open): Refactor as methods of remote_target.
11158         (extended_remote_open, extended_remote_detach)
11159         (extended_remote_attach, extended_remote_post_attach):
11160         (extended_remote_supports_disable_randomization)
11161         (extended_remote_create_inferior): : Refactor as method of
11162         extended_remote_target.
11163         (remote_set_permissions, remote_open_1, remote_detach)
11164         (remote_follow_fork, remote_follow_exec, remote_disconnect)
11165         (remote_resume, remote_commit_resume, remote_stop)
11166         (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
11167         (remote_terminal_ours, remote_wait, remote_fetch_registers)
11168         (remote_prepare_to_store, remote_store_registers)
11169         (remote_flash_erase, remote_flash_done, remote_files_info)
11170         (remote_kill, remote_mourn, remote_insert_breakpoint)
11171         (remote_remove_breakpoint, remote_insert_watchpoint)
11172         (remote_watchpoint_addr_within_range)
11173         (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
11174         (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
11175         (remote_supports_stopped_by_sw_breakpoint)
11176         (remote_stopped_by_hw_breakpoint)
11177         (remote_supports_stopped_by_hw_breakpoint)
11178         (remote_stopped_by_watchpoint, remote_stopped_data_address)
11179         (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
11180         (remote_verify_memory): Refactor as methods of remote_target.
11181         (remote_write_qxfer, remote_read_qxfer): Remove target_ops
11182         parameter.
11183         (remote_xfer_partial, remote_get_memory_xfer_limit)
11184         (remote_search_memory, remote_rcmd, remote_memory_map)
11185         (remote_pid_to_str, remote_get_thread_local_address)
11186         (remote_get_tib_address, remote_read_description): Refactor as
11187         methods of remote_target.
11188         (remote_target::fileio_open, remote_target::fileio_pwrite)
11189         (remote_target::fileio_pread, remote_target::fileio_close): New.
11190         (remote_hostio_readlink, remote_hostio_fstat)
11191         (remote_filesystem_is_local, remote_can_execute_reverse)
11192         (remote_supports_non_stop, remote_supports_disable_randomization)
11193         (remote_supports_multi_process, remote_supports_cond_breakpoints)
11194         (remote_supports_enable_disable_tracepoint)
11195         (remote_supports_string_tracing)
11196         (remote_can_run_breakpoint_commands, remote_trace_init)
11197         (remote_download_tracepoint, remote_can_download_tracepoint)
11198         (remote_download_trace_state_variable, remote_enable_tracepoint)
11199         (remote_disable_tracepoint, remote_trace_set_readonly_regions)
11200         (remote_trace_start, remote_get_trace_status)
11201         (remote_get_tracepoint_status, remote_trace_stop)
11202         (remote_trace_find, remote_get_trace_state_variable_value)
11203         (remote_save_trace_data, remote_get_raw_trace_data)
11204         (remote_set_disconnected_tracing, remote_core_of_thread)
11205         (remote_set_circular_trace_buffer, remote_traceframe_info)
11206         (remote_get_min_fast_tracepoint_insn_len)
11207         (remote_set_trace_buffer_size, remote_set_trace_notes)
11208         (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
11209         (remote_disable_btrace, remote_teardown_btrace)
11210         (remote_read_btrace, remote_btrace_conf)
11211         (remote_augmented_libraries_svr4_read, remote_load)
11212         (remote_pid_to_exec_file, remote_can_do_single_step)
11213         (remote_execution_direction, remote_thread_handle_to_thread_info):
11214         Refactor as methods of remote_target.
11215         (init_remote_ops, init_extended_remote_ops): Delete.
11216         (remote_can_async_p, remote_is_async_p, remote_async)
11217         (remote_thread_events, remote_upload_tracepoints)
11218         (remote_upload_trace_state_variables): Refactor as methods of
11219         remote_target.
11220         (_initialize_remote): Remove references to init_remote_ops and
11221         init_extended_remote_ops.
11222
11223         * remote-sim.c (gdbsim_target): New class.
11224         (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
11225         (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
11226         (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
11227         (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
11228         (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
11229         (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
11230         Refactor as methods of gdbsim_target.
11231         (gdbsim_ops): Now a gdbsim_target.
11232         (init_gdbsim_ops): Delete.
11233         (gdbsim_cntrl_c): Adjust.
11234         (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
11235
11236         * amd64-linux-nat.c (amd64_linux_nat_target): New class.
11237         (the_amd64_linux_nat_target): New.
11238         (amd64_linux_fetch_inferior_registers)
11239         (amd64_linux_store_inferior_registers): Refactor as methods of
11240         amd64_linux_nat_target.
11241         (_initialize_amd64_linux_nat): Adjust.  Set linux_target.
11242         * i386-linux-nat.c: Don't include "linux-nat.h".
11243         (i386_linux_nat_target): New class.
11244         (the_i386_linux_nat_target): New.
11245         (i386_linux_fetch_inferior_registers)
11246         (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
11247         as methods of i386_linux_nat_target.
11248         (_initialize_i386_linux_nat): Adjust.  Set linux_target.
11249         * inf-child.c (inf_child_ops): Delete.
11250         (inf_child_fetch_inferior_registers)
11251         (inf_child_store_inferior_registers): Delete.
11252         (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
11253         methods of inf_child_target.
11254         (inf_child_target::supports_terminal_ours)
11255         (inf_child_target::terminal_init)
11256         (inf_child_target::terminal_inferior)
11257         (inf_child_target::terminal_ours_for_output)
11258         (inf_child_target::terminal_ours, inf_child_target::interrupt)
11259         (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
11260         New.
11261         (inf_child_open, inf_child_disconnect, inf_child_close)
11262         (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
11263         (inf_child_post_startup_inferior, inf_child_can_run)
11264         (inf_child_pid_to_exec_file): Refactor as methods of
11265         inf_child_target.
11266         (inf_child_follow_fork): Delete.
11267         (inf_child_target::can_create_inferior)
11268         (inf_child_target::can_attach): New.
11269         (inf_child_target::has_all_memory, inf_child_target::has_memory)
11270         (inf_child_target::has_stack, inf_child_target::has_registers)
11271         (inf_child_target::has_execution): New.
11272         (inf_child_fileio_open, inf_child_fileio_pwrite)
11273         (inf_child_fileio_pread, inf_child_fileio_fstat)
11274         (inf_child_fileio_close, inf_child_fileio_unlink)
11275         (inf_child_fileio_readlink, inf_child_use_agent)
11276         (inf_child_can_use_agent): Refactor as methods of
11277         inf_child_target.
11278         (return_zero, inf_child_target): Delete.
11279         (inf_child_target::inf_child_target): New.
11280         * inf-child.h: Include "target.h".
11281         (inf_child_target): Delete function prototype.
11282         (inf_child_target): New class.
11283         (inf_child_open_target, inf_child_mourn_inferior)
11284         (inf_child_maybe_unpush_target): Delete.
11285         * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
11286         (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
11287         (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
11288         (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
11289         (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
11290         (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
11291         (inf_ptrace_wait, inf_ptrace_xfer_partial)
11292         (inf_ptrace_thread_alive, inf_ptrace_files_info)
11293         (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
11294         methods of inf_ptrace_target.
11295         (inf_ptrace_target): Delete function.
11296         * inf-ptrace.h: Include "inf-child.h".
11297         (inf_ptrace_target): Delete function declaration.
11298         (inf_ptrace_target): New class.
11299         (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
11300         * linux-nat.c (linux_target): New.
11301         (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
11302         (linux_nat_target::~linux_nat_target): New.
11303         (linux_child_post_attach, linux_child_post_startup_inferior)
11304         (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
11305         (linux_child_remove_fork_catchpoint)
11306         (linux_child_insert_vfork_catchpoint)
11307         (linux_child_remove_vfork_catchpoint)
11308         (linux_child_insert_exec_catchpoint)
11309         (linux_child_remove_exec_catchpoint)
11310         (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
11311         (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
11312         (linux_nat_resume, linux_nat_stopped_by_watchpoint)
11313         (linux_nat_stopped_data_address)
11314         (linux_nat_stopped_by_sw_breakpoint)
11315         (linux_nat_supports_stopped_by_sw_breakpoint)
11316         (linux_nat_stopped_by_hw_breakpoint)
11317         (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
11318         (linux_nat_kill, linux_nat_mourn_inferior)
11319         (linux_nat_xfer_partial, linux_nat_thread_alive)
11320         (linux_nat_update_thread_list, linux_nat_pid_to_str)
11321         (linux_nat_thread_name, linux_child_pid_to_exec_file)
11322         (linux_child_static_tracepoint_markers_by_strid)
11323         (linux_nat_is_async_p, linux_nat_can_async_p)
11324         (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
11325         (linux_nat_supports_multi_process)
11326         (linux_nat_supports_disable_randomization, linux_nat_async)
11327         (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
11328         (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
11329         (linux_nat_fileio_open, linux_nat_fileio_readlink)
11330         (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
11331         methods of linux_nat_target.
11332         (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
11333         (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
11334         parameter.
11335         (check_stopped_by_watchpoint): Adjust.
11336         (linux_xfer_partial): Delete.
11337         (linux_target_install_ops, linux_target, linux_nat_add_target):
11338         Delete.
11339         (linux_nat_target::linux_nat_target): New.
11340         * linux-nat.h: Include "inf-ptrace.h".
11341         (linux_nat_target): New.
11342         (linux_target, linux_target_install_ops, linux_nat_add_target):
11343         Delete function declarations.
11344         (linux_target): Declare global.
11345         * linux-thread-db.c (thread_db_target): New.
11346         (thread_db_target::thread_db_target): New.
11347         (thread_db_ops): Delete.
11348         (the_thread_db_target): New.
11349         (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
11350         (thread_db_update_thread_list, thread_db_pid_to_str)
11351         (thread_db_extra_thread_info)
11352         (thread_db_thread_handle_to_thread_info)
11353         (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
11354         (thread_db_resume): Refactor as methods of thread_db_target.
11355         (init_thread_db_ops): Delete.
11356         (_initialize_thread_db): Remove reference to init_thread_db_ops.
11357         * x86-linux-nat.c: Don't include "linux-nat.h".
11358         (super_post_startup_inferior): Delete.
11359         (x86_linux_nat_target::~x86_linux_nat_target): New.
11360         (x86_linux_child_post_startup_inferior)
11361         (x86_linux_read_description, x86_linux_enable_btrace)
11362         (x86_linux_disable_btrace, x86_linux_teardown_btrace)
11363         (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
11364         methods of x86_linux_nat_target.
11365         (x86_linux_create_target): Delete.  Bits folded ...
11366         (x86_linux_add_target): ... here.  Now takes a linux_nat_target
11367         pointer.
11368         * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
11369         (x86_linux_nat_target): New class.
11370         (x86_linux_create_target): Delete.
11371         (x86_linux_add_target): Now takes a linux_nat_target pointer.
11372         * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
11373         (x86_region_ok_for_watchpoint, x86_stopped_data_address)
11374         (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
11375         (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
11376         (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
11377         make extern.
11378         (x86_use_watchpoints): Delete.
11379         * x86-nat.h: Include "breakpoint.h" and "target.h".
11380         (x86_use_watchpoints): Delete.
11381         (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
11382         (x86_stopped_by_watchpoint, x86_stopped_data_address)
11383         (x86_insert_watchpoint, x86_remove_watchpoint)
11384         (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
11385         (x86_stopped_by_hw_breakpoint): New declarations.
11386         (x86_nat_target): New template class.
11387
11388         * ppc-linux-nat.c (ppc_linux_nat_target): New class.
11389         (the_ppc_linux_nat_target): New.
11390         (ppc_linux_fetch_inferior_registers)
11391         (ppc_linux_can_use_hw_breakpoint)
11392         (ppc_linux_region_ok_for_hw_watchpoint)
11393         (ppc_linux_ranged_break_num_registers)
11394         (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
11395         (ppc_linux_insert_mask_watchpoint)
11396         (ppc_linux_remove_mask_watchpoint)
11397         (ppc_linux_can_accel_watchpoint_condition)
11398         (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
11399         (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
11400         (ppc_linux_watchpoint_addr_within_range)
11401         (ppc_linux_masked_watch_num_registers)
11402         (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
11403         (ppc_linux_read_description): Refactor as methods of
11404         ppc_linux_nat_target.
11405         (_initialize_ppc_linux_nat): Adjust.  Set linux_target.
11406
11407         * procfs.c (procfs_xfer_partial): Delete forward declaration.
11408         (procfs_target): New class.
11409         (the_procfs_target): New.
11410         (procfs_target): Delete function.
11411         (procfs_auxv_parse, procfs_attach, procfs_detach)
11412         (procfs_fetch_registers, procfs_store_registers, procfs_wait)
11413         (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
11414         (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
11415         (procfs_create_inferior, procfs_update_thread_list)
11416         (procfs_thread_alive, procfs_pid_to_str)
11417         (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
11418         (procfs_stopped_data_address, procfs_insert_watchpoint)
11419         (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
11420         (proc_find_memory_regions, procfs_info_proc)
11421         (procfs_make_note_section): Refactor as methods of procfs_target.
11422         (_initialize_procfs): Adjust.
11423         * sol-thread.c (sol_thread_target): New class.
11424         (sol_thread_ops): Now a sol_thread_target.
11425         (sol_thread_detach, sol_thread_resume, sol_thread_wait)
11426         (sol_thread_fetch_registers, sol_thread_store_registers)
11427         (sol_thread_xfer_partial, sol_thread_mourn_inferior)
11428         (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
11429         (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
11430         (init_sol_thread_ops): Delete.
11431         (_initialize_sol_thread): Adjust.  Remove references to
11432         init_sol_thread_ops and complete_target_initialization.
11433
11434         * windows-nat.c (windows_nat_target): New class.
11435         (windows_fetch_inferior_registers)
11436         (windows_store_inferior_registers, windows_resume, windows_wait)
11437         (windows_attach, windows_detach, windows_pid_to_exec_file)
11438         (windows_files_info, windows_create_inferior)
11439         (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
11440         (windows_close, windows_pid_to_str, windows_xfer_partial)
11441         (windows_get_tib_address, windows_get_ada_task_ptid)
11442         (windows_thread_name, windows_thread_alive): Refactor as
11443         windows_nat_target methods.
11444         (do_initial_windows_stuff): Adjust.
11445         (windows_target): Delete function.
11446         (_initialize_windows_nat): Adjust.
11447
11448         * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
11449         (darwin_mourn_inferior, darwin_kill_inferior)
11450         (darwin_create_inferior, darwin_attach, darwin_detach)
11451         (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
11452         (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
11453         (darwin_supports_multi_process): Refactor as darwin_nat_target
11454         methods.
11455         (darwin_resume_to, darwin_files_info): Delete.
11456         (_initialize_darwin_inferior): Rename to ...
11457         (_initialize_darwin_nat): ... this.  Adjust to C++ification.
11458         * darwin-nat.h: Include "inf-child.h".
11459         (darwin_nat_target): New class.
11460         (darwin_complete_target): Delete.
11461         * i386-darwin-nat.c (i386_darwin_nat_target): New class.
11462         (darwin_target): New.
11463         (i386_darwin_fetch_inferior_registers)
11464         (i386_darwin_store_inferior_registers): Refactor as methods of
11465         darwin_nat_target.
11466         (darwin_complete_target): Delete, with ...
11467         (_initialize_i386_darwin_nat): ... bits factored out here.
11468
11469         * alpha-linux-nat.c (alpha_linux_nat_target): New class.
11470         (the_alpha_linux_nat_target): New.
11471         (alpha_linux_register_u_offset): Refactor as
11472         alpha_linux_nat_target method.
11473         (_initialize_alpha_linux_nat): Adjust.
11474         * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
11475         (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
11476         (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
11477         methods of linux_nat_trad_target.
11478         (linux_trad_target): Delete.
11479         * linux-nat-trad.h (linux_trad_target): Delete function.
11480         (linux_nat_trad_target): New class.
11481         * mips-linux-nat.c (mips_linux_nat_target): New class.
11482         (super_fetch_registers, super_store_registers, super_close):
11483         Delete.
11484         (the_mips_linux_nat_target): New.
11485         (mips64_linux_regsets_fetch_registers)
11486         (mips64_linux_regsets_store_registers)
11487         (mips64_linux_fetch_registers, mips64_linux_store_registers)
11488         (mips_linux_register_u_offset, mips_linux_read_description)
11489         (mips_linux_can_use_hw_breakpoint)
11490         (mips_linux_stopped_by_watchpoint)
11491         (mips_linux_stopped_data_address)
11492         (mips_linux_region_ok_for_hw_watchpoint)
11493         (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
11494         (mips_linux_close): Refactor as methods of mips_linux_nat.
11495         (_initialize_mips_linux_nat): Adjust to C++ification.
11496
11497         * aix-thread.c (aix_thread_target): New class.
11498         (aix_thread_ops): Now an aix_thread_target.
11499         (aix_thread_detach, aix_thread_resume, aix_thread_wait)
11500         (aix_thread_fetch_registers, aix_thread_store_registers)
11501         (aix_thread_xfer_partial, aix_thread_mourn_inferior)
11502         (aix_thread_thread_alive, aix_thread_pid_to_str)
11503         (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
11504         Refactor as methods of aix_thread_target.
11505         (init_aix_thread_ops): Delete.
11506         (_initialize_aix_thread): Remove references to init_aix_thread_ops
11507         and complete_target_initialization.
11508         * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
11509         (rs6000_nat_target): New class.
11510         (the_rs6000_nat_target): New.
11511         (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
11512         (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
11513         (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
11514         (super_create_inferior): Delete.
11515         (_initialize_rs6000_nat): Adjust to C++ification.
11516
11517         * arm-linux-nat.c (arm_linux_nat_target): New class.
11518         (the_arm_linux_nat_target): New.
11519         (arm_linux_fetch_inferior_registers)
11520         (arm_linux_store_inferior_registers, arm_linux_read_description)
11521         (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
11522         (arm_linux_remove_hw_breakpoint)
11523         (arm_linux_region_ok_for_hw_watchpoint)
11524         (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
11525         (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
11526         (arm_linux_watchpoint_addr_within_range): Refactor as methods of
11527         arm_linux_nat_target.
11528         (_initialize_arm_linux_nat): Adjust to C++ification.
11529
11530         * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
11531         (the_aarch64_linux_nat_target): New.
11532         (aarch64_linux_fetch_inferior_registers)
11533         (aarch64_linux_store_inferior_registers)
11534         (aarch64_linux_child_post_startup_inferior)
11535         (aarch64_linux_read_description)
11536         (aarch64_linux_can_use_hw_breakpoint)
11537         (aarch64_linux_insert_hw_breakpoint)
11538         (aarch64_linux_remove_hw_breakpoint)
11539         (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
11540         (aarch64_linux_region_ok_for_hw_watchpoint)
11541         (aarch64_linux_stopped_data_address)
11542         (aarch64_linux_stopped_by_watchpoint)
11543         (aarch64_linux_watchpoint_addr_within_range)
11544         (aarch64_linux_can_do_single_step): Refactor as methods of
11545         aarch64_linux_nat_target.
11546         (super_post_startup_inferior): Delete.
11547         (_initialize_aarch64_linux_nat): Adjust to C++ification.
11548
11549         * hppa-linux-nat.c (hppa_linux_nat_target): New class.
11550         (the_hppa_linux_nat_target): New.
11551         (hppa_linux_fetch_inferior_registers)
11552         (hppa_linux_store_inferior_registers): Refactor as methods of
11553         hppa_linux_nat_target.
11554         (_initialize_hppa_linux_nat): Adjust to C++ification.
11555
11556         * ia64-linux-nat.c (ia64_linux_nat_target): New class.
11557         (the_ia64_linux_nat_target): New.
11558         (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
11559         (ia64_linux_stopped_data_address)
11560         (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
11561         (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
11562         ia64_linux_nat_target methods.
11563         (super_xfer_partial): Delete.
11564         (_initialize_ia64_linux_nat): Adjust to C++ification.
11565
11566         * m32r-linux-nat.c (m32r_linux_nat_target): New class.
11567         (the_m32r_linux_nat_target): New.
11568         (m32r_linux_fetch_inferior_registers)
11569         (m32r_linux_store_inferior_registers): Refactor as
11570         m32r_linux_nat_target methods.
11571         (_initialize_m32r_linux_nat): Adjust to C++ification.
11572
11573         * m68k-linux-nat.c (m68k_linux_nat_target): New class.
11574         (the_m68k_linux_nat_target): New.
11575         (m68k_linux_fetch_inferior_registers)
11576         (m68k_linux_store_inferior_registers): Refactor as
11577         m68k_linux_nat_target methods.
11578         (_initialize_m68k_linux_nat): Adjust to C++ification.
11579
11580         * s390-linux-nat.c (s390_linux_nat_target): New class.
11581         (the_s390_linux_nat_target): New.
11582         (s390_linux_fetch_inferior_registers)
11583         (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
11584         (s390_insert_watchpoint, s390_remove_watchpoint)
11585         (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
11586         (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
11587         (s390_auxv_parse, s390_read_description): Refactor as methods of
11588         s390_linux_nat_target.
11589         (_initialize_s390_nat): Adjust to C++ification.
11590
11591         * sparc-linux-nat.c (sparc_linux_nat_target): New class.
11592         (the_sparc_linux_nat_target): New.
11593         (_initialize_sparc_linux_nat): Adjust to C++ification.
11594         * sparc-nat.c (sparc_fetch_inferior_registers)
11595         (sparc_store_inferior_registers): Remove target_ops parameter.
11596         * sparc-nat.h (sparc_fetch_inferior_registers)
11597         (sparc_store_inferior_registers): Remove target_ops parameter.
11598         * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
11599         (the_sparc64_linux_nat_target): New.
11600         (_initialize_sparc64_linux_nat): Adjust to C++ification.
11601
11602         * spu-linux-nat.c (spu_linux_nat_target): New class.
11603         (the_spu_linux_nat_target): New.
11604         (spu_child_post_startup_inferior, spu_child_post_attach)
11605         (spu_child_wait, spu_fetch_inferior_registers)
11606         (spu_store_inferior_registers, spu_xfer_partial)
11607         (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
11608         methods.
11609         (_initialize_spu_nat): Adjust to C++ification.
11610
11611         * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
11612         (the_tilegx_linux_nat_target): New.
11613         (fetch_inferior_registers, store_inferior_registers):
11614         Refactor as methods.
11615         (_initialize_tile_linux_nat): Adjust to C++ification.
11616
11617         * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
11618         (the_xtensa_linux_nat_target): New.
11619         (xtensa_linux_fetch_inferior_registers)
11620         (xtensa_linux_store_inferior_registers): Refactor as
11621         xtensa_linux_nat_target methods.
11622         (_initialize_xtensa_linux_nat): Adjust to C++ification.
11623
11624         * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
11625         (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
11626         (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
11627         (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
11628         (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
11629         (fbsd_stopped_by_sw_breakpoint)
11630         (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
11631         (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
11632         (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
11633         (fbsd_post_startup_inferior, fbsd_post_attach)
11634         (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
11635         (fbsd_set_syscall_catchpoint)
11636         (super_xfer_partial, super_resume, super_wait)
11637         (fbsd_supports_stopped_by_hw_breakpoint): Delete.
11638         (fbsd_handle_debug_trap): Remove target_ops parameter.
11639         (fbsd_nat_add_target): Delete.
11640         * fbsd-nat.h: Include "inf-ptrace.h".
11641         (fbsd_nat_add_target): Delete.
11642         (USE_SIGTRAP_SIGINFO): Define.
11643         (fbsd_nat_target): New class.
11644
11645         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
11646         (amd64bsd_store_inferior_registers): Remove target_ops parameter.
11647         (amd64bsd_target): Delete.
11648         * amd64-bsd-nat.h: New file.
11649         * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
11650         "x86-bsd-nat.h".
11651         (amd64_fbsd_nat_target): New class.
11652         (the_amd64_fbsd_nat_target): New.
11653         (amd64fbsd_read_description): Refactor as method of
11654         amd64_fbsd_nat_target.
11655         (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
11656         (_initialize_amd64fbsd_nat): Adjust to C++ification.
11657         * amd64-nat.h (amd64bsd_target): Delete function declaration.
11658         * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
11659         (i386bsd_store_inferior_registers): Remove target_ops parameter.
11660         (i386bsd_target): Delete.
11661         * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
11662         (i386bsd_fetch_inferior_registers)
11663         (i386bsd_store_inferior_registers): Declare.
11664         (i386_bsd_nat_target): New class.
11665         * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
11666         (the_i386_fbsd_nat_target): New.
11667         (i386fbsd_resume, i386fbsd_read_description): Refactor as
11668         i386_fbsd_nat_target methods.
11669         (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
11670         (_initialize_i386fbsd_nat): Adjust to C++ification.
11671         * x86-bsd-nat.c (super_mourn_inferior): Delete.
11672         (x86bsd_mourn_inferior, x86bsd_target): Delete.
11673         (_initialize_x86_bsd_nat): Adjust to C++ification.
11674         * x86-bsd-nat.h: Include "x86-nat.h".
11675         (x86bsd_target): Delete declaration.
11676         (x86bsd_nat_target): New class.
11677
11678         * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
11679         (the_aarch64_fbsd_nat_target): New.
11680         (aarch64_fbsd_fetch_inferior_registers)
11681         (aarch64_fbsd_store_inferior_registers): Refactor as methods of
11682         aarch64_fbsd_nat_target.
11683         (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
11684         * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
11685         (the_alpha_bsd_nat_target): New.
11686         (alphabsd_fetch_inferior_registers)
11687         (alphabsd_store_inferior_registers): Refactor as
11688         alpha_bsd_nat_target methods.
11689         (_initialize_alphabsd_nat): Refactor as methods of
11690         alpha_bsd_nat_target.
11691         * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
11692         (the_amd64_nbsd_nat_target): New.
11693         (_initialize_amd64nbsd_nat): Adjust to C++ification.
11694         * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
11695         (the_amd64_obsd_nat_target): New.
11696         (_initialize_amd64obsd_nat): Adjust to C++ification.
11697         * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
11698         (the_arm_fbsd_nat_target): New.
11699         (arm_fbsd_fetch_inferior_registers)
11700         (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
11701         (_initialize_arm_fbsd_nat): Refactor as methods of
11702         arm_fbsd_nat_target.
11703         (_initialize_arm_fbsd_nat): Adjust to C++ification.
11704         * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
11705         (the_arm_netbsd_nat_target): New.
11706         (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
11707         arm_netbsd_nat_target.
11708         (_initialize_arm_netbsd_nat): Adjust to C++ification.
11709         * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
11710         (the_hppa_nbsd_nat_target): New.
11711         (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
11712         hppa_nbsd_nat_target methods.
11713         (_initialize_hppanbsd_nat): Adjust to C++ification.
11714         * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
11715         (the_hppa_obsd_nat_target): New.
11716         (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
11717         methods of hppa_obsd_nat_target.
11718         (_initialize_hppaobsd_nat): Adjust to C++ification.  Use
11719         add_target.
11720         * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
11721         (_initialize_i386nbsd_nat): Adjust to C++ification.  Use
11722         add_target.
11723         * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
11724         (_initialize_i386obsd_nat): Use add_target.
11725         * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
11726         (the_m68k_bsd_nat_target): New.
11727         (m68kbsd_fetch_inferior_registers)
11728         (m68kbsd_store_inferior_registers): Refactor as methods of
11729         m68k_bsd_nat_target.
11730         (_initialize_m68kbsd_nat): Adjust to C++ification.
11731         * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
11732         (the_mips_fbsd_nat_target): New.
11733         (mips_fbsd_fetch_inferior_registers)
11734         (mips_fbsd_store_inferior_registers): Refactor as methods of
11735         mips_fbsd_nat_target.
11736         (_initialize_mips_fbsd_nat): Adjust to C++ification.  Use
11737         add_target.
11738         * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
11739         (the_mips_nbsd_nat_target): New.
11740         (mipsnbsd_fetch_inferior_registers)
11741         (mipsnbsd_store_inferior_registers): Refactor as methods of
11742         mips_nbsd_nat_target.
11743         (_initialize_mipsnbsd_nat): Adjust to C++ification.
11744         * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
11745         (the_mips64_obsd_nat_target): New.
11746         (mips64obsd_fetch_inferior_registers)
11747         (mips64obsd_store_inferior_registers): Refactor as methods of
11748         mips64_obsd_nat_target.
11749         (_initialize_mips64obsd_nat): Adjust to C++ification.  Use
11750         add_target.
11751         * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
11752         nbsd_nat_target.
11753         * nbsd-nat.h: Include "inf-ptrace.h".
11754         (nbsd_nat_target): New class.
11755         * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
11756         (obsd_wait): Refactor as methods of obsd_nat_target.
11757         (obsd_add_target): Delete.
11758         * obsd-nat.h: Include "inf-ptrace.h".
11759         (obsd_nat_target): New class.
11760         * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
11761         (the_ppc_fbsd_nat_target): New.
11762         (ppcfbsd_fetch_inferior_registers)
11763         (ppcfbsd_store_inferior_registers): Refactor as methods of
11764         ppc_fbsd_nat_target.
11765         (_initialize_ppcfbsd_nat): Adjust to C++ification.  Use
11766         add_target.
11767         * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
11768         (the_ppc_nbsd_nat_target): New.
11769         (ppcnbsd_fetch_inferior_registers)
11770         (ppcnbsd_store_inferior_registers): Refactor as methods of
11771         ppc_nbsd_nat_target.
11772         (_initialize_ppcnbsd_nat): Adjust to C++ification.
11773         * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
11774         (the_ppc_obsd_nat_target): New.
11775         (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
11776         methods of ppc_obsd_nat_target.
11777         (_initialize_ppcobsd_nat): Adjust to C++ification.  Use
11778         add_target.
11779         * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
11780         (the_sh_nbsd_nat_target): New.
11781         (shnbsd_fetch_inferior_registers)
11782         (shnbsd_store_inferior_registers): Refactor as methods of
11783         sh_nbsd_nat_target.
11784         (_initialize_shnbsd_nat): Adjust to C++ification.
11785         * sparc-nat.c (sparc_xfer_wcookie): Make extern.
11786         (inf_ptrace_xfer_partial): Delete.
11787         (sparc_xfer_partial, sparc_target): Delete.
11788         * sparc-nat.h (sparc_fetch_inferior_registers)
11789         (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
11790         (sparc_target): Delete function declaration.
11791         (sparc_target): New template class.
11792         * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
11793         (_initialize_sparcnbsd_nat): Adjust to C++ification.
11794         * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
11795         (_initialize_sparc64fbsd_nat): Adjust to C++ification.  Use
11796         add_target.
11797         * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
11798         (_initialize_sparc64nbsd_nat): Adjust to C++ification.
11799         * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
11800         (_initialize_sparc64obsd_nat): Adjust to C++ification.  Use
11801         add_target.
11802         * vax-bsd-nat.c (vax_bsd_nat_target): New class.
11803         (the_vax_bsd_nat_target): New.
11804         (vaxbsd_fetch_inferior_registers)
11805         (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
11806         methods.
11807         (_initialize_vaxbsd_nat): Adjust to C++ification.
11808
11809         * bsd-kvm.c (bsd_kvm_target): New class.
11810         (bsd_kvm_ops): Now a bsd_kvm_target.
11811         (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
11812         (bsd_kvm_files_info, bsd_kvm_fetch_registers)
11813         (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
11814         bsd_kvm_target.
11815         (bsd_kvm_return_one): Delete.
11816         (bsd_kvm_add_target): Adjust to C++ification.
11817
11818         * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
11819         (nto_procfs_target_procfs): New classes.
11820         (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
11821         (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
11822         (procfs_post_attach, procfs_wait, procfs_fetch_registers)
11823         (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
11824         (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
11825         (procfs_remove_hw_breakpoint, procfs_resume)
11826         (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
11827         (procfs_kill_inferior, procfs_store_registers)
11828         (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
11829         as methods of nto_procfs_target.
11830         (nto_procfs_ops): Now an nto_procfs_target_procfs.
11831         (nto_native_ops): Delete.
11832         (procfs_open, procfs_native_open): Delete.
11833         (nto_native_ops): Now an nto_procfs_target_native.
11834         (init_procfs_targets): Adjust to C++ification.
11835         (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
11836         (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
11837         Refactor as methods of nto_procfs_target.
11838
11839         * go32-nat.c (go32_nat_target): New class.
11840         (the_go32_nat_target): New.
11841         (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
11842         (go32_store_registers, go32_xfer_partial, go32_files_info)
11843         (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
11844         (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
11845         (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
11846         (go32_pid_to_str): Refactor as methods of go32_nat_target.
11847         (go32_target): Delete.
11848         (_initialize_go32_nat): Adjust to C++ification.
11849
11850         * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
11851         (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
11852         (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
11853         (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
11854         gnu_nat_target.
11855         (gnu_target): Delete.
11856         * gnu-nat.h (gnu_target): Delete.
11857         (gnu_nat_target): New class.
11858         * i386-gnu-nat.c (gnu_base_target): New.
11859         (i386_gnu_nat_target): New class.
11860         (the_i386_gnu_nat_target): New.
11861         (_initialize_i386gnu_nat): Adjust to C++ification.
11862
11863 2018-05-02  Pedro Alves  <palves@redhat.com>
11864
11865         * bfd-target.c (target_bfd_xclose): Rename to ...
11866         (target_bfd_close): ... this.
11867         (target_bfd_reopen): Adjust.
11868         * target.c (target_close): Remove references to to_xclose.
11869         * target.h (target_ops::to_xclose): Delete.
11870         (target_ops::to_close): Update comments.
11871
11872 2018-05-02  Pedro Alves  <palves@redhat.com>
11873
11874         * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
11875         "linux-nat.h".
11876         * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
11877         * inf-ptrace.c (inf_ptrace_register_u_offset)
11878         (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
11879         (inf_ptrace_store_register, inf_ptrace_store_registers)
11880         (inf_ptrace_trad_target): Move to ...
11881         * linux-nat-trad.c: ... this new file.
11882         * linux-nat-trad.h: New file.
11883         * linux-nat.c (linux_target_install_ops): Make extern.
11884         (linux_trad_target): Delete.
11885         * linux-nat.h (linux_trad_target): Delete declaration.
11886         (linux_target_install_ops): Declare.
11887         * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
11888         "linux-nat.h".
11889
11890 2018-05-02  Pedro Alves  <palves@redhat.com>
11891
11892         * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
11893         procfs_target/add_target here.
11894         * procfs.c (procfs_target): Make static.
11895         (_initialize_procfs): Call add_target here.
11896         * procfs.h (struct target_ops): Remove forward declaration.
11897         (procfs_target): Remove declaration.
11898         * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
11899
11900 2018-05-02  Pedro Alves  <palves@redhat.com>
11901
11902         * procfs.c (procfs_stopped_by_watchpoint)
11903         (procfs_insert_watchpoint, procfs_remove_watchpoint)
11904         (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
11905         Forward declare.
11906         (procfs_use_watchpoints): Delete, move contents...
11907         (procfs_target): ... here.
11908         * procfs.h (procfs_use_watchpoints): Delete declaration.
11909         * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
11910         procfs_use_watchpoints.
11911         * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
11912         procfs_use_watchpoints.
11913
11914 2018-05-02  Tom Tromey  <tom@tromey.com>
11915
11916         PR python/20084:
11917         * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
11918         and var_zuinteger_unlimited.
11919         * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
11920         and PARAM_ZUINTEGER_UNLIMITED.
11921         (set_parameter_value): Handle var_zuinteger and
11922         var_zuinteger_unlimited.
11923         (add_setshow_generic): Likewise.
11924         (parmpy_init): Likewise.
11925
11926 2018-04-28  Dan Robertson  <danlrobertson89@gmail.com>
11927
11928         PR rust/23124
11929         * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
11930         pointer is not null before dereferencing it.
11931
11932 2018-04-30  Tom Tromey  <tom@tromey.com>
11933
11934         * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
11935         is_mi_like_p.
11936
11937 2018-04-30  Tom Tromey  <tom@tromey.com>
11938
11939         * breakpoint.c (mention): Remove use of is_mi_like_p.
11940         (print_mention_ranged_breakpoint): Likewise.
11941         * break-catch-throw.c (print_it_exception_catchpoint): Remove use
11942         of is_mi_like_p.
11943
11944 2018-04-30  Tom Tromey  <tom@tromey.com>
11945
11946         * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
11947
11948 2018-04-30  Tom Tromey  <tom@tromey.com>
11949
11950         * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
11951         (info_spu_event_command): Remove some uses of is_mi_like_p.
11952
11953 2018-04-30  Tom Tromey  <tom@tromey.com>
11954
11955         * python/py-framefilter.c (py_print_single_arg)
11956         (enumerate_locals, py_print_args, py_print_frame): Remove some
11957         uses of is_mi_like_p.
11958
11959 2018-04-30  Tom Tromey  <tom@tromey.com>
11960
11961         * ui-out.c: Update.
11962         * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
11963         * ui-out.h (ui_out::is_mi_like_p): Now const.
11964         (ui_out::do_is_mi_like_p): Now const.
11965         * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
11966
11967 2018-04-30  Tom Tromey  <tom@tromey.com>
11968
11969         * varobj.c (varobj_set_visualizer): Use new_reference.
11970         * python/python.c (gdbpy_decode_line): Use new_reference.
11971         * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
11972         new_reference.
11973
11974 2018-04-30  Tom Tromey  <tom@tromey.com>
11975
11976         * varobj.c (install_new_value): Use new_reference.
11977         * value.h (value_incref): Return void.  Swap intro comment with
11978         value_decref.
11979         * value.c (set_value_parent): Use new_reference.
11980         (value_incref): Return void.  Update intro comment.
11981         (release_value): Use new_reference.
11982         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
11983
11984 2018-04-30  Tom Tromey  <tom@tromey.com>
11985
11986         * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
11987         * gdb_bfd.h (new_bfd_ref): Remove.
11988         (gdb_bfd_open): Update comment.
11989         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
11990         (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
11991         (gdb_bfd_fdopenr): Use new_reference.
11992         * exec.c (exec_file_attach): Use new_reference.
11993
11994 2018-04-30  Tom Tromey  <tom@tromey.com>
11995
11996         * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
11997         method.
11998
11999 2018-04-30  Tom Tromey  <tom@tromey.com>
12000
12001         * jit.c (jit_read_code_entry): Use type_align.
12002         * i386-tdep.c (i386_gdbarch_init): Don't call
12003         set_gdbarch_long_long_align_bit.
12004         * gdbarch.sh: Remove long_long_align_bit.
12005         * gdbarch.c, gdbarch.h: Rebuild.
12006         * arc-tdep.c (arc_type_align): New function.
12007         (arc_gdbarch_init): Use arc_type_align.  Don't call
12008         set_gdbarch_long_long_align_bit.
12009
12010 2018-04-30  Tom Tromey  <tom@tromey.com>
12011
12012         * rust-lang.c (rust_type_alignment): Remove.
12013         (rust_composite_type): Use type_align.
12014
12015 2018-04-30  Tom Tromey  <tom@tromey.com>
12016
12017         * NEWS: Mention Type.align.
12018         * python/py-type.c (typy_get_alignof): New function.
12019         (type_object_getset): Add "alignof".
12020
12021 2018-04-30  Tom Tromey  <tom@tromey.com>
12022
12023         PR exp/17095:
12024         * NEWS: Update.
12025         * std-operator.def (UNOP_ALIGNOF): New operator.
12026         * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
12027         New.
12028         * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
12029         * c-lang.c (c_op_print_tab): Add alignof.
12030         * c-exp.y (ALIGNOF): New token.
12031         (exp): Add "ALIGNOF" production.
12032         (ident_tokens): Add _Alignof and alignof.
12033
12034 2018-04-30  Tom Tromey  <tom@tromey.com>
12035
12036         * i386-tdep.c (i386_type_align): New function.
12037         (i386_gdbarch_init): Update.
12038         * gdbarch.sh (type_align): New method.
12039         * gdbarch.c, gdbarch.h: Rebuild.
12040         * arch-utils.h (default_type_align): Declare.
12041         * arch-utils.c (default_type_align): New function.
12042         * gdbtypes.h (TYPE_ALIGN_BITS): New define.
12043         (struct type) <align_log2>: New field.
12044         <instance_flags>: Now a bitfield.
12045         (TYPE_RAW_ALIGN): New macro.
12046         (type_align, type_raw_align, set_type_align): Declare.
12047         * gdbtypes.c (type_align, type_raw_align, set_type_align): New
12048         functions.
12049         * dwarf2read.c (quirk_rust_enum): Set type alignment.
12050         (get_alignment, maybe_set_alignment): New functions.
12051         (read_structure_type, read_enumeration_type, read_array_type)
12052         (read_set_type, read_tag_pointer_type, read_tag_reference_type)
12053         (read_subrange_type, read_base_type): Set type alignment.
12054
12055 2018-04-30  Simon Marchi  <simon.marchi@ericsson.com>
12056
12057         * dwarf2read.c (read_index_from_section): Use bool.
12058
12059 2018-04-29  Fabian Groffen  <grobian@gentoo.org>
12060
12061         PR gdb/22950
12062         * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
12063         with #ifdef.
12064
12065 2018-04-29  John Reiser  <jreiser@BitWagon.com>
12066
12067         PR build/22873
12068         * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
12069         last step, and do it atomically.
12070
12071 2018-04-27  Alexandre Oliva  <aoliva@redhat.com>
12072
12073         * compile/compile-c-types.c (convert_int, convert_float):
12074         Update for C FE v1.
12075
12076 2018-04-27  Tom Tromey  <tom@tromey.com>
12077
12078         PR rust/22545:
12079         * rust-lang.c (rust_inclusive_range_type_p): New function.
12080         (rust_range): Handle inclusive ranges.
12081         (rust_compute_range): Likewise.
12082         * rust-exp.y (struct rust_op) <inclusive>: New field.
12083         (DOTDOTEQ): New constant.
12084         (range_expr): Add "..=" productions.
12085         (operator_tokens): Add "..=" token.
12086         (ast_range): Add "inclusive" parameter.
12087         (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
12088         ranges.
12089         * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
12090         bounds values.
12091         * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
12092         LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
12093         Update comments.
12094         * expprint.c (print_subexp_standard): Handle new bounds values.
12095         (dump_subexp_body_standard): Likewise.
12096
12097 2018-04-27  Tom Tromey  <tom@tromey.com>
12098
12099         * configure: Rebuild.
12100         * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
12101         * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
12102         "OVERRIDE".
12103         (class symbol_needs_eval_context): Likewise.
12104         * dwarf2read.c (mock_mapped_index::symbol_name_count)
12105         (mock_mapped_index::symbol_name_at): Use "override".  Remove
12106         "virtual".
12107         * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
12108         "override".
12109         (class dwarf_expr_executor): Use "override", not "OVERRIDE".
12110         * aarch64-tdep.c (instruction_reader::read): Use "override".
12111         (instruction_reader_test::read): Likewise.
12112         * arm-tdep.c (instruction_reader::read): Use "override".
12113         (instruction_reader_thumb::read): Likewise.
12114
12115 2018-04-26  Andrzej Kaczmarek  <andrzej.kaczmarek@codecoup.pl>
12116
12117         PR remote/9665
12118         * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
12119         instead of remote_send.
12120         (remote_send): Remove.
12121
12122 2018-04-26  Pedro Alves  <palves@redhat.com>
12123
12124         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
12125         find_function_start_sal instead of find_pc_line.
12126
12127 2018-04-26  Pedro Alves  <palves@redhat.com>
12128
12129         * breakpoint.c (set_breakpoint_location_function): Handle
12130         mst_data_gnu_ifunc.
12131         * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
12132         * elfread.c (elf_symtab_read): Give data symbols with
12133         BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
12134         (elf_rel_plt_read): Update comment.
12135         * linespec.c (convert_linespec_to_sals): Handle
12136         mst_data_gnu_ifunc.
12137         (minsym_found): Handle mst_data_gnu_ifunc.
12138         * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
12139         (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
12140         * parse.c (find_minsym_type_and_address): Handle
12141         mst_data_gnu_ifunc.
12142         * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
12143         * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
12144         * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
12145         comment.
12146         <mst_data_gnu_ifunc>: New enumerator.
12147
12148 2018-04-26  Pedro Alves  <palves@redhat.com>
12149
12150         * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
12151         (lookup_minimal_symbol_by_pc_section): ... this.  Replace
12152         'want_trampoline' parameter by a lookup_msym_prefer parameter.
12153         Handle it.
12154         (lookup_minimal_symbol_by_pc_section): Delete old implementation.
12155         (lookup_minimal_symbol_by_pc): Adjust.
12156         (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
12157         (lookup_solib_trampoline_symbol_by_pc): Adjust.
12158         * minsyms.h (lookup_msym_prefer): New enum.
12159         (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
12160         parameter by a lookup_msym_prefer parameter.
12161
12162 2018-04-26  Pedro Alves  <palves@redhat.com>
12163
12164         * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
12165         ends in "@plt" instead of looking at the symbol's section.
12166
12167 2018-04-26  Pedro Alves  <palves@redhat.com>
12168
12169         * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete.  Remove
12170         all references.
12171         (find_pc_partial_function_gnu_ifunc): Rename to ...
12172         (find_pc_partial_function): ... this, and remove references to
12173         'is_gnu_ifunc_p'.
12174         (find_pc_partial_function): Delete old implementation.
12175         * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
12176
12177 2018-04-26  Pedro Alves  <palves@redhat.com>
12178
12179         * linespec.c (struct bound_minimal_symbol_search_key): New.
12180         (convert_linespec_to_sals): Sort minimal symbols earlier.  Don't
12181         skip first line if we found a GNU ifunc minimal symbol by name.
12182         (compare_msymbols): Change parameters to work with a destructured
12183         lhs minsym.
12184         (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
12185         functions.
12186
12187 2018-04-26  Pedro Alves  <palves@redhat.com>
12188
12189         * breakpoint.c (set_breakpoint_location_function): Don't resolve
12190         ifunc targets here.  Instead, if we have an ifunc minsym, use its
12191         address/name.
12192         (add_location_to_breakpoint): Store the minsym and the objfile in
12193         the breakpoint location.
12194         * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
12195         * linespec.c (minsym_found): Resolve GNU ifunc targets here.
12196         Record the minsym in the sal.
12197         * symtab.h (symtab_and_line) <msymbol>: New field.
12198
12199 2018-04-26  Pedro Alves  <palves@redhat.com>
12200
12201         * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
12202         unless we actually resolved the ifunc.
12203
12204 2018-04-26  Pedro Alves  <palves@redhat.com>
12205
12206         * c-exp.y (variable production): Prefer ifunc minsyms over
12207         regular function symbols.
12208         * symtab.c (find_gnu_ifunc): New function.
12209         * minsyms.h (lookup_msym_prefer): New enum.
12210         (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
12211         parameter by a lookup_msym_prefer parameter.
12212         * symtab.h (find_gnu_ifunc): New declaration.
12213
12214 2018-04-26  Pedro Alves  <palves@redhat.com>
12215
12216         * blockframe.c (find_gnu_ifunc_target_type): New function.
12217         (find_function_type): New.
12218         * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
12219         return a value with a memory address.
12220         (eval_call): For calls to GNU ifunc functions, try to find the
12221         type of the target function from the type that the resolver
12222         returns.
12223         * gdbtypes.c (objfile_type): Don't install a return type for ifunc
12224         symbols.
12225         * infcall.c (find_function_return_type): Delete.
12226         (find_function_addr): Add 'function_type' parameter.  For calls to
12227         GNU ifunc functions, try to find the type of the target function
12228         from the type that the resolver returns, and return it via
12229         FUNCTION_TYPE.
12230         (call_function_by_hand_dummy): Adjust to use the function type
12231         returned by find_function_addr.
12232         (find_function_addr): Add 'function_type' parameter and move
12233         description here.
12234         * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
12235         declarations.
12236
12237 2018-04-26  Pedro Alves  <palves@redhat.com>
12238
12239         * c-exp.y (variable production): Skip finding an alias for ifunc
12240         symbols.
12241
12242 2018-04-26  Pedro Alves  <palves@redhat.com>
12243
12244         * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
12245
12246 2018-04-25  Pedro Alves  <palves@redhat.com>
12247
12248         * infcmd.c (kill_command): Print the pid as string, not the whole
12249         thread's ptid.  Add comment.  s/has been killed/killed/ in output
12250         message.
12251         * remote.c (remote_detach_1): Print the pid as string, not the
12252         whole thread's ptid.
12253
12254 2018-04-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
12255             Sergio Durigan Junior  <sergiodj@redhat.com>
12256             Pedro Alves  <palves@redhat.com>
12257
12258         * infcmd.c (kill_command): Print message when inferior has
12259         been killed.
12260         * inferior.c (print_inferior_events): Remove 'static'.  Set as
12261         '1'.
12262         (add_inferior): Improve message printed when
12263         'print_inferior_events' is on.
12264         (exit_inferior): Remove message printed when
12265         'print_inferior_events' is on.
12266         (detach_inferior): Improve message printed when
12267         'print_inferior_events' is on.
12268         (initialize_inferiors): Use 'add_inferior_silent' to set
12269         'current_inferior_'.
12270         * inferior.h (print_inferior_events): Declare here as
12271         'extern'.
12272         * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
12273         '[Detaching...]' messages when 'print_inferior_events' is on.
12274         Use 'add_thread_silent' instead of 'add_thread'.  Add '[' and ']'
12275         as prefix/suffix for messages.  Remove periods.  Fix erroneous
12276         'Detaching after fork from child...', replace it by '... from
12277         parent...'.
12278         (handle_vfork_child_exec_or_exit): Add '[' and ']' as
12279         prefix/suffix when printing 'Detaching...' messages.  Print
12280         them when 'print_inferior_events' is on.
12281         * remote.c (remote_detach_1): Print message when detaching
12282         from inferior and '!is_fork_parent'.
12283
12284 2018-04-24  Tom Tromey  <tom@tromey.com>
12285
12286         * cli-out.h: Reindent.
12287
12288 2018-04-24  Tom Tromey  <tom@tromey.com>
12289
12290         * cli-out.c (cli_ui_out::out_field_fmt): Remove.
12291         (cli_ui_out::do_field_string): Use fputs_filtered.
12292         * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
12293
12294 2018-04-23  Tom Tromey  <tom@tromey.com>
12295
12296         * guile/scm-frame.c (gdbscm_frame_read_var): Use
12297         gdb::unique_xmalloc_ptr.
12298
12299 2018-04-23  Tom Tromey  <tom@tromey.com>
12300
12301         * configure: Rebuild.
12302
12303 2018-04-22  Rajendra SY  <rajendra.sy@gmail.com>
12304
12305         PR gdb/23095
12306         * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
12307         prepare_for_testing.  Set normal_bp to r_debug_state if target
12308         is bsd.
12309
12310 2018-04-21  Pedro Alves  <palves@redhat.com>
12311             Rajendra SY  <rajendra.sy@gmail.com>
12312
12313         * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
12314         * remote.c (extended_remote_attach): In all-stop mode, mark the
12315         thread as executing.
12316
12317 2018-04-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
12318
12319         * thread.c (thread_apply_all_command): Fix comment.
12320         (thread_command): Fix comment.
12321
12322 2018-04-10  Alan Hayward  <alan.hayward@arm.com>
12323
12324         * common/tdesc.h (tdesc_create_feature): Remove xml filename
12325         parameter.
12326         * features/aarch64-core.c (create_feature_aarch64_core):
12327         Regenerate.
12328         * features/aarch64-fpu.c (create_feature_aarch64_fpu):
12329         Likewise.
12330         * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
12331         Likewise.
12332         * features/i386/32bit-avx512.c
12333         (create_feature_i386_32bit_avx512): Likewise.
12334         * features/i386/32bit-core.c (create_feature_i386_32bit_core):
12335         Likewise.
12336         * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
12337         Likewise.
12338         * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
12339         Likewise.
12340         * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
12341         Likewise.
12342         * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
12343         Likewise.
12344         * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
12345         Likewise.
12346         * features/i386/64bit-avx512.c
12347         (create_feature_i386_64bit_avx512): Likewise.
12348         * features/i386/64bit-core.c (create_feature_i386_64bit_core):
12349         Likewise.
12350         * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
12351         Likewise.
12352         * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
12353         Likewise.
12354         * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
12355         Likewise.
12356         * features/i386/64bit-segments.c
12357         (create_feature_i386_64bit_segments): Likewise.
12358         * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
12359         Likewise.
12360         * features/i386/x32-core.c
12361         (create_feature_i386_x32_core): Likewise.
12362         * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
12363         * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
12364         * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
12365         * target-descriptions.c: In generated code, don't pass xml
12366         filename.
12367
12368 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
12369
12370         * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
12371         (print_xml_feature::visit_post): Likewise.
12372         (print_xml_feature::visit): Likewise.
12373         * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
12374         (print_xml_feature): Add new class.
12375         * regformats/regdat.sh: Null xmltarget on feature targets.
12376         * target-descriptions.c (struct target_desc): Add xmltarget.
12377         (maintenance_check_tdesc_xml_convert): Add unittest function.
12378         (tdesc_get_features_xml): Add function to get xml.
12379         (maintenance_check_xml_descriptions): Test xml generation.
12380         * xml-tdesc.c (string_read_description_xml): Add function.
12381         * xml-tdesc.h (string_read_description_xml): Add declaration.
12382
12383 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
12384
12385         * features/Makefile: Add feature marker to targets with new style
12386         target descriptions.
12387         * regformats/aarch64.dat: Regenerate.
12388         * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
12389         * regformats/i386/amd64-avx-linux.dat: Likewise.
12390         * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
12391         * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
12392         * regformats/i386/amd64-linux.dat: Likewise.
12393         * regformats/i386/amd64-mpx-linux.dat: Likewise.
12394         * regformats/i386/amd64.dat: Likewise.
12395         * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
12396         * regformats/i386/i386-avx-linux.dat: Likewise.
12397         * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
12398         * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
12399         * regformats/i386/i386-linux.dat: Likewise.
12400         * regformats/i386/i386-mmx-linux.dat: Likewise.
12401         * regformats/i386/i386-mpx-linux.dat: Likewise.
12402         * regformats/i386/i386.dat: Likewise.
12403         * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
12404         * regformats/i386/x32-avx-linux.dat: Likewise.
12405         * regformats/i386/x32-linux.dat: Likewise.
12406         * regformats/tic6x-c62x-linux.dat: Likewise.
12407         * regformats/tic6x-c64x-linux.dat: Likewise.
12408         * regformats/tic6x-c64xp-linux.dat: Likewise.
12409         * regformats/regdat.sh: Parse feature marker.
12410
12411 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
12412
12413         * common/tdesc.h (tdesc_architecture_name): Add new declaration.
12414         (tdesc_osabi_name): Likewise.
12415         * target-descriptions.c (tdesc_architecture_name): Add new
12416         function.
12417         (tdesc_osabi_name): Likewise.
12418
12419 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
12420
12421         * common/tdesc.c (tdesc_predefined_type): Move to here.
12422         (tdesc_named_type): Likewise.
12423         (tdesc_create_vector): Likewise.
12424         (tdesc_create_struct): Likewise.
12425         (tdesc_set_struct_size): Likewise.
12426         (tdesc_create_union): Likewise.
12427         (tdesc_create_flags): Likewise.
12428         (tdesc_create_enum): Likewise.
12429         (tdesc_add_field): Likewise.
12430         (tdesc_add_typed_bitfield): Likewise.
12431         (tdesc_add_bitfield): Likewise.
12432         (tdesc_add_flag): Likewise.
12433         (tdesc_add_enum_value): Likewise.
12434         * common/tdesc.h (struct tdesc_type_builtin): Likewise.
12435         (struct tdesc_type_vector): Likewise.
12436         (struct tdesc_type_field): Likewise.
12437         (struct tdesc_type_with_fields): Likewise.
12438         (tdesc_create_enum): Add declaration.
12439         (tdesc_add_typed_bitfield): Likewise.
12440         (tdesc_add_enum_value): Likewise.
12441         * target-descriptions.c (tdesc_type_field): Move from here.
12442         (tdesc_type_builtin): Likewise.
12443         (tdesc_type_vector): Likewise.
12444         (tdesc_type_with_fields): Likewise.
12445         (tdesc_predefined_types): Likewise.
12446         (tdesc_named_type): Likewise.
12447         (tdesc_create_vector): Likewise.
12448         (tdesc_create_struct): Likewise.
12449         (tdesc_set_struct_size): Likewise.
12450         (tdesc_create_union): Likewise.
12451         (tdesc_create_flags): Likewise.
12452         (tdesc_create_enum): Likewise.
12453         (tdesc_add_field): Likewise.
12454         (tdesc_add_typed_bitfield): Likewise.
12455         (tdesc_add_bitfield): Likewise.
12456         (tdesc_add_flag): Likewise.
12457         (tdesc_add_enum_value): Likewise.
12458         * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
12459         (tdesc_add_typed_bitfield): Likewise.
12460         (tdesc_add_enum_value): Likewise.
12461
12462 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
12463
12464         * common/tdesc.c (tdesc_feature::accept): Move to here.
12465         (tdesc_feature::operator==): Likewise.
12466         (tdesc_create_reg): Likewise.
12467         * common/tdesc.h (tdesc_type_kind): Likewise.
12468         (struct tdesc_type): Likewise.
12469         (struct tdesc_feature): Likewise.
12470         * regformats/regdat.sh: Create a feature.
12471         * target-descriptions.c (tdesc_type_kind): Move from here.
12472         (tdesc_type): Likewise.
12473         (tdesc_type_up): Likewise.
12474         (tdesc_feature): Likewise.
12475         (tdesc_create_reg): Likewise.
12476
12477 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
12478
12479         * Makefile.in: Add arch/tdesc.c
12480         * common/tdesc.c: New file.
12481         * common/tdesc.h (tdesc_element_visitor): Move to here.
12482         (tdesc_element): Likewise.
12483         (tdesc_reg): Likewise.
12484         (tdesc_reg_up): Likewise.
12485         * regformats/regdef.h (reg): Add offset to constructors.
12486         * target-descriptions.c (tdesc_element_visitor): Move from here.
12487         (tdesc_element): Likewise.
12488         (tdesc_reg): Likewise.
12489         (tdesc_reg_up): Likewise.
12490
12491 2018-04-17  Tom Tromey  <tom@tromey.com>
12492
12493         * dwarf2read.c (quirk_rust_enum): Conditionally drop the
12494         discriminant field.
12495
12496 2018-04-17  Tom Tromey  <tom@tromey.com>
12497
12498         * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
12499
12500 2018-04-17  Andreas Arnez  <arnez@linux.vnet.ibm.com>
12501
12502         * symtab.c (print_symbol_info): Skip printing filename and line
12503         number when `last' is NULL.
12504         (symtab_symbol_info): Use empty string instead of NULL for first
12505         invocation of print_symbol_info.
12506         (rbreak_command): Pass NULL to `last' parameter of
12507         print_symbol_info.
12508
12509 2018-04-16  Simon Marchi  <simon.marchi@ericsson.com>
12510
12511         * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
12512         instead of nullptr.
12513
12514 2018-04-16  Pedro Alves  <palves@redhat.com>
12515
12516         * MAINTAINERS (sh): Remove.
12517         * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
12518         (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
12519         (ALLDEPFILES): Remove sh64-tdep.c.
12520         * NEWS: Mentions that support for SH-5/SH64 is removed.
12521         * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
12522         (sh*-*-openbsd*): Ditto.
12523         (sh64-*-elf*): Remove.
12524         (sh*): Remove.
12525         * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
12526         * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
12527         * sh-tdep.c: No longer include "sh64-tdep.h".
12528         (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
12529         * sh64-tdep.c, sh64-tdep.h: Remove files.
12530
12531 2018-04-16  Pedro Alves  <palves@redhat.com>
12532
12533         * MAINTAINERS: Remove m88k.
12534         * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
12535         (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
12536         (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
12537         * NEWS: Mention that support for m88k was removed.
12538         * configure.host (m88*-*-*): Remove support.
12539         * configure.nat (m88k-*-*): Remove support.
12540         * configure.tgt (m88*-*-openbsd*): Remove.
12541         * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
12542
12543 2018-04-15  Simon Marchi  <simon.marchi@polymtl.ca>
12544
12545         * configure.tgt (x86_tobjs): New variable.
12546         (amd64_tobjs, i386_tobjs): Use it.
12547
12548 2018-04-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
12549
12550         * symtab.c (print_symbol_info): Precede the symbol definition by
12551         the line number when available.
12552         * NEWS: Advertise this enhancement.
12553
12554 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
12555
12556         * NEWS (New options): announce set/show record btrace cpu.
12557         * btrace.c: Include record-btrace.h.
12558         (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
12559         the vendor is unknown.
12560         (btrace_compute_ftrace_1): Add cpu parameter.  Update callers.
12561         Maybe overwrite the btrace configuration's cpu.
12562         (btrace_compute_ftrace): Add cpu parameter.  Update callers.
12563         (btrace_fetch): Add cpu parameter.  Update callers.
12564         (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
12565         Maybe overwrite the btrace configuration's cpu.  Skip enabling
12566         errata workarounds if the vendor is unknown.
12567         * python/py-record-btrace.c: Include record-btrace.h.
12568         (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
12569         (recpy_bt_function_call_history): Call record_btrace_get_cpu.
12570         * record-btrace.c (record_btrace_cpu_state_kind): New.
12571         (record_btrace_cpu): New.
12572         (set_record_btrace_cpu_cmdlist): New.
12573         (record_btrace_get_cpu): New.
12574         (require_btrace_thread, record_btrace_info)
12575         (record_btrace_resume_thread): Call record_btrace_get_cpu.
12576         (cmd_set_record_btrace_cpu_none): New.
12577         (cmd_set_record_btrace_cpu_auto): New.
12578         (cmd_set_record_btrace_cpu): New.
12579         (cmd_show_record_btrace_cpu): New.
12580         (_initialize_record_btrace): Initialize set/show record btrace cpu
12581         commands.
12582         * record-btrace.h (record_btrace_get_cpu): New.
12583
12584 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
12585
12586         * record.c (set_record_command): Fix typo in message.
12587
12588 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
12589
12590         * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
12591
12592 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
12593
12594         * infrun.c (process_event_stop_test): Call
12595         gdbarch_in_indirect_branch_thunk.
12596         * gdbarch.sh (in_indirect_branch_thunk): New.
12597         * gdbarch.c: Regenerated.
12598         * gdbarch.h: Regenerated.
12599         * x86-tdep.h: New.
12600         * x86-tdep.c: New.
12601         * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
12602         (HFILES_NO_SRCDIR): Add x86-tdep.h.
12603         (ALLDEPFILES): Add x86-tdep.c.
12604         * arch-utils.h (default_in_indirect_branch_thunk): New.
12605         * arch-utils.c (default_in_indirect_branch_thunk): New.
12606         * i386-tdep: Include x86-tdep.h.
12607         (i386_in_indirect_branch_thunk): New.
12608         (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
12609         function.
12610         * amd64-tdep: Include x86-tdep.h.
12611         (amd64_in_indirect_branch_thunk): New.
12612         (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
12613
12614 2018-04-12  Jan Kratochvil  <jan.kratochvil@redhat.com>
12615
12616         PR gdb/23053
12617         * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
12618         (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
12619         (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
12620         regression.
12621
12622 2018-04-12  Tom Tromey  <tom@tromey.com>
12623
12624         * rust-lang.c (rust_print_struct_def): Remove univariant code.
12625         (rust_evaluate_subexp): Likewise.
12626
12627 2018-04-12  Pedro Alves  <palves@redhat.com>
12628
12629         * procfs.c (procfs_detach): Make forward declaration's prototype
12630         match definition's protototype.
12631         (proc_get_LDT_entry): Remove stale do_cleanups call.
12632
12633 2018-04-12  Pedro Alves  <palves@redhat.com>
12634
12635         * target.h (target_ops::to_has_exited): Delete.
12636         (target_has_exited): Delete.
12637         * target-delegates.c: Regenerate.
12638
12639 2018-04-11  Pedro Alves  <palves@redhat.com>
12640
12641         * target.c (fileio_fh_t::t): Add comment.
12642         (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
12643         (target_fileio_close): Handle a NULL target.
12644         (invalidate_fileio_fh): New.
12645         (target_close): Call it.
12646         * remote.c (remote_hostio_send_command): No longer check whether
12647         remote_desc is open.
12648
12649 2018-04-11  Pedro Alves  <palves@redhat.com>
12650
12651         * target.c (fileio_fh_t): Make it a named struct instead of a
12652         typedef.
12653         (fileio_fh_t::is_closed): New method.
12654         (DEF_VEC_O (fileio_fh_t)): Remove.
12655         (fileio_fhandles): Now a std::vector.
12656         (is_closed_fileio_fh): Delete.
12657         (acquire_fileio_fd): Adjust.  Rename parameters.
12658         (release_fileio_fd): Adjust.
12659         (fileio_fd_to_fh): Reimplement as a function instead of a macro.
12660         (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
12661         (target_fileio_close): Adjust.
12662
12663 2018-04-10  Simon Marchi  <simon.marchi@ericsson.com>
12664
12665         * auto-load.c (auto_load_safe_path_vec_update): Iterate by
12666         index.
12667
12668 2018-04-10  Pedro Alves  <palves@redhat.com>
12669
12670         * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
12671         (scoped_finish_thread_state): New class.
12672         * infcmd.c (run_command_1): Use it instead of finish_thread_state
12673         cleanup.
12674         * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
12675         (fetch_inferior_event, normal_stop): Likewise.
12676         * thread.c (finish_thread_state_cleanup): Delete.
12677
12678 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
12679             Pedro Alves  <palves@redhat.com>
12680
12681         * value.c: Include "selftest.h" and "common/array-view.h".
12682         (struct range) <operator ==>: New.
12683         (test_ranges_contain): New.
12684         (check_ranges_vector): New.
12685         (test_insert_into_bit_range_vector): New.
12686         (_initialize_values): Register selftests.
12687         * common/array-view.h (operator==, operator!=): New.
12688
12689 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
12690
12691         * common/gdb_vecs.h (unordered_remove): Add overload that takes
12692         an iterator.
12693         * inline-frame.c: Include <algorithm>.
12694         (struct inline_state): Add constructor.
12695         (inline_state_s): Remove.
12696         (DEF_VEC_O(inline_state_s)): Remove.
12697         (inline_states): Change type to std::vector.
12698         (find_inline_frame_state): Adjust to std::vector.
12699         (allocate_inline_frame_state): Remove.
12700         (clear_inline_frame_state): Adjust to std::vector.
12701         (skip_inline_frames): Adjust to std::vector.
12702
12703 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
12704
12705         * tracepoint.h (struct trace_state_variable): Add constructor.
12706         <name>: Change type to std::string.
12707         * tracepoint.c (tsv_s): Remove.
12708         (DEF_VEC_O(tsv_s)): Remove.
12709         (tvariables): Change to std::vector.
12710         (create_trace_state_variable): Adjust to std::vector.
12711         (find_trace_state_variable): Likewise.
12712         (find_trace_state_variable_by_number): Likewise.
12713         (delete_trace_state_variable): Likewise.
12714         (trace_variable_command): Adjust to std::string.
12715         (delete_trace_variable_command): Likewise.
12716         (tvariables_info_1): Adjust to std::vector.
12717         (save_trace_state_variables): Likewise.
12718         (start_tracing): Likewise.
12719         (merge_uploaded_trace_state_variables): Adjust to std::vector
12720         and std::string.
12721         * target.h (struct target_ops)
12722         <to_download_trace_state_variable>: Pass reference to
12723         trace_state_variable.
12724         * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
12725         * target-delegates.c: Re-generate.
12726         * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
12727         (mi_tsv_deleted): Likewise.
12728         * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
12729         * remote.c (remote_download_trace_state_variable): Change
12730         pointer to reference and adjust.
12731         * make-target-delegates (parse_argtypes): Handle references.
12732         (write_function_header): Likewise.
12733         (munge_type): Likewise.
12734
12735 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
12736
12737         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12738         string_view-selftests.c.
12739         * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
12740         testsuite.
12741         * unittests/basic_string_view/cons/char/1.cc: Likewise.
12742         * unittests/basic_string_view/cons/char/2.cc: Likewise.
12743         * unittests/basic_string_view/cons/char/3.cc: Likewise.
12744         * unittests/basic_string_view/element_access/char/1.cc:
12745         Likewise.
12746         * unittests/basic_string_view/element_access/char/empty.cc:
12747         Likewise.
12748         * unittests/basic_string_view/element_access/char/front_back.cc:
12749         Likewise.
12750         * unittests/basic_string_view/inserters/char/2.cc: Likewise.
12751         * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
12752         Likewise.
12753         * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
12754         Likewise.
12755         * unittests/basic_string_view/modifiers/swap/char/1.cc:
12756         Likewise.
12757         * unittests/basic_string_view/operations/compare/char/1.cc:
12758         Likewise.
12759         * unittests/basic_string_view/operations/compare/char/13650.cc:
12760         Likewise.
12761         * unittests/basic_string_view/operations/copy/char/1.cc:
12762         Likewise.
12763         * unittests/basic_string_view/operations/data/char/1.cc:
12764         Likewise.
12765         * unittests/basic_string_view/operations/find/char/1.cc:
12766         Likewise.
12767         * unittests/basic_string_view/operations/find/char/2.cc:
12768         Likewise.
12769         * unittests/basic_string_view/operations/find/char/3.cc:
12770         Likewise.
12771         * unittests/basic_string_view/operations/find/char/4.cc:
12772         Likewise.
12773         * unittests/basic_string_view/operations/rfind/char/1.cc:
12774         Likewise.
12775         * unittests/basic_string_view/operations/rfind/char/2.cc:
12776         Likewise.
12777         * unittests/basic_string_view/operations/rfind/char/3.cc:
12778         Likewise.
12779         * unittests/basic_string_view/operations/substr/char/1.cc:
12780         Likewise.
12781         * unittests/basic_string_view/operators/char/2.cc: Likewise.
12782         * unittests/string_view-selftests.c: New file.
12783
12784 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
12785
12786         * unittests/basic_string_view/capacity/1.cc: New file.
12787         * unittests/basic_string_view/capacity/empty_neg.cc: New file.
12788         * unittests/basic_string_view/cons/char/1.cc: New file.
12789         * unittests/basic_string_view/cons/char/2.cc: New file.
12790         * unittests/basic_string_view/cons/char/3.cc: New file.
12791         * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
12792         * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
12793         * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
12794         * unittests/basic_string_view/element_access/char/1.cc: New file.
12795         * unittests/basic_string_view/element_access/char/2.cc: New file.
12796         * unittests/basic_string_view/element_access/char/empty.cc: New file.
12797         * unittests/basic_string_view/element_access/char/front_back.cc: New file.
12798         * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
12799         * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
12800         * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
12801         * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
12802         * unittests/basic_string_view/include.cc: New file.
12803         * unittests/basic_string_view/inserters/char/1.cc: New file.
12804         * unittests/basic_string_view/inserters/char/2.cc: New file.
12805         * unittests/basic_string_view/inserters/char/3.cc: New file.
12806         * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
12807         * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
12808         * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
12809         * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
12810         * unittests/basic_string_view/literals/types.cc: New file.
12811         * unittests/basic_string_view/literals/values.cc: New file.
12812         * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
12813         * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
12814         * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
12815         * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
12816         * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
12817         * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
12818         * unittests/basic_string_view/operations/compare/char/1.cc: New file.
12819         * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
12820         * unittests/basic_string_view/operations/compare/char/2.cc: New file.
12821         * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
12822         * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
12823         * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
12824         * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
12825         * unittests/basic_string_view/operations/copy/char/1.cc: New file.
12826         * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
12827         * unittests/basic_string_view/operations/data/char/1.cc: New file.
12828         * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
12829         * unittests/basic_string_view/operations/find/char/1.cc: New file.
12830         * unittests/basic_string_view/operations/find/char/2.cc: New file.
12831         * unittests/basic_string_view/operations/find/char/3.cc: New file.
12832         * unittests/basic_string_view/operations/find/char/4.cc: New file.
12833         * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
12834         * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
12835         * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
12836         * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
12837         * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
12838         * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
12839         * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
12840         * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
12841         * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
12842         * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
12843         * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
12844         * unittests/basic_string_view/operations/substr/char/1.cc: New file.
12845         * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
12846         * unittests/basic_string_view/operators/char/2.cc: New file.
12847         * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
12848         * unittests/basic_string_view/range_access/char/1.cc: New file.
12849         * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
12850         * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
12851         * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
12852         * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
12853         * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
12854         * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
12855         * unittests/basic_string_view/requirements/typedefs.cc: New file.
12856         * unittests/basic_string_view/typedefs.cc: New file.
12857         * unittests/basic_string_view/types/1.cc: New file.
12858
12859 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
12860
12861         * common/gdb_string_view.h: Remove libstdc++ implementation
12862         details, adjust to gdb reality.
12863         * common/gdb_string_view.tcc: Likewise.
12864         * cli/cli-script.c (struct string_view): Remove.
12865         (user_args) <m_args>: Change element type to gdb::string_view.
12866         (user_args::insert_args): Adjust.
12867
12868 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
12869
12870         * common/gdb_string_view.h: New file.
12871         * common/gdb_string_view.tcc: New file.
12872
12873 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
12874
12875         * ax_cxx_compile_stdcxx.m4: Sync with upstream.
12876         * configure: Re-generate.
12877
12878 2018-04-09  Pedro Alves  <palves@redhat.com>
12879
12880         * gdbarch.sh: Include "observable.h" instead of "observer.h".
12881         (set_target_gdbarch): Call
12882         gdb::observers::architecture_changed.notify instead of
12883         observer_notify_architecture_changed.
12884
12885 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
12886
12887         * tracepoint.c (struct current_traceframe_cleanup): Remove.
12888         (do_restore_current_traceframe_cleanup): Remove.
12889         (restore_current_traceframe_cleanup_dtor): Remove.
12890         (make_cleanup_restore_current_traceframe): Remove.
12891         (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
12892         New.
12893         * tracepoint.h (struct scoped_restore_current_traceframe): New.
12894         * infrun.c (fetch_inferior_event): Use
12895         scoped_restore_current_traceframe.
12896
12897 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
12898
12899         * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
12900         Remove.
12901         <n_allocated_type_units>: Remove.
12902         <all_type_units>: Change to std::vector.
12903         * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
12904         to std::vector change.
12905         (dwarf2_per_objfile::get_cutu): Likewise.
12906         (dwarf2_per_objfile::get_tu): Likewise.
12907         (create_signatured_type_table_from_index): Likewise.
12908         (create_signatured_type_table_from_debug_names): Likewise.
12909         (dw2_symtab_iter_next): Likewise.
12910         (dw2_print_stats): Likewise.
12911         (dw2_expand_all_symtabs): Likewise.
12912         (dw2_expand_marked_cus): Likewise.
12913         (dw2_debug_names_iterator::next): Likewise.
12914         (dwarf2_initialize_objfile): Likewise.
12915         (add_signatured_type_cu_to_table): Likewise.
12916         (create_all_type_units): Likewise.
12917         (add_type_unit): Likewise.
12918         (struct tu_abbrev_offset): Add constructor.
12919         (build_type_psymtabs_1): Adjust to std::vector change.
12920         (print_tu_stats): Likewise.
12921         * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
12922         (write_debug_names): Likewise.
12923
12924 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
12925
12926         * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
12927         Make an std::vector.
12928         <n_comp_units>: Remove.
12929         * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
12930         to std::vector change.
12931         (dwarf2_per_objfile::get_cutu): Likewise.
12932         (dwarf2_per_objfile::get_cu): Likewise.
12933         (create_cus_from_index): Likewise.
12934         (create_addrmap_from_index): Likewise.
12935         (create_addrmap_from_aranges): Likewise.
12936         (dwarf2_read_index): Likewise.
12937         (dw2_find_last_source_symtab): Likewise.
12938         (dw2_map_symtabs_matching_filename): Likewise.
12939         (dw2_symtab_iter_next): Likewise.
12940         (dw2_print_stats): Likewise.
12941         (dw2_expand_all_symtabs): Likewise.
12942         (dw2_expand_symtabs_with_fullname): Likewise.
12943         (dw2_expand_marked_cus): Likewise.
12944         (dw2_map_symbol_filenames): Likewise.
12945         (create_cus_from_debug_names): Likewise.
12946         (dwarf2_read_debug_names): Likewise.
12947         (dw2_debug_names_iterator::next): Likewise.
12948         (dwarf2_initialize_objfile): Likewise.
12949         (set_partial_user): Likewise.
12950         (dwarf2_build_psymtabs_hard): Likewise.
12951         (read_comp_units_from_section): Remove arguments, adjust to
12952         std::vector change.
12953         (create_all_comp_units): Adjust to std::vector and
12954         read_comp_units_from_section changes.
12955         (dwarf2_find_containing_comp_unit): Adjust to std::vector
12956         change.
12957         * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
12958         (psyms_seen_size): Likewise.
12959         (write_gdbindex): Likewise.
12960         (write_debug_names): Likewise.
12961
12962 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
12963
12964         * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
12965         with dwarf2_per_objfile.
12966         (create_cus_from_index): Likewise.
12967         (create_signatured_type_table_from_index): Likewise.
12968         (dwarf2_read_index): Likewise.
12969         (dwarf2_initialize_objfile): Likewise.
12970         (dwarf2_fetch_die_loc_sect_off):  Get dwarf2_per_objfile from
12971         per_cu rather than get_dwarf2_per_objfile.
12972
12973 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
12974
12975         * dwarf2read.h (struct signatured_type): Forward declare.
12976         (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
12977         New methods.
12978         * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
12979         (dw2_get_cutu): ...this.
12980         (dwarf2_per_objfile::get_cu): Rename from...
12981         (dw2_get_cu): ...this.
12982         (dwarf2_per_objfile::get_tu): New.
12983         (create_addrmap_from_index): Adjust.
12984         (create_addrmap_from_aranges): Adjust.
12985         (dw2_find_last_source_symtab): Adjust.
12986         (dw2_map_symtabs_matching_filename): Adjust.
12987         (dw2_symtab_iter_next): Adjust.
12988         (dw2_print_stats): Adjust.
12989         (dw2_expand_all_symtabs): Adjust.
12990         (dw2_expand_symtabs_with_fullname): Adjust.
12991         (dw2_expand_marked_cus): Adjust.
12992         (dw_expand_symtabs_matching_file_matcher): Adjust.
12993         (dw2_map_symbol_filenames): Adjust.
12994         (dw2_debug_names_iterator::next): Adjust.
12995         (dwarf2_initialize_objfile): Adjust.
12996         (set_partial_user): Adjust.
12997         (dwarf2_build_psymtabs_hard): Adjust.
12998
12999 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
13000
13001         * dwarf2read.c (create_signatured_type_table_from_debug_names):
13002         Remove unused variables.
13003         (dw2_map_symtabs_matching_filename): Likewise.
13004         (dwarf2_record_block_ranges): Likewise.
13005         (dwarf2_read_addr_index): Likewise.
13006         (follow_die_offset): Likewise.
13007
13008 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
13009
13010         * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
13011         to symbol_file_add_main.
13012
13013 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
13014
13015         PR mi/22299
13016         * mi/mi-console.c (do_fputc_async_safe): New.
13017         (mi_console_file::write_async_safe): New.
13018         (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
13019         * mi/mi-console.h (class mi_console_file) <write_async_safe>:
13020         New.
13021         * ui-file.c (ui_file::putstrn): Adjust call to
13022         fputstrn_unfiltered.
13023         * utils.c (printchar): Replace do_fputs and do_fprintf
13024         parameters by do_fputc.
13025         (fputstr_filtered): Adjust call to printchar.
13026         (fputstr_unfiltered): Likewise.
13027         (fputstrn_filtered): Likewise.
13028         (fputstrn_unfiltered): Add do_fputc parameter, pass to
13029         printchar.
13030         * utils.h (do_fputc_ftype): New typedef.
13031         (fputstrn_unfiltered): Add do_fputc parameter.
13032
13033 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
13034
13035         * regformats/i386/i386-avx.dat: Remove.
13036
13037 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
13038
13039         PR gdb/22979
13040         * amd64-tdep.c (amd64_none_init_abi): New function.
13041         (amd64_x32_none_init_abi): New function.
13042         (_initialize_amd64_tdep): Register handlers for x86-64 and
13043         x64_32 with GDB_OSABI_NONE.
13044         * osabi.c (gdbarch_init_osabi): Allow running handlers for the
13045         GDB_OSABI_NONE osabi.
13046
13047 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
13048
13049         PR gdb/22980
13050         * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
13051         GDB_OSABI_NONE.
13052         * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
13053         * osabi.c (gdb_osabi_names): Add "unknown" entry.
13054
13055 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
13056
13057         * common/byte-vector.h (char_vector): New type.
13058         * target.h (target_read_alloc): Return
13059         gdb::optional<byte_vector>.
13060         (target_read_stralloc): Return gdb::optional<char_vector>.
13061         (target_get_osdata): Return gdb::optional<char_vector>.
13062         * target.c (target_read_alloc_1): Templatize.  Replacement
13063         manual memory management with vector.
13064         (target_read_alloc): Change return type, adjust.
13065         (target_read_stralloc): Change return type, adjust.
13066         (target_get_osdata): Change return type, adjust.
13067         * auxv.c (struct auxv_info) <length>: Remove.
13068         <data>: Change type to gdb::optional<byte_vector>.
13069         (auxv_inferior_data_cleanup): Free auxv_info with delete.
13070         (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
13071         (target_auxv_search): Adjust.
13072         (fprint_target_auxv): Adjust.
13073         * avr-tdep.c (avr_io_reg_read_command): Adjust.
13074         * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
13075         (linux_make_corefile_notes): Adjust.
13076         * osdata.c (get_osdata): Adjust.
13077         * remote.c (remote_get_threads_with_qxfer): Adjust.
13078         (remote_memory_map): Adjust.
13079         (remote_traceframe_info): Adjust.
13080         (btrace_read_config): Adjust.
13081         (remote_read_btrace): Adjust.
13082         (remote_pid_to_exec_file): Adjust.
13083         * solib-aix.c (solib_aix_get_library_list): Adjust.
13084         * solib-dsbt.c (decode_loadmap): Don't free buf.
13085         (dsbt_get_initial_loadmaps): Adjust.
13086         * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
13087         * solib-target.c (solib_target_current_sos): Adjust.
13088         * tracepoint.c (sdata_make_value): Adjust.
13089         * xml-support.c (xinclude_start_include): Adjust.
13090         (xml_fetch_content_from_file): Adjust.
13091         * xml-support.h (xml_fetch_another): Change return type.
13092         (xml_fetch_content_from_file): Change return type.
13093         * xml-syscall.c (xml_init_syscalls_info): Adjust.
13094         * xml-tdesc.c (file_read_description_xml): Adjust.
13095         (fetch_available_features_from_target): Change return type.
13096         (target_fetch_description_xml): Adjust.
13097         (target_read_description_xml): Adjust.
13098
13099 2018-04-06  Tom Tromey  <tom@tromey.com>
13100
13101         * value.c (~value): Update.
13102         (struct value) <contents>: Now unique_xmalloc_ptr.
13103         (value_contents_bits_eq, allocate_value_contents)
13104         (value_contents_raw, value_contents_all_raw)
13105         (value_contents_for_printing, value_contents_for_printing_const)
13106         (set_value_enclosing_type): Update.
13107
13108 2018-04-06  Tom Tromey  <tom@tromey.com>
13109
13110         * value.c (range_s): Remove typedef, VEC.
13111         (struct range): Add operator<.
13112         (range_lessthan): Remove.
13113         (ranges_contain): Change type.
13114         (~value): Update.
13115         (struct value) <unavailable, optimized_out>: Now std::vector.
13116         (value_entirely_available)
13117         (value_entirely_covered_by_range_vector)
13118         (value_entirely_unavailable, value_entirely_optimized_out):
13119         Update.
13120         (insert_into_bit_range_vector): Change argument type.
13121         (find_first_range_overlap): Likewise.
13122         (struct ranges_and_idx, value_contents_bits_eq)
13123         (require_not_optimized_out, require_available): Update.
13124         (ranges_copy_adjusted): Change argument types.
13125         (value_optimized_out, value_copy, value_fetch_lazy): Update.
13126
13127 2018-04-06  Tom Tromey  <tom@tromey.com>
13128
13129         * value.c (~value): Update.
13130         (struct value) <parent>: Now a value_ref_ptr.
13131         (value_parent, set_value_parent, value_address, value_copy):
13132         Update.
13133
13134 2018-04-06  Tom Tromey  <tom@tromey.com>
13135
13136         * value.c (struct value): Add constructor, destructor, and member
13137         initializers.
13138         (allocate_value_lazy, value_decref): Update.
13139
13140 2018-04-06  Tom Tromey  <tom@tromey.com>
13141
13142         * value.c (struct value) <released, next>: Remove.
13143         (all_values): Now a std::vector.
13144         (allocate_value_lazy): Update.
13145         (value_next): Remove.
13146         (value_mark, value_free_to_mark, release_value)
13147         (value_release_to_mark): Update.
13148
13149 2018-04-06  Tom Tromey  <tom@tromey.com>
13150
13151         * value.h (fetch_subexp_value, value_release_to_mark): Update.
13152         (free_value_chain): Remove.
13153         * value.c (free_value_chain): Remove.
13154         (value_release_to_mark): Return a std::vector.
13155         * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
13156         std::vector.
13157         (check_condition): Update.
13158         * eval.c (fetch_subexp_value): Change "val_chain" to a
13159         std::vector.
13160         * breakpoint.c (update_watchpoint): Update.
13161         (can_use_hardware_watchpoint): Change "vals" to a std::vector.
13162
13163 2018-04-06  Tom Tromey  <tom@tromey.com>
13164
13165         * value.h (free_all_values): Remove.
13166         * value.c (free_all_values): Remove.
13167
13168 2018-04-06  Tom Tromey  <tom@tromey.com>
13169
13170         * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
13171         (value_history_chain, value_history_count): Remove.
13172         (value_history): New global.
13173         (record_latest_value, access_value_history, show_values)
13174         (preserve_values): Update.
13175
13176 2018-04-06  Tom Tromey  <tom@tromey.com>
13177
13178         * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
13179         * varobj.c (varobj_set_display_format, varobj_set_value)
13180         (install_default_visualizer, construct_visualizer)
13181         (install_new_value, ~varobj, varobj_get_value_type)
13182         (my_value_of_variable, varobj_editable_p): Update.
13183         * c-varobj.c (c_describe_child, c_value_of_variable)
13184         (cplus_number_of_children, cplus_describe_child): Update.
13185         * ada-varobj.c (ada_number_of_children, ada_name_of_child)
13186         (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
13187         (ada_value_of_variable, ada_value_is_changeable_p): Update.
13188
13189 2018-04-06  Tom Tromey  <tom@tromey.com>
13190
13191         * printcmd.c (last_examine_address): Change type to
13192         value_ref_ptr.
13193         (do_examine, x_command): Update.
13194
13195 2018-04-06  Tom Tromey  <tom@tromey.com>
13196
13197         * value.c (release_value): Update.
13198         * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
13199         (struct bpstats) <val>: Now a value_ref_ptr.
13200         * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
13201         (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
13202         (~watchpoint, print_it_watchpoint, watch_command_1)
13203         (invalidate_bp_value_on_memory_change): Update.
13204
13205 2018-04-06  Tom Tromey  <tom@tromey.com>
13206
13207         * varobj.c (varobj_clear_saved_item)
13208         (update_dynamic_varobj_children, install_new_value, ~varobj):
13209         Update.
13210         * value.h (value_incref): Move declaration earlier.
13211         (value_decref): Rename from value_free.
13212         (struct value_ref_policy): New.
13213         (value_ref_ptr): New typedef.
13214         (struct value_deleter): Remove.
13215         (gdb_value_up): Remove typedef.
13216         (release_value): Change return type.
13217         (release_value_or_incref): Remove.
13218         * value.c (set_value_parent): Update.
13219         (value_incref): Change return type.
13220         (value_decref): Rename from value_free.
13221         (value_free_to_mark, free_all_values, free_value_chain): Update.
13222         (release_value): Return value_ref_ptr.
13223         (release_value_or_incref): Remove.
13224         (record_latest_value, set_internalvar, clear_internalvar):
13225         Update.
13226         * stack.c (info_frame_command): Don't call value_free.
13227         * python/py-value.c (valpy_dealloc, valpy_new)
13228         (value_to_value_object): Update.
13229         * printcmd.c (do_examine): Update.
13230         * opencl-lang.c (lval_func_free_closure): Update.
13231         * mi/mi-main.c (register_changed_p): Don't call value_free.
13232         * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
13233         * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
13234         * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
13235         value_free.
13236         * guile/scm-value.c (vlscm_free_value_smob)
13237         (vlscm_scm_from_value): Update.
13238         * frame.c (frame_register_unwind, frame_unwind_register_signed)
13239         (frame_unwind_register_unsigned, get_frame_register_bytes)
13240         (put_frame_register_bytes): Don't call value_free.
13241         * findvar.c (address_from_register): Don't call value_free.
13242         * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
13243         * dwarf2loc.c (entry_data_value_free_closure)
13244         (value_of_dwarf_reg_entry, free_pieced_value_closure)
13245         (dwarf2_evaluate_loc_desc_full): Update.
13246         * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
13247         (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
13248         (~watchpoint, watch_command_1)
13249         (invalidate_bp_value_on_memory_change): Update.
13250         * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
13251
13252 2018-04-06  Simon Marchi  <simon.marchi@polymtl.ca>
13253
13254         PR gdb/23022
13255         * warning.m4: Add -Wno-error=deprecated-register.
13256         * configure: Re-generate.
13257
13258 2018-04-05  Tom Tromey  <tom@tromey.com>
13259
13260         * linespec.h: Remove include of "vec.h".
13261
13262 2018-04-05  Tom Tromey  <tom@tromey.com>
13263
13264         * linespec.c (typep): Remove typedef.
13265         (find_methods, find_superclass_methods): Take a std::vector.
13266         (find_method): Use std::vector.
13267
13268 2018-04-05  Tom Tromey  <tom@tromey.com>
13269
13270         * utils.c (compare_strings): Remove.
13271         * utils.h (compare_strings): Remove.
13272         * objc-lang.h (find_imps): Update.
13273         * objc-lang.c (find_methods): Take a std::vector.
13274         (uniquify_strings, find_imps): Likewise.
13275         * linespec.c (find_methods): Take a std::vector.
13276         (decode_objc): Use std::vector.
13277         (add_all_symbol_names_from_pspace, find_superclass_methods): Take
13278         a std::vector.
13279         (find_method, find_function_symbols): Use std::vector.
13280
13281 2018-04-05  Tom Tromey  <tom@tromey.com>
13282
13283         * completer.c (completion_tracker::completion_tracker): Remove
13284         cast.
13285         (completion_tracker::discard_completions): Likewise.
13286         * breakpoint.c (ambiguous_names_p): Remove cast.
13287         * ada-lang.c (_initialize_ada_language): Remove cast.
13288         * utils.h (streq): Update.
13289         (streq_hash): Add new declaration.
13290         * utils.c (streq): Return bool.
13291         (streq_hash): New function.
13292
13293 2018-04-05  Tom Tromey  <tom@tromey.com>
13294
13295         * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
13296         Remove a string copy.
13297
13298 2018-04-05  Tom Tromey  <tom@tromey.com>
13299
13300         * linespec.c (filter_results): Use std::vector.
13301         (decode_line_2, decode_line_full): Update.
13302
13303 2018-04-05  Tom Tromey  <tom@tromey.com>
13304
13305         * linespec.c (canonical_to_fullform): Return std::string.
13306         (filter_results): Update.
13307         (struct decode_line_2_item): Add constructor.
13308         <fullform, displayform>: Now std::string.
13309         (decode_line_2_compare_items): Now a std::sort comparator.
13310         (decode_line_2): Update.
13311
13312 2018-04-05  Tom Tromey  <tom@tromey.com>
13313
13314         * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
13315         (unexpected_linespec_error): Update.
13316         (linespec_parse_basic, parse_linespec): Update.
13317
13318 2018-04-05  Tom Tromey  <tom@tromey.com>
13319
13320         * linespec.c (linespec_parse_basic): Reindent.
13321
13322 2018-04-05  Tom Tromey  <tom@tromey.com>
13323
13324         * minsyms.h (iterate_over_minimal_symbols): Update.
13325         * minsyms.c (iterate_over_minimal_symbols): Take a
13326         gdb::function_view.
13327         * linespec.c (struct collect_minsyms): Remove.
13328         (compare_msyms): Now a std::sort comparator.
13329         (add_minsym): Add parameters.
13330         (search_minsyms_for_name): Update.  Use std::vector.
13331
13332 2018-04-03  Tom Tromey  <tom@tromey.com>
13333
13334         * mipsread.c (read_alphacoff_dynamic_symtab): Use
13335         gdb::byte_vector.
13336
13337 2018-04-02  Weimin Pan  <weimin.pan@oracle.com>
13338
13339         * MAINTAINERS (Write After Approval): Add Weimin Pan.
13340
13341 2018-04-02  Weimin Pan  <weimin.pan@oracle.com>
13342
13343         PR gdb/16959
13344         * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when 
13345         printing static type.
13346
13347 2018-04-01  Tom Tromey  <tom@tromey.com>
13348
13349         * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
13350         (rs6000_xfer_shared_libraries): Update.
13351
13352 2018-04-01  Simon Marchi  <simon.marchi@polymtl.ca>
13353
13354         * common/gdb_vecs.h (char_ptr): Remove.
13355         * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
13356
13357 2018-03-30  Simon Marchi  <simon.marchi@polymtl.ca>
13358
13359         * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
13360         with std::vector.
13361         * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
13362
13363 2018-03-30  Simon Marchi  <simon.marchi@polymtl.ca>
13364
13365         * tracepoint.h (struct uploaded_tp): Initialize fields.
13366         <actions, step_actions, cmd_strings>: Change type to
13367         std::vector<char *>.
13368         * tracepoint.c (get_uploaded_tp): Allocate with new.
13369         (free_uploaded_tps): Free with delete.
13370         (parse_tracepoint_definition): Adjust to std::vector change.
13371         * breakpoint.c (read_uploaded_action): Likewise.
13372         (create_tracepoint_from_upload): Likewise.
13373         * ctf.c (ctf_write_uploaded_tp): Likewise.
13374         (SET_ARRAY_FIELD): Likewise.
13375         * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
13376
13377 2018-03-30  Tom Tromey  <tom@tromey.com>
13378
13379         * solib-svr4.c (lm_info_read): Use gdb::byte_vector.  Return
13380         std::unique_ptr.
13381         (svr4_keep_data_in_core): Update.
13382         (svr4_read_so_list): Update.
13383
13384 2018-03-30  Tom Tromey  <tom@tromey.com>
13385
13386         * windows-nat.c (handle_output_debug_string, handle_exception):
13387         Update.
13388         * target.h (target_read_string): Update.
13389         * target.c (target_read_string): Change "string" to
13390         unique_xmalloc_ptr.
13391         * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
13392         Update.
13393         * solib-frv.c (frv_current_sos): Update.
13394         * solib-dsbt.c (dsbt_current_sos): Update.
13395         * solib-darwin.c (darwin_current_sos): Update.
13396         * linux-thread-db.c (inferior_has_bug): Update.
13397         * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
13398         Update.  Remove alloca.
13399         * ada-lang.c (ada_main_name): Update.
13400
13401 2018-03-30  Tom Tromey  <tom@tromey.com>
13402
13403         * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
13404         (struct dwo_file_deleter): New.
13405         (dwo_file_up): New typedef.
13406         (open_and_init_dwo_file): Use dwo_file_up.
13407         (free_dwo_file_cleanup): Remove.
13408
13409 2018-03-30  Tom Tromey  <tom@tromey.com>
13410
13411         * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
13412         (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
13413
13414 2018-03-30  Tom Tromey  <tom@tromey.com>
13415
13416         * dwarf2read.c (class free_cached_comp_units): New class.
13417         (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
13418         (free_cached_comp_units): Remove function.
13419
13420 2018-03-30  Tom Tromey  <tom@tromey.com>
13421
13422         * utils.h (make_cleanup_unpush_target): Remove.
13423         * inf-ptrace.c (struct target_unpusher): New.
13424         (target_unpush_up) New typedef.
13425         (inf_ptrace_create_inferior, inf_ptrace_attach): Use
13426         target_unpush_up.
13427         * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
13428
13429 2018-03-27  Tom Tromey  <tom@tromey.com>
13430
13431         * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
13432
13433 2018-03-27  Pedro Alves  <palves@redhat.com>
13434             Tom Tromey  <tom@tromey.com>
13435
13436         * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
13437         destructor.  Now a class.
13438         (gdb_readline_wrapper_cleanup): Remove function.
13439         (gdb_readline_wrapper): Remove cleanups.
13440
13441 2018-03-27  Tom Tromey  <tom@tromey.com>
13442
13443         * typeprint.h (struct type_print_options) <local_typedefs,
13444         global_typedefs>: Remove "struct" keyword.
13445         (class typedef_hash_table): New class.
13446         (recursively_update_typedef_hash, add_template_parameters)
13447         (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
13448         (find_typedef_in_hash): Don't declare.
13449         * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
13450         (typedef_hash_table::recursively_update): Rename from
13451         recursively_update_typedef_hash.  Now a member.
13452         (typedef_hash_table::add_template_parameters): Rename from
13453         add_template_parameters.  Now a member.
13454         (typedef_hash_table::typedef_hash_table): Now a constructor;
13455         rename from create_typedef_hash.
13456         (typedef_hash_table::~typedef_hash_table): Now a destructor;
13457         rename from free_typedef_hash.
13458         (do_free_typedef_hash, make_cleanup_free_typedef_hash)
13459         (do_free_global_table): Remove.
13460         (typedef_hash_table::typedef_hash_table): New constructor; renamed
13461         from copy_type_recursive.
13462         (create_global_typedef_table): Remove.
13463         (typedef_hash_table::find_global_typedef): Now a member of
13464         typedef_hash_table.
13465         (typedef_hash_table::find_typedef): Rename from
13466         find_typedef_in_hash; now a member.
13467         (whatis_exp): Update.
13468         * extension.h (struct ext_lang_type_printers): Add constructor and
13469         destructor.
13470         (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
13471         declare.
13472         * extension.c (ext_lang_type_printers::ext_lang_type_printers):
13473         Now a constructor; rename from start_ext_lang_type_printers.
13474         (ext_lang_type_printers): Now a destructor; rename from
13475         free_ext_lang_type_printers.
13476         * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
13477         Update.
13478         (c_type_print_base_struct_union): Update.  Remove cleanups.
13479
13480 2018-03-27  Tom Tromey  <tom@tromey.com>
13481
13482         * dwarf-index-write.c: Include <cmath>.
13483
13484 2018-03-27  Joel Brobecker  <brobecker@adacore.com>
13485
13486         * NEWS: Add entry describing new "set|show varsize-limit" command.
13487         * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
13488         command.
13489         * printcmd.c (_initialize_printcmd): Add "set var" alias of
13490         "set variable".
13491
13492 2018-03-27  Simon Marchi  <simon.marchi@ericsson.com>
13493
13494         * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
13495         dwarf-index-write.c
13496         (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
13497         * dwarf-index-common.c: New file.
13498         * dwarf-index-common.h: New file.
13499         * dwarf-index-write.c: New file.
13500         * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
13501         (struct dwarf2_section_info): Move from here.
13502         (dwarf2_section_info_def): Likewise.
13503         (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
13504         (offset_type): Likewise.
13505         (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
13506         (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
13507         (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
13508         (byte_swap): Likewise.
13509         (MAYBE_SWAP): Likewise.
13510         (dwarf2_per_cu_ptr): Likewise.
13511         (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
13512         (struct tu_stats): Likewise.
13513         (struct dwarf2_per_objfile): Likewise.
13514         (struct dwarf2_per_cu_data): Likewise.
13515         (struct signatured_type): Likewise.
13516         (sig_type_ptr): Likewise.
13517         (DEF_VEC_P (sig_type_ptr)): Likewise.
13518         (INDEX4_SUFFIX): Likewise.
13519         (INDEX5_SUFFIX): Likewise.
13520         (DEBUG_STR_SUFFIX): Likewise.
13521         (dwarf2_read_section): Make non-static.
13522         (mapped_index_string_hash): Move from here.
13523         (dwarf5_djb_hash): Likewise.
13524         (file_write): Likewise.
13525         (class data_buf): Likewise.
13526         (struct symtab_index_entry): Likewise.
13527         (struct mapped_symtab): Likewise.
13528         (find_slot): Likewise.
13529         (hash_expand): Likewise.
13530         (add_index_entry): Likewise.
13531         (uniquify_cu_indices): Likewise.
13532         (class c_str_view): Likewise.
13533         (class c_str_view_hasher): Likewise.
13534         (class vector_hasher): Likewise.
13535         (write_hash_table): Likewise.
13536         (psym_index_map): Likewise.
13537         (struct addrmap_index_data): Likewise.
13538         (add_address_entry): Likewise.
13539         (add_address_entry_worker): Likewise.
13540         (write_address_map): Likewise.
13541         (symbol_kind): Likewise.
13542         (write_psymbols): Likewise.
13543         (struct signatured_type_index_data): Likewise.
13544         (write_one_signatured_type): Likewise.
13545         (recursively_count_psymbols): Likewise.
13546         (recursively_write_psymbols): Likewise.
13547         (class debug_names): Likewise.
13548         (check_dwarf64_offsets): Likewise.
13549         (psyms_seen_size): Likewise.
13550         (write_gdbindex): Likewise.
13551         (write_debug_names): Likewise.
13552         (assert_file_size): Likewise.
13553         (write_psymtabs_to_index): Likewise.
13554         (save_gdb_index_command): Likewise.
13555         (_initialize_dwarf2_read): Don't register the "save gdb-index"
13556         command.
13557         * dwarf2read.h: New file.
13558
13559 2018-03-27  Joel Brobecker  <brobecker@adacore.com>
13560
13561         PR gdb/22670
13562         * dwarf2read.c (dwarf2_physname): Do not return the demangled
13563         symbol name if the CU's language stores symbol names in linkage
13564         format.
13565         * language.h (struct language_defn)
13566         <la_store_sym_names_in_linkage_form_p>: New field.  Adjust
13567         all instances of this struct.
13568
13569 2018-03-26  Tom Tromey  <tom@tromey.com>
13570
13571         * stack.c (backtrace_command_1): Remove verbose code.
13572
13573 2018-03-26  Tom Tromey  <tom@tromey.com>
13574
13575         * python/py-framefilter.c (py_print_type): Don't catch
13576         exceptions.  Return void.
13577         (py_print_value): Likewise.
13578         (py_print_single_arg): Likewise.
13579         (enumerate_args): Don't catch exceptions.
13580         (py_print_args): Likewise.
13581         (py_print_frame): Likewise.
13582         (gdbpy_apply_frame_filter): Catch exceptions here.
13583
13584 2018-03-26  Tom Tromey  <tom@tromey.com>
13585
13586         * stack.c (_initialize_stack): Remove trailing newlines from help
13587         text.  Add "Usage" line to "backtrace" help.
13588
13589 2018-03-26  Tom Tromey  <tom@tromey.com>
13590
13591         PR python/16486:
13592         * python/py-framefilter.c (py_print_args): Call wrap_hint.
13593
13594 2018-03-26  Tom Tromey  <tom@tromey.com>
13595
13596         * python/py-framefilter.c (py_print_single_arg): Return
13597         EXT_LANG_BT_ERROR from catch.
13598
13599 2018-03-26  Tom Tromey  <tom@tromey.com>
13600
13601         PR backtrace/15584:
13602         * stack.c (backtrace_command_1): Move some code into no-filters
13603         "if".
13604
13605 2018-03-26  Tom Tromey  <tom@tromey.com>
13606
13607         * python/py-framefilter.c (throw_quit_or_print_exception): New
13608         function.
13609         (gdbpy_apply_frame_filter): Use it.
13610
13611 2018-03-26  Tom Tromey  <tom@tromey.com>
13612
13613         PR cli/17716:
13614         * python/py-framefilter.c (py_print_type, py_print_value)
13615         (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
13616         RETURN_MASK_ERROR.
13617
13618 2018-03-26  Tom Tromey  <tom@tromey.com>
13619
13620         * python/py-framefilter.c (enumerate_args): Use
13621         gdb::unique_xmalloc_ptr.
13622
13623 2018-03-26  Tom Tromey  <tom@tromey.com>
13624
13625         * python/py-framefilter.c (py_print_frame): Return
13626         EXT_LANG_BT_OK.
13627         (gdbpy_apply_frame_filter): Update comment.
13628         * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
13629         Remove.
13630         <EXT_LANG_BT_NO_FILTERS>: Change value.
13631
13632 2018-03-26  Tom Tromey  <tom@tromey.com>
13633
13634         PR backtrace/15582:
13635         * stack.c (backtrace_command): Parse "hide" argument.
13636         * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
13637         * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
13638         constant.
13639
13640 2018-03-26  Tom Tromey  <tom@tromey.com>
13641
13642         * stack.c (backtrace_command_1): Remove "show_locals" parameter,
13643         add "flags".
13644         (backtrace_command): Remove "fulltrace", add "flags".
13645
13646 2018-03-26  Tom Tromey  <tom@tromey.com>
13647
13648         * stack.c (backtrace_command): Rewrite command line parsing.
13649
13650 2018-03-26  Simon Marchi  <simon.marchi@ericsson.com>
13651
13652         * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
13653
13654 2018-03-26  Simon Marchi  <simon.marchi@ericsson.com>
13655
13656         * filename-seen-cache.h: Add include guard.
13657
13658 2018-03-26  Keith Seitz  <keiths@redhat.com>
13659
13660         * symfile.c (place_section): Remove "struct" from section_addr_info
13661         in comment.
13662         * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
13663         "struct" keyword from section_addr_info.
13664
13665 2018-03-26  Alan Hayward  <alan.hayward@arm.com>
13666
13667         * regformats/regdef.h (reg): Add constructors.
13668
13669 2018-03-25  Pedro Alves  <palves@redhat.com>
13670
13671         * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
13672         if then/else bodies in var_func_name extraction.
13673
13674 2018-03-23  Weimin Pan  <weimin.pan@oracle.com>
13675
13676         * minsyms.c (lookup_minimal_symbol_and_objfile): Use
13677         lookup_minimal_symbol() to find symbol entry.
13678         * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
13679
13680 2018-03-23  Keith Seitz  <keiths@redhat.com>
13681
13682         PR c++/22968
13683         * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
13684         nested type definitions for C++, too.
13685
13686 2018-03-23  Tom Tromey  <tom@tromey.com>
13687
13688         * machoread.c (struct oso_el): Add a constructor.  Don't define as
13689         a typedef.
13690         (macho_register_oso): Remove.
13691         (macho_symtab_read): Take a std::vector.
13692         (oso_el_compare_name): Now a std::sort comparator.
13693         (macho_symfile_read_all_oso): Take a std::vector.
13694         (macho_symfile_read): Use std::vector.  Remove cleanups.
13695
13696 2018-03-22  Tom Tromey  <tom@tromey.com>
13697
13698         * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
13699         (record_full_goto_bookmark): Use std::string.
13700
13701 2018-03-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
13702
13703         PR tdep/18295
13704         * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
13705         a single mask.
13706
13707 2018-03-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
13708
13709         * rs6000-tdep.c (store_insn_p): New function.
13710         (skip_prologue): New variable alloca_reg_offset. Set lr_reg
13711         and cr_reg to their unshifted values. Use store_insn_p to
13712         match LR saves using either R1 or fdata->alloca_reg. Use
13713         store_insn_p to match CR saves. Set alloca_reg_offset
13714         when alloca_reg and framep are set. Remove lr_reg shift
13715         when assigning to fdata->lr_register.
13716
13717 2018-03-22  Andreas Arnez  <arnez@linux.vnet.ibm.com>
13718
13719         * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
13720         command line args instead of emitting a warning.
13721
13722 2018-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
13723
13724         * tracepoint.h (struct static_tracepoint_marker): Initialize
13725         fields, define default constructor, move constructor and move
13726         assignment, disable the rest.
13727         <str_id, extra>: Make std::string.
13728         (release_static_tracepoint_marker): Remove.
13729         (free_current_marker): Remove.
13730         * tracepoint.c (free_current_marker): Remove.
13731         (parse_static_tracepoint_marker_definition): Adjust to
13732         std::string, use new hex2str overload.
13733         (release_static_tracepoint_marker): Remove.
13734         (print_one_static_tracepoint_marker): Get marker by reference
13735         and adjust to std::string.
13736         (info_static_tracepoint_markers_command): Adjust to std::vector
13737         changes
13738         * target.h (static_tracepoint_marker_p): Remove typedef.
13739         (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
13740         (struct target_ops) <to_static_tracepoint_marker_at>: Return
13741         bool.
13742         <to_static_tracepoint_markers_by_strid>: Return std::vector.
13743         * target-debug.h
13744         (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
13745         (target_debug_print_std_vector_static_tracepoint_marker): New.
13746         (target_debug_print_struct_static_tracepoint_marker_p): Rename
13747         to...
13748         (target_debug_print_static_tracepoint_marker_p): ... this.
13749         * target-delegates.c: Re-generate.
13750         * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
13751         Make std::string.
13752         * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
13753         (decode_static_tracepoint_spec): Adjust to std::vector.
13754         (tracepoint_print_one_detail): Adjust to std::string.
13755         (strace_marker_decode_location): Adjust to std::string.
13756         (update_static_tracepoint): Adjust to std::string, remove call
13757         to release_static_tracepoint_marker.
13758         * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
13759         Adjust to std::vector.
13760         * remote.c (remote_static_tracepoint_marker_at): Return bool.
13761         (remote_static_tracepoint_markers_by_strid): Adjust to
13762         std::vector.
13763         * common/rsp-low.h (hex2str): New overload with explicit count
13764         of bytes.
13765         * common/rsp-low.c (hex2str): New overload with explicit count
13766         of bytes.
13767         * unittests/rsp-low-selftests.c (test_hex2str): New function.
13768         (_initialize_rsp_low_selftests): Add test_hex2str test.
13769         * unittests/tracepoint-selftests.c
13770         (test_parse_static_tracepoint_marker_definition): Adjust to
13771         std::string.
13772
13773 2018-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
13774
13775         * tracepoint.c (parse_static_tracepoint_marker_definition):
13776         Consider case where the definition is followed by more
13777         definitions.
13778         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
13779         tracepoint-selftests.c.
13780         * unittests/tracepoint-selftests.c: New.
13781
13782 2018-03-21  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
13783
13784         * MAINTAINERS (Write After Approval): Add Pedro Franco de
13785         Carvalho.
13786
13787 2018-03-20  Stephen Roberts  <stephen.roberts@arm.com>
13788
13789         * symtab.c (find_pc_sect_line): fixed indentation.
13790
13791 2018-03-20  Stephen Roberts  <stephen.roberts@arm.com>
13792
13793         * symtab.c (find_pc_sect_line): now uses binary search.
13794
13795 2018-03-19  Tom Tromey  <tom@tromey.com>
13796
13797         * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
13798         "IDENT" production.
13799
13800 2018-03-19  Pedro Alves  <palves@redhat.com>
13801             Tom Tromey  <tom@tromey.com>
13802
13803         * unittests/observable-selftests.c: New file.
13804         * common/observable.h: New file.
13805         * observable.h: New file.
13806         * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
13807         arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
13808         breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
13809         corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
13810         extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
13811         infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
13812         linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
13813         mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
13814         ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
13815         python/py-breakpoint.c, python/py-finishbreakpoint.c,
13816         python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
13817         record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
13818         riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
13819         spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
13820         symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
13821         tui/tui-interp.c, valops.c: Update all users.
13822         * tui/tui-hooks.c (tui_bp_created_observer)
13823         (tui_bp_deleted_observer, tui_bp_modified_observer)
13824         (tui_inferior_exit_observer, tui_before_prompt_observer)
13825         (tui_normal_stop_observer, tui_register_changed_observer):
13826         Remove.
13827         (tui_observers_token): New global.
13828         (attach_or_detach, tui_attach_detach_observers): New functions.
13829         (tui_install_hooks, tui_remove_hooks): Use
13830         tui_attach_detach_observers.
13831         * record-btrace.c (record_btrace_thread_observer): Remove.
13832         (record_btrace_thread_observer_token): New global.
13833         * observer.sh: Remove.
13834         * observer.c: Rename to observable.c.
13835         * observable.c (namespace gdb_observers): Define new objects.
13836         (observer_debug): Move into gdb_observers namespace.
13837         (struct observer, struct observer_list, xalloc_observer_list_node)
13838         (xfree_observer_list_node, generic_observer_attach)
13839         (generic_observer_detach, generic_observer_notify): Remove.
13840         (_initialize_observer): Update.
13841         Don't include observer.inc.
13842         * Makefile.in (generated_files): Remove observer.h, observer.inc.
13843         (clean mostlyclean): Likewise.
13844         (observer.h, observer.inc): Remove targets.
13845         (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
13846         (COMMON_SFILES): Use observable.c, not observer.c.
13847         * .gitignore: Remove observer.h.
13848
13849 2018-03-18  Tom Tromey  <tom@tromey.com>
13850
13851         * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
13852         gdb::def_vector.
13853         (bfd_lookup_symbol_from_dyn_symtab): Likewise.
13854
13855 2018-03-17  Tom Tromey  <tom@tromey.com>
13856
13857         * auto-load.c (auto_load_objfile_script_1): Use std::string.
13858
13859 2018-03-17  Tom Tromey  <tom@tromey.com>
13860
13861         * target.c (class scoped_target_fd): New.
13862         (target_fileio_close_cleanup): Remove.
13863         (target_fileio_read_alloc_1): Use scoped_target_fd.
13864
13865 2018-03-16  Simon Marchi  <simon.marchi@polymtl.ca>
13866
13867         * silent-rules.mk: New.
13868         * Makefile.in: Include silent-rules.mk
13869         (srcdir, VPATH, top_srcdir): Move up.
13870         (COMPILE): Add ECHO_CXX.
13871         (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
13872         (init.c): Add ECHO_INIT_C.
13873         (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
13874         (version.c): Add ECHO_GEN.
13875         (printcmd.o): Add ECHO_CXX.
13876         (target-float.o): Add ECHO_CXX.
13877         (ada-exp.o): Add ECHO_CXX.
13878         (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
13879         (insight$(EXEEXT)): Add ECHO_CXXLD.
13880         * gnulib/configure.ac: Add AM_SILENT_RULES.
13881         * gnulib/aclocal.m4: Re-generate.
13882         * gnulib/configure: Re-generate.
13883         * gnulib/import/Makefile.in: Re-generate.
13884
13885 2018-03-16  Tom Tromey  <tom@tromey.com>
13886
13887         * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
13888         * utils.h (make_cleanup_free_section_addr_info): Don't declare.
13889         * utils.c (do_free_section_addr_info)
13890         (make_cleanup_free_section_addr_info): Remove.
13891         * symfile.h (struct other_sections): Add constructor.
13892         (struct section_addr_info): Remove.
13893         (section_addr_info): New typedef.
13894         (struct sym_fns) <sym_offsets>: Change type of parameter.
13895         (build_section_addr_info_from_objfile)
13896         (relative_addr_info_to_section_offsets, addr_info_make_relative)
13897         (default_symfile_offsets, symbol_file_add)
13898         (symbol_file_add_from_bfd)
13899         (build_section_addr_info_from_section_table): Update.
13900         (alloc_section_addr_info, free_section_addr_info): Don't declare.
13901         * symfile.c (alloc_section_addr_info): Remove.
13902         (build_section_addr_info_from_section_table): Change return type.
13903         Update.
13904         (build_section_addr_info_from_bfd)
13905         (build_section_addr_info_from_objfile): Likewise.
13906         (free_section_addr_info): Remove.
13907         (relative_addr_info_to_section_offsets): Change type of "addrs".
13908         (addrs_section_compar): Now a std::sort comparator.
13909         (addrs_section_sort): Change return type.
13910         (addr_info_make_relative): Change type of "addrs".  Update.
13911         (default_symfile_offsets, syms_from_objfile_1)
13912         (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
13913         (symbol_file_add_separate): Update.
13914         (symbol_file_add): Change type of "addrs".  Update.
13915         (add_symbol_file_command): Update.  Remove cleanups.
13916         * symfile-mem.c (symbol_file_add_from_memory): Update.  Remove
13917         cleanups.
13918         * symfile-debug.c (debug_sym_offsets): Change type of "info".
13919         * solib.c (solib_read_symbols): Update.
13920         * objfiles.c (objfile_relocate): Update.  Remove cleanups.
13921         * machoread.c (macho_symfile_offsets): Update.
13922         * jit.c (jit_bfd_try_read_symtab): Update.
13923
13924 2018-03-15  Simon Marchi  <simon.marchi@polymtl.ca>
13925
13926         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
13927         unittests/utils-selftests.c.
13928         * unittests/utils-selftests.c: New file.
13929
13930 2018-03-14  Tom Tromey  <tom@tromey.com>
13931
13932         PR cli/14977:
13933         * printcmd.c (printf_c_string, printf_wide_c_string): Special case
13934         for NULL.
13935
13936 2018-03-14  Tom Tromey  <tom@tromey.com>
13937
13938         PR cli/19918:
13939         * printcmd.c (printf_pointer): Allow "-" in format.
13940
13941 2018-03-14  Tom Tromey  <tom@tromey.com>
13942
13943         * printcmd.c (_initialize_printcmd): Add usage to printf.
13944
13945 2018-03-14  Yao Qi  <qiyao@sourceware.org>
13946
13947         * MAINTAINERS: Update my email address.
13948
13949 2018-03-13  Tom Tromey  <tom@tromey.com>
13950
13951         * machoread.c (macho_check_dsym): Change filenamep to a
13952         std::string*.
13953         (macho_symfile_read): Update.
13954         * symfile.c (load_command): Use std::string.
13955
13956 2018-03-12  Andrew Burgess  <andrew.burgess@embecosm.com>
13957
13958         * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
13959         to error message string.
13960         (riscv_register_name): Use xsnprintf instead of sprintf.
13961         (riscv_insn::fetch_instruction): Use gdb_assert instead of
13962         internal_error.
13963         (riscv_print_arg_location): Use gdb_assert_not_reached instead of
13964         error.
13965         (riscv_push_dummy_call): Likewise.
13966
13967 2018-03-12  Tom Tromey  <tom@tromey.com>
13968
13969         * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
13970         Use gdb::byte_vector.
13971         * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
13972
13973 2018-03-12  Yao Qi  <yao.qi@linaro.org>
13974
13975         * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
13976         parameter type to readable_regcache.
13977         * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
13978         the declaration.
13979
13980 2018-03-11  Tom Tromey  <tom@tromey.com>
13981
13982         * dwarf2read.c (struct nextfield): Add initializers.
13983         (struct nextfnfield): Remove.
13984         (struct fnfieldlist): Add initializers.  Remove "length" and
13985         "head", use std::vector.
13986         (struct decl_field_list): Remove.
13987         (struct field_info): Add initializers.
13988         <fields, baseclasses>: Now std::vector.
13989         <nbaseclasses, nfnfields, typedef_field_list_count,
13990         nested_types_list_count>: Remove.
13991         (dwarf2_add_field, dwarf2_add_type_defn)
13992         (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
13993         (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
13994         (process_structure_scope): Update.
13995
13996 2018-03-11  Tom Tromey  <tom@tromey.com>
13997
13998         * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
13999         for use by std::sort.
14000         (build_type_psymtabs_1): Use std::vector.
14001
14002 2018-03-09  Eli Zaretskii  <eliz@gnu.org>
14003
14004         * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
14005         and LIBMPFR in the printed configuration.
14006
14007 2018-03-08  Tom Tromey  <tom@tromey.com>
14008
14009         * source.c (get_filename_and_charpos): Use scoped_fd.
14010         * nto-procfs.c (procfs_open_1): Use scoped_fd.
14011         (procfs_pidlist): Likewise.
14012         * procfs.c (proc_get_LDT_entry): Use scoped_fd.
14013         (iterate_over_mappings): Likewise.
14014
14015 2018-03-08  Tom Tromey  <tom@tromey.com>
14016
14017         * infcall.c (struct call_return_meta_info)
14018         <stack_temporaries_enabled>: Remove.
14019         (get_call_return_value, call_function_by_hand_dummy): Update.
14020         * thread.c (disable_thread_stack_temporaries): Remove.
14021         (enable_thread_stack_temporaries): Remove.
14022         (thread_stack_temporaries_enabled_p): Return bool.
14023         (push_thread_stack_temporary, value_in_thread_stack_temporaries)
14024         (get_last_thread_stack_temporary): Update.
14025         * eval.c (evaluate_subexp): Update.
14026         * gdbthread.h (class enable_thread_stack_temporaries): Now a
14027         class, not a function.
14028         (value_ptr, value_vec): Remove typedefs.
14029         (class thread_info) <stack_temporaries_enabled>: Now bool.
14030         <stack_temporaries>: Now a std::vector.
14031         (thread_stack_temporaries_enabled_p)
14032         (value_in_thread_stack_temporaries): Return bool.
14033
14034 2018-03-08  Simon Marchi  <simon.marchi@ericsson.com>
14035
14036         * remote.c (putpkt_binary): Fix omitted bytes reporting.
14037         (getpkt_or_notif_sane_1): Likewise.
14038
14039 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
14040
14041         * build-id.c (build_id_to_debug_bfd): Use std::string.
14042
14043 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
14044
14045         * build-id.c (find_separate_debug_file_by_buildid): Return
14046         std::string.
14047         * build-id.h (find_separate_debug_file_by_buildid): Return
14048         std::string.
14049         * coffread.c (coff_symfile_read): Adjust to std::string.
14050         * elfread.c (elf_symfile_read): Adjust to std::string.
14051         * symfile.c (separate_debug_file_exists): Change parameter to
14052         std::string.
14053         (find_separate_debug_file): Return std::string.
14054         (find_separate_debug_file_by_debuglink): Return std::string.
14055         * symfile.h (find_separate_debug_file_by_debuglink): Return
14056         std::string.
14057
14058 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
14059
14060         * common/xml-utils.c (xml_escape_text): Move code to...
14061         (xml_escape_text_append): ... this new function.
14062         * common/xml-utils.h (xml_escape_text_append): New declaration.
14063         * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
14064         New function.
14065         (_initialize_xml_utils): register test_xml_escape_text_append as
14066         a selftest.
14067
14068 2018-03-07  Alan Hayward  <alan.hayward@arm.com>
14069
14070         * defs.h: Remove MAX_REGISTER_SIZE.
14071         * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
14072         asserts.
14073         * python/py-unwind.c (pyuw_sniffer): Likewise.
14074
14075 2018-03-07  Tom Tromey  <tom@tromey.com>
14076
14077         * linux-tdep.c (linux_info_proc): Update.
14078         * target.h (struct target_ops) <to_fileio_readlink>: Return
14079         optional<string>.
14080         (target_fileio_readlink): Return optional<string>.
14081         * remote.c (remote_hostio_readlink): Return optional<string>.
14082         * inf-child.c (inf_child_fileio_readlink): Return
14083         optional<string>.
14084         * target.c (target_fileio_readlink): Return optional<string>.
14085
14086 2018-03-07  Andrew Burgess  <andrew.burgess@embecosm.com>
14087
14088         * regcache.c (cooked_read_test): Add riscv to the list of
14089         architectures that have a save_reggroup.
14090
14091 2018-03-07  Andreas Arnez  <arnez@linux.vnet.ibm.com>
14092
14093         * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
14094         value is not a dynamic class object.
14095
14096 2018-03-06  Tom Tromey  <tom@tromey.com>
14097
14098         * rust-exp.y: Formatting fixes.
14099
14100 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
14101
14102         * riscv-tdep.c (riscv_register_name): Remove target description
14103         support.
14104         (riscv_gdbarch_init): Remove target description check.
14105
14106 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
14107
14108         * riscv-tdep.c: Remove 'Contributed by ...' lines from header
14109         comment.
14110         * riscv-tdep.h: Likewise.
14111
14112 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
14113
14114         * riscv-tdep.c (riscv_pseudo_register_read): Delete.
14115         (riscv_pseudo_register_write): Delete.
14116         (riscv_gdbarch_init): Remove all use of pseudo registers.
14117
14118 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
14119
14120         * record-btrace.c (btrace_print_lines): Replace cleanup
14121         parameter with RAII equivalents.
14122         (btrace_insn_history): Replace cleanup with RAII equivalents.
14123         * ui-out.h (make_cleanup_ui_out_list_begin_end,
14124         make_cleanup_ui_out_tuple_begin_end): Remove.
14125         * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
14126         make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
14127         make_cleanup_ui_out_list_begin_end): Remove.
14128
14129 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
14130
14131         * record-btrace.c (record_btrace_maybe_mark_async_event): Change
14132         parameter types to std::vector.  Use bool.
14133         (record_btrace_wait): Replace VEC(tp_t) with
14134         std::vector<thread_info *>.
14135         * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
14136
14137 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
14138
14139         * record-btrace.c (record_btrace_disable_callback): Remove.
14140         (struct scoped_btrace_disable): New.
14141         (record_btrace_open): Use scoped_btrace_disable.
14142
14143 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
14144
14145         * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
14146         reading values from registers.
14147
14148 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
14149
14150         * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
14151         where appropriate.
14152
14153 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
14154
14155         * riscv-tdep.c (riscv_print_arg_location): Add header comment,
14156         change parameter type.  Use GDB's print functions, and use
14157         core_addr_to_string where appropriate.
14158         (riscv_push_dummy_call): Use core_addr_to_string where
14159         appropriate, update call to riscv_print_arg_location, and reindent
14160         a few lines.
14161         (riscv_return_value): Update call to riscv_print_arg_location.
14162
14163 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
14164             Tim Newsome <tim@sifive.com>
14165             Albert Ou <a0u@eecs.berkeley.edu>
14166             Darius Rad <darius@bluespec.com>
14167
14168         * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
14169         (HFILES_NO_SRCDIR): Add riscv-tdep.h.
14170         (ALLDEPFILES): Add riscv-tdep.c
14171         * configure.tgt: Add riscv support.
14172         * riscv-tdep.c: New file.
14173         * riscv-tdep.h: New file.
14174         * NEWS: Mention new target.
14175         * MAINTAINERS: Add entry for riscv.
14176
14177 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
14178
14179         * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
14180         fields within aggregates.
14181
14182 2018-03-04  Simon Marchi  <simon.marchi@polymtl.ca>
14183
14184         * record-btrace.c (btrace_print_lines): Change type of flags to
14185         gdb_disassembly_flags.
14186
14187 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
14188
14189         * fbsd-nat.c: Include "inf-ptrace.h".
14190         (USE_SIGTRAP_SIGINFO): Conditionally define.
14191         [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
14192         (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
14193         [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
14194         function.
14195         [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
14196         Likewise.
14197         [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
14198         Likewise.
14199         (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
14200         "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
14201         "supports_stopped_by_hw_breakpoint" target methods.
14202
14203 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
14204
14205         * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
14206         * fbsd-nat.c (debug_fbsd_nat): New variable.
14207         (show_fbsd_nat_debug): New function.
14208         (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
14209         (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
14210
14211 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
14212
14213         * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
14214         * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
14215         prototype.
14216         * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
14217         (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
14218         method.
14219
14220 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
14221
14222         * common/gdb_vecs.c (free_char_ptr_vec): Remove.
14223         * common/gdb_vecs.h (free_char_ptr_vec): Remove.
14224
14225 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
14226
14227         * charset.c (struct charset_vector): New.
14228         (charsets): Change type to charset_vector.
14229         (find_charset_names): Adjust.
14230         (add_one): Adjust.
14231         (_initialize_charset): Adjust.
14232
14233 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
14234
14235         * progspace.h (struct program_space) <deleted_solibs>: Change
14236         type to std::vector<std::string>.
14237         * progspace.c (clear_program_space_solib_cache): Adjust.
14238         * breakpoint.c (print_solib_event): Adjust.
14239         (check_status_catch_solib): Adjust.
14240         * solib.c (update_solib_list): Adjust.
14241         * ui-out.h (class ui_out) <field_string>: New overload.
14242         * ui-out.c (ui_out::field_string): New overload.
14243
14244 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
14245
14246         * progspace.h (struct program_space): Add constructor and
14247         destructor, initialize fields.
14248         (add_program_space): Remove.
14249         * progspace.c (add_program_space): Rename to...
14250         (program_space::program_space): ... this.
14251         (release_program_space): Rename to...
14252         (program_space::~program_space): ... this.
14253         (delete_program_space): Use delete to delete program_space.
14254         (initialize_progspace): Use new to allocate program_space.
14255         * inferior.c (add_inferior_with_spaces): Likewise.
14256         (clone_inferior_command): Likewise.
14257         * infrun.c (follow_fork_inferior): Likewise.
14258         (handle_vfork_child_exec_or_exit): Likewise.
14259
14260 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
14261
14262         * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
14263         (delim_string_to_char_ptr_vec): Return std::vector of
14264         gdb::unique_xmalloc_ptr.
14265         (dirnames_to_char_ptr_vec_append): Take std::vector of
14266         gdb::unique_xmalloc_ptr.
14267         (dirnames_to_char_ptr_vec): Return std::vector of
14268         gdb::unique_xmalloc_ptr.
14269         * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
14270         Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
14271         (delim_string_to_char_ptr_vec): Return an std::vector of
14272         gdb::unique_xmalloc_ptr, adjust the code.
14273         (dirnames_to_char_ptr_vec_append): Take an std::vector of
14274         gdb::unique_xmalloc_ptr, adjust the code.
14275         (dirnames_to_char_ptr_vec): Return an std::vector of
14276         gdb::unique_xmalloc_ptr, adjust the code.
14277         * auto-load.c (auto_load_safe_path_vec): Change type to
14278         std::vector of gdb::unique_xmalloc_ptr.
14279         (auto_load_expand_dir_vars): Return an std::vector of
14280         gdb::unique_xmalloc_ptr, adjust the code.
14281         (auto_load_safe_path_vec_update): Adjust.
14282         (filename_is_in_auto_load_safe_path_vec): Adjust.
14283         (auto_load_objfile_script_1): Adjust.
14284         * build-id.c (build_id_to_debug_bfd): Adjust.
14285         * linux-thread-db.c (thread_db_load_search): Adjust.
14286         * source.c (add_path): Adjust.
14287         (openp): Adjust.
14288         * symfile.c (find_separate_debug_file): Adjust.
14289         * utils.c (do_free_char_ptr_vec): Remove.
14290         (make_cleanup_free_char_ptr_vec): Remove.
14291
14292 2018-03-01  Sergio Durigan Junior  <sergiodj@redhat.com>
14293
14294         PR gdb/22907
14295         * common/pathstuff.c: Conditionally include "<windows.h>".
14296
14297 2018-03-01  Georg Sauthoff  <mail@georg.so>
14298
14299         PR gdb/22888
14300         * gcore.in: Quote variables and switch interpreter to bash.
14301
14302 2018-03-01  Tom Tromey  <tom@tromey.com>
14303
14304         * dwarf2read.c (alloc_discriminant_info): Fix default_index
14305         assertion.  Add assertion for discriminant_index.
14306         (quirk_rust_enum): Use correct base type name in univariant case.
14307
14308 2018-03-01  Simon Marchi  <simon.marchi@ericsson.com>
14309
14310         * record.c (get_call_history_modifiers): Return a
14311         record_print_flags.
14312         (cmd_record_call_history): Adjust.
14313         * record-btrace.c (record_btrace_call_history): Adjust.
14314         (record_btrace_call_history_range): Adjust.
14315         (record_btrace_call_history_from): Adjust.
14316         * target-debug.h (target_debug_print_record_print_flags): New.
14317         * target-delegates.c: Re-generate.
14318         * target.c (target_call_history): Change flags type.
14319         (target_call_history_from): Likewise.
14320         (target_call_history_range): Likewise.
14321         * target.h (struct target_ops) <target_call_history>: Likewise.
14322         (target_call_history_from): Likewise.
14323         (target_call_history_range): Likewise.
14324
14325 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
14326             Simon Marchi  <simon.marchi@polymtl.ca>
14327
14328         * common/common-utils.c: Include "sys/stat.h".
14329         (is_regular_file): Move here from "source.c"; change return
14330         type to "bool".
14331         * common/common-utils.h (is_regular_file): New prototype.
14332         * common/pathstuff.c (contains_dir_separator): New function.
14333         * common/pathstuff.h (contains_dir_separator): New prototype.
14334         * source.c: Don't include "sys/stat.h".
14335         (is_regular_file): Move to "common/common-utils.c".
14336
14337 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
14338
14339         * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
14340         (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
14341         * auto-load.c: Include "common/pathstuff.h".
14342         * common/common-def.h (current_directory): Move here.
14343         * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
14344         function.
14345         * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
14346         prototype.
14347         * common/pathstuff.c: New file.
14348         * common/pathstuff.h: New file.
14349         * compile/compile.c: Include "common/pathstuff.h".
14350         * defs.h (current_directory): Move to "common/common-defs.h".
14351         * dwarf2read.c: Include "common/pathstuff.h".
14352         * exec.c: Likewise.
14353         * guile/scm-safe-call.c: Likewise.
14354         * linux-thread-db.c: Likewise.
14355         * main.c: Likewise.
14356         * nto-tdep.c: Likewise.
14357         * objfiles.c: Likewise.
14358         * source.c: Likewise.
14359         * symtab.c: Likewise.
14360         * utils.c: Include "common/pathstuff.h".
14361         (gdb_realpath): Move to "common/pathstuff.c".
14362         (gdb_realpath_keepfile): Likewise.
14363         (gdb_abspath): Likewise.
14364         * utils.h (gdb_realpath): Move to "common/pathstuff.h".
14365         (gdb_realpath_keepfile): Likewise.
14366         (gdb_abspath): Likewise.
14367
14368 2018-02-28  John Baldwin  <jhb@FreeBSD.org>
14369
14370         * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
14371         wildcard process pid for super_resume for kernels with a
14372         specific bug.
14373
14374 2018-02-27  Phil Muldoon  <pmuldoon@redhat.com>
14375
14376         * compile/compile.c (get_args): Add additional comments
14377         explaining function.
14378
14379 2018-02-27  Simon Marchi  <simon.marchi@polymtl.ca>
14380             Tom Tromey  <tom@tromey.com>
14381
14382         * target.h (memory_write_request_s): Remove typedef.  Don't define
14383         VEC.
14384         (target_write_memory_blocks): Change argument to std::vector.
14385         (struct memory_write_request): Add constructor.
14386         * target-memory.c (compare_block_starting_address): Return bool.
14387         Change argument types.
14388         (claim_memory): Change arguments to use std::vector.
14389         (split_regular_and_flash_blocks, blocks_to_erase)
14390         (compute_garbled_blocks): Likewise.
14391         (cleanup_request_data, cleanup_write_requests_vector): Remove.
14392         (target_write_memory_blocks): Change argument to std::vector.
14393         * symfile.c (struct load_section_data): Add constructor and
14394         destructor.  Use std::vector for "requests".
14395         (struct load_progress_data): Add initializers.
14396         (load_section_callback): Update.  Use "new".
14397         (clear_memory_write_data): Remove.
14398         (generic_load): Update.
14399
14400 2018-02-27  Alan Hayward  <alan.hayward@arm.com>
14401
14402         * arch/aarch64.h: Use common/tdesc.h.
14403
14404 2018-02-26  Maciej W. Rozycki  <macro@mips.com>
14405
14406         * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
14407         architecture with a 64-bit ABI.
14408
14409 2018-02-26  Maciej W. Rozycki  <macro@mips.com>
14410
14411         * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
14412         ahead of target description loading.
14413
14414 2018-02-26  Tom Tromey  <tom@tromey.com>
14415
14416         * stack.c (backtrace_command_1): Update.
14417         * python/python-internal.h (gdbpy_apply_frame_filter): Change type
14418         of "flags".
14419         * python/py-framefilter.c (py_print_frame)
14420         (gdbpy_apply_frame_filter): Change type of "flags".
14421         * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
14422         of "flags".
14423         (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
14424         (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
14425         * extension.h (enum frame_filter_flag): Rename from
14426         frame_filter_flags.
14427         (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
14428         (apply_ext_lang_frame_filter): Change type of "flags".
14429         * extension.c (apply_ext_lang_frame_filter): Change type of
14430         "flags".
14431         * extension-priv.h (struct extension_language_ops)
14432         <apply_frame_filter>: Change type of "flags".
14433
14434 2018-02-26  Tom Tromey  <tom@tromey.com>
14435
14436         PR python/16497:
14437         * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag.  Fix
14438         off-by-one in py_end computation.
14439         * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
14440         PRINT_MORE_FRAMES.
14441         * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
14442         constant.
14443
14444 2018-02-26  Tom Tromey  <tom@tromey.com>
14445
14446         * dwarf2read.c (struct variant_field): New.
14447         (struct nextfield) <variant>: New field.
14448         (dwarf2_add_field): Handle DW_TAG_variant_part.
14449         (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
14450         discriminated union.
14451         (read_structure_type): Handle DW_TAG_variant_part.
14452         (handle_struct_member_die): New function, extracted from
14453         process_structure_scope.  Handle DW_TAG_variant.
14454         (process_structure_scope): Handle discriminated unions.  Call
14455         handle_struct_member_die.
14456
14457 2018-02-26  Tom Tromey  <tom@tromey.com>
14458
14459         * rust-lang.h (rust_last_path_segment): Declare.
14460         * rust-lang.c (rust_last_path_segment): Now public.  Change
14461         contract.
14462         (struct disr_info): Remove.
14463         (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
14464         (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
14465         (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
14466         (rust_enum_p, rust_enum_variant): New function.
14467         (rust_underscore_fields): Remove "offset" parameter.
14468         (rust_print_enum): New function.
14469         (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
14470         <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
14471         (rust_print_struct_def): Add "for_rust_enum" parameter.  Handle
14472         enums.
14473         (rust_internal_print_type): New function, from rust_print_type.
14474         Remove enum code.
14475         (rust_print_type): Call rust_internal_print_type.
14476         (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
14477         Update enum handling.
14478         * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
14479         (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
14480         (rust_union_quirks): New functions.
14481         (process_full_comp_unit, process_full_type_unit): Call
14482         rust_union_quirks.
14483         (process_structure_scope): Update rust_unions if necessary.
14484
14485 2018-02-26  Tom Tromey  <tom@tromey.com>
14486
14487         * value.h (value_union_variant): Declare.
14488         * valops.c (value_union_variant): New function.
14489         * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
14490         (struct discriminant_info): New.
14491         (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
14492         enumerator.
14493         (struct main_type) <flag_discriminated_union>: New field.
14494
14495 2018-02-26  Tom Tromey  <tom@tromey.com>
14496
14497         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
14498         unittests/unpack-selftests.c.
14499         * unittests/unpack-selftests.c: New file.
14500         * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
14501
14502 2018-02-26  Yao Qi  <yao.qi@linaro.org>
14503
14504         * dwarf2read.c (struct partial_die_info) <read>: New method.
14505         (read_partial_die): Remove the declaration.
14506         (load_partial_dies): Update.
14507         (partial_die_info::partial_die_info):
14508         (read_partial_die): Change it to partial_die_info::read.
14509
14510 2018-02-26  Yao Qi  <yao.qi@linaro.org>
14511
14512         * dwarf2read.c (struct partial_die_info) <fixup>: New method.
14513         (fixup_partial_die): Remove declaration.
14514         (scan_partial_symbols): Update.
14515         (partial_die_parent_scope): Likewise.
14516         (partial_die_full_name): Likewise.
14517         (fixup_partial_die): Change it to partial_die_info::fixup.
14518
14519 2018-02-26  Yao Qi  <yao.qi@linaro.org>
14520
14521         * dwarf2read.c (read_partial_die): Update the declaration.
14522         (load_partial_dies): Caller update.
14523         (read_partial_die): Remove one argument abbrev_len.
14524
14525 2018-02-26  Yao Qi  <yao.qi@linaro.org>
14526
14527         * dwarf2read.c (struct partial_die_info): Add ctor, delete
14528         assignment operator.
14529         (load_partial_dies): Use ctor and copy ctor.
14530         (read_partial_die): Update.
14531         (dwarf2_cu::find_partial_die): Use ctor.
14532
14533 2018-02-26  Yao Qi  <yao.qi@linaro.org>
14534
14535         * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
14536         (find_partial_die_in_comp_unit): Change it to
14537         dwarf2_cu::find_partial_die.
14538         (find_partial_die): Update.
14539
14540 2018-02-26  Yao Qi  <yao.qi@linaro.org>
14541
14542         * dwarf2read.c (read_partial_die): Remove the code checking abbrev
14543         is NULL.
14544
14545 2018-02-26  Yao Qi  <yao.qi@linaro.org>
14546
14547         * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
14548
14549 2018-02-26  Alan Hayward  <alan.hayward@arm.com>
14550
14551         * arch/amd64.h: Use common/tdesc.h.
14552         * arch/i386.c: Likewise.
14553         * arch/i386.h: Likewise.
14554         * arch/tic6x.c: Likewise.
14555         * arch/tdesc.h: Move file from here...
14556         * common/tdesc.h: ...to here.
14557         * features/aarch64-core.c: Regenerate.
14558         * features/aarch64-fpu.c: Regenerate.
14559         * features/i386/32bit-avx.c: Regenerate.
14560         * features/i386/32bit-avx512.c: Regenerate.
14561         * features/i386/32bit-core.c: Regenerate.
14562         * features/i386/32bit-linux.c: Regenerate.
14563         * features/i386/32bit-mpx.c: Regenerate.
14564         * features/i386/32bit-pkeys.c: Regenerate.
14565         * features/i386/32bit-sse.c: Regenerate.
14566         * features/i386/64bit-avx.c: Regenerate.
14567         * features/i386/64bit-avx512.c: Regenerate.
14568         * features/i386/64bit-core.c: Regenerate.
14569         * features/i386/64bit-linux.c: Regenerate.
14570         * features/i386/64bit-mpx.c: Regenerate.
14571         * features/i386/64bit-pkeys.c: Regenerate.
14572         * features/i386/64bit-segments.c: Regenerate.
14573         * features/i386/64bit-sse.c: Regenerate.
14574         * features/i386/x32-core.c: Regenerate.
14575         * features/tic6x-c6xp.c: Regenerate.
14576         * features/tic6x-core.c: Regenerate.
14577         * features/tic6x-gp.c: Regenerate.
14578         * target-descriptions.c: Use common/tdesc.h.
14579         * target-descriptions.h: Likewise.
14580
14581 2018-02-24  Tom Tromey  <tom@tromey.com>
14582
14583         * linux-thread-db.c (try_thread_db_load_from_pdir_1)
14584         (try_thread_db_load_from_dir, thread_db_load_search): Use
14585         std::string.
14586         (info_auto_load_libthread_db_compare): Return bool.  Change
14587         argument types.
14588         (info_auto_load_libthread_db): Use std::vector, std::string.
14589         Remove cleanups.
14590
14591 2018-02-24  Tom Tromey  <tom@tromey.com>
14592
14593         * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
14594         std::string.
14595         * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
14596         std::string*.
14597         * gdbarch.c: Rebuild.
14598         * gdbarch.h: Rebuild.
14599         * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
14600         * arch-utils.h (default_fast_tracepoint_valid_at): Update.
14601         * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
14602         std::string*.
14603
14604 2018-02-23  Simon Marchi  <simon.marchi@polymtl.ca>
14605
14606         * gdbtypes.h (sect_offset): Change type to uint64_t.
14607         (sect_offset_str): New function.
14608         * dwarf2read.c (create_addrmap_from_aranges): Use
14609         sect_offset_str.
14610         (error_check_comp_unit_head): Likewise.
14611         (create_debug_type_hash_table): Likewise.
14612         (read_cutu_die_from_dwo): Likewise.
14613         (init_cutu_and_read_dies): Likewise.
14614         (init_cutu_and_read_dies_no_follow): Likewise.
14615         (process_psymtab_comp_unit_reader): Likewise.
14616         (partial_die_parent_scope): Likewise.
14617         (peek_die_abbrev): Likewise.
14618         (process_queue): Likewise.
14619         (dwarf2_physname): Likewise.
14620         (read_namespace_alias): Likewise.
14621         (read_import_statement): Likewise.
14622         (create_dwo_cu_reader): Likewise.
14623         (create_cus_hash_table): Likewise.
14624         (lookup_dwo_cutu): Likewise.
14625         (inherit_abstract_dies): Likewise.
14626         (read_func_scope): Likewise.
14627         (read_call_site_scope): Likewise.
14628         (dwarf2_add_member_fn): Likewise.
14629         (read_common_block): Likewise.
14630         (read_module_type): Likewise.
14631         (read_typedef): Likewise.
14632         (read_subrange_type): Likewise.
14633         (load_partial_dies): Likewise.
14634         (read_partial_die): Likewise.
14635         (find_partial_die): Likewise.
14636         (read_str_index): Likewise.
14637         (dwarf2_string_attr): Likewise.
14638         (build_error_marker_type): Likewise.
14639         (lookup_die_type): Likewise.
14640         (dump_die_shallow): Likewise.
14641         (follow_die_ref): Likewise.
14642         (dwarf2_fetch_die_loc_sect_off): Likewise.
14643         (dwarf2_fetch_constant_bytes): Likewise.
14644         (follow_die_sig): Likewise.
14645         (get_signatured_type): Likewise.
14646         (get_DW_AT_signature_type): Likewise.
14647         (dwarf2_find_containing_comp_unit): Likewise.
14648         (set_die_type): Likewise.
14649
14650 2018-02-21  John Baldwin  <jhb@FreeBSD.org>
14651
14652         * arch/aarch64.c: Include "common-defs.h".
14653         * arch/amd64.c: Likewise.
14654         * arch/i386.c: Likewise.
14655
14656 2018-02-21  Tom Tromey  <tom@tromey.com>
14657
14658         * value.h: (extract_field_op): Update.
14659         * eval.c (extract_field_op): Return a const char *.
14660         * expression.h (parse_expression_for_completion): Update.
14661         * completer.c (complete_expression): Update.
14662         (add_struct_fields): Make fieldname const.
14663         * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
14664         (mark_completion_tag, parse_exp_in_context_1): Update.
14665         (parse_expression_for_completion): Change "name" to
14666         unique_xmalloc_ptr*.
14667
14668 2018-02-21  Tom Tromey  <tom@tromey.com>
14669
14670         * infcall.c (call_function_by_hand_dummy): Use std::vector.
14671
14672 2018-02-21  Yao Qi  <yao.qi@linaro.org>
14673
14674         * avr-tdep.c (avr_read_pc): Change parameter type to
14675         readable_regcache.
14676         * gdbarch.sh (read_pc): Likewise.
14677         * gdbarch.c: Re-generated.
14678         * gdbarch.h: Re-generated.
14679         * hppa-tdep.c (hppa_read_pc): Change parameter type to
14680         readable_regcache.
14681         * ia64-tdep.c (ia64_read_pc): Likewise.
14682         * mips-tdep.c (mips_read_pc): Likewise.
14683         * spu-tdep.c (spu_read_pc): Likewise.
14684
14685 2018-02-21  Yao Qi  <yao.qi@linaro.org>
14686
14687         * Makefile.in (COMMON_SFILES): Add regcache-dump.c
14688         * regcache-dump.c: New file.
14689         * regcache.c: Move register_dump to regcache-dump.c.
14690         (maintenance_print_registers): Likewise.
14691         (maintenance_print_raw_registers): Likewise.
14692         (maintenance_print_cooked_registers): Likewise.
14693         (maintenance_print_register_groups): Likewise.
14694         (maintenance_print_remote_registers): Likewise.
14695         (_initialize_regcache): Likewise.
14696         * regcache.h (register_dump): Moved from regcache.c.
14697
14698 2018-02-21  Yao Qi  <yao.qi@linaro.org>
14699
14700         * regcache.c (regcache::regcache): Update.
14701         (regcache::invalidate): Move it to detached_regcache::invalidate.
14702         (get_thread_arch_aspace_regcache): Update.
14703         (regcache::raw_update): Update.
14704         (regcache::cooked_read): Remove some code.
14705         (regcache::cooked_read_value): Likewise.
14706         (regcache::raw_write): Remove assert on m_readonly_p.
14707         (regcache::raw_supply_integer): Move it to
14708         detached_regcache::raw_supply_integer.
14709         (regcache::raw_supply_zeroed): Likewise.
14710         * regcache.h (detached_regcache) <raw_supply_integer>: New
14711         declaration.
14712         <raw_supply_zeroed, invalidate>: Likewise.
14713         (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
14714         <invalidate>: Likewise.
14715         <m_readonly_p>: Removed.
14716
14717 2018-02-21  Yao Qi  <yao.qi@linaro.org>
14718
14719         * infcmd.c (get_return_value): Let stop_regs point to
14720         get_current_regcache.
14721         * regcache.c (regcache::regcache): Remove.
14722         (register_dump_reg_buffer): New class.
14723         (regcache_print): Adjust.
14724         * regcache.h (regcache): Remove constructors.
14725
14726 2018-02-21  Yao Qi  <yao.qi@linaro.org>
14727
14728         * regcache.c (class register_dump): New class.
14729         (register_dump_regcache, register_dump_none): New class.
14730         (register_dump_remote, register_dump_groups): New class.
14731         (regcache_print): Update.
14732         * regcache.h (regcache_dump_what): Move it to regcache.c.
14733         (regcache) <dump>: Remove.
14734
14735 2018-02-21  Yao Qi  <yao.qi@linaro.org>
14736
14737         * jit.c (struct jit_unwind_private) <regcache>: Change its type to
14738          reg_buffer_rw *.
14739         (jit_unwind_reg_set_impl): Call raw_supply.
14740         (jit_frame_sniffer): Use reg_buffer_rw.
14741         * record-full.c (record_full_core_regbuf): Change its type.
14742         (record_full_core_open_1): Use reg_buffer_rw.
14743         (record_full_close): Likewise.
14744         (record_full_core_fetch_registers): Use regcache->raw_supply.
14745         (record_full_core_store_registers): Likewise.
14746         * regcache.c (regcache::get_register_status): Move it to
14747         reg_buffer.
14748         (regcache_raw_set_cached_value): Remove.
14749         (regcache::raw_set_cached_value): Remove.
14750         (regcache::raw_write): Call raw_supply.
14751         (regcache::raw_supply): Move it to reg_buffer_rw.
14752         * regcache.h (regcache_raw_set_cached_value): Remove.
14753         (reg_buffer_rw): New class.
14754
14755 2018-02-21  Yao Qi  <yao.qi@linaro.org>
14756
14757         * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
14758         readonly_detached_regcache.
14759         (dummy_frame_prev_register): Use regcache->cooked_read.
14760         * frame.c (frame_save_as_regcache): Change return type.
14761         (frame_pop): Update.
14762         * frame.h (frame_save_as_regcache): Update declaration.
14763         * inferior.h (get_infcall_suspend_state_regcache): Update
14764         declaration.
14765         * infrun.c (infcall_suspend_state) <registers>: use
14766         readonly_detached_regcache.
14767         (save_infcall_suspend_state): Don't use regcache_dup.
14768         (get_infcall_suspend_state_regcache): Change return type.
14769         * linux-fork.c (struct fork_info) <savedregs>: Change to
14770         readonly_detached_regcache.
14771         <pc>: New field.
14772         (fork_save_infrun_state): Don't use regcache_dup.
14773         (info_checkpoints_command): Adjust.
14774         * mi/mi-main.c (register_changed_p): Update declaration.
14775         (mi_cmd_data_list_changed_registers): Use
14776         readonly_detached_regcache.
14777         (register_changed_p): Change parameter type to
14778         readonly_detached_regcache.
14779         * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
14780         readonly_detached_regcache.
14781         (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
14782         * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
14783         New.
14784         (regcache::save): Move it to reg_buffer.
14785         (regcache::restore): Change parameter type.
14786         (regcache_dup): Remove.
14787         * regcache.h (reg_buffer) <save>: New method.
14788         (readonly_detached_regcache): New class.
14789         * spu-tdep.c (spu2ppu_cache) <regcache>: Use
14790         readonly_detached_regcache.
14791         (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
14792
14793 2018-02-21  Yao Qi  <yao.qi@linaro.org>
14794
14795         * frame.c (frame_save_as_regcache): Use regcache method save.
14796         (frame_pop): Use regcache method restore.
14797         * infrun.c (restore_infcall_suspend_state): Likewise.
14798         * linux-fork.c (fork_load_infrun_state): Likewise.
14799         * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
14800         save.
14801         * regcache.c (regcache_save): Remove.
14802         (regcache::restore): More asserts.
14803         (regcache_cpy): Remove.
14804         * regcache.h (regcache_save): Remove the declaration.
14805         (regcache::restore): Move from private to public.
14806         Remove the friend declaration of regcache_cpy.
14807         (regcache_cpy): Remove declaration.
14808
14809 2018-02-21  Yao Qi  <yao.qi@linaro.org>
14810
14811         * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
14812         parameter type to 'readable_regcache *'.
14813         * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
14814         * arm-tdep.c (arm_neon_quad_read): Likewise.
14815         (arm_pseudo_read): Likewise.
14816         * avr-tdep.c (avr_pseudo_register_read): Likewise.
14817         * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
14818         * frv-tdep.c (frv_pseudo_register_read): Likewise.
14819         * gdbarch.c: Re-generated.
14820         * gdbarch.h: Re-generated.
14821         * gdbarch.sh (pseudo_register_read): Change parameter type to
14822         'readable_regcache *'.
14823         (pseudo_register_read_value): Likewise.
14824         * h8300-tdep.c (pseudo_from_raw_register): Likewise.
14825         (h8300_pseudo_register_read): Likewise.
14826         * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
14827         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
14828         (i386_pseudo_register_read_into_value): Likewise.
14829         (i386_pseudo_register_read_value): Likewise.
14830         * i386-tdep.h (i386_pseudo_register_read_into_value): Update
14831         declaration.
14832         * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
14833         * m32c-tdep.c (m32c_raw_read): Likewise.
14834         (m32c_read_flg): Likewise.
14835         (m32c_banked_register): Likewise.
14836         (m32c_banked_read): Likewise.
14837         (m32c_sb_read): Likewise.
14838         (m32c_part_read): Likewise.
14839         (m32c_cat_read): Likewise.
14840         (m32c_r3r2r1r0_read): Likewise.
14841         (m32c_pseudo_register_read): Likewise.
14842         * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
14843         * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
14844         (mep_pseudo_cr64_read): Likewise.
14845         (mep_pseudo_register_read): Likewise.
14846         * mips-tdep.c (mips_pseudo_register_read): Likewise.
14847         * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
14848         * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
14849         * regcache.c (regcache::raw_read): Move it to readable_regcache.
14850         (regcache::cooked_read): Likewise.
14851         (regcache::cooked_read_value): Likewise.
14852         (regcache_cooked_read_signed):
14853         (regcache::cooked_read): Likewise.
14854         * regcache.h (readable_regcache): New class.
14855         (regcache): Inherit readable_regcache.  Move some methods to
14856         readable_regcache.
14857         * rl78-tdep.c (rl78_pseudo_register_read): Change
14858         parameter type to 'readable_regcache *'.
14859         * rs6000-tdep.c (do_regcache_raw_read): Remove.
14860         (e500_pseudo_register_read): Change parameter type to
14861         'readable_regcache *'.
14862         (dfp_pseudo_register_read): Likewise.
14863         (vsx_pseudo_register_read): Likewise.
14864         (efpr_pseudo_register_read): Likewise.
14865         * s390-tdep.c (s390_pseudo_register_read): Likewise.
14866         * sh-tdep.c (sh_pseudo_register_read): Likewise.
14867         * sh64-tdep.c (pseudo_register_read_portions): Likewise.
14868         (sh64_pseudo_register_read): Likewise.
14869         * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
14870         * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
14871         * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
14872         (spu_pseudo_register_read): Likewise.
14873         * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
14874         (xtensa_pseudo_register_read): Likewise.
14875
14876 2018-02-21  Yao Qi  <yao.qi@linaro.org>
14877
14878         * regcache.c (regcache::regcache): Call reg_buffer ctor.
14879         (regcache::arch): Move it to reg_buffer::arch.
14880         (regcache::register_buffer): Likewise.
14881         (regcache::assert_regnum): Likewise.
14882         (regcache::num_raw_registers): Likewise.
14883         * regcache.h (reg_buffer): New class.
14884         (regcache): Inherit reg_buffer.
14885
14886 2018-02-20  Simon Marchi  <simon.marchi@ericsson.com>
14887
14888         * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
14889         gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
14890
14891 2018-02-20  Markus Metzger  <markus.t.metzger@intel.com>
14892
14893         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
14894
14895 2018-02-19  Alan Hayward  <alan.hayward@arm.com>
14896
14897         * Makefile.in: (COMMON_SFILES): Add common/*.c files.
14898         (SFILES): Remove common/*.c files.
14899         (COMMON_OBS): Remove some *.o files built from common/*.c files.
14900         * common/common.host: Add common reference.
14901         * configure.ac: Likewise.
14902         * configure: Regenerate.
14903
14904 2018-02-16  Yao Qi  <yao.qi@linaro.org>
14905
14906         * block.c (block_namespace_info): Inherit allocate_on_obstack.
14907         (block_initialize_namespace): Use new.
14908         * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
14909         (dwarf2_free_objfile): Use delete.
14910         * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
14911         (copy_type_recursive): Use new.
14912         * gdb_obstack.h (allocate_on_obstack): New.
14913
14914 2018-02-15  Yao Qi  <yao.qi@linaro.org>
14915
14916         PR gdb/22849
14917         * inferior.c (exit_inferior_1): Reset inf->control.
14918
14919 2018-02-15  Joel Brobecker  <brobecker@adacore.com>
14920
14921         * ada-lang.c (ada_to_fixed_value_create): Delete advance
14922         declaration.
14923
14924 2018-02-14  Pedro Alves  <palves@redhat.com>
14925
14926         * frame-unwind.c (frame_unwind_try_unwinder): Always call
14927         frame_cleanup_after_sniffer on exception.
14928
14929 2018-02-14  Tom Tromey  <tom@tromey.com>
14930
14931         * solist.h (struct target_so_ops) <bfd_open>: Make pathname
14932         const.
14933         (solib_bfd_open): Make pathname const.
14934         * solib.c (solib_bfd_open): Make pathname const.
14935         * solib-spu.c (spu_bfd_fopen): Make name const.
14936         (spu_bfd_open): Make pathname const.
14937         * solib-darwin.c (darwin_bfd_open): Make pathname const.
14938         * solib-aix.c (solib_aix_bfd_open): Make pathname const.
14939
14940 2018-02-14  Tom Tromey  <tom@tromey.com>
14941
14942         * symfile.c (symfile_bfd_open): Update.
14943         * source.h (openp, source_full_path_of, find_and_open_source):
14944         Change argument type to unique_xmalloc_ptr.
14945         * source.c (openp): Take a unique_xmalloc_ptr.
14946         (source_full_path_of, find_and_open_source): Likewise.
14947         (open_source_file, symtab_to_fullname): Update.
14948         * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
14949         unique_xmalloc_ptr.
14950         * solib.c (solib_find_1): Use unique_xmalloc_ptr.
14951         (exec_file_find): Update.
14952         * psymtab.c (psymtab_to_fullname): Update.
14953         * nto-tdep.h (nto_find_and_open_solib): Update.
14954         * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
14955         unique_xmalloc_ptr.
14956         * exec.c (exec_file_attach): Update.
14957         * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
14958         * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
14959
14960 2018-02-14  Tom Tromey  <tom@tromey.com>
14961
14962         * solib.c: Include source.h.
14963         * nto-tdep.c: Include source.h.
14964         * mi/mi-cmd-env.c: Include source.h.
14965         * infcmd.c: Include source.h.
14966         * exec.c: Include source.h.
14967         * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
14968         (add_path, directory_switch, source_path, init_source_path): Move
14969         declarations...
14970         * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
14971         (add_path, directory_switch, source_path, init_source_path):
14972         ...here.
14973
14974 2018-02-14  Tom Tromey  <tom@tromey.com>
14975
14976         * solist.h (exec_file_find, solib_find): Return
14977         unique_xmalloc_ptr.
14978         (solib_bfd_fopen): Take a const char *.
14979         * solib.c (solib_find_1): Return unique_xmalloc_ptr.
14980         (exec_file_find, solib_find): Likewise.
14981         (solib_bfd_fopen): Do not take ownership of "pathname".
14982         (solib_bfd_open): Use unique_xmalloc_ptr.
14983         * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
14984         * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
14985         * infrun.c (follow_exec): Use unique_xmalloc_ptr.
14986         * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
14987
14988 2018-02-14  Joel Brobecker  <brobecker@adacore.com>
14989
14990         * ada-lang.c (name_match_type_from_name): Remove reference to
14991         ada_name_for_lookup in function's documentation.
14992         * ada-lang.h (ada_name_for_lookup): Delete declaration.
14993
14994 2018-02-13  Simon Marchi  <simon.marchi@polymtl.ca>
14995
14996         * defs.h (enum openp_flags): New enum.
14997         (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
14998         Move to enum openp_flags.
14999         (openp_flags): New enum flags.
15000         (openp): Change parameter type to openp_flags.
15001         * source.c (openp): Change parameter type to openp_flags.
15002         * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
15003         * dwarf2read.c (try_open_dwop_file): Use openp_flags.
15004
15005 2018-02-13  Simon Marchi  <simon.marchi@polymtl.ca>
15006
15007         * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
15008         per-command.
15009
15010 2018-02-12  Andrew Burgess  <andrew.burgess@embecosm.com>
15011
15012         * dwarf2read.c (dwarf2_release_queue): Delete function, move body
15013         into...
15014         (class dwarf2_queue_guard): ...the destructor of this new class.
15015         (dw2_do_instantiate_symtab): Create instance of the new class
15016         dwarf2_queue_guard, remove cleanup.
15017
15018 2018-02-09  Tom Tromey  <tom@tromey.com>
15019
15020         * source.c (find_source_lines): Don't reference past the end of
15021         the vector.
15022
15023 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
15024
15025         * remote.c (remote_btrace_maybe_reopen): Change error message.
15026         * btrace.c (btrace_enable): Likewise.
15027         (parse_xml_btrace): Likewise.
15028         (parse_xml_btrace_conf): Likewise.
15029
15030 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
15031
15032         * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
15033         (linux_enable_pt, linux_enable_bts): Call
15034         diagnose_perf_event_open_fail.
15035
15036 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
15037
15038         * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
15039         Remove parameter and change return type.  Update callers.  Move it.
15040         (linux_enable_bts, linux_enable_pt): Improve error message.
15041         (linux_enable_pt): Remove zero buffer size check.
15042         (linux_enable_btrace): Improve error messages.  Remove NULL return
15043         check.
15044
15045 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
15046
15047         * btrace.c (btrace_enable): Remove target_supports_btrace call.
15048         * nat/linux-btrace.c (perf_event_pt_event_type): Move.
15049         (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
15050         (linux_supports_pt, linux_supports_btrace): Remove.
15051         (linux_enable_bts): Call cpu_supports_bts.
15052         * nat/linux-btrace.h (linux_supports_btrace): Remove.
15053         * remote.c (remote_supports_btrace): Remove.
15054         (init_remote_ops): Remove remote_supports_btrace.
15055         * target-delegates.c: Regenerated.
15056         * target.c (target_supports_btrace): Remove.
15057         * target.h (target_ops) <to_supports_btrace>: Remove
15058         (target_supports_btrace): Remove.
15059         * x86-linux-nat.c (x86_linux_create_target): Remove
15060         linux_supports_btrace.
15061
15062 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
15063
15064         * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
15065         btrace failed.
15066         * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
15067         exception and use message in own exception.
15068
15069 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
15070
15071         * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
15072         (perf_event_pt_event_type): Use gdb_file_up.
15073         (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
15074         scoped_fd, and scoped_mmap.
15075
15076 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
15077
15078         * common/scoped_mmap.h: New.
15079         * unittests/scoped_mmap-selftest.c: New.
15080         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
15081         unittests/scoped_mmap-selftest.c.
15082
15083 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
15084
15085         * common/scoped_fd.h: New.
15086         * unittests/scoped_fd-selftest.c: New.
15087         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
15088         unittests/scoped_fd-selftest.c.
15089
15090 2018-02-09  Tom Tromey  <tom@tromey.com>
15091
15092         * auto-load.c (auto_load_section_scripts): Use
15093         gdb::unique_xmalloc_ptr.
15094
15095 2018-02-09  Tom Tromey  <tom@tromey.com>
15096
15097         * auto-load.c (execute_script_contents): Use std::string.
15098
15099 2018-02-09  Joel Brobecker  <brobecker@adacore.com>
15100
15101         * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
15102         Python function, rather than a new command.
15103
15104 2018-02-08  Tom Tromey  <tom@tromey.com>
15105
15106         * solib.c (solib_find_1): Use std::string.
15107         (solib_bfd_fopen): Use unique_xmalloc_ptr.
15108
15109 2018-02-08  Tom Tromey  <tom@tromey.com>
15110
15111         * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
15112
15113 2018-02-08  Tom Tromey  <tom@tromey.com>
15114
15115         * source.c (find_source_lines): Use gdb::def_vector.
15116
15117 2018-02-08  Tom Tromey  <tom@tromey.com>
15118
15119         * macrocmd.c (struct temporary_macro_definition): New.
15120         (macro_define_command): Use temporary_macro_definition.  Remove
15121         cleanups.
15122         (free_macro_definition_ptr): Remove.
15123
15124 2018-02-08  Tom Tromey  <tom@tromey.com>
15125
15126         * macroexp.c (maybe_expand): Use std::string.
15127
15128 2018-02-08  Tom Tromey  <tom@tromey.com>
15129
15130         * macroexp.c (struct macro_buffer): Add initializers for some
15131         members.
15132         (init_buffer, init_shared_buffer, free_buffer)
15133         (free_buffer_return_text): Remove.
15134         (macro_buffer): New constructors.
15135         (~macro_buffer): New destructor.
15136         (macro_buffer::set_shared): New method.
15137         (macro_buffer::resize_buffer, macro_buffer::appendc)
15138         (macro_buffer::appendmem): Now methods, not free functions.
15139         (set_token, append_tokens_without_splicing, stringify)
15140         (macro_stringify): Update.
15141         (gather_arguments): Change return type.  Remove argc_p argument,
15142         add args_ptr argument.  Use std::vector.
15143         (substitute_args): Remove argc argument.  Accept std::vector.
15144         (expand): Update.  Use std::vector.
15145         (scan, macro_expand, macro_expand_next): Update.
15146
15147 2018-02-08  Tom Tromey  <tom@tromey.com>
15148
15149         * symtab.c (default_collect_symbol_completion_matches_break_on):
15150         Use unique_xmalloc_ptr.
15151         * macroscope.h: (sal_macro_scope, user_macro_scope)
15152         (default_macro_scope): Return unique_xmalloc_ptr.
15153         * macroscope.c (sal_macro_scope, user_macro_scope)
15154         (default_macro_scope): Return unique_xmalloc_ptr.
15155         * macroexp.h (macro_expand, macro_expand_once): Return
15156         unique_xmalloc_ptr.
15157         * macroexp.c (macro_expand, macro_expand_once): Return
15158         unique_xmalloc_ptr.
15159         * macrocmd.c (macro_expand_command, macro_expand_once_command)
15160         (info_macro_command, info_macros_command): Use
15161         unique_xmalloc_ptr.
15162         * compile/compile-c-support.c (write_macro_definitions): Use
15163         unique_xmalloc_ptr.
15164         * c-exp.y (c_parse): Use unique_xmalloc_ptr.
15165
15166 2018-02-07  Simon Marchi  <simon.marchi@ericsson.com>
15167
15168         * value.c (value_static_field): Assign field type instead of
15169         containing type when returning an optimized out value.
15170
15171 2018-02-06  Yao Qi  <yao.qi@linaro.org>
15172
15173         * ft32-tdep.c (ft32_read_pc): Remove.
15174         (ft32_write_pc): Remove.
15175         (ft32_gdbarch_init): Update.
15176         * m32r-tdep.c (m32r_read_pc): Remove.
15177         (m32r_gdbarch_init): Update.
15178         * mep-tdep.c (mep_read_pc): Remove.
15179         (mep_gdbarch_init): Update.
15180         * microblaze-tdep.c (microblaze_write_pc): Remove.
15181         (microblaze_gdbarch_init): Update.
15182         * mn10300-tdep.c (mn10300_read_pc): Remove.
15183         (mn10300_write_pc): Remove.
15184         (mn10300_gdbarch_init): Update.
15185         * moxie-tdep.c (moxie_read_pc): Remove.
15186         (moxie_write_pc): Remove.
15187         (moxie_gdbarch_init): Update.
15188
15189 2018-02-06  Yao Qi  <yao.qi@linaro.org>
15190
15191         * expprint.c (print_subexp_standard): Handle
15192         OP_F77_UNDETERMINED_ARGLIST.
15193         (dump_subexp_body_standard): Likewise.
15194
15195 2018-02-05  Alan Hayward  <alan.hayward@arm.com>
15196
15197         * target-descriptions.c (tdesc_element_visitor) Add empty
15198         implementations.
15199         (tdesc_type): Move make_gdb_type from here.
15200         (tdesc_type_builtin): Likewise.
15201         (tdesc_type_vector): Likewise.
15202         (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
15203         (make_gdb_type_struct): Move from tdesc_type_with_fields.
15204         (make_gdb_type_union): Likewise.
15205         (make_gdb_type_flags): Likewise.
15206         (make_gdb_type_enum): Likewise.
15207         (make_gdb_type): New function.
15208         (tdesc_register_type): Use static make_gdb_type.
15209
15210 2018-02-05  Ruslan Kabatsayev <b7.10110111@gmail.com>
15211
15212         * infcmd.c (default_print_one_register_info): Align natural-format
15213         column values consistently one under another.
15214         (pad_to_column): New function.
15215
15216 2018-02-05  Joel Brobecker  <brobecker@adacore.com>
15217
15218         * dwarf2read.c (dwarf2_physname): Move commment.
15219
15220 2018-02-01  Leszek Swirski  <leszeks@google.com>
15221
15222         * varobj.c (varobj_formatted_print_options): Allow recursive
15223         pretty printing if pretty printing is enabled.
15224
15225 2018-02-01  Leszek Swirski  <leszeks@google.com>
15226
15227         * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
15228         names after a structop as a filename.
15229
15230 2018-02-01  Yao Qi  <yao.qi@linaro.org>
15231
15232         * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
15233         (arm_record_coproc_data_proc): Likewise.
15234
15235 2018-02-01  Yao Qi  <yao.qi@linaro.org>
15236
15237         * arm-tdep.c (arm_record_extension_space): Change ret to signed.
15238
15239 2018-01-31  Nikola Prica  <nikola.prica@rt-rk.com>
15240
15241         * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
15242         assign shifted lr_reg to fdata->lr_register when lr_reg is set.
15243
15244 2018-01-31  Pedro Alves  <palves@redhat.com>
15245
15246         * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
15247         * inflow.c (child_terminal_save_inferior): Wrap reference to
15248         tcgetpgrp in HAVE_TERMIOS_H.
15249         (child_interrupt, child_pass_ctrlc): Wrap references to signal in
15250         _WIN32.
15251         * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
15252         always iterate over all inferiors.
15253         (gdbsim_cntrl_c): Adjust.
15254         * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
15255
15256 2018-01-31  Joel Brobecker  <brobecker@adacore.com>
15257
15258         * gdbtypes.c (lookup_array_range_type): Make sure the array's
15259         index type is objfile-owned if the element type is as well.
15260
15261 2018-01-31  Joel Brobecker  <brobecker@adacore.com>
15262
15263         GDB 8.1 released.
15264
15265 2018-01-30  Philipp Rudo  <prudo@linux.vnet.ibm.com>
15266
15267         * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
15268         "features/s390x-linux64.c".
15269         (_initialize_s390_linux_tdep): Remove initialization of tdescs
15270         s390_linux32 and s390x_linux64.
15271         (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
15272         default tdesc.
15273         * s390-tdep.c: Include "features/s390-linux32.c" and
15274         "features/s390x-linux64.c".
15275         (s390_tdesc_valid): Add check for tdesc_has_registers.
15276         (s390_gdbarch_init): Make sure there is always a valid tdesc.
15277         (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
15278         tdesc_s390x_linux64.
15279         * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
15280         tdesc_s390x_linux64 to...
15281         * s390-tdep.h: ...here.
15282
15283 2018-01-30  Pedro Alves  <palves@redhat.com>
15284
15285         PR gdb/13211
15286         * config.in, configure: Regenerate.
15287         * configure.ac: Check for getpgid.
15288         * go32-nat.c (go32_pass_ctrlc): New.
15289         (go32_target): Install it.
15290         * inf-child.c (inf_child_target): Install
15291         child_terminal_save_inferior, child_pass_ctrlc and
15292         child_interrupt.
15293         * inf-ptrace.c (inf_ptrace_interrupt): Delete.
15294         (inf_ptrace_target): No longer install it.
15295         * infcmd.c (interrupt_target_1): Adjust.
15296         * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
15297         (child_interrupt): Declare.
15298         (inferior::terminal_state): New.
15299         * inflow.c (struct terminal_info): Update comments.
15300         (inferior_process_group): Delete.
15301         (terminal_is_ours): Delete.
15302         (gdb_tty_state): New.
15303         (child_terminal_init): Adjust.
15304         (is_gdb_terminal, sharing_input_terminal_1)
15305         (sharing_input_terminal): New functions.
15306         (child_terminal_inferior): Adjust.  Use sharing_input_terminal.
15307         Set the process's actual process group in the foreground if
15308         possible.  Handle is_ours_for_output/is_ours distinction.  Don't
15309         mark terminal as the inferior's if not sharing GDB's terminal.
15310         Don't check attach_flag.
15311         (child_terminal_ours_for_output, child_terminal_ours): Adjust to
15312         pass down a target_terminal_state.
15313         (child_terminal_save_inferior): New, factored out from ...
15314         (child_terminal_ours_1): ... this.  Handle
15315         target_terminal_state::is_ours_for_output.
15316         (child_interrupt, child_pass_ctrlc): New.
15317         (inflow_inferior_exit): Clear the inferior's terminal_state.
15318         (copy_terminal_info): Copy the inferior's terminal state.
15319         (_initialize_inflow): Remove reference to terminal_is_ours.
15320         * inflow.h (inferior_process_group): Delete.
15321         * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
15322         * procfs.c (procfs_target): Don't install procfs_interrupt.
15323         (procfs_interrupt): Delete.
15324         * remote.c (remote_serial_quit_handler): Adjust.
15325         (remote_interrupt): Remove ptid parameter.  Adjust.
15326         * target-delegates.c: Regenerate.
15327         * target.c: Include "terminal.h".
15328         (target_terminal::terminal_state): Rename to ...
15329         (target_terminal::m_terminal_state): ... this.
15330         (target_terminal::init): Adjust.
15331         (target_terminal::inferior): Adjust to per-inferior
15332         terminal_state.
15333         (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
15334         (target_terminal::ours, target_terminal::ours_for_output): Use
15335         target_terminal_is_ours_kind.
15336         (target_interrupt): Remove ptid parameter.  Adjust.
15337         (default_target_pass_ctrlc): Adjust.
15338         * target.h (target_ops::to_terminal_save_inferior): New field.
15339         (target_ops::to_interrupt): Remove ptid_t parameter.
15340         (target_interrupt): Remove ptid_t parameter.  Update comment.
15341         (target_pass_ctrlc): Update comment.
15342         * target/target.h (target_terminal_state): New scoped enum,
15343         factored out of ...
15344         (target_terminal::terminal_state): ... here.
15345         (target_terminal::inferior): Update comments.
15346         (target_terminal::restore_inferior): New.
15347         (target_terminal::is_inferior, target_terminal::is_ours)
15348         (target_terminal::is_ours_for_output): Adjust.
15349         (target_terminal::scoped_restore_terminal_state): Adjust to
15350         rename, and call restore_inferior() instead of inferior().
15351         (target_terminal::scoped_restore_terminal_state::m_state): Change
15352         type.
15353         (target_terminal::terminal_state): Rename to ...
15354         (target_terminal::m_terminal_state): ... this and change type.
15355
15356 2018-01-30  Pedro Alves  <palves@redhat.com>
15357
15358         * linux-nat.c (wait_for_signal): New function.
15359         (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
15360         directly.
15361         (async_terminal_is_ours)
15362         (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
15363         (linux_nat_add_target): Don't override
15364         to_terminal_inferior/to_terminal_ours.
15365
15366 2018-01-29  Sergio Durigan Junior  <sergiodj@redhat.com>
15367
15368         * remote.c (remote_follow_fork): Don't call "detach_inferior".
15369
15370 2018-01-28  Simon Marchi  <simon.marchi@ericsson.com>
15371
15372         * dwarf2read.c (free_dwo_files): Add forward-declaration.
15373         (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
15374         dwarf2_per_objfile_free here.
15375         (dwarf2_per_objfile_free): Remove.
15376         (_initialize_dwarf2_read): Don't register
15377         dwarf2_per_objfile_free as a registry cleanup.
15378
15379 2018-01-27  Eli Zaretskii  <eliz@gnu.org>
15380
15381         Avoid compilation errors in MinGW native builds
15382
15383         The error is triggered by including python-internal.h, and the
15384         error message is:
15385
15386              In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
15387                       from build-gnulib/import/math.h:27,
15388                       from d:/usr/Python26/include/pyport.h:235,
15389                       from d:/usr/Python26/include/Python.h:58,
15390                       from python/python-internal.h:94,
15391                       from python/py-arch.c:24:
15392              d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
15393         using ::hypot;
15394                 ^~~~~
15395
15396         This happens because Python headers define 'hypot' to expand t
15397         '_hypot' in the Windows builds.
15398         * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
15399         'hypoth'.  This avoids a compilation error.
15400
15401 2018-01-26  Alan Hayward  <alan.hayward@arm.com>
15402
15403         * MAINTAINERS (Write After Approval): Fix ordering.
15404
15405 2018-01-26  Alan Hayward  <alan.hayward@arm.com>
15406
15407         * MAINTAINERS (Write After Approval): Add Alan Hayward.
15408
15409 2018-01-26  Alan Modra  <amodra@gmail.com>
15410
15411         * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
15412         (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
15413         Remove nop.  Make const.  Comment.
15414         (powerpc32_plt_stub_so_2): New.
15415         (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
15416         Correct count.  Update uses.
15417         (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
15418         Move common code reading PLT entry word.  Correct
15419         powerpc32_plt_stub PLT address calculation.
15420         * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
15421         (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
15422         (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
15423         (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
15424         (ppc64_standard_linkage8): Likewise.
15425         * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
15426         Correct insns description.
15427         * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
15428
15429 2018-01-24  Pedro Alves  <palves@redhat.com>
15430
15431         GCC PR libstdc++/83906
15432         * gdbtypes.c (operator==(const dynamic_prop &,
15433         const dynamic_prop &)): New.
15434         (operator==(const range_bounds &, const range_bounds &)): New.
15435         (check_types_equal): Use them instead of memcmp.
15436         * gdbtypes.h (operator==(const dynamic_prop &,
15437         const dynamic_prop &)): Declare.
15438         (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
15439         (operator==(const range_bounds &, const range_bounds &)): Declare.
15440         (operator!=(const range_bounds &, const range_bounds &)): Declare.
15441
15442 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
15443
15444         * s390-linux-tdep.c (s390_record_address_mask)
15445         (s390_record_calc_disp_common, s390_record_calc_disp)
15446         (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
15447         (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
15448         (s390_process_record): Move to s390-tdep.c.
15449         (s390_linux_init_abi_any): Adjust.
15450         * s390-tdep.c (s390_record_address_mask)
15451         (s390_record_calc_disp_common, s390_record_calc_disp)
15452         (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
15453         (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
15454         (s390_process_record): Moved from s390-linux-tdep.c
15455         (s390_gdbarch_init): Adjust.
15456
15457 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
15458
15459         * s390-linux-nat.c (s390-tdep.h): New include.
15460         * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
15461         (HFILES_NO_SRCDIR): Add s390-tdep.h.
15462         (ALLDEPFILES): Add s390-tdep.c.
15463         * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
15464         * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
15465         * s390-tdep.h: ...this.  New file.
15466         * s390-linux-tdep.c (s390-tdep.h): New include.
15467         (_initialize_s390_tdep): Rename to...
15468         (_initialize_s390_linux_tdep): ...this and adjust.
15469         (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
15470         (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
15471         s390-tdep.h.
15472         (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
15473         (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
15474         (s390_is_partial_instruction, s390_software_single_step)
15475         (is_non_branch_ril, s390_displaced_step_copy_insn)
15476         (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
15477         (s390_prologue_data, s390_addr, s390_store, s390_load)
15478         (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
15479         (s390_register_call_saved, s390_guess_tracepoint_registers)
15480         (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
15481         (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
15482         (s390_pseudo_register_name, s390_pseudo_register_type)
15483         (s390_pseudo_register_read, s390_pseudo_register_write)
15484         (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
15485         (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
15486         (s390_addr_bits_remove, s390_address_class_type_flags)
15487         (s390_address_class_type_flags_to_name)
15488         (s390_address_class_name_to_type_flags, s390_effective_inner_type)
15489         (s390_function_arg_float, s390_function_arg_vector)
15490         (is_power_of_two, s390_function_arg_integer, s390_arg_state)
15491         (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
15492         (s390_frame_align, s390_register_return_value, s390_return_value)
15493         (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
15494         (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
15495         (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
15496         (s390_trad_frame_prev_register, s390_unwind_cache)
15497         (s390_prologue_frame_unwind_cache)
15498         (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
15499         (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
15500         (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
15501         (s390_stub_frame_this_id, s390_stub_frame_prev_register)
15502         (s390_stub_frame_sniffer, s390_stub_frame_unwind)
15503         (s390_frame_base_address, s390_local_base_address)
15504         (s390_frame_base, s390_gcc_target_options)
15505         (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
15506         (s390_validate_reg_range, s390_tdesc_valid)
15507         (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
15508         * s390-tdep.c: ...this.  New file.
15509
15510 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
15511
15512         * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
15513         (s390_process_record, s390_gdbarch_tdep_alloc)
15514         (s390_linux_init_abi_any): Use/set new hook.
15515
15516 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
15517
15518         * s390-linux-tdep.c (osabi.h): New include.
15519         (s390_linux_init_abi_31, s390_linux_init_abi_64)
15520         (s390_linux_init_abi_any): New functions.
15521         (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
15522
15523 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
15524
15525         * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
15526         tdesc_has_registers check
15527
15528 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
15529
15530         * s390-linux-tdep.c (s390_tdesc_valid): New function.
15531         (s390_validate_reg_range): New macro.
15532         (s390_gdbarch_init): Adjust.
15533
15534 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
15535
15536         * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
15537         (s390_gdbarch_tdep_alloc): Adjust.
15538         (s390_gdbarch_init): Adjust.
15539
15540 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
15541
15542         * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
15543         <have_tdb>: Change type to bool.
15544         (s390_gdbarch_tdep_alloc): Adjust.
15545         (s390_gdbarch_init): Adjust.
15546
15547 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
15548
15549         * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
15550         (gdbarch_tdep) <have_upper, have_vx>: New fields.
15551         (s390_gdbarch_tdep_alloc): New function.
15552         (s390_gdbarch_init): Allocate tdep at start and use its fields
15553         instead of separate variables.
15554
15555 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
15556
15557         * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
15558         when looking for cached gdbarch and add comment for remaining.
15559
15560 2018-01-22  Pedro Alves  <palves@redhat.com>
15561             Sergio Durigan Junior  <sergiodj@redhat.com>
15562
15563         * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
15564         case.
15565
15566 2018-01-22  Maciej W. Rozycki  <macro@mips.com>
15567
15568         * MAINTAINERS: Update my company e-mail address.
15569
15570 2018-01-22  Yao Qi  <yao.qi@linaro.org>
15571
15572         * regcache.c (cooked_write_test): New function.
15573         (_initialize_regcache): Register the test.
15574
15575 2018-01-22  Yao Qi  <yao.qi@linaro.org>
15576
15577         * ia64-tdep.c (ia64_pseudo_register_read): Call
15578         regcache->cooked_read instead of regcache_cooked_read_unsigned.
15579         * m32c-tdep.c (m32c_cat_read): Likewise.
15580         (m32c_r3r2r1r0_read): Likewise.
15581         * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
15582         * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
15583
15584 2018-01-22  Yao Qi  <yao.qi@linaro.org>
15585
15586         * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
15587         method raw_read instead of regcache_raw_read.
15588         * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
15589         * arm-tdep.c (arm_neon_quad_read): Likewise.
15590         * avr-tdep.c (avr_pseudo_register_read): Likewise.
15591         * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
15592         * frv-tdep.c (frv_pseudo_register_read): Likewise.
15593         * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
15594         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
15595         (i386_pseudo_register_read_into_value): Likewise.
15596         * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
15597         * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
15598         * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
15599         * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
15600         * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
15601         * sparc-tdep.c (sparc32_pseudo_register_read):  Likewise.
15602         * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
15603         * spu-tdep.c (spu_pseudo_register_read_spu):  Likewise.
15604         * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
15605
15606 2018-01-22  Yao Qi  <yao.qi@linaro.org>
15607
15608         * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
15609         * configure.tgt: Remove target mt.
15610         * mt-tdep.c: Remove.
15611         * regcache.c (cooked_read_test): Remove the check for mt.
15612
15613 2018-01-22  Yao Qi  <yao.qi@linaro.org>
15614
15615         * jit.c (jit_frame_prev_register): Call regcache::cooked_read
15616         instead of gdbarch_pseudo_register_read_value.
15617
15618 2018-01-22  Joel Brobecker  <brobecker@adacore.com>
15619
15620         * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
15621         language is Ada.
15622
15623 2018-01-22  Joel Brobecker  <brobecker@adacore.com>
15624
15625         * linespec.c (create_sals_line_offset): Remove code that preserved
15626         the symtab_and_line's line number.
15627
15628 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
15629
15630         * varobj.c (varobj_create): Don't set valid_block when creating a
15631         floating varobj.
15632
15633 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
15634
15635         * varobj.c (varobj_create): Remove out of date comment.
15636
15637 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
15638
15639         PR mi/20395
15640         * ada-exp.y (write_var_from_sym): Pass extra parameter when
15641         updating innermost block.
15642         * parse.c (innermost_block_tracker::update): Take extra type
15643         parameter, and check types match before updating innermost block.
15644         (write_dollar_variable): Update innermost block for registers.
15645         * parser-defs.h (enum innermost_block_tracker_type): New enum.
15646         (innermost_block_tracker::innermost_block_tracker): Initialise
15647         m_types member.
15648         (innermost_block_tracker::reset): Take type parameter.
15649         (innermost_block_tracker::update): Take type parameter, and pass
15650         type through as needed.
15651         (innermost_block_tracker::m_types): New member.
15652         * varobj.c (varobj_create): Pass type when reseting innermost
15653         block.
15654
15655 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
15656
15657         * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
15658         * ada-lang.c (resolve_subexp): Likewise.
15659         * breakpoint.c (set_breakpoint_condition) Likewise.
15660         (watch_command_1) Likewise.
15661         * c-exp.y (variable): Likewise.
15662         * d-exp.y (PrimaryExpression): Likewise.
15663         * f-exp.y (variable): Likewise.
15664         * go-exp.y (variable): Likewise.
15665         * m2-exp.y (variable): Likewise.
15666         * objfiles.c (objfile::~objfile): Likewise.
15667         * p-exp.y (variable): Likewise.
15668         * parse.c (innermost_block): Change type.
15669         * parser-defs.h (class innermost_block_tracker): New.
15670         (innermost_block): Change to innermost_block_tracker.
15671         * printcmd.c (display_command): Switch to innermost_block API.
15672         (do_one_display): Likewise.
15673         * rust-exp.y (do_one_display): Likewise.
15674         * symfile.c (clear_symtab_users): Likewise.
15675         * varobj.c (varobj_create): Switch to innermost_block API, replace
15676         use of innermost_block with block stored on varobj object.
15677
15678 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
15679
15680         * expression.h (innermost_block): Remove declaration.
15681         * varobj.c: Add 'parser-defs.h' include.
15682
15683 2018-01-19  Tom Tromey  <tom@tromey.com>
15684
15685         * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
15686         symbols in the static and global blocks.
15687
15688 2018-01-19  James Clarke  <jrtc27@jrtc27.com>
15689
15690         * nat/linux-ptrace.c: Remove unnecessary reinclusion of
15691         gdb_ptrace.h, and move including gdb_wait.h ...
15692         * nat/linux-ptrace.h: ... to here.
15693
15694 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
15695
15696         * inf-ptrace.c (inf_ptrace_detach): Adjust call to
15697         inf_ptrace_detach_success.
15698         (inf_ptrace_detach_success): Add inferior parameter, use it
15699         instead of inferior_ptid, pass it to detach_inferior.
15700         * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
15701         parameter.
15702         * inferior.c (detach_inferior): Add overload that takes an
15703         inferior object.
15704         * inferior.h (detach_inferior): Likewise.
15705         * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
15706         use inferior_ptid, adjust call to inf_ptrace_detach_success.
15707         * linux-thread-db.c (thread_db_detach): Use inf parameter.
15708
15709 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
15710
15711         * target.h (struct target_ops) <to_detach>: Add inferior
15712         parameter.
15713         (target_detach): Likewise.
15714         * target.c (dispose_inferior): Pass inferior down.
15715         (target_detach): Pass inferior down.  Assert that it is equal to
15716         the current inferior.
15717         * aix-thread.c (aix_thread_detach): Pass inferior down.
15718         * corefile.c (core_file_command): Pass current_inferior() down.
15719         * corelow.c (core_detach): Add inferior parameter.
15720         * darwin-nat.c (darwin_detach): Likewise.
15721         * gnu-nat.c (gnu_detach): Likewise.
15722         * inf-ptrace.c (inf_ptrace_detach): Likewise.
15723         * infcmd.c (detach_command): Pass current_inferior() down to
15724         target_detach.
15725         * infrun.c (follow_fork_inferior): Pass parent_inf to
15726         target_detach.
15727         (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
15728         target_detach.
15729         * linux-nat.c (linux_nat_detach): Add inferior parameter.
15730         * linux-thread-db.c (thread_db_detach): Likewise.
15731         * nto-procfs.c (procfs_detach): Likewise.
15732         * procfs.c (procfs_detach): Likewise.
15733         * record.c (record_detach): Likewise.
15734         * record.h (struct inferior): Forward-declare.
15735         (record_detach): Add inferior parameter.
15736         * remote-sim.c (gdbsim_detach): Likewise.
15737         * remote.c (remote_detach_1): Likewise.
15738         (remote_detach): Likewise.
15739         (extended_remote_detach): Likewise.
15740         * sol-thread.c (sol_thread_detach): Likewise.
15741         * target-debug.h (target_debug_print_inferior_p): New macro.
15742         * target-delegates.c: Re-generate.
15743         * top.c (kill_or_detach): Pass inferior down to target_detach.
15744         * windows-nat.c (windows_detach): Add inferior parameter.
15745
15746 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
15747
15748         * target.h (struct target_ops) <to_detach>: Remove args
15749         parameter.
15750         (target_detach): Likewise.
15751         * target.c (dispose_inferior): Adjust.
15752         (target_detach): Remove args parameter, adjust.
15753         * aix-thread.c (aix_thread_detach): Adjust.
15754         * corefile.c (core_file_command): Adjust.
15755         * corelow.c (core_detach): Adjust.
15756         * darwin-nat.c (darwin_detach): Adjust.
15757         * gnu-nat.c (gnu_detach): Adjust.
15758         * inf-ptrace.c (inf_ptrace_detach): Adjust.
15759         * infcmd.c (detach_command): Adjust
15760         * infrun.c (follow_fork_inferior): Adjust.
15761         (handle_vfork_child_exec_or_exit): Adjust.
15762         * linux-fork.c (linux_fork_detach): Remove args parameter.
15763         * linux-fork.h (linux_fork_detach): Likewise.
15764         * linux-nat.c (linux_nat_detach): Likewise, and adjust.
15765         * linux-thread-db.c (thread_db_detach): Likewise.
15766         * nto-procfs.c (procfs_detach): Likewise.
15767         * procfs.c (procfs_detach): Likewise.
15768         (do_detach): Remove signo parameter.
15769         * record.c (record_detach): Remove args parameter.
15770         * record.h (record_detach): Likewise.
15771         * remote-sim.c (gdbsim_detach): Likewise.
15772         * remote.c (remote_detach_1): Likewise.
15773         (remote_detach): Likewise.
15774         (extended_remote_detach): Likewise.
15775         * sol-thread.c (sol_thread_detach): Likewise.
15776         * target-delegates.c: Re-generate.
15777         * top.c (struct qt_args) <args>: Remove field.
15778         (kill_or_detach): Don't pass args.
15779         (quit_force): Don't set args.
15780         * windows-nat.c (windows_detach): Remove args parameter.
15781
15782 2018-01-19  Yao Qi  <yao.qi@linaro.org>
15783
15784         * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
15785         (arm_linux_init_abi): Install it.
15786
15787 2018-01-19  Yao Qi  <yao.qi@linaro.org>
15788
15789         * osabi.c (gdb_osabi_names): Extend the regexp for
15790         arm-linux-gnueabihf.
15791
15792 2018-01-18  Yao Qi  <yao.qi@linaro.org>
15793
15794         * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
15795         m_abbrevs.
15796         (abbrev_table::add_abbrev): Update.
15797         (abbrev_table::lookup_abbrev): Update.
15798
15799 2018-01-18  Yao Qi  <yao.qi@linaro.org>
15800
15801         * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
15802
15803 2018-01-17  Sergio Durigan Junior  <sergiodj@redhat.com>
15804
15805         * compile/compile.c (compile_to_object): Convert "triplet_rx"
15806         to "std::string".
15807
15808 2018-01-17  Tom Tromey  <tom@tromey.com>
15809
15810         * dwarf2read.c (symbolp): Remove typedef.  Don't instantiate VEC.
15811
15812 2018-01-17  Tom Tromey  <tom@tromey.com>
15813
15814         * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
15815         * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
15816         (create_array_type_with_stride): Update.
15817         * dwarf2read.c (set_die_type): Update.
15818
15819 2018-01-17  Tom Tromey  <tom@tromey.com>
15820
15821         * dwarf2read.c (delayed_method_info): Remove typedef.
15822         (dwarf2_cu::method_info): Now a std::vector.
15823         (add_to_method_list): Update.
15824         (free_delayed_list): Remove.
15825         (compute_delayed_physnames): Update.
15826         (process_full_comp_unit, process_full_type_unit): Clear the method
15827         list.  Remove cleanups.
15828         (psymtab_include_file_name): Add name_holder parameter.  Use
15829         unique_xmalloc_ptr.
15830         (dwarf_decode_lines): Update.
15831
15832 2018-01-17  Tom Tromey  <tom@tromey.com>
15833             Simon Marchi  <simon.marchi@ericsson.com>
15834
15835         * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
15836         (dwarf2_per_objfile::free_cached_comp_units)
15837         (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
15838         (init_cutu_and_read_dies_no_follow): Update.
15839         (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
15840         (dwarf2_cu::~dwarf2_cu): New.
15841         (free_heap_comp_unit, free_stack_comp_unit): Remove.
15842         (age_cached_comp_units, free_one_cached_comp_unit): Update.
15843
15844 2018-01-17  Tom Tromey  <tom@tromey.com>
15845             Simon Marchi  <simon.marchi@ericsson.com>
15846
15847         * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
15848         (struct die_reader_specs) <abbrev_table>: New member.
15849         (struct abbrev_table): Add constructor.
15850         <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
15851         <abbrev_obstack>: Now an auto_obstack.
15852         (abbrev_table_up): New typedef.
15853         (init_cu_die_reader): Add abbrev_table parameter.
15854         (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
15855         Add result_dwo_abbrev_table.
15856         (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
15857         (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
15858         Update.
15859         (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
15860         parameter.
15861         (skip_children): Update.
15862         (abbrev_table::alloc_abbrev): Rename from
15863         abbrev_table_alloc_abbrev.
15864         (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
15865         (abbrev_table::lookup_abbrev): Rename from
15866         abbrev_table_lookup_abbrev.
15867         (abbrev_table_read_table): Return abbrev_table_up.
15868         (abbrev_table_free, abbrev_table_free_cleanup)
15869         (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
15870         (load_partial_dies): Update.
15871
15872 2018-01-17  Tom Tromey  <tom@tromey.com>
15873
15874         * dwarf2read.c (dwarf2_compute_name): Update comment.
15875         (read_func_scope, read_variable): Update.
15876         (new_symbol): Remove.
15877         (new_symbol_full): Rename to new_symbol.
15878
15879 2018-01-17  Mike Gulick  <mgulick@mathworks.com>
15880
15881         PR gdb/16577
15882         * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
15883         a warning instead of throwing an error, set section size to 0 and return
15884         NULL.
15885         * gdb_bfd.h (gdb_bfd_map_section): Update description.
15886
15887 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
15888
15889         * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
15890         std::string.
15891         (linux_ptrace_attach_fail_reason_string): Likewise.
15892         * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
15893         Likewise.
15894         (linux_ptrace_attach_fail_reason_string): Likewise.
15895         * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
15896
15897 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
15898
15899         * linux-nat.c (linux_nat_attach): Remove xstrdup.
15900
15901 2018-01-17  Eldar Abusalimov  <eldar.abusalimov@jetbrains.com>
15902
15903         PR gdb/21559
15904         * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
15905         checking for fs_base/gs_base fields in struct user_regs_struct.
15906         * configure: Regenerate.
15907
15908 2018-01-17  Yao Qi  <yao.qi@linaro.org>
15909
15910         * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
15911         function.
15912         (aarch64_linux_init_abi): Install it to gdbarch hook
15913         gcc_target_options.
15914
15915 2018-01-15  Pedro Alves  <palves@redhat.com>
15916
15917         * common/signals-state-save-restore.c
15918         (save_original_signals_state): Fix typos.
15919
15920 2017-01-12  Tom Tromey  <tom@tromey.com>
15921             Sergio Durigan Junior  <sergiodj@redhat.com>
15922
15923         * Makefile.in (install-only): Install gdb-add-index.
15924
15925 2018-01-12  John Baldwin  <jhb@FreeBSD.org>
15926
15927         * fbsd-tdep.c (KVE_PROTECTION): Correct value.
15928
15929 2018-01-12  Andreas Arnez  <arnez@linux.vnet.ibm.com>
15930
15931         * infrun.c (keep_going_pass_signal): Clear step-over info when
15932         insert_breakpoints fails.
15933
15934 2018-01-11  Pedro Alves  <palves@redhat.com>
15935
15936         PR gdb/22583
15937         * infrun.c (resume): Rename to ...
15938         (resume_1): ... this.
15939         (resume): Reimplement as wrapper around resume_1.
15940
15941 2018-01-11  Pedro Alves  <palves@redhat.com>
15942
15943         PR remote/22597
15944         * remote.c (remote_parse_stop_reply): Default to the last-set
15945         general thread instead of to 'magic_null_ptid'.
15946
15947 2018-01-10  Pedro Alves  <palves@redhat.com>
15948
15949         * language.h (language_get_symbol_name_matcher): Rename ...
15950         (get_symbol_name_matcher): ... this.
15951         * language.c (language_get_symbol_name_matcher): Ditto.
15952         * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
15953         callers adjusted.
15954
15955 2018-01-10  Pedro Alves  <palves@redhat.com>
15956
15957         PR gdb/22670
15958         * dwarf2read.c
15959         (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
15960         Adjust to use language_get_symbol_name_matcher instead of
15961         language_defn::la_get_symbol_name_matcher.
15962         * language.c (language_get_symbol_name_matcher): If in Ada mode
15963         and the lookup name is a verbatim match, return Ada's matcher.
15964         * language.h (language_get_symbol_name_matcher): Adjust comment.
15965         (ada_lookup_name_info::verbatim_p):: New method.
15966
15967 2018-01-10  Pedro Alves  <palves@redhat.com>
15968
15969         PR gdb/22670
15970         * ada-lang.c (ada_collect_symbol_completion_matches): If the
15971         minsym's language is language_auto or language_cplus, pass down
15972         language_ada instead.
15973         * symtab.c (compare_symbol_name): Don't frob symbol language here.
15974
15975 2018-01-10  Pedro Alves  <palves@redhat.com>
15976
15977         PR gdb/22670
15978         * minsyms.c (linkage_name_str): New function.
15979         (iterate_over_minimal_symbols): Use it.
15980
15981 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
15982
15983         * NEWS: Document that 'info proc' now works on FreeBSD.
15984
15985 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
15986
15987         * configure.ac: Check for kinfo_getfile in libutil.
15988         * configure: Regenerate.
15989         * config.in: Regenerate.
15990         * fbsd-nat.c: Include "fbsd-tdep.h".
15991         (fbsd_fetch_cmdline): New.
15992         (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
15993         rather than calling error.
15994         (fbsd_info_proc): New.
15995         (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
15996         (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
15997         (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
15998
15999 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
16000
16001         * fbsd-nat.c (struct free_deleter): Remove.
16002         (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
16003
16004 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
16005
16006         * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
16007         NULL for an empty pathname.
16008
16009 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
16010
16011         * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
16012         (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
16013         (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
16014         (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
16015         (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
16016         (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
16017         (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
16018         (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
16019         (kinfo_proc_layout_32, kinfo_proc_layout_i386)
16020         (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
16021         (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
16022         (fbsd_core_fetch_timeval, fbsd_print_sigset)
16023         (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
16024         (fbsd_init_abi):  Install gdbarch "core_info_proc" method.
16025         * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
16026
16027 2018-01-08  Samuel Thibault  <samuel.thibault@ens-lyon.org>
16028
16029         * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
16030         (gnu_xfer_auxv): New function.
16031         (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
16032         TARGET_OBJECT_AUXV.
16033
16034 2018-01-08  Yao Qi  <yao.qi@linaro.org>
16035             Simon Marchi  <simon.marchi@ericsson.com>
16036
16037         * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
16038         common/selftest.c.
16039         (COMMON_OBS): Remove selftest.o.
16040         * configure.ac: Append selftest-arch.c and common/selftest.c to
16041         CONFIG_SRCS.  Append selftest-arch.o and selftest.o to COMMON_OBS.
16042         * configure: Re-generated.
16043         * maint.c (maintenance_selftest): Wrap selftests::run_tests with
16044         GDB_SELF_TEST.
16045         (maintenance_info_selftests): Likewise.
16046
16047 2018-01-08  Xavier Roirand  <roirand@adacore.com>
16048
16049         * ada-valprint.c (val_print_packed_array_elements): Use
16050         proper number of elements when printing an array indexed
16051         by an enumeration type.
16052
16053 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
16054
16055         * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
16056         (dw2_get_file_names_reader): Adjust.
16057         (lookup_dwo_signatured_type): Adjust.
16058         (lookup_dwp_signatured_type): Adjust.
16059         (lookup_signatured_type): Adjust.
16060         (create_type_unit_group): Adjust.
16061         (get_type_unit_group): Adjust.
16062         (process_psymtab_comp_unit_reader): Adjust.
16063         (build_type_psymtabs_reader): Adjust.
16064         (scan_partial_symbols): Adjust.
16065         (add_partial_symbol): Adjust.
16066         (add_partial_subprogram): Adjust.
16067         (peek_die_abbrev): Adjust.
16068         (fixup_go_packaging): Adjust.
16069         (process_imported_unit_die): Adjust.
16070         (dwarf2_compute_name): Adjust.
16071         (dwarf2_physname): Adjust.
16072         (read_import_statement): Adjust.
16073         (handle_DW_AT_stmt_list): Adjust.
16074         (read_file_scope): Adjust.
16075         (read_func_scope): Adjust.
16076         (read_lexical_block_scope): Adjust.
16077         (read_call_site_scope): Adjust.
16078         (read_variable): Adjust.
16079         (dwarf2_rnglists_process): Adjust.
16080         (dwarf2_ranges_process): Adjust.
16081         (dwarf2_ranges_read): Adjust.
16082         (dwarf2_get_pc_bounds): Adjust.
16083         (dwarf2_record_block_ranges): Adjust.
16084         (dwarf2_add_field): Adjust.
16085         (dwarf2_add_member_fn): Adjust.
16086         (read_structure_type): Adjust.
16087         (process_structure_scope): Adjust.
16088         (read_enumeration_type): Adjust.
16089         (read_array_type): Adjust.
16090         (mark_common_block_symbol_computed): Adjust.
16091         (read_common_block): Adjust.
16092         (read_namespace_type): Adjust.
16093         (read_namespace): Adjust.
16094         (read_module_type): Adjust.
16095         (read_tag_pointer_type): Adjust.
16096         (read_tag_ptr_to_member_type): Adjust.
16097         (read_tag_string_type): Adjust.
16098         (read_subroutine_type): Adjust.
16099         (read_typedef): Adjust.
16100         (read_base_type): Adjust.
16101         (attr_to_dynamic_prop): Adjust.
16102         (read_subrange_type): Adjust.
16103         (read_unspecified_type): Adjust.
16104         (dwarf2_read_abbrevs): Adjust.
16105         (load_partial_dies): Adjust.
16106         (read_partial_die): Adjust.
16107         (find_partial_die): Adjust.
16108         (guess_partial_die_structure_name): Adjust.
16109         (fixup_partial_die): Adjust.
16110         (read_attribute_value): Adjust.
16111         (read_addr_index): Adjust.
16112         (read_addr_index_from_leb128): Adjust.
16113         (read_str_index): Adjust.
16114         (dwarf2_string_attr): Adjust.
16115         (get_debug_line_section): Adjust.
16116         (dwarf_decode_line_header): Adjust.
16117         (lnp_state_machine::check_line_address): Adjust.
16118         (dwarf_decode_lines_1): Adjust.
16119         (dwarf_decode_lines): Adjust.
16120         (dwarf2_start_symtab): Adjust.
16121         (var_decode_location): Adjust.
16122         (new_symbol_full): Adjust.
16123         (dwarf2_const_value_data): Adjust.
16124         (dwarf2_const_value_attr): Adjust.
16125         (dwarf2_const_value): Adjust.
16126         (die_type): Adjust.
16127         (die_containing_type): Adjust.
16128         (build_error_marker_type): Adjust.
16129         (lookup_die_type): Adjust.
16130         (guess_full_die_structure_name): Adjust.
16131         (anonymous_struct_prefix): Adjust.
16132         (determine_prefix): Adjust.
16133         (dwarf2_name): Adjust.
16134         (follow_die_ref_or_sig): Adjust.
16135         (follow_die_offset): Adjust.
16136         (follow_die_ref): Adjust.
16137         (follow_die_sig_1): Adjust.
16138         (follow_die_sig): Adjust.
16139         (get_signatured_type): Adjust.
16140         (get_DW_AT_signature_type): Adjust.
16141         (decode_locdesc): Adjust.
16142         (dwarf_decode_macros): Adjust.
16143         (cu_debug_loc_section): Adjust.
16144         (fill_in_loclist_baton): Adjust.
16145         (dwarf2_symbol_mark_computed): Adjust.
16146         (init_one_comp_unit): Don't assign
16147         dwarf2_cu::dwarf2_per_objfile.
16148         (set_die_type): Adjust.
16149
16150 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
16151
16152         * dwarf2read.c (struct mapped_debug_names): Add constructor.
16153         <dwarf2_per_objfile>: New field.
16154         (dwarf2_per_objfile): Remove global.
16155         (get_dwarf2_per_objfile): New function.
16156         (set_dwarf2_per_objfile): New function.
16157         (dwarf2_build_psymtabs_hard): Change objfile parameter to
16158         dwarf2_per_objfile.
16159         (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
16160         (read_abbrev_offset): Likewise.
16161         (read_indirect_string): Likewise.
16162         (read_indirect_line_string): Likewise.
16163         (read_indirect_string_at_offset): Likewise.
16164         (read_indirect_string_from_dwz): Likewise.
16165         (dwarf2_find_containing_comp_unit): Change objfile parameter to
16166         dwarf2_per_objfile.
16167         (age_cached_comp_units): Add dwarf2_per_objfile parameter.
16168         (create_all_comp_units): Change objfile parameter to
16169         dwarf2_per_objfile.
16170         (create_all_type_units): Likewise.
16171         (process_queue): Add dwarf2_per_objfile parameter.
16172         (read_and_check_comp_unit_head): Likewise.
16173         (lookup_dwo_unit_in_dwp): Likewise.
16174         (get_dwp_file): Likewise.
16175         (process_cu_includes): Likewise.
16176         (struct free_dwo_file_cleanup_data): New struct.
16177         (dwarf2_has_info): Use get_dwarf2_per_objfile and
16178         set_dwarf2_per_objfile.
16179         (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
16180         (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
16181         context, adjust calls.
16182         (dw2_instantiate_symtab): Likewise.
16183         (dw2_get_cutu): Add dwarf2_per_objfile parameter.
16184         (dw2_get_cu): Likewise.
16185         (create_cu_from_index_list): Change objfile parameter to
16186         dwarf2_per_objfile.
16187         (create_cus_from_index_list): Get dwarf2_per_objfile from
16188         context, adjust calls.
16189         (create_cus_from_index): Likewise.
16190         (create_signatured_type_table_from_index): Change objfile
16191         parameter to dwarf2_per_objfile.
16192         (create_signatured_type_table_from_debug_names): Change objfile
16193         parameter to dwarf2_per_objfile.
16194         (create_addrmap_from_index): Likewise.
16195         (create_addrmap_from_aranges): Likewise.
16196         (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
16197         (dw2_setup): Remove.
16198         (dw2_get_file_names_reader): Get dwarf2_per_objfile from
16199         context.
16200         (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
16201         get_dwarf2_per_objfile.
16202         (dw2_forget_cached_source_info): Likewise.
16203         (dw2_map_symtabs_matching_filename): Likewise.
16204         (struct dw2_symtab_iterator) <index>: Remove.
16205         <dwarf2_per_objfile>: New field.
16206         (dw2_symtab_iter_init): Replace index parameter with
16207         dwarf2_per_objfile.
16208         (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
16209         (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
16210         (dw2_print_stats): Likewise.
16211         (dw2_dump): Likewise.
16212         (dw2_expand_symtabs_for_function): Likewise.
16213         (dw2_expand_all_symtabs): Likewise.
16214         (dw2_expand_symtabs_with_fullname): Likewise.
16215         (dw2_expand_marked_cus): Replace index and objfile parameters
16216         with dwarf2_per_objfile.
16217         (dw_expand_symtabs_matching_file_matcher): Add
16218         dwarf2_per_objfile parameter and adjust calls.
16219         (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
16220         adjust calls.
16221         (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
16222         (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
16223         adjust calls.
16224         (create_cus_from_debug_names_list): Replace objfile parameter
16225         with dwarf2_per_objfile and adjust calls.
16226         (create_cus_from_debug_names): Likewise.
16227         (dwarf2_read_debug_names): Likewise.
16228         (mapped_debug_names::namei_to_name): Adjust call.
16229         (dw2_debug_names_iterator::next): Likewise.
16230         (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
16231         (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
16232         (dw2_debug_names_dump): Likewise.
16233         (dw2_debug_names_expand_symtabs_for_function): Likewise.
16234         (dw2_debug_names_expand_symtabs_matching): Likewise.
16235         (dwarf2_initialize_objfile): Likewise.
16236         (dwarf2_build_psymtabs): Likewise.
16237         (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
16238         this_cu.
16239         (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
16240         (read_and_check_comp_unit_head): Likewise.
16241         (read_abbrev_offset): Likewise.
16242         (create_debug_type_hash_table): Likewise.
16243         (create_debug_types_hash_table): Likewise.
16244         (create_all_type_units): Replace objfile parameter with
16245         dwarf2_per_objfile.
16246         (add_type_unit): Add dwarf2_per_objfile parameter.
16247         (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
16248         with dwarf2_per_objfile.
16249         (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
16250         (lookup_dwp_signatured_type): Likewise.
16251         (lookup_signatured_type): Likewise.
16252         (read_cutu_die_from_dwo): Likewise.
16253         (init_tu_and_read_dwo_dies): Likewise.
16254         (init_cutu_and_read_dies): Likewise.
16255         (init_cutu_and_read_dies_no_follow): Likewise.
16256         (allocate_type_unit_groups_table): Add objfile parameter.
16257         (create_type_unit_group): Use dwarf2_per_objfile from cu.
16258         (get_type_unit_group): Likewise.
16259         (process_psymtab_comp_unit): Update call.
16260         (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
16261         (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
16262         (print_tu_stats): Likewise.
16263         (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
16264         in void* parameter.
16265         (build_type_psymtabs): Change objfile parameter to
16266         dwarf2_per_objfile.
16267         (process_skeletonless_type_unit): Use dwarf2_per_objfile
16268         passed in void* parameter.
16269         (process_skeletonless_type_units): Change objfile parameter to
16270         dwarf2_per_objfile.
16271         (set_partial_user): Likewise.
16272         (dwarf2_build_psymtabs_hard): Likewise.
16273         (read_comp_units_from_section): Likewise.
16274         (create_all_comp_units): Likewise.
16275         (scan_partial_symbols): Update calls.
16276         (add_partial_symbol): Likewise.
16277         (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
16278         (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
16279         (process_queue): Add dwarf2_per_objfile parameter.
16280         (get_compunit_symtab): Use dwarf2_per_objfile from cu.
16281         (compute_compunit_symtab_includes): Likewise.
16282         (process_cu_includes): Add dwarf2_per_objfile parameter.
16283         (process_full_comp_unit): Use dwarf2_per_objfile from cu.
16284         (process_full_type_unit): Likewise.
16285         (process_imported_unit_die): Update call.
16286         (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
16287         (read_file_scope): Likewise.
16288         (allocate_dwo_file_hash_table): Add objfile parameter.
16289         (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
16290         (create_cus_hash_table): Likewise.
16291         (create_dwp_hash_table): Likewise.
16292         (create_dwo_unit_in_dwp_v1): Likewise.
16293         (create_dwp_v2_section): Likewise.
16294         (create_dwo_unit_in_dwp_v2): Likewise.
16295         (lookup_dwo_unit_in_dwp): Likewise.
16296         (try_open_dwop_file): Likewise.
16297         (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
16298         (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
16299         cleanup to include a reference to dwarf2_per_objfile.
16300         (open_dwp_file): Add dwarf2_per_objfile parameter.
16301         (open_and_init_dwp_file): Likewise.
16302         (get_dwp_file): Likewise.
16303         (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
16304         (queue_and_load_all_dwo_tus): Update call.
16305         (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
16306         data.
16307         (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
16308         (dwarf2_ranges_process): Likewise.
16309         (dwarf2_get_pc_bounds): Likewise.
16310         (mark_common_block_symbol_computed): Likewise.
16311         (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
16312         (dwarf2_read_abbrevs): Update call.
16313         (read_partial_die): Use dwarf2_per_objfile from cu.
16314         (find_partial_die): Likewise.
16315         (fixup_partial_die): Likewise.
16316         (read_attribute_value): Likewise.
16317         (read_indirect_string_at_offset_from): Add objfile parameter.
16318         (read_indirect_string_at_offset): Add dwarf2_per_objfile
16319         parameter.
16320         (read_indirect_string_from_dwz): Add objfile parameter.
16321         (read_indirect_string): Add objfile parameter.
16322         (read_addr_index_1): Add dwarf2_per_objfile parameter.
16323         (read_addr_index): Use dwarf2_per_objfile from cu.
16324         (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
16325         call dw2_setup.
16326         (read_str_index): Use dwarf2_per_objfile from cu.
16327         (get_debug_line_section): Likewise.
16328         (read_formatted_entries): Add dwarf2_per_objfile parameter.
16329         (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
16330         (new_symbol_full): Use dwarf2_per_objfile from cu.
16331         (build_error_marker_type): Likewise.
16332         (lookup_die_type): Likewise.
16333         (determine_prefix): Likewise.
16334         (follow_die_offset): Likewise.
16335         (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
16336         (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
16337         (dwarf2_fetch_die_type_sect_off): Likewise.
16338         (dwarf2_get_die_type): Likewise.
16339         (follow_die_sig_1): Use dwarf2_per_objfile from cu.
16340         (get_signatured_type): Likewise.
16341         (get_DW_AT_signature_type): Likewise.
16342         (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
16343         (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
16344         (cu_debug_loc_section): Likewise.
16345         (fill_in_loclist_baton): Likewise.
16346         (dwarf2_symbol_mark_computed): Likewise.
16347         (dwarf2_find_containing_comp_unit): Change objfile parameter to
16348         dwarf2_per_objfile.
16349         (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
16350         parameter.
16351         (age_cached_comp_units): Add dwarf2_per_objfile parameter.
16352         (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
16353         (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
16354         (set_die_type): Use dwarf2_free_objfile from cu.
16355         (get_die_type_at_offset): Likewise.
16356         (dwarf2_per_objfile_free): Don't assign global variable.
16357         (debug_names) <constructor>: Add dwarf2_per_objfile
16358         parameter, update m_debugstrlookup construction.
16359         (debug_names::debug_str_lookup): Add dwarf2_per_objfile
16360         parameter.
16361         <m_dwarf2_per_objfile>: New field.
16362         <lookup>: Use m_dwarf2_per_objfile.
16363         (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
16364         (psyms_seen_size): Likewise.
16365         (write_gdbindex): Replace objfile parameter with
16366         dwarf2_per_objfile.
16367         (write_debug_names): Likewise.
16368         (write_psymtabs_to_index): Likewise.
16369         (save_gdb_index_command): Use get_dwarf2_per_objfile, update
16370         calls.
16371
16372 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
16373
16374         * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
16375         <dwarf2_per_objfile>: New field.
16376         (struct dwarf2_per_cu_data) <objfile>: Remove.
16377         <dwarf2_per_objfile>: New field.
16378         (create_cu_from_index_list): Assign dwarf2_per_objfile instead
16379         of objfile.
16380         (create_signatured_type_table_from_index): Likewise.
16381         (create_debug_type_hash_table): Likewise.
16382         (fill_in_sig_entry_from_dwo_entry): Likewise.
16383         (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
16384         (create_type_unit_group): Assign dwarf2_per_objfile instead of
16385         objfile.
16386         (create_partial_symtab): Access objfile through
16387         dwarf2_per_objfile.
16388         (process_psymtab_comp_unit_reader): Likewise.
16389         (read_comp_units_from_section): Likewise.
16390         (scan_partial_symbols): Likewise.
16391         (add_partial_symbol): Likewise.
16392         (add_partial_subprogram): Likewise.
16393         (peek_die_abbrev): Likewise.
16394         (fixup_go_packaging): Likewise.
16395         (process_full_comp_unit): Likewise.
16396         (process_full_type_unit): Likewise.
16397         (process_imported_unit_die): Likewise.
16398         (dwarf2_compute_name): Likewise.
16399         (dwarf2_physname): Likewise.
16400         (read_import_statement): Likewise.
16401         (create_cus_hash_table): Assign dwarf2_physname instead of
16402         objfile.
16403         (read_func_scope): Access objfile through dwarf2_per_objfile.
16404         (read_lexical_block_scope): Likewise.
16405         (read_call_site_scope): Likewise.
16406         (read_variable): Likewise.
16407         (dwarf2_rnglists_process): Likewise.
16408         (dwarf2_ranges_process): Likewise.
16409         (dwarf2_ranges_read): Likewise.
16410         (dwarf2_record_block_ranges): Likewise.
16411         (dwarf2_add_field): Likewise.
16412         (dwarf2_add_member_fn): Likewise.
16413         (read_structure_type): Likewise.
16414         (process_structure_scope): Likewise.
16415         (read_enumeration_type): Likewise.
16416         (read_array_type): Likewise.
16417         (read_common_block): Likewise.
16418         (read_namespace_type): Likewise.
16419         (read_namespace): Likewise.
16420         (read_module_type): Likewise.
16421         (read_tag_pointer_type): Likewise.
16422         (read_tag_ptr_to_member_type): Likewise.
16423         (read_tag_string_type): Likewise.
16424         (read_subroutine_type): Likewise.
16425         (read_typedef): Likewise.
16426         (read_base_type): Likewise.
16427         (attr_to_dynamic_prop): Likewise.
16428         (read_subrange_type): Likewise.
16429         (read_unspecified_type): Likewise.
16430         (load_partial_dies): Likewise.
16431         (read_partial_die): Likewise.
16432         (find_partial_die): Likewise.
16433         (guess_partial_die_structure_name): Likewise.
16434         (fixup_partial_die): Likewise.
16435         (read_attribute_value): Likewise.
16436         (read_addr_index_from_leb128): Likewise.
16437         (dwarf2_read_addr_index): Likewise.
16438         (dwarf2_string_attr): Likewise.
16439         (lnp_state_machine::check_line_address): Likewise.
16440         (dwarf_decode_lines_1): Likewise.
16441         (dwarf_decode_lines): Likewise.
16442         (dwarf2_start_symtab): Likewise.
16443         (var_decode_location): Likewise.
16444         (new_symbol_full): Likewise.
16445         (dwarf2_const_value_data): Likewise.
16446         (dwarf2_const_value_attr): Likewise.
16447         (dwarf2_const_value): Likewise.
16448         (die_type): Likewise.
16449         (die_containing_type): Likewise.
16450         (lookup_die_type): Likewise.
16451         (guess_full_die_structure_name): Likewise.
16452         (anonymous_struct_prefix): Likewise.
16453         (dwarf2_name): Likewise.
16454         (follow_die_ref_or_sig): Likewise.
16455         (follow_die_offset): Likewise.
16456         (follow_die_ref): Likewise.
16457         (dwarf2_fetch_die_loc_sect_off): Likewise.
16458         (dwarf2_fetch_constant_bytes): Likewise.
16459         (dwarf2_fetch_die_type_sect_off): Likewise.
16460         (dwarf2_get_die_type): Likewise.
16461         (follow_die_sig): Likewise.
16462         (decode_locdesc): Likewise.
16463         (dwarf2_per_cu_objfile): Likewise.
16464         (dwarf2_per_cu_text_offset): Likewise.
16465         (init_one_comp_unit): Assign dwarf2_per_objfile instead of
16466         objfile.
16467         (set_die_type): Access objfile through
16468         dwarf2_per_objfile.
16469
16470 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
16471
16472         * valprint.c (converted_character_d): Remove typedef.
16473         (DEF_VEC_O (converted_character_d)): Remove.
16474         (count_next_character): Use std::vector.
16475         (print_converted_chars_to_obstack): Likewise.
16476         (generic_printstr): Likewise.
16477
16478 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
16479
16480         * xml-support.h (struct gdb_xml_value): Add constructor.
16481         <value>: Change type to unique_xmalloc_ptr.
16482         (gdb_xml_value_s): Remove typedef.
16483         (DEF_VEC_O (gdb_xml_value_s)): Remove.
16484         (gdb_xml_element_start_handler): Change parameter type to
16485         std::vector.
16486         (xml_find_attribute): Likewise.
16487         * xml-support.c (xml_find_attribute): Change parameter type to
16488         std::vector and adjust.
16489         (gdb_xml_values_cleanup): Remove.
16490         (gdb_xml_parser::start_element): Adjust to std::vector.
16491         (xinclude_start_include): Change paraeter type to std::vector
16492         and adjust.
16493         * btrace.c (check_xml_btrace_version): Likewise.
16494         (parse_xml_btrace_block): Likewise.
16495         (parse_xml_btrace_pt_config_cpu): Likewise.
16496         (parse_xml_btrace_pt): Likewise.
16497         (parse_xml_btrace_conf_bts): Likewise.
16498         (parse_xml_btrace_conf_pt): Likewise.
16499         * memory-map.c (memory_map_start_memory): Likewise.
16500         (memory_map_start_property): Likewise.
16501         * osdata.c (osdata_start_osdata): Likewise.
16502         (osdata_start_item): Likewise.
16503         (osdata_start_column): Likewise.
16504         * remote.c (start_thread): Likewise.
16505         * solib-aix.c (library_list_start_library): Likewise.
16506         (library_list_start_list): Likewise.
16507         * solib-svr4.c (library_list_start_library): Likewise.
16508         (svr4_library_list_start_list): Likewise.
16509         * solib-target.c (library_list_start_segment): Likewise.
16510         (library_list_start_section): Likewise.
16511         (library_list_start_library): Likewise.
16512         (library_list_start_list): Likewise.
16513         * tracepoint.c (traceframe_info_start_memory): Likewise.
16514         (traceframe_info_start_tvar): Likewise.
16515         * xml-syscall.c (syscall_start_syscall): Likewise.
16516         * xml-tdesc.c (tdesc_start_target): Likewise.
16517         (tdesc_start_feature): Likewise.
16518         (tdesc_start_reg): Likewise.
16519         (tdesc_start_union): Likewise.
16520         (tdesc_start_struct): Likewise.
16521         (tdesc_start_flags): Likewise.
16522         (tdesc_start_enum): Likewise.
16523         (tdesc_start_field): Likewise.
16524         (tdesc_start_enum_value): Likewise.
16525         (tdesc_start_vector): Likewise.
16526
16527 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
16528
16529         * extension.h (struct xmethod_worker) <clone>: Remove.
16530         * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
16531         Remove.
16532         (python_xmethod_worker::clone): Remove.
16533         * valops.c (find_overload_match): Use std::move instead of
16534         clone.
16535
16536 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
16537
16538         * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
16539         (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
16540         <free_xmethod_worker_data>: Remove.
16541         <get_matching_xmethod_workers>: Chance VEC to std::vector.
16542         <get_xmethod_arg_types>: Remove.
16543         <get_xmethod_result_type>: Remove.
16544         <invoke_xmethod>: Remove.
16545         * extension.c (new_xmethod_worker): Remove.
16546         (clone_xmethod_worker): Remove.
16547         (get_matching_xmethod_workers): Return void, pass std::vector by
16548         pointer.
16549         (get_xmethod_arg_types): Rename to...
16550         (xmethod_worker::get_arg_types): ... this, and adjust.
16551         (get_xmethod_result_type): Rename to...
16552         (xmethod_worker::get_result_type): ... this, and adjust.
16553         (invoke_xmethod): Remove.
16554         (free_xmethod_worker): Remove.
16555         (free_xmethod_worker_vec): Remove.
16556         * extension.h (enum ext_lang_rc): Move here from
16557         extension-priv.h.
16558         (struct xmethod_worker): Add constructor and destructor.
16559         <data>: Remove.
16560         <value>: Remove.
16561         <invoke, clone, do_get_result_type, do_get_arg_types>: New
16562         virtual pure methods.
16563         <get_arg_types, get_result_type>: New methods.
16564         (xmethod_worker_ptr): Remove typedef.
16565         (DEF_VEC_P (xmethod_worker_ptr)): Remove.
16566         (xmethod_worker_vec): Remove typedef.
16567         (xmethod_worker_up): New typedef.
16568         (invoke_xmethod): Remove.
16569         (clone_xmethod_worker): Remove.
16570         (free_xmethod_worker): Remove.
16571         (free_xmethod_worker_vec): Remove.
16572         (get_xmethod_arg_types): Remove.
16573         (get_xmethod_result_type): Remove.
16574         * valops.c (find_method_list): Use std::vector, don't use
16575         intermediate vector.
16576         (value_find_oload_method_list): Use std::vector.
16577         (find_overload_match): Use std::vector.
16578         (find_oload_champ): Use std::vector.
16579         * value.c (value_free): Use operator delete.
16580         (value_of_xmethod): Rename to...
16581         (value_from_xmethod): ... this.  Don't assign
16582         xmethod_worker::value, take rvalue-reference.
16583         (result_type_of_xmethod): Adjust.
16584         (call_xmethod): Adjust.
16585         * value.h: Include extension.h.
16586         (struct xmethod_worker): Don't forward-declare.
16587         (value_of_xmethod): Rename to...
16588         (value_from_xmethod): ... this, take rvalue-reference.
16589         * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
16590         (struct python_xmethod_worker): ... this, add constructor and
16591         destructor.
16592         <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
16593         (gdbpy_free_xmethod_worker_data): Rename to...
16594         (python_xmethod_worker::~python_xmethod_worker): ... this and
16595         adjust.
16596         (gdbpy_clone_xmethod_worker_data): Rename to...
16597         (python_xmethod_worker::clone): ... this and adjust.
16598         (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
16599         temporary vector.
16600         (gdbpy_get_xmethod_arg_types): Rename to...
16601         (python_xmethod_worker::do_get_arg_types): ... this and adjust.
16602         (gdbpy_get_xmethod_result_type): Rename to...
16603         (python_xmethod_worker::do_get_result_type): ... this and
16604         adjust.
16605         (gdbpy_invoke_xmethod): Rename to...
16606         (python_xmethod_worker::invoke): ... this and adjust.
16607         (new_python_xmethod_worker): Rename to...
16608         (python_xmethod_worker::python_xmethod_worker): ... this and
16609         adjust.
16610         * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
16611         Remove.
16612         (gdbpy_free_xmethod_worker_data): Remove.
16613         (gdbpy_get_matching_xmethod_workers): Use std::vector.
16614         (gdbpy_get_xmethod_arg_types): Remove.
16615         (gdbpy_get_xmethod_result_type): Remove.
16616         (gdbpy_invoke_xmethod): Remove.
16617         * python/python.c (python_extension_ops): Remove obsolete
16618         callbacks.
16619
16620 2018-01-05  Pedro Alves  <palves@redhat.com>
16621
16622         PR gdb/18653
16623         * common/signals-state-save-restore.c
16624         (save_original_signals_state): New parameter 'quiet'.  Warn if we
16625         find a custom handler preinstalled, instead of internal erroring.
16626         But only warn if !quiet.
16627         * common/signals-state-save-restore.h
16628         (save_original_signals_state): New parameter 'quiet'.
16629         * main.c (captured_main_1): Move save_original_signals_state call
16630         after option handling, and pass QUIET.
16631
16632 2018-01-05  Pedro Alves  <palves@redhat.com>
16633
16634         * spu-tdep.c (spu_catch_start): Pass
16635         symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
16636
16637 2018-01-05  Pedro Alves  <palves@redhat.com>
16638
16639         PR gdb/22670
16640         * ada-lang.c (literal_symbol_name_matcher): New function.
16641         (ada_get_symbol_name_matcher): Use it for
16642         symbol_name_match_type::SEARCH_NAME.
16643         * block.c (block_lookup_symbol): New parameter 'match_type'.  Pass
16644         it down instead of assuming symbol_name_match_type::FULL.
16645         * block.h (block_lookup_symbol): New parameter 'match_type'.
16646         * c-valprint.c (print_unpacked_pointer): Use
16647         lookup_symbol_search_name instead of lookup_symbol.
16648         * compile/compile-object-load.c (get_out_value_type): Pass down
16649         symbol_name_match_type::SEARCH_NAME.
16650         * cp-namespace.c (cp_basic_lookup_symbol): Pass down
16651         symbol_name_match_type::FULL.
16652         * cp-support.c (cp_get_symbol_name_matcher): Handle
16653         symbol_name_match_type::SEARCH_NAME.
16654         * infrun.c (insert_exception_resume_breakpoint): Use
16655         lookup_symbol_search_name.
16656         * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
16657         * psymtab.c (maintenance_check_psymtabs): Use
16658         symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
16659         * stack.c (print_frame_args): Use lookup_symbol_search_name and
16660         SYMBOL_SEARCH_NAME.
16661         * symtab.c (lookup_local_symbol): Don't demangle the lookup name
16662         if symbol_name_match_type::SEARCH_NAME.
16663         (lookup_symbol_in_language): Pass down
16664         symbol_name_match_type::FULL.
16665         (lookup_symbol_search_name): New.
16666         (lookup_language_this): Pass down
16667         symbol_name_match_type::SEARCH_NAME.
16668         (lookup_symbol_aux, lookup_local_symbol): New parameter
16669         'match_type'.  Pass it down.
16670         * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
16671         (lookup_symbol_search_name): New declaration.
16672         (lookup_symbol_in_block): New 'match_type' parameter.
16673
16674 2018-01-05  Pedro Alves  <palves@redhat.com>
16675
16676         PR gdb/22670
16677         * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
16678         ada_lookup_symbol.
16679         (ada_lookup_symbol): Reimplement in terms of
16680         ada_lookup_symbol_list, bits factored out from
16681         ada_lookup_encoded_symbol.
16682
16683 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
16684
16685         * ada-exp.y (write_object_renaming): When subscripting an array
16686         using a symbol as the index, pass the block in call to
16687         ada_lookup_encoded_symbol when looking that symbol up.
16688
16689 2018-01-05  Jerome Guitton  <guitton@adacore.com>
16690
16691         * ada-lang.c (ada_array_length): Use ada_index_type instead of
16692         TYPE_INDEX_TYPE.
16693
16694 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
16695
16696         * ada-lang.c (ada_to_fixed_value_create): Add handling of
16697         the case where VALUE_LVAL (val0) is not lval_memory.
16698
16699 2018-01-05  Xavier Roirand  <roirand@adacore.com>
16700
16701         * ada-valprint.c (print_optional_low_bound): Handle
16702         character-indexed array printing like boolean-indexed array
16703         printing.
16704
16705 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
16706
16707         * NEWS: Create a new section for the next release branch.
16708         Rename the section of the current branch, now that it has
16709         been cut.
16710
16711 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
16712
16713         GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
16714         * version.in: Bump version to 8.1.50.DATE-git.
16715
16716 2018-01-03  Xavier Roirand  <roirand@adacore.com>
16717
16718         * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
16719         Add field.
16720         * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
16721         Add field.
16722         (default_exception_support_info) <catch_handlers_sym>: Add field.
16723         (exception_support_info_fallback) <catch_handlers_sym>: Add field.
16724         (ada_exception_name_addr_1): Add "catch handlers" handling.
16725         (ada_exception_catchpoint_cond_string) <ex>: New parameter.
16726         Update all callers.
16727         (create_excep_cond_exprs) <ex>: Add parameter.
16728         (re_set_exception): Update create_excep_cond_exprs call.
16729         (print_it_exception, print_one_exception, print_mention_exception)
16730         (print_recreate_exception): Add "catch handler" handling.
16731         (allocate_location_catch_handlers, re_set_catch_handlers)
16732         (check_status_catch_handlers, print_it_catch_handlers)
16733         (print_one_catch_handlers, print_mention_catch_handlers)
16734         (print_recreate_catch_handlers): New function.
16735         (catch_handlers_breakpoint_ops): New variable.
16736         (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
16737         Add parameter.  Add "catch handler" handling.
16738         (ada_exception_sym_name, ada_exception_breakpoint_ops):
16739         Add "catch handler" handling.
16740         (ada_exception_catchpoint_cond_string): Add "catch handler"
16741         handling.
16742         (create_ada_exception_catchpoint): Update create_excep_cond_exprs
16743         call.
16744         (catch_ada_handlers_command): New function.
16745         (initialize_ada_catchpoint_ops): Initialize "catch handlers"
16746         operations structure.
16747         (_initialize_ada_language): Add "catch handlers" command entry.
16748         * NEWS: Document "catch handlers" feature.
16749
16750 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
16751
16752         * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
16753         account when creating the array type of the slice.
16754         (ada_value_slice): Likewise.
16755
16756 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
16757
16758         * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
16759         New enum value.
16760         (create_array_type_with_stride): Add byte_stride_prop parameter.
16761         * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
16762         New parameter.  Update all callers in this file.
16763         (array_type_has_dynamic_stride): New function.
16764         (is_dynamic_type_internal, resolve_dynamic_array): Add handling
16765         of arrays with dynamic byte strides.
16766         * dwarf2read.c (read_array_type): Add support for dynamic
16767         DW_AT_byte_stride attributes.
16768
16769 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
16770
16771         * dwarf2read.c (read_unspecified_type): Treat
16772         DW_TAG_enumeration_type DIEs from Ada units as stubs.
16773
16774 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
16775
16776         Update copyright year range in all GDB files.
16777
16778 2018-01-01, 18  Joel Brobecker  <brobecker@adacore.com>
16779
16780         * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
16781         and gdb/testsuite/gdb.base/step-line.c.
16782
16783 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
16784
16785         * copyright.py (main): Dump the contents of
16786         MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
16787         even if BY_HAND is empty.
16788
16789 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
16790
16791         * top.c (print_gdb_version): Update Copyright year in version
16792         message.
16793
16794 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
16795
16796         * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
16797
16798 For older changes see ChangeLog-2017.
16799 \f
16800 Local Variables:
16801 mode: change-log
16802 left-margin: 8
16803 fill-column: 74
16804 version-control: never
16805 coding: utf-8
16806 End: