gdb/riscv: Add gdb to dwarf register number mapping
[external/binutils.git] / gdb / ChangeLog
1 2018-12-22  Andrew Burgess  <andrew.burgess@embecosm.com>
2
3         * riscv-tdep.c (riscv_dwarf_reg_to_regnum): New function.
4         (riscv_gdbarch_init): Register new function with gdbarch.
5         * riscv-tdep.h: New enum to define RISC-V DWARF register numbers.
6
7 2018-12-21  Simon Marchi  <simon.marchi@ericsson.com>
8
9         * minsyms.c (mst_str): New.
10         (minimal_symbol_reader::record_full): Add debug output.
11
12 2018-12-21  John Baldwin  <jhb@FreeBSD.org>
13
14         * fbsd-nat.c (fbsd_handle_debug_trap): Require pl.pl_flags to
15         equal PL_FLAG_SI.
16         (fbsd_nat_target::stopped_by_sw_breakpoint): Likewise.
17
18 2018-12-21  Paul Marechal  <paul.marechal@ericsson.com>
19
20         PR gdb/23974
21         * target.c (target_read_stralloc): Check for empty vector.
22
23 2018-12-21  Дилян Палаузов  <dilyan.palauzov@aegee.org>
24
25         * top.c (print_gdb_configuration): Print "--without-python"
26         if GDB was configured without Python.
27
28 2018-12-21  Andrew Burgess  <andrew.burgess@embecosm.com>
29
30         * riscv-tdep.c (riscv_scan_prologue): Use plongest to format
31         a signed offset as a string.
32
33 2018-12-21  Dave Murphy  <davem@devkitpro.org>
34
35         * dtrace-probe.c (dtrace_static_probe_ops): Explicit zero
36         initialise.
37         * probe.c (any_static_probe_ops): Ditto.
38         * record-btrace.c (record_btrace_thread_observer_token): Ditto.
39         * stap-probe.c (stap_static_probe_ops): Ditto.
40         * tui/tui-hooks.c (tui_observers_token): Ditto.
41         * unittests/observable-selftests.c (token1, token2, token3): Ditto.
42
43 2018-12-19  Andrew Burgess  <andrew.burgess@embecosm.com>
44
45         * gdb/dummy-frame.c (default_dummy_id): Defined new function.
46         * gdb/dummy-frame.h (default_dummy_id): Declare new function.
47         * gdb/frame-unwind.c (default_unwind_pc): Define new function.
48         (default_unwind_sp): Define new function.
49         * gdb/frame-unwind.h (default_unwind_pc): Declare new function.
50         (default_unwind_sp): Declare new function.
51         * gdb/frame.c (frame_unwind_pc): Assume gdbarch_unwind_pc is
52         available.
53         (get_frame_sp): Assume that gdbarch_unwind_sp is available.
54         * gdb/gdbarch.c: Regenerate.
55         * gdb/gdbarch.h: Regenerate.
56         * gdb/gdbarch.sh: Update definition of dummy_id, unwind_pc, and
57         unwind_sp.  Add additional header files to be included in
58         generated file.
59
60 2018-12-19  Dimitar Dimitrov  <dimitar@dinux.eu>
61
62         * nat/linux-ptrace.c (linux_ptrace_test_ret_to_nx): Remove
63         sp clobbers.
64
65 2018-12-17  Andrew Burgess  <andrew.burgess@embecosm.com>
66
67         * dwarf2read.c (struct dwarf2_cu): Convert the fields 'mark',
68         'has_loclist', 'checked_producer', 'producer_is_gxx_lt_4_6',
69         'producer_is_gcc_lt_4_3', 'producer_is_icc_lt_14',
70         'processing_has_namespace_info' from unsigned int to bool.  Update
71         comments.
72         (producer_is_icc_lt_14): Update return type.
73         (producer_is_gcc_lt_4_3): Likewise.
74         (producer_is_gxx_lt_4_6): Likewise.
75         (process_die): Write true instead of 1 into predicate fields.
76         (dwarf2_start_symtab): Likewise.
77         (var_decode_location): Likewise.
78         (dwarf2_mark_helper): Likewise.
79         (dwarf2_mark): Likewise.
80         (dwarf2_clear_marks): Write false instead of 0 into predicate
81         field.
82         (dwarf2_cu::dwarf2_cu): Initialise predicate fields to false, not
83         0.
84
85 2018-12-17  Szabolcs Nagy  <szabolcs.nagy@arm.com>
86
87         * nat/aarch64-sve-linux-ptrace.h: Include signal.h instead of
88         asm/sigcontext.h.
89
90 2018-12-17  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
91
92         * nat/linux-ptrace.c (kill_child): Fix ARI warning by removing
93         warning trailing new line.
94
95 2018-12-16  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
96
97         * nat/linux-ptrace.c (kill_child): New function.
98         (linux_ptrace_test_ret_to_nx): Use kill_child instead of local code.
99         Add a call to kill_child in case of early return after fork.
100         (linux_check_ptrace_features): Use kill_child instead of local code.
101         (linux_test_for_tracefork): Likewise.
102
103 2018-12-14  Tom Tromey  <tom@tromey.com>
104
105         * Makefile.in: Remove "alloca" comment.
106         (INFOFILES): Remove.
107         (local-maintainer-clean): Don't use INFOFILES.
108
109 2018-12-13  John Baldwin  <jhb@FreeBSD.org>
110
111         * syscalls/update-freebsd.sh: New file.
112         * syscalls/freebsd.xml: Regenerate.
113
114 2018-12-13  John Baldwin  <jhb@FreeBSD.org>
115
116         * NEWS: Add entry documenting system call aliases.
117         * break-catch-syscall.c (catch_syscall_split_args): Pass 'result'
118         to get_syscalls_by_name.
119         * gdbarch.sh (UNKNOWN_SYSCALL): Remove.
120         * gdbarch.h: Regenerate.
121         * syscalls/gdb-syscalls.dtd (syscall): Add alias attribute.
122         * xml-syscall.c [!HAVE_LIBEXPAT] (get_syscalls_by_name): Rename
123         from get_syscall_by_name.  Now accepts a pointer to a vector of
124         integers and returns a bool.
125         [HAVE_LIBEXPAT] (struct syscall_desc): Add alias member.
126         (syscall_create_syscall_desc): Add alias parameter and pass it to
127         syscall_desc constructor.
128         (syscall_start_syscall): Handle alias attribute.
129         (syscall_attr): Add alias attribute.
130         (xml_get_syscalls_by_name): Rename from xml_get_syscall_number.
131         Now accepts a pointer to a vector of integers and returns a
132         bool.  Add syscalls whose alias or name matches the requested
133         name.
134         (get_syscalls_by_name): Rename from get_syscall_by_name.  Now
135         accepts a pointer to a vector of integers and returns a bool.
136         * xml-syscall.h (get_syscalls_by_name): Likewise.
137
138 2018-12-13  John Baldwin  <jhb@FreeBSD.org>
139
140         * break-catch-syscall.c (catch_syscall_split_args): Pass 'result'
141         to get_syscalls_by_group.
142         * xml-syscall.c [!HAVE_LIBEXPAT] (get_syscalls_by_group): Return
143         false.
144         [HAVE_LIBEXPAT] (xml_list_syscalls_by_group): Append syscall
145         numbers to an existing vector of integers and return a bool.
146         (get_syscalls_by_group): Accept pointer to vector of integers
147         and change return type to bool.
148         * xml-syscall.h (get_syscalls_by_group): Likewise.
149
150 2018-12-13  Jim Wilson  <jimw@sifive.com>
151
152         * riscv-tdep.c (riscv_print_one_register_info): For MSTATUS, add
153         comment for SD field, and correct xlen calculation.  For MISA, add
154         comment for MXL field, add call to register_size, and correct base
155         calculation.
156
157 2018-12-13  Stafford Horne  <shorne@gmail.com>
158
159         * NEWS(New targets): Add or1k*-*-linux*.
160
161 2018-12-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
162
163         * nat/linux-osdata.c (linux_xfer_osdata_info_os_types): Forward
164         declare on one line to fix ARI warning.
165
166 2018-12-12  Andrew Burgess  <andrew.burgess@embecosm.com>
167
168         * infrun.c (infcall_suspend_state::infcall_suspend_state): New.
169         (infcall_suspend_state::registers): New.
170         (infcall_suspend_state::restore): New.
171         (infcall_suspend_state::thread_suspend): Rename to...
172         (infcall_suspend_state::m_thread_suspend): ...this.
173         (infcall_suspend_state::registers): Rename to...
174         (infcall_suspend_state::m_registers): ...this.
175         (infcall_suspend_state::siginfo_gdbarch): Rename to...
176         (infcall_suspend_state::m_siginfo_gdbarch): ...this.
177         (infcall_suspend_state::siginfo_data): Rename to...
178         (infcall_suspend_state::m_siginfo_data): ...this.
179         (save_infcall_suspend_state): Rewrite to use infcall_suspend_state
180         constructor.
181         (restore_infcall_suspend_state): Rewrite to use
182         infcall_suspend_state::restore method.
183         (get_infcall_suspend_state_regcache): Use
184         infcall_suspend_state::registers method.
185
186 2018-12-12  Andrew Burgess  <andrew.burgess@embecosm.com>
187
188         * riscv-tdep.c (riscv_call_arg_scalar_float): Unnamed (variadic)
189         arguments are passed in integer registers.
190         (riscv_call_arg_complex_float): Likewise.
191
192 2018-12-11  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
193
194         * nat/linux-osdata.c (common_getter): New function.
195         (struct osdata_type): Change getter to take_snapshot.
196         Add LONGEST len_avail and struct buffer buffer.
197         Change all elements in the initializer.
198         Add an element for the list of types.
199         (linux_xfer_osdata_info_os_types): New function.
200         (linux_common_xfer_osdata): Use common_getter for the list of types.
201         Replace getter call by common_getter.
202         (linux_xfer_osdata_cpus): Remove args READBUF, OFFSET, LEN.
203         Add arg BUFFER.  Only keep the code that adds data in BUFFER.
204         (linux_xfer_osdata_fds): Likewise.
205         (linux_xfer_osdata_modules): Likewise.
206         (linux_xfer_osdata_msg): Likewise.
207         (linux_xfer_osdata_processes): Likewise.
208         (linux_xfer_osdata_processgroups): Likewise.
209         (linux_xfer_osdata_sem): Likewise.
210         (linux_xfer_osdata_shm): Likewise.
211         (linux_xfer_osdata_isockets): Likewise.
212         (linux_xfer_osdata_threads): Likewise.
213
214 2018-12-11  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
215
216         * nat/linux-osdata.c: Removed various trailing spaces.
217
218 2018-12-10  Andrew Burgess  <andrew.burgess@embecosm.com>
219
220         * riscv-tdep.c (riscv_register_name): Fix ARI warning by removing
221         leading whitespace before #include line.
222
223 2018-12-08  Simon Marchi  <simon.marchi@ericsson.com>
224             Дилян Палаузов  <dilyan.palauzov@aegee.org>
225
226         PR gdb/23950
227         * configure.ac: Search for tgetent in libtinfow.
228         * configure: Re-generate.
229
230 2018-12-08  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
231
232         * linux-thread-db.c (struct thread_db_info): Add td_ta_delete_p.
233         (thread_db_err_str): Forward declare.
234         (delete_thread_db_info): Call td_ta_delete_p if available.
235         (try_thread_db_load_1): Acquire td_ta_delete address.
236         * nat/gdb_thread_db.h (td_ta_delete_ftype): Declare.
237
238 2018-12-08  Pedro Alves  <palves@redhat.com>
239
240         * source.c (forward_search_command): Rename to ...
241         (search_command_helper): ... this.  Add 'forward' parameter.
242         Tweak to use a gdb::def_vector<char> instead of a xrealloc'ed
243         buffer.  Handle backward searches too.
244         (forward_search_command, reverse_search_command): Reimplement by
245         calling search_command_helper.
246
247 2018-12-07  Andrew Burgess  <andrew.burgess@embecosm.com>
248
249         * .dir-locals.el: Copy most of the settings from c-mode over to
250         c++-mode.
251
252 2018-12-08  Stafford Horne  <shorne@gmail.com>
253
254         * Makefile.in (ALL_TARGET_OBS): Add or1k-linux-tdep.o.
255         * configure.tgt: Add or1k*-*-linux*.
256         * or1k-linux-tdep.c: New file.
257         * or1k-tdep.c (or1k_gdbarch_init): Call gdbarch_init_osabi.
258
259 2018-12-07  Pedro Alves  <palves@redhat.com>
260
261         * dwarf2read.c (get_gdb_index_contents_from_section): Use
262         gdb::make_array_view.
263
264 2018-12-05  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
265
266         * language.c (_initialize_language): Fix leak by assigning
267         a static string to language.  Same for range and case_sensitive,
268         even if no leak is detected for these variables.
269
270 2018-12-05  John Baldwin  <jhb@FreeBSD.org>
271
272         * configure: Re-generate.
273         * configure.ac: Use separate sed expressions to escape variables
274         in auto-load directories.
275
276 2018-12-05  Andrew Burgess  <andrew.burgess@embecosm.com>
277
278         * riscv-tdep.c (riscv_features_from_gdbarch_info): New function.
279         (riscv_find_default_target_description): Use new function to
280         extract feature from gdbarch_info.
281         (riscv_gdbarch_init): Add error checks for xlen and flen between
282         target description and bfd headers.  Be smarter about when we
283         think the hardware floating point abi should be used.
284
285 2018-12-05  Alan Hayward  <alan.hayward@arm.com>
286
287         * nat/aarch64-linux-hw-point.c
288         (aarch64_linux_any_set_debug_regs_state): New function.
289         * nat/aarch64-linux-hw-point.h
290         (aarch64_linux_any_set_debug_regs_state): New declaration.
291         * nat/aarch64-linux.c (aarch64_linux_new_thread): Check if any
292         BPs or WPs are set.
293
294 2018-11-30  John Baldwin  <jhb@FreeBSD.org>
295
296         * common/filestuff.c [HAVE_KINFO_GETFILE]: Include headers.
297         (fdwalk) [HAVE_KINFO_GETFILE]: Use kinfo_getfile.
298
299 2018-11-30  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
300             Simon Marchi  <simon.marchi@ericsson.com>
301
302         * linespec.c (symtab_vector_up): Remove.
303         (symtabs_from_filename): Change return type to std::vector.
304         (collect_symtabs_from_filename): Likewise.
305         (create_sals_line_offset): Assign return value of
306         collect_symtabs_from_filename to *ls->file_symtabs.
307         (convert_explicit_location_to_linespec): Remove call to release.
308         (parse_linespec): Likewise.
309         (symtab_collector) <symtab_collector>: Remove initialization of
310         m_symtabs.
311         <release_symtabs>: Change return type to std::vector<symtab *>.
312         <operator ()>: Adjust.
313
314 2018-11-30  John Baldwin  <jhb@FreeBSD.org>
315
316         * fbsd-nat.c [__FreeBSD_version >= 700009] (USE_SIGINFO): Macro
317         defined.
318         (union sigval32, struct siginfo32, fbsd_siginfo_size)
319         (fbsd_convert_siginfo): Make conditional on USE_SIGINFO instead
320         of KERN_PROC_AUXV and PT_LWPINFO.
321         (fbsd_nat_target::xfer_partial): Define method unconditionally.
322         Make TARGET_OBJECT_SIGNAL_INFO conditional on USE_SIGINFO.
323         Make TARGET_OBJECT_AUXV conditional on KERN_PROC_AUXV.
324         Make TARGET_OBJECT_FREEBSD_VMMAP and
325         TARGET_OBJECT_FREEBSD_PS_STRINGS conditional on KERN_PROC_VMMAP
326         and KERN_PROC_PS_STRINGS.
327         * fbsd-nat.h: Include <sys/proc.h>.
328         (fbsd_nat_target::xfer_partial): Declare method unconditionally.
329
330 2018-11-30  Andrew Burgess  <andrew.burgess@embecosm.com>
331
332         * riscv-linux-nat.c: Add 'inferior.h' and 'target-descriptions.h'
333         header files.
334         (riscv_linux_nat_target::read_description): New method.
335
336 2018-11-30  Andrew Burgess  <andrew.burgess@embecosm.com>
337
338         * arch/riscv.h (riscv_gdbarch_features::hash): New method.
339         * arch/riscv.c (struct riscv_gdbarch_features_hasher): New.
340         (riscv_tdesc_cache): New global.
341         (riscv_create_target_description): Look in the cache before
342         creating a new target description.
343
344 2018-11-30  Andrew Burgess  <andrew.burgess@embecosm.com>
345
346         * arch/riscv.h (riscv_gdb_features::operator==): New.
347         (riscv_gdb_features::operator!=): New.
348         * riscv-tdep.c (riscv_gdbarch_init): Make use of the inequality
349         operator.
350
351 2018-11-30  Andrew Burgess  <andrew.burgess@embecosm.com>
352
353         * arch/riscv.h (riscv_create_target_description): Make return type
354         const.
355         * arch/riscv.c (riscv_create_target_description): Likewise.
356         * riscv-tdep.c (riscv_find_default_target_description): Likewise.
357
358 2018-11-30  Jan Kratochvil  <jan.kratochvil@redhat.com>
359             Keith Seitz  <keiths@redhat.com>
360             Tom Tromey  <tom@tromey.com>
361             Sergio Durigan Junior  <sergiodj@redhat.com>
362
363         https://bugzilla.redhat.com/show_bug.cgi?id=1613614
364         * dwarf2read.c (dwarf2_find_containing_comp_unit): Add
365         'mid_cu->length' to '*cu_off' when checking if 'sect_off' is
366         inside the CU.
367
368 2018-11-30  Pedro Alves  <palves@redhat.com>
369
370         * aix-thread.c (aix_thread_target) <aix_thread_target>: Delete.
371         <stratum>: New override.
372         * bfd-target.c (aix_thread_target) <aix_thread_target>: Delete.
373         <stratum>: New override.
374         * bsd-uthread.c (bsd_uthread_target) <bsd_uthread_target>: Delete.
375         <stratum>: New override.
376         * exec.c (exec_target) <exec_target>: Delete.
377         <stratum>: New override.
378         * gdbarch-selftests.c (register_to_value_test): Adjust to use the
379         stratum method instead of the to_stratum field.
380         * linux-thread-db.c (thread_db_target) <thread_db_target>: Delete.
381         <stratum>: New override.
382         (thread_db_target::thread_db_target): Delete.
383         * make-target-delegates (print_class): Don't print a ctor
384         declaration.  Print a stratum method override declaration.
385         * process-stratum-target.h (process_stratum_target)
386         <process_stratum_target>: Delete.
387         <stratum>: New override.
388         * ravenscar-thread.c (ravenscar_thread_target)
389         <ravenscar_thread_target>: Delete.
390         <stratum>: New override.
391         * record-btrace.c (record_btrace_target)
392         <record_btrace_target>: Delete.
393         <stratum>: New override.
394         * record-full.c (record_full_base_target)
395         <record_full_base_target>: Delete.
396         <stratum>: New override.
397         * record.c (record_disconnect, record_detach)
398         (record_mourn_inferior, record_kill): Adjust to use the stratum
399         method instead of the to_stratum field.
400         * regcache.c (cooked_read_test, cooked_write_test): Likewise.
401         * sol-thread.c (sol_thread_target)
402         <sol_thread_target>: Delete.
403         <stratum>: New override.
404         * spu-multiarch.c (spu_multiarch_target)
405         <spu_multiarch_target>: Delete.
406         <stratum>: New override.
407         * target-delegates.c: Regenerate.
408         * target.c (target_stack::push, target_stack::unpush)
409         (pop_all_targets_above, pop_all_targets_at_and_above)
410         (info_target_command, target_require_runnable)
411         (target_stack::find_beneath): Adjust to use the stratum method
412         instead of the to_stratum field.
413         (dummy_target::dummy_target): Delete.
414         (dummy_target::stratum): New.
415         (debug_target::debug_target): Delete.
416         (debug_target::stratum): New.
417         (maintenance_print_target_stack): Adjust to use the stratum method
418         instead of the to_stratum field.
419         * target.h (struct target_ops) <stratum>: New method.
420         <to_stratum>: Delete.
421         <is_pushed>: Adjust to use the stratum method
422         instead of the to_stratum field.
423
424 2018-11-30  Pedro Alves  <palves@redhat.com>
425
426         * corelow.c (core_target) <has_all_memory, has_execution>: New
427         overrides.
428         * inf-child.c (inf_child_target::has_all_memory)
429         (inf_child_target::has_memory, inf_child_target::has_stack)
430         (inf_child_target::has_registers)
431         (inf_child_target::has_execution): Delete.
432         * inf-child.h (inf_child_target) <has_all_memory, has_memory,
433         has_stack, has_registers, has_execution>: Delete.
434         * process-stratum-target.c
435         (process_stratum_target::has_all_memory)
436         (process_stratum_target::has_memory)
437         (process_stratum_target::has_stack)
438         (process_stratum_target::has_registers)
439         (process_stratum_target::has_execution): New.
440         * process-stratum-target.h (process_stratum_target)
441         <has_all_memory, has_memory, has_stack, has_registers,
442         has_execution>: New method overrides.
443         * ravenscar-thread.c (ravenscar_thread_target) <has_all_memory,
444         has_memory, has_stack, has_registers, has_execution>: Delete.
445         * remote-sim.c (gdbsim_target) <has_stack, has_registers,
446         has_execution>: Delete.
447         * remote.c (remote_target) <has_all_memory, has_memory, has_stack,
448         has_registers, has_execution>: Delete.
449         * target.c (default_child_has_all_memory)
450         (default_child_has_memory, default_child_has_stack)
451         (default_child_has_registers, default_child_has_execution):
452         Delete.
453         * target.h (default_child_has_all_memory)
454         (default_child_has_memory, default_child_has_stack)
455         (default_child_has_registers, default_child_has_execution):
456         Delete.
457         * tracefile.h (tracefile_target) <has_execution>: New override.
458
459 2018-11-30  Pedro Alves  <palves@redhat.com>
460
461         * Makefile.in (COMMON_SFILES): Add process-stratum-target.c.
462         * bsd-kvm.c: Include "process-stratum-target.h".
463         (bsd_kvm_target): Now inherits from process_stratum_target.
464         (bsd_kvm_target::bsd_kvm_target): Default it.
465         * corelow.c: Include "process-stratum-target.h".
466         (core_target): Now inherits from process_stratum_target.
467         (core_target::core_target): Don't set to_stratum here.
468         * inf-child.c (inf_child_target::inf_child_target): Delete.
469         * inf-child.h: Include "process-stratum-target.h".
470         (inf_child_target): Inherit from process_stratum_target.
471         (inf_child_target) <inf_child_target>: Default it.
472         <can_async_p, supports_non_stop, supports_disable_randomization>:
473         Delete overrides.
474         * process-stratum-target.c: New file.
475         * process-stratum-target.h: New file.
476         * remote-sim.c: Include "process-stratum-target.h".
477         (gdbsim_target): Inherit from process_stratum_target.
478         <gdbsim_target>: Default it.
479         * remote.c: Include "process-stratum-target.h".
480         (remote_target): Inherit from process_stratum_target.
481         <remote_target>: Default it.
482         * target.c (default_thread_address_space)
483         (default_thread_architecture): Delete.
484         * target.h (target_ops) <thread_architecture>: Now returns NULL by
485         default.
486         <thread_address_space>: Ditto.
487         * test-target.h: Include "process-stratum-target.h" instead of
488         "target.h".
489         (test_target_ops): Inherit from process_stratum_target.
490         <test_target_ops>: Default it.
491         * tracefile.c (tracefile_target::tracefile_target): Delete.
492         * tracefile.h: Include "process-stratum-target.h".
493         (tracefile_target): Inherit from process_stratum_target.
494         <tracefile_target>: Default it.
495         * target-delegates.c: Regenerate.
496
497 2018-11-30  Pedro Alves  <palves@redhat.com>
498
499         * Makefile.in (COMMON_SFILES): Add test-target.c.
500         * gdbarch-selftests.c: Include "test-target.h".
501         * regcache.c: Include "test-target.h".
502         * target.c (test_target_info, test_target_ops::info): Move to ...
503         * test-target.c: ... this new file.
504         * target.h (test_target_ops): Move to ...
505         * test-target.h: ... this new file.
506
507 2018-11-29  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
508
509         * source.c (forward_search_command): Fix leak by using
510         xrealloc even for the first allocation in the loop, as buf
511         is static.
512
513 2018-11-29  Rajendra SY  <rajendra.sy@gmail.com>
514
515         PR gdb/23093
516         * gdb/fbsd-tdep.c (fbsd_gdb_signal_from_target)
517         (fbsd_gdb_signal_to_target): New.
518         (fbsd_init_abi): Install gdbarch "signal_from_target" and
519         "signal_to_target" methods.
520
521 2018-11-29  Tom Tromey  <tom@tromey.com>
522
523         * valarith.c (value_x_unop): Don't set argvec[3].
524
525 2018-11-26  Simon Marchi  <simon.marchi@ericsson.com>
526
527         PR gdb/23917
528         * sparc-linux-nat.c (sparc_linux_nat_target): Remove extraneous
529         semicolon.
530
531 2018-11-26  Pedro Alves  <palves@redhat.com>
532
533         * procfs.c (procfs_notice_thread): Replace uses of
534         in_thread_list/is_exited with find_thread_ptid/THREAD_EXITED.
535         * sol-thread.c (sol_thread_target::wait)
536         (sol_update_thread_list_callback): Likewise.
537
538 2018-11-25  Tom Tromey  <tom@tromey.com>
539
540         * ui-out.c (ui_out::field_fmt): Remove comment.
541         * tui/tui-out.c (tui_ui_out::do_field_fmt): Remove comment.
542         * mi/mi-out.c (mi_ui_out::do_field_fmt): Remove comment.
543
544 2018-11-24  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
545
546         * source.c (open_source_file): Leak fixed in '8e6a5953e1d Fix 4K
547         leak in open_source_file' has been partially undone by '2179fbc36d23
548         Return scoped_fd from open_source_file'. Re-add the transfer of
549         current s->fullname to the unique_xmalloc_ptr fullname given
550         to find_and_open_source.
551
552 2018-11-23  Pedro Alves  <palves@redhat.com>
553
554         * gdbthread.h (enum thread_state): Move comments here.
555         (is_running, is_stopped, is_exited): Remove declarations.
556
557 2018-11-22  Pedro Alves  <palves@redhat.com>
558
559         * Makefile.in (COMMON_SFILES): Add thread-iter.c.
560         * breakpoint.c (breakpoints_should_be_inserted_now): Replace
561         ALL_NON_EXITED_THREADS with all_non_exited_threads.
562         (print_one_breakpoint_location): Replace ALL_INFERIORS with
563         all_inferiors.
564         * bsd-kvm.c: Include inferior.h.
565         * btrace.c (btrace_free_objfile): Replace ALL_NON_EXITED_THREADS
566         with all_non_exited_threads.
567         * common/filtered-iterator.h: New.
568         * common/safe-iterator.h: New.
569         * corelow.c (core_target_open): Don't call init_thread_list here.
570         * darwin-nat.c (thread_info_from_private_thread_info): Replace
571         ALL_THREADS with all_threads.
572         * fbsd-nat.c (fbsd_nat_target::resume): Replace
573         ALL_NON_EXITED_THREADS with inf->non_exited_threads.
574         * fbsd-tdep.c (fbsd_make_corefile_notes): Replace
575         ALL_NON_EXITED_THREADS with inf->non_exited_threads.
576         * fork-child.c (postfork_hook): Don't call init_thread_list here.
577         * gdbarch-selftests.c (register_to_value_test): Adjust.
578         * gdbthread.h: Don't include "inferior.h" here.
579         (struct inferior): Forward declare.
580         (enum step_over_calls_kind): Moved here from inferior.h.
581         (thread_info::deletable): Definition moved to thread.c.
582         (find_thread_ptid (inferior *, ptid_t)): Declare.
583         (ALL_THREADS, ALL_THREADS_BY_INFERIOR, ALL_THREADS_SAFE): Delete.
584         Include "thread-iter.h".
585         (all_threads, all_non_exited_threads, all_threads_safe): New.
586         (any_thread_p): Declare.
587         (thread_list): Delete.
588         * infcmd.c (signal_command): Replace ALL_NON_EXITED_THREADS with
589         all_non_exited_threads.
590         (proceed_after_attach_callback): Delete.
591         (proceed_after_attach): Take an inferior pointer instead of an
592         integer PID.  Adjust to use range-for.
593         (attach_post_wait): Pass down inferior pointer instead of pid.
594         Use range-for instead of ALL_NON_EXITED_THREADS.
595         (detach_command): Remove init_thread_list call.
596         * inferior-iter.h: New.
597         * inferior.c (struct delete_thread_of_inferior_arg): Delete.
598         (delete_thread_of_inferior): Delete.
599         (delete_inferior, exit_inferior_1): Use range-for with
600         inf->threads_safe() instead of iterate_over_threads.
601         (inferior_appeared): Call init_thread_list here.
602         (discard_all_inferiors): Use all_non_exited_inferiors.
603         (find_inferior_id, find_inferior_pid): Use all_inferiors.
604         (iterate_over_inferiors): Use all_inferiors_safe.
605         (have_inferiors, number_of_live_inferiors): Use
606         all_non_exited_inferiors.
607         (number_of_inferiors): Use all_inferiors and std::distance.
608         (print_inferior): Use all_inferiors.
609         * inferior.h: Include gdbthread.h.
610         (enum step_over_calls_kind): Moved to gdbthread.h.
611         (struct inferior) <thread_list>: New field.
612         <threads, non_exited_threads, threads_safe>: New methods.
613         (ALL_INFERIORS): Delete.
614         Include "inferior-iter.h".
615         (ALL_NON_EXITED_INFERIORS): Delete.
616         (all_inferiors_safe, all_inferiors, all_non_exited_inferiors): New
617         functions.
618         * inflow.c (child_interrupt, child_pass_ctrlc): Replace
619         ALL_NON_EXITED_THREADS with all_non_exited_threads.
620         * infrun.c (follow_exec): Use all_threads_safe.
621         (clear_proceed_status, proceed): Use all_non_exited_threads.
622         (init_wait_for_inferior): Don't clear inline frame state here.
623         (infrun_thread_stop_requested, for_each_just_stopped_thread): Use
624         all_threads instead of ALL_NON_EXITED_THREADS.
625         (random_pending_event_thread): Use all_non_exited_threads instead
626         of ALL_NON_EXITED_THREADS.  Use a lambda for repeated code.
627         (clean_up_just_stopped_threads_fsms): Use all_non_exited_threads
628         instead of ALL_NON_EXITED_THREADS.
629         (handle_no_resumed): Use all_non_exited_threads instead of
630         ALL_NON_EXITED_THREADS.  Use all_inferiors instead of
631         ALL_INFERIORS.
632         (restart_threads, switch_back_to_stepped_thread): Use
633         all_non_exited_threads instead of ALL_NON_EXITED_THREADS.
634         * linux-nat.c (check_zombie_leaders): Replace ALL_INFERIORS with
635         all_inferiors.
636         (kill_unfollowed_fork_children): Use inf->non_exited_threads
637         instead of ALL_NON_EXITED_THREADS.
638         * linux-tdep.c (linux_make_corefile_notes): Use
639         inf->non_exited_threads instead of ALL_NON_EXITED_THREADS.
640         * linux-thread-db.c (thread_db_target::update_thread_list):
641         Replace ALL_INFERIORS with all_inferiors.
642         (thread_db_target::thread_handle_to_thread_info): Use
643         inf->non_exited_threads instead of ALL_NON_EXITED_THREADS.
644         * mi/mi-interp.c (multiple_inferiors_p): New.
645         (mi_on_resume_1): Simplify using all_non_exited_threads and
646         multiple_inferiors_p.
647         * mi/mi-main.c (mi_cmd_thread_list_ids): Use all_non_exited_threads
648         instead of ALL_NON_EXITED_THREADS.
649         * nto-procfs.c (nto_procfs_target::open): Don't call
650         init_thread_list here.
651         * record-btrace.c (record_btrace_target_open)
652         (record_btrace_target::stop_recording)
653         (record_btrace_target::close)
654         (record_btrace_target::record_is_replaying)
655         (record_btrace_target::resume, record_btrace_target::wait)
656         (record_btrace_target::record_stop_replaying): Use
657         all_non_exited_threads instead of ALL_NON_EXITED_THREADS.
658         * record-full.c (record_full_wait_1): Use all_non_exited_threads
659         instead of ALL_NON_EXITED_THREADS.
660         * regcache.c (cooked_read_test): Remove reference to global
661         thread_list.
662         * remote-sim.c (gdbsim_target::create_inferior): Don't call
663         init_thread_list here.
664         * remote.c (remote_target::update_thread_list): Use
665         all_threads_safe instead of ALL_NON_EXITED_THREADS.
666         (remote_target::process_initial_stop_replies): Replace
667         ALL_INFERIORS with all_non_exited_inferiors and use
668         all_non_exited_threads instead of ALL_NON_EXITED_THREADS.
669         (remote_target::open_1): Don't call init_thread_list here.
670         (remote_target::append_pending_thread_resumptions)
671         (remote_target::remote_resume_with_hc): Use all_non_exited_threads
672         instead of ALL_NON_EXITED_THREADS.
673         (remote_target::commit_resume)
674         (remote_target::remove_new_fork_children): Replace ALL_INFERIORS
675         with all_non_exited_inferiors and use all_non_exited_threads
676         instead of ALL_NON_EXITED_THREADS.
677         (remote_target::kill_new_fork_children): Use
678         all_non_exited_threads instead of ALL_NON_EXITED_THREADS.  Remove
679         init_thread_list and init_wait_for_inferior calls.
680         (remote_target::remote_btrace_maybe_reopen)
681         (remote_target::thread_handle_to_thread_info): Use
682         all_non_exited_threads instead of ALL_NON_EXITED_THREADS.
683         * target.c (target_terminal::restore_inferior)
684         (target_terminal_is_ours_kind): Replace ALL_INFERIORS with
685         all_non_exited_inferiors.
686         * thread-iter.c: New file.
687         * thread-iter.h: New file.
688         * thread.c: Include "inline-frame.h".
689         (thread_list): Delete.
690         (clear_thread_inferior_resources): Call clear_inline_frame_state.
691         (init_thread_list): Use all_threads_safe instead of
692         ALL_THREADS_SAFE.  Adjust to per-inferior thread lists.
693         (new_thread): Adjust to per-inferior thread lists.
694         (add_thread_silent): Pass inferior to find_thread_ptid.
695         (thread_info::deletable): New, moved from the header.
696         (delete_thread_1): Adjust to per-inferior thread lists.
697         (find_thread_global_id): Use inf->threads().
698         (find_thread_ptid): Use find_inferior_ptid and pass inferior to
699         find_thread_ptid.
700         (find_thread_ptid(inferior*, ptid_t)): New overload.
701         (iterate_over_threads): Use all_threads_safe.
702         (any_thread_p): New.
703         (thread_count): Use all_threads and std::distance.
704         (live_threads_count): Use all_non_exited_threads and
705         std::distance.
706         (valid_global_thread_id): Use all_threads.
707         (in_thread_list): Use find_thread_ptid.
708         (first_thread_of_inferior): Adjust to per-inferior thread lists.
709         (any_thread_of_inferior, any_live_thread_of_inferior): Use
710         inf->non_exited_threads().
711         (prune_threads, delete_exited_threads): Use all_threads_safe.
712         (thread_change_ptid): Pass inferior pointer to find_thread_ptid.
713         (set_resumed, set_running): Use all_non_exited_threads.
714         (is_thread_state, is_stopped, is_exited, is_running)
715         (is_executing): Delete.
716         (set_executing, set_stop_requested, finish_thread_state): Use
717         all_non_exited_threads.
718         (print_thread_info_1): Use all_inferiors and all_threads.
719         (thread_apply_all_command): Use all_non_exited_threads.
720         (thread_find_command): Use all_threads.
721         (update_threads_executing): Use all_non_exited_threads.
722         * tid-parse.c (parse_thread_id): Use inf->threads.
723         * x86-bsd-nat.c (x86bsd_dr_set): Use inf->non_exited_threads ().
724
725 2018-11-22  Pedro Alves  <palves@redhat.com>
726
727         * infrun.c (follow_exec) <set follow-exec new>: Add thread and
728         switch to it before calling into try_open_exec_file.
729
730 2018-11-22  Pedro Alves  <palves@redhat.com>
731
732         * cli/cli-interp.c (cli_on_user_selected_context_changed): Use
733         inferior_thread instead of find_thread_ptid, and only when
734         inferior_ptid is not null_ptid.
735         * inferior.c (add_inferior): Don't include target_pid_to_str
736         output when the inferior is not started.
737         * python/py-inferior.c (python_on_normal_stop): Don't use
738         find_thread_ptid.
739         (tui_on_user_selected_context_changed): Use inferior_thread
740         instead of find_thread_ptid, and only when inferior_ptid is not
741         null_ptid.
742
743 2018-11-21  Benno Fünfstück  <benno.fuenfstueck@gmail.com>
744
745         PR python/23714
746         * gdb/python/python.c (execute_gdb_command): Call
747         prevent_dont_repeat earlier to avoid affecting dont_repeat.
748
749 2018-11-21  Andrew Burgess  <andrew.burgess@embecosm.com>
750
751         * Makefile.in (ALL_TARGET_OBS): Add arch/riscv.o.
752         (HFILES_NO_SRCDIR): Add arch/riscv.h.
753         * arch/riscv.c: New file.
754         * arch/riscv.h: New file.
755         * configure.tgt: Add cpu_obs list of riscv, move riscv-tdep.o into
756         this list, and add arch/riscv.o.
757         * features/Makefile: Add riscv features.
758         * features/riscv/32bit-cpu.c: New file.
759         * features/riscv/32bit-cpu.xml: New file.
760         * features/riscv/32bit-csr.c: New file.
761         * features/riscv/32bit-csr.xml: New file.
762         * features/riscv/32bit-fpu.c: New file.
763         * features/riscv/32bit-fpu.xml: New file.
764         * features/riscv/64bit-cpu.c: New file.
765         * features/riscv/64bit-cpu.xml: New file.
766         * features/riscv/64bit-csr.c: New file.
767         * features/riscv/64bit-csr.xml: New file.
768         * features/riscv/64bit-fpu.c: New file.
769         * features/riscv/64bit-fpu.xml: New file.
770         * features/riscv/rebuild-csr-xml.sh: New file.
771         * riscv-tdep.c: Add 'arch/riscv.h' include.
772         (riscv_gdb_reg_names): Delete.
773         (csr_reggroup): New global.
774         (struct riscv_register_alias): Delete.
775         (struct riscv_register_feature): New structure.
776         (riscv_register_aliases): Delete.
777         (riscv_xreg_feature): New global.
778         (riscv_freg_feature): New global.
779         (riscv_virtual_feature): New global.
780         (riscv_csr_feature): New global.
781         (riscv_create_csr_aliases): New function.
782         (riscv_read_misa_reg): Delete.
783         (riscv_has_feature): Delete.
784         (riscv_isa_xlen): Simplify, just return cached xlen.
785         (riscv_isa_flen): Simplify, just return cached flen.
786         (riscv_has_fp_abi): Update for changes in struct gdbarch_tdep.
787         (riscv_register_name): Update to make use of tdesc_register_name.
788         Look up xreg and freg names in the new globals riscv_xreg_feature
789         and riscv_freg_feature.  Don't supply csr aliases here.
790         (riscv_fpreg_q_type): Delete.
791         (riscv_register_type): Use tdesc_register_type in almost all
792         cases, override the returned type in a few specific cases only.
793         (riscv_print_one_register_info): Handle errors reading registers.
794         (riscv_register_reggroup_p): Use tdesc_register_in_reggroup_p for
795         registers that are otherwise unknown to GDB.  Also check the
796         csr_reggroup.
797         (riscv_print_registers_info): Remove assert about upper register
798         number, and use gdbarch_register_reggroup_p instead of
799         short-cutting.
800         (riscv_find_default_target_description): New function.
801         (riscv_check_tdesc_feature): New function.
802         (riscv_add_reggroups): New function.
803         (riscv_setup_register_aliases): New function.
804         (riscv_init_reggroups): New function.
805         (_initialize_riscv_tdep): Add calls to setup CSR aliases, and
806         setup register groups.  Register new riscv debug variable.
807         * riscv-tdep.h: Add 'arch/riscv.h' include.
808         (struct gdbarch_tdep): Remove abi union, and add
809         riscv_gdbarch_features field.  Remove cached quad floating point
810         type, and provide initialisation for double type field.
811         * target-descriptions.c (maint_print_c_tdesc_cmd): Add riscv to
812         the list of targets using the feature based target descriptions.
813         * NEWS: Mention target description support.
814
815 2018-11-21  Pedro Alves  <palves@redhat.com>
816
817         * valops.c (find_method_list, value_find_oload_method_list)
818         (find_overload_match, find_oload_champ): Rename parameters and
819         locals.
820
821 2018-11-21  Pedro Alves  <palves@redhat.com>
822
823         * valops.c (find_method_list): Replace pointer and length
824         parameters with an gdb::array_view.  Adjust.
825         (value_find_oload_method_list): Likewise.
826         (find_overload_match): Use gdb::array_view for methods list.
827         Adjust to find_oload_champ interface change.
828         (find_oload_champ): 'xm_worker_vec' parameter now a pointer/array.
829         'num_fns' parameter now a size_t.  Eliminate 'fn_count' local.
830
831 2018-11-21  Pedro Alves  <palves@redhat.com>
832
833         * gdbtypes.c (compare_badness): Change type of parameters to const
834         reference.  Adjust to badness_vector being a std::vector now.
835         (rank_function): Adjust to badness_vector being a std::vector now.
836         * gdbtypes.h (badness_vector): Now a typedef to std::vector.
837         (LENGTH_MATCH): Delete.
838         (compare_badness): Change type of parameters to const reference.
839         (rank_function): Return a badness_vector by value now.
840         (find_overload_match): Adjust to badness_vector being a
841         std::vector now.  Remove cleanups.
842         (find_oload_champ_namespace): 'oload_champ_bv' parameter now a
843         badness_vector pointer.
844         (find_oload_champ_namespace_loop): 'oload_champ_bv' parameter now
845         a badness_vector pointer.  Adjust to badness_vector being a
846         std::vector now.  Remove cleanups.
847         (find_oload_champ): 'oload_champ_bv' parameter now
848         a badness_vector pointer.  Adjust to badness_vector being a
849         std::vector now.  Remove cleanups.
850
851 2018-11-21  Pedro Alves  <palves@redhat.com>
852
853         * cp-support.c (sym_return_val_size, sym_return_val_index)
854         (sym_return_val): Delete.
855         (overload_list_add_symbol): Add std::vector parameter.  Adjust to
856         add to the vector.
857         (make_symbol_overload_list): Adjust to return a std::vector
858         instead of maintaining a global open coded vector.
859         (make_symbol_overload_list_block): Add std::vector parameter.
860         (make_symbol_overload_list_block): Rename to ...
861         (add_symbol_overload_list_block): ... this and add std::vector
862         parameter.
863         (make_symbol_overload_list_namespace): Rename to ...
864         (add_symbol_overload_list_namespace): ... this and add std::vector
865         parameter.
866         (make_symbol_overload_list_adl_namespace): Rename to ...
867         (add_symbol_overload_list_adl_namespace): ... this and add
868         std::vector parameter.
869         (make_symbol_overload_list_adl): Delete.
870         (add_symbol_overload_list_adl): New.
871         (make_symbol_overload_list_using): Rename to ...
872         (add_symbol_overload_list_using): ... this and add std::vector
873         parameter.
874         (make_symbol_overload_list_qualified): Rename to ...
875         (add_symbol_overload_list_qualified): ... this and add std::vector
876         parameter.
877         * cp-support.h: Include "common/array-view.h" and <vector>.
878         (make_symbol_overload_list): Change return type to std::vector.
879         (make_symbol_overload_list_adl): Delete declaration.
880         (add_symbol_overload_list_adl): New declaration.
881         * valops.c (find_overload_match): Local 'oload_syms' now a
882         std::vector.
883         (find_oload_champ_namespace): 'oload_syms' parameter now a
884         std::vector pointer.
885         (find_oload_champ_namespace_loop): 'oload_syms' parameter now a
886         std::vector pointer.  Adjust to new make_symbol_overload_list
887         interface.
888
889 2018-11-21  Pedro Alves  <palves@redhat.com>
890
891         * common/array-view.h (array_view::splice(size_type, size_t)): New.
892         (array_view::splice(size_type)): New.
893         * eval.c (eval_call, evaluate_funcall): Adjust to use array_view.
894         * extension.c (xmethod_worker::get_arg_types): Adjust to return an
895         std::vector.
896         (xmethod_worker::get_result_type): Adjust to use gdb::array_view.
897         * extension.h: Include "common/array-view.h".
898         (xmethod_worker::invoke): Adjust to use gdb::array_view.
899         (xmethod_worker::get_arg_types): Adjust to return an std::vector.
900         (xmethod_worker::get_result_type): Adjust to use gdb::array_view.
901         (xmethod_worker::do_get_arg_types): Adjust to use std::vector.
902         (xmethod_worker::do_get_result_type): Adjust to use
903         gdb::array_view.
904         * gdbtypes.c (rank_function): Adjust to use gdb::array_view.
905         * gdbtypes.h: Include "common/array-view.h".
906         (rank_function): Adjust to use gdb::array_view.
907         * python/py-xmethods.c (python_xmethod_worker::invoke)
908         (python_xmethod_worker::do_get_arg_types)
909         (python_xmethod_worker::do_get_result_type)
910         (python_xmethod_worker::invoke): Adjust to new interfaces.
911         * valarith.c (value_user_defined_cpp_op, value_user_defined_op)
912         (value_x_binop, value_x_unop): Adjust to use gdb::array_view.
913         * valops.c (find_overload_match, find_oload_champ_namespace)
914         (find_oload_champ_namespace_loop, find_oload_champ): Adjust to use
915         gdb:array_view and the new xmethod_worker interfaces.
916         * value.c (result_type_of_xmethod, call_xmethod): Adjust to use
917         gdb::array_view.
918         * value.h (find_overload_match, result_type_of_xmethod)
919         (call_xmethod): Adjust to use gdb::array_view.
920         * unittests/array-view-selftests.c: Add slicing tests.
921
922 2018-11-21  Pedro Alves  <palves@redhat.com>
923
924         * ada-lang.c (ada_evaluate_subexp): Adjust to pass an array_view.
925         * common/array-view.h (make_array_view): New.
926         * compile/compile-object-run.c (compile_object_run): Adjust to
927         pass an array_view.
928         * elfread.c (elf_gnu_ifunc_resolve_addr): Adjust.
929         * eval.c (eval_call): Adjust to pass an array_view.
930         (evaluate_subexp_standard): Adjust to pass an array_view.
931         * gcore.c (call_target_sbrk): Adjust to pass an array_view.
932         * guile/scm-value.c (gdbscm_value_call): Likewise.
933         * infcall.c (push_dummy_code): Replace pointer + size parameters
934         with an array_view parameter.
935         (call_function_by_hand, call_function_by_hand_dummy): Likewise and
936         adjust.
937         * infcall.h: Include "common/array-view.h".
938         (call_function_by_hand, call_function_by_hand_dummy): Replace
939         pointer + size parameters with an array_view parameter.
940         * linux-fork.c (inferior_call_waitpid): Adjust to use array_view.
941         * linux-tdep.c (linux_infcall_mmap): Likewise.
942         * objc-lang.c (lookup_objc_class, lookup_child_selector)
943         (value_nsstring, print_object_command): Likewise.
944         * python/py-value.c (valpy_call): Likewise.
945         * rust-lang.c (rust_evaluate_funcall): Likewise.
946         * spu-tdep.c (flush_ea_cache): Likewise.
947         * valarith.c (value_x_binop, value_x_unop): Likewise.
948         * valops.c (value_allocate_space_in_inferior): Likewise.
949         * unittests/array-view-selftests.c (run_tests): Add
950         gdb::make_array_view test.
951
952 2018-11-20  Andrew Burgess  <andrew.burgess@embecosm.com>
953
954         * cli-out.c (cli_ui_out::do_field_int): Use string_printf rather
955         than a fixed size buffer.
956
957 2018-11-20  Andrew Burgess  <andrew.burgess@embecosm.com>
958
959         * breakpoint.c (print_one_breakpoint_location): Reduce whitespace,
960         and remove insertion of extra spaces in GDB's output.
961         * cli-out.c (cli_ui_out::do_field_fmt): Update header comment.
962         Layout field into a temporary buffer, and then output it as a
963         string field.
964
965 2018-11-20  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
966
967         * NEWS: Document the language choice done by
968         'info [types|functions|variables]|rbreak'.
969
970 2018-11-20  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
971
972         * symtab.c (treg_matches_sym_type_name): Use
973         scoped_switch_to_sym_language_if_auto instead of local logic.
974         (print_symbol_info): Use scoped_switch_to_sym_language_if_auto
975         to switch to SYM language when language mode is auto.
976
977 2018-11-20  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
978
979         * language.h (scoped_switch_to_sym_language_if_auto): New class.
980
981 2018-11-20  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
982
983         * symtab.c (search_symbols): Properly check absence of type regexp
984         before entering the loop scanning the minimal symbols.
985
986 2018-11-20  John Darrington  <john@darrington.wattle.id.au>
987
988         * s12z-tdep.c (s12z_extract_return_value): New function.
989         (inv_reg_perm) New array.
990         (s12z_return_value): Populate readbuf if non-null.
991
992 2018-11-20  Eli Zaretskii  <eliz@gnu.org>
993
994         * common/filestuff.c (gdb_fopen_cloexec): Disable use of "e" mode
995         with 'fopen' also if O_CLOEXEC is equal to O_NOINHERIT, to cater
996         to MinGW fixed by Gnulib.
997         (O_NOINHERIT): Define if not defined.
998
999 2018-11-19  John Darrington  <john@darrington.wattle.id.au>
1000
1001         * s12z-tdep.c (s12z_frame_cache): Add an assertion.
1002
1003 2018-11-19  Simon Marchi  <simon.marchi@polymtl.ca>
1004
1005         * infrun.c (displaced_step_inferior_state) <next>: Remove.
1006
1007 2018-11-19  Tom Tromey  <tom@tromey.com>
1008
1009         * source.c (get_filename_and_charpos): Return void.
1010
1011 2018-11-19  Simon Marchi  <simon.marchi@polymtl.ca>
1012
1013         * skip.c (_initialize_step_skip): Fix "info skip" help.
1014
1015 2018-11-16  Tom Tromey  <tom@tromey.com>
1016
1017         PR rust/23625:
1018         * rust-lang.c (rust_internal_print_type): Handle TYPE_CODE_PTR.
1019
1020 2018-11-19  Simon Marchi  <simon.marchi@ericsson.com>
1021
1022         * infrun.c (displaced_step_inferior_states): Change type to
1023         std::forward_list.
1024         (get_displaced_stepping_state): Adjust.
1025         (displaced_step_in_progress_any_inferior): Adjust.
1026         (add_displaced_stepping_state): Adjust.
1027         (remove_displaced_stepping_state): Adjust.
1028
1029 2018-11-18  Tom Tromey  <tom@tromey.com>
1030
1031         PR build/23814:
1032         * target-delegates.c: Rebuild.
1033         * ia64-linux-nat.c (class ia64_linux_nat_target)
1034         <have_steppable_watchpoint>: Use override.  Return true, not 1.
1035         (ia64_linux_nat_target::can_use_hw_breakpoint): Rename.  Remove
1036         "self" argument.
1037         (ia64_linux_nat_target::low_new_thread): Rename.
1038         (class ia64_linux_nat_target) <read_description>: Don't declare.
1039         * target.h (struct target_ops) <have_steppable_watchpoint>: Return
1040         bool.
1041
1042 2018-11-16  Alan Hayward  <alan.hayward@arm.com>
1043
1044         PR gdb/22736:
1045         * aarch64-tdep.c (aarch64_push_dummy_call): Remove
1046         lang_struct_return code.
1047
1048 2018-11-16  Alan Hayward  <alan.hayward@arm.com>
1049
1050         * aarch64-tdep.c (aarch64_push_dummy_call): Replace arg with
1051         return_method.
1052         * alpha-tdep.c (alpha_push_dummy_call): Likewise.
1053         * amd64-tdep.c (amd64_push_arguments): Likewise.
1054         (amd64_push_dummy_call): Likewise.
1055         * amd64-windows-tdep.c (amd64_windows_push_arguments): Likewise.
1056         * arc-tdep.c (arc_push_dummy_call): Likewise.
1057         * arm-tdep.c (arm_push_dummy_call): Likewise.
1058         * avr-tdep.c (avr_push_dummy_call): Likewise.
1059         * bfin-tdep.c (bfin_push_dummy_call): Likewise.
1060         * cris-tdep.c (cris_push_dummy_call): Likewise.
1061         * csky-tdep.c (csky_push_dummy_call): Likewise.
1062         * frv-tdep.c (frv_push_dummy_call): Likewise.
1063         * gdbarch.c: Regenerate.
1064         * gdbarch.h: Regenerate.
1065         * gdbarch.sh (gdbarch_push_dummy_call): Replace arg with
1066         return_method.
1067         * h8300-tdep.c (h8300_push_dummy_call): Likewise.
1068         * hppa-tdep.c (hppa32_push_dummy_call): Likewise.
1069         (hppa64_push_dummy_call): Likewise.
1070         * i386-darwin-tdep.c (i386_darwin_push_dummy_call): Likewise.
1071         * i386-tdep.c (i386_push_dummy_call): Likewise.
1072         * ia64-tdep.c (ia64_push_dummy_call): Likewise.
1073         * infcall.c (call_function_by_hand_dummy): Likewise.
1074         * iq2000-tdep.c (iq2000_push_dummy_call): Likewise.
1075         * lm32-tdep.c (lm32_push_dummy_call): Likewise.
1076         * m32c-tdep.c (m32c_push_dummy_call): Likewise.
1077         * m32r-tdep.c (m32r_push_dummy_call): Likewise.
1078         * m68hc11-tdep.c (m68hc11_push_dummy_call): Likewise.
1079         * m68k-tdep.c (m68k_push_dummy_call): Likewise.
1080         * mep-tdep.c (mep_push_dummy_call): Likewise.
1081         * mips-tdep.c (mips_eabi_push_dummy_call): Likewise.
1082         (mips_n32n64_push_dummy_call): Likewise.
1083         (mips_o32_push_dummy_call): Likewise.
1084         (mips_o64_push_dummy_call): Likewise.
1085         * mn10300-tdep.c (mn10300_push_dummy_call): Likewise.
1086         * msp430-tdep.c (msp430_push_dummy_call): Likewise.
1087         * nds32-tdep.c (nds32_push_dummy_call): Likewise.
1088         * nios2-tdep.c (nios2_push_dummy_call): Likewise.
1089         * or1k-tdep.c (or1k_push_dummy_call): Likewise.
1090         * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
1091         (ppc64_sysv_abi_push_dummy_call): Likewise.
1092         * ppc-tdep.h (ppc_sysv_abi_push_dummy_call): Likewise.
1093         (ppc64_sysv_abi_push_dummy_call): Likewise.
1094         * riscv-tdep.c (riscv_push_dummy_call): Likewise.
1095         * rl78-tdep.c (rl78_push_dummy_call): Likewise.
1096         * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
1097         * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
1098         * rx-tdep.c (rx_push_dummy_call): Likewise.
1099         * s390-tdep.c (s390_push_dummy_call): Likewise.
1100         * score-tdep.c (score_push_dummy_call): Likewise.
1101         * sh-tdep.c (sh_push_dummy_call_fpu): Likewise.
1102         (sh_push_dummy_call_nofpu): Likewise.
1103         * sparc-tdep.c (sparc32_store_arguments): Likewise.
1104         (sparc32_push_dummy_call): Likewise.
1105         * sparc64-tdep.c (sparc64_store_arguments): Likewise.
1106         (sparc64_push_dummy_call): Likewise.
1107         * spu-tdep.c (spu_push_dummy_call): Likewise.
1108         * tic6x-tdep.c (tic6x_push_dummy_call): Likewise.
1109         * tilegx-tdep.c (tilegx_push_dummy_call): Likewise.
1110         * v850-tdep.c (v850_push_dummy_call): Likewise.
1111         * vax-tdep.c (vax_push_dummy_call): Likewise.
1112         * xstormy16-tdep.c (xstormy16_push_dummy_call): Likewise.
1113         * xtensa-tdep.c (xtensa_push_dummy_call): Likewise.
1114
1115 2018-11-16  Alan Hayward  <alan.hayward@arm.com>
1116
1117         * gdbarch.sh (enum function_call_return_method): Add enum.
1118         * gdbarch.h: Regenerate.
1119         * infcall.c (call_function_by_hand_dummy): Replace vars with enum.
1120
1121 2018-11-15  Joel Brobecker  <brobecker@adacore.com>
1122
1123         * unittests/copy_bitwise-selftests.c: New file.
1124         * utils.c (selftests::bits_to_str, selftests::check_copy_bitwise)
1125         (selftests::copy_bitwise_tests): Delete, moving this code to
1126         unittests/copy_bitwise-selftests.c instead.
1127         (_initialize_utils): Do not register copy_bitwise tests.
1128         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1129         unittests/copy_bitwise-selftests.c.
1130
1131 2018-11-14  Joel Brobecker  <brobecker@adacore.com>
1132
1133         * ada-lang.c (move_bits): Delete. Update all callers to use
1134         copy_bitwise instead.
1135         * dwarf2loc.c (copy_bitwise, bits_to_str::bits_to_str)
1136         (selftests::check_copy_bitwise, selftests::copy_bitwise_tests):
1137         Move from here to utils.c.
1138         (_initialize_dwarf2loc): Remove call to register copy_bitwise
1139         selftests.
1140         * utils.h (copy_bitwise): Add declaration.
1141         * utils.c (copy_bitwise, bits_to_str::bits_to_str)
1142         (selftests::check_copy_bitwise, selftests::copy_bitwise_tests):
1143         Moved here from dwarf2loc.c.
1144         (_initialize_utils): Register copy_bitwise selftests.
1145
1146 2018-11-14  Jim Wilson  <jimw@sifive.com>
1147
1148         * riscv-tdep.c (struct riscv_arg_info): New field is_unnamed.
1149         (riscv_call_arg_scalar_int): If unnamed arg with twice xlen alignment,
1150         then increment next_regnum if odd.
1151         (riscv_arg_location): New arg is_unnamed.  Set ainfo->is_unnamed.
1152         (riscv_push_dummy_call): New local ftype.  Call check_typedef to set
1153         function type.  Pass new arg to riscv_arg_location based on function
1154         type.
1155         (riscv_return_value): Pass new arg to riscv_arg_location.
1156
1157         * riscv-tdep.c (BIGGEST_ALIGNMENT): New.
1158         (riscv_type_alignment) <TYPE_CODE_ARRAY>: If TYPE_VECTOR, return min
1159         of TYPE_LENGTH and BIGGEST_ALIGNMENT.
1160
1161         * riscv-tdep.c (riscv_call_arg_scalar_int): Use std::min when
1162         setting len.  New local align, set to max of arg align and xlen,
1163         and pass to first riscv_assign_stack_location call.
1164
1165 2018-11-12  Simon Marchi  <simon.marchi@polymtl.ca>
1166
1167         * skip.c (complete_skip_number): New function.
1168         (_initialize_step_skip): Add completers to some skip commands.
1169
1170 2018-11-09  Tom Tromey  <tom@tromey.com>
1171
1172         * remote.c (remote_g_packet_guess_s): Remove typedef and DEF_VEC.
1173         (struct remote_g_packet_data): Derive from allocate_on_obstack.
1174         <guesses>: Now a std::vector.
1175         (remote_g_packet_data_init, register_remote_g_packet_guess):
1176         Update.
1177         (remote_read_description_p): Update.  Return bool.
1178         (remote_target::read_description): Update.
1179         (struct remote_g_packet_guess): Add constructor.
1180
1181 2018-11-09  Tom Tromey  <tom@tromey.com>
1182
1183         * common/scoped_fd.h (class scoped_fd): Add move constructor and
1184         move assignment operator.
1185         * psymtab.c (psymtab_to_fullname): Update.
1186         * source.h (open_source_file): Return scoped_fd.
1187         (find_and_open_source): Likewise.
1188         * source.c (open_source_file): Return scoped_fd.
1189         (get_filename_and_charpos): Update.
1190         (print_source_lines_base): Update.  Use scoped_fd::to_file.
1191         (forward_search_command): Likewise.
1192         (reverse_search_command): Likewise.
1193         (find_and_open_source): Return scoped_fd.
1194         * tui/tui-source.c (tui_set_source_content): Update.  Use
1195         gdb_file_up.
1196
1197 2018-11-09  John Baldwin  <jhb@FreeBSD.org>
1198
1199         * minsyms.c (minimal_symbol_reader::install): Fix unsigned
1200         overflow.
1201
1202 2018-11-09  Hafiz Abid Qadeer  <abidh@codesourcery.com>
1203
1204         * configure: Regenerate.
1205
1206 2018-11-09  Tom de Vries  <tdevries@suse.de>
1207
1208         * symtab.c (symbol_set_names): Call symbol_find_demangled_name
1209         unconditionally, to set the language of the symbol.  Manage freeing
1210         returned pointer using gdb::unique_xmalloc_ptr.
1211
1212 2018-11-08  Tom Tromey  <tom@tromey.com>
1213
1214         * record.c (require_record_target): Upper-case "<TAB>".
1215
1216 2018-11-08  Tom Tromey  <tom@tromey.com>
1217
1218         * python/lib/gdb/command/pretty_printers.py
1219         (InfoPrettyPrinter.invoke): Don't indent "objfile" heading.
1220
1221 2018-11-08  Tom Tromey  <tom@tromey.com>
1222
1223         PR gdb/23555:
1224         PR gdb/23838:
1225         * target.h (target_supports_terminal_ours): Return bool.
1226         * target.c (target_supports_terminal_ours): Handle case where
1227         current_top_target returns nullptr.  Return bool.
1228
1229 2018-11-08  Joel Brobecker  <brobecker@adacore.com>
1230
1231         * aarch64-tdep.c (aapcs_is_vfp_call_or_return_candidate_1):
1232         return the correct count for potential HFAs.
1233
1234 2018-11-08  Jan Beulich  <jbeulich@suse.com>
1235
1236         * i387-tdep.c (i387_supply_xsave): Split handling of
1237         X86_XSTATE_ZMM_H and X86_XSTATE_ZMM.
1238         (i387_collect_xsave): Likewise.
1239
1240 2018-11-08  Andrew Burgess  <andrew.burgess@embecosm.com>
1241
1242         * riscv-tdep.c (riscv_insn::decode): Update header comment.
1243         (riscv_frame_this_id): Catch errors thrown while building the
1244         frame cache, leave the frame id as the default, which is the outer
1245         frame id.
1246
1247 2018-11-07  Joel Brobecker  <brobecker@adacore.com>
1248
1249         * ada-lang.c (read_atcb): Only set task_info->called_task if
1250         task_info->state == Entry_Caller_Sleep.
1251         (print_ada_task_info): Do not check task_info->state before
1252         checking task_info->called_task.
1253         (info_task): Likewise.
1254
1255 2018-11-07  Joel Brobecker  <brobecker@adacore.com>
1256
1257         * ada-tasks.c (read_atcb): Clear task_info before computing
1258         the value of each of its fields.
1259
1260 2018-11-07  Andrew Burgess  <andrew.burgess@embecosm.com>
1261
1262         * dwarf2read.c (dwarf2_init_integer_type): Check for name being
1263         NULL before dereferencing it.
1264
1265 2018-11-06  Tom de Vries  <tdevries@suse.de>
1266
1267         * linux-tdep.c (linux_vsyscall_range_raw): Use xmalloc to allocate
1268         program headers.
1269
1270 2018-11-06  Max Filippov  <jcmvbkbc@gmail.com>
1271
1272         * configure.tgt (xtensa*-*-linux*): Change to xtensa*-*-*linux*
1273         so that it applies to uclinux as well.
1274
1275 2018-11-06  Marius Muench  <marius.muench@eurecom.fr>
1276
1277         * arm-tdep.c (arm_scan_prologue): Don't dereference FP reg
1278         when on AAPCS.
1279
1280 2018-11-06  John Baldwin  <jhb@FreeBSD.org>
1281
1282         * riscv-fbsd-nat.c (getregs_supplies): Return true for
1283         RISCV_CSR_SSTATUS_REGNUM.
1284
1285 2018-11-04  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1286
1287         * source.c (open_source_file): Fix leak by transferring the
1288         current s->fullname to the unique_xmalloc_ptr fullname given
1289         to find_and_open_source.
1290
1291 2018-11-04  Tom Tromey  <tom@tromey.com>
1292
1293         * varobj.c (install_default_visualizer): Update.
1294         * python/python-internal.h (gdbpy_get_varobj_pretty_printer):
1295         Return gdbpy_ref.
1296         * python/py-prettyprint.c (search_pp_list): Return gdbpy_ref.
1297         (find_pretty_printer_from_progspace)
1298         (find_pretty_printer_from_gdb, find_pretty_printer)
1299         (gdbpy_get_varobj_pretty_printer): Return gdbpy_ref.
1300         (gdbpy_get_varobj_pretty_printer, gdbpy_default_visualizer):
1301         Update.
1302
1303 2018-11-04  Tom Tromey  <tom@tromey.com>
1304
1305         * python/python.c (gdbpy_parameter_value): Update.
1306         * python/python-internal.h (python_string_to_unicode)
1307         (python_string_to_target_python_string)
1308         (host_string_to_python_string): Return gdbpy_ref.
1309         * python/py-utils.c (python_string_to_unicode)
1310         (unicode_to_encoded_python_string)
1311         (unicode_to_target_python_string)
1312         (python_string_to_target_string)
1313         (python_string_to_target_python_string): Return gdbpy_ref.
1314         (python_string_to_host_string): Update.
1315         (host_string_to_python_string): Return gdbpy_ref.
1316         * python/py-symtab.c (stpy_get_filename, stpy_get_producer)
1317         (stpy_fullname): Update.
1318         * python/py-progspace.c (pspy_get_filename, pspy_solib_name):
1319         Update.
1320         * python/py-prettyprint.c (print_string_repr): Update.
1321         * python/py-objfile.c (objfpy_get_filename, objfpy_get_username)
1322         (objfpy_get_build_id): Update.
1323         * python/py-breakpoint.c (bppy_get_location)
1324         (bppy_get_expression, bppy_get_condition, bppy_get_commands):
1325         Update.
1326
1327 2018-11-04  Tom Tromey  <tom@tromey.com>
1328
1329         * python/python-internal.h (gdb_py_object_from_longest)
1330         (gdb_py_object_from_ulongest): Return gdbpy_ref.
1331         * python/py-value.c (valpy_int): Update.
1332         * python/py-utils.c (gdb_py_object_from_longest): Return
1333         gdbpy_ref.
1334         (gdb_py_object_from_ulongest): Likewise.
1335         * python/py-type.c (typy_get_alignof): Update.
1336         * python/py-linetable.c (ltpy_get_all_source_lines)
1337         (ltpy_entry_get_line, ltpy_entry_get_pc): Update.
1338         * python/py-block.c (blpy_get_start, blpy_get_end): Update.
1339
1340 2018-11-03  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1341
1342         * ada-lang.c (_initialize_ada_language): Fix typo.
1343
1344 2018-11-03  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1345
1346         * language.c (type): Remove.
1347         (_initialize_language): Remove assignment to type.
1348
1349 2018-11-02  Joel Brobecker  <brobecker@adacore.com>
1350
1351         * aarch64-ravenscar-thread.h, aarch64-ravenscar-thread.c: New files.
1352         * aarch64-tdep.c: #include "aarch64-ravenscar-thread.h".
1353         (aarch64_gdbarch_init): Add call to register_aarch64_ravenscar_ops.
1354         * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-ravenscar-thread.o.
1355         (HFILES_NO_SRCDIR): Add aarch64-ravenscar-thread.h.
1356         (ALLDEPFILES): Add aarch64-ravenscar-thread.c.
1357         * configure.tgt (cpu_obs) [aarch64*-*-*]: Add ravenscar-thread.o
1358         and aarch64-ravenscar-thread.o.
1359         * NEWS: Add entry documenting Ravenscar tasking support
1360         on AArch64 ELF.
1361
1362 2018-11-02  Matthew Malcomson  <matthew.malcomson@arm.com>
1363
1364         * symtab.c (info_functions_command): Initialize quiet flag.
1365         * stack.c (info_args_command): Likewise.
1366
1367 2018-11-01  Jim Wilson  <jimw@sifive.com>
1368
1369         * riscv-tdep.c (riscv_breakpoint_kind_from_pc): New local unaligned_p.
1370         Set if pcptr if unaligned.  Return 2 if unaligned_p true.  Update
1371         debugging messages.
1372
1373 2018-11-01  Joel Brobecker  <brobecker@adacore.com>
1374
1375         * ada-lang.c (ada_watch_location_expression): New function.
1376         (ada_language_defn): Set la_watch_location_expression to
1377         ada_watch_location_expression.
1378
1379 2018-11-01  Joel Brobecker  <brobecker@adacore.com>
1380
1381         * print-utils.c (int_string): Remove unnecessary trailing spaces.
1382
1383 2018-11-01  Joel Brobecker  <brobecker@adacore.com>
1384
1385         * rs6000-tdep.c (skip_prologue): Fix potential negative left
1386         shifting.
1387
1388 2018-11-01  Jerome Guitton  <guitton@adacore.com>
1389             Joel Brobecker  <brobecker@adacore.com>
1390
1391         * defs.h (enum gdb_osabi): Add GDB_OSABI_PIKEOS.
1392         * osabi.c (gdb_osabi_names): Add name for GDB_OSABI_PIKEOS.
1393         * arm-pikeos-tdep.c: New file.
1394         * configure.tgt: Add arm-pikeos-tdep.o to the case of ARM
1395         embedded system.
1396         * Makefile.in (ALL_TARGET_OBS): Add arm-pikeos-tdep.o.
1397
1398 2018-11-01  Simon Marchi  <simon.marchi@ericsson.com>
1399
1400         * common/pathstuff.c (get_standard_temp_dir): New.
1401         * common/pathstuff.h (get_standard_temp_dir): New.
1402         * config.in: Re-generate.
1403         * configure: Re-generate.
1404         * configure.ac: Don't check for mkdtemp.
1405         * gnulib/aclocal-m4-deps.mk: Re-generate.
1406         * gnulib/aclocal.m4: Re-generate.
1407         * gnulib/config.in: Re-generate.
1408         * gnulib/configure: Re-generate.
1409         * gnulib/import/Makefile.am: Re-generate.
1410         * gnulib/import/Makefile.in: Re-generate.
1411         * gnulib/import/m4/gnulib-cache.m4: Re-generate.
1412         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
1413         * gnulib/import/m4/mkdtemp.m4: New file.
1414         * gnulib/import/mkdtemp.c: New file.
1415         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES):
1416         Add mkdtemp module.
1417         * unittests/mkdir-recursive-selftests.c (test): Use
1418         get_standard_temp_dir.
1419         (_initialize_mkdir_recursive_selftests): Remove HAVE_MKDTEMP
1420         ifdef.
1421         * compile/compile.c (get_compile_file_tempdir): Likewise.
1422
1423 2018-11-01  Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
1424
1425         * rs6000-aix-tdep.c: Include "trad-frame.h" and "frame-unwind.h".
1426         (SIG_FRAME_LR_OFFSET64): New define.
1427         (SIG_FRAME_FP_OFFSET64): New define.
1428         (aix_sighandle_frame_cache): New Function.
1429         (aix_sighandle_frame_this_id): New Function.
1430         (aix_sighandle_frame_prev_register): New Function.
1431         (aix_sighandle_frame_sniffer): New Function.
1432         (aix_sighandle_frame_unwind): New global variable.
1433         (rs6000_aix_init_osabi): Install new frame unwinder.
1434
1435 2018-10-31  Sergio Durigan Junior  <sergiodj@redhat.com>
1436
1437         PR gdb/23835
1438         * common/common-defs.h: Don't redefine _FORTIFY_SOURCE if it's
1439         already defined.
1440
1441 2018-10-31  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1442
1443         * ppc-linux-nat.c: Include nat/linux-ptrace.h.
1444
1445 2018-10-31  Andrew Burgess  <andrew.burgess@embecosm.com>
1446
1447         * dwarf2read.c (struct dwarf2_cu): Add producer_is_icc field.
1448         (producer_is_icc): New function.
1449         (check_producer): Set producer_is_icc field on dwarf2_cu.
1450         (dwarf2_init_integer_type): New function.
1451         (read_base_type): Call dwarf2_init_integer_type instead of
1452         init_integer_type in all cases.
1453         (dwarf2_cu::dwarf2_cu): Initialise producer_is_icc field.
1454         * valprint.c (maybe_negate_by_bytes): Add an assertion that the
1455         LEN is greater than 0.
1456
1457 2018-10-30  Tom Tromey  <tom@tromey.com>
1458
1459         * main.c (captured_main_1): Check return value of bfd_init.
1460
1461 2018-10-29  Sergio Durigan Junior  <sergiodj@redhat.com>
1462
1463         * common/offset-type.h (DEFINE_OFFSET_REL_OP): Delete.
1464         Adjust comments.
1465
1466 2018-10-29  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1467
1468         * procfs.c: Include common/pathstuff.h.
1469
1470 2018-10-28  Andrew Burgess  <andrew.burgess@embecosm.com>
1471
1472         * riscv-linux-nat.c (riscv_linux_nat_target::fetch_registers):
1473         Add missing braces.  No functional change.
1474
1475 2018-10-27  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1476
1477         * macrocmd.c (info_macro_command): Use report_unrecognized_option_error
1478         to report a bad option and fix indentation.
1479         * demangle.c (demangle_command): Use report_unrecognized_option_error
1480         to report a bad option and correctly report the bad option.
1481
1482 2018-10-27  Tom Tromey  <tom@tromey.com>
1483
1484         PR cli/23364:
1485         * darwin-nat.c (copied_shell): New global.
1486         (may_have_sip): Rename from should_disable_startup_with_shell.
1487         (copy_shell_to_cache, maybe_cache_shell): New functions.
1488         (darwin_nat_target::create_inferior): Update.  Use
1489         copied_shell.
1490
1491 2018-10-27  Tom Tromey  <tom@tromey.com>
1492
1493         * unittests/scoped_fd-selftests.c (test_to_file): New function.
1494         (run_tests): Call test_to_file.
1495         * dwarf-index-write.c (write_psymtabs_to_index): Do not reopen
1496         temporary files.
1497         * common/scoped_fd.h (scoped_fd::to_file): New method.
1498
1499 2018-10-27  Tom Tromey  <tom@tromey.com>
1500
1501         * unittests/scoped_mmap-selftests.c (test_normal): Use
1502         gdb_mkostemp_cloexec.
1503         * unittests/scoped_fd-selftests.c (test_destroy, test_release):
1504         Use gdb_mkostemp_cloexec.
1505         * gnulib/aclocal-m4-deps.mk, gnulib/aclocal.m4,
1506         gnulib/config.in, gnulib/configure,
1507         gnulib/import/Makefile.am, gnulib/import/Makefile.in,
1508         gnulib/import/m4/gnulib-cache.m4,
1509         gnulib/import/m4/gnulib-comp.m4: Update.
1510         * gnulib/import/m4/mkostemp.m4: New file.
1511         * gnulib/import/m4/mkstemp.m4: Remove.
1512         * gnulib/import/mkostemp.c: New file.
1513         * gnulib/import/mkstemp.m4: Remove.
1514         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Remove
1515         mkstemp, add mkostemp.  Apply new patch.
1516         * gnulib/import/stdlib.in.h: Apply patch.
1517         * gnulib/patches/0002-mkostemp-mkostemps-Fix-compilation-error-in-C-mode-o.patch:
1518         New file.
1519         * dwarf-index-write.c (write_psymtabs_to_index): Use
1520         gdb_mkostemp_cloexec.
1521         * common/filestuff.h (gdb_mkostemp_cloexec): New function.
1522
1523 2018-10-27  Tom Tromey  <tom@tromey.com>
1524
1525         * unittests/mkdir-recursive-selftests.c: New file.
1526         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1527         unittests/mkdir-recursive-selftests.c.
1528         * dwarf-index-cache.c (mkdir_recursive): Move to
1529         common/filestuff.c.
1530         (index_cache::store): Check return value of mkdir_recursive.
1531         (create_dir_and_check, test_mkdir_recursive): Move to new file.
1532         (_initialize_index_cache): Don't register test.
1533         * common/filestuff.h (mkdir_recursive): Declare.
1534         * common/filestuff.c (mkdir_recursive): Move from
1535         dwarf-index-cache.c.  Return bool.
1536
1537 2018-10-27  Tom Tromey  <tom@tromey.com>
1538
1539         * dwarf-index-write.c (write_psymtabs_to_index): Move
1540         make_temp_filename to common/pathstuff.c.
1541         * common/pathstuff.h (make_temp_filename): Declare.
1542         * common/pathstuff.c (make_temp_filename): New function, moved
1543         from dwarf-index-write.c.
1544
1545 2018-10-27  Tom Tromey  <tom@tromey.com>
1546
1547         * procfs.c (procfs_target::create_inferior): Use get_shell.
1548         * cli/cli-cmds.c (shell_escape): Use get_shell.
1549         * windows-nat.c (windows_nat_target::create_inferior): Use
1550         get_shell.
1551         * common/pathstuff.c (get_shell): New function.
1552         * nat/fork-inferior.c (SHELL_FILE, get_startup_shell): Remove.
1553         (fork_inferior): Use get_shell.
1554         * common/pathstuff.h (get_shell): Declare.
1555
1556 2018-10-27  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1557
1558         * NEWS: Mention changes to 'info [args|functions|locals|variables]'
1559
1560 2018-10-27  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1561
1562         * stack.c (print_variable_and_value_data): Add preg and treg.
1563         (print_frame_local_vars): Add quiet, regexp and t_regexp arguments,
1564         and update callers.
1565         (print_frame_arg_vars): Likewise.
1566         (prepare_reg): New function.
1567         (info_locals_command): Extract info print args and use them.
1568         (info_args_command): Likewise.
1569         (_initialize_stack): Modify on-line help.
1570         * symtab.c (treg_matches_sym_type_name): New function.
1571         (search_symbols): New arg t_regexp.
1572         (symtab_symbol_info): New args quiet, regexp, t_regexp.
1573         (info_variables_command): Extract info print args and use them.
1574         (info_functions_command): Likewise.
1575         (info_types_command): Update call to symtab_symbol_info.
1576         (_initialize_symtab): Modify on-line help.
1577         * symtab.h (treg_matches_sym_type_name): New function.
1578         (search_symbols): New t_regexp arg.
1579
1580 2018-10-27  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1581
1582         * cli-utils.c (extract_arg_maybe_quoted): New function.
1583         (extract_info_print_args): New function.
1584         (info_print_args_help): New function.
1585         (report_unrecognized_option_error): New function.
1586         * cli-utils.h (extract_arg_maybe_quoted): New function.
1587         (extract_info_print_args): New function.
1588         (info_print_args_help): New function.
1589         (report_unrecognized_option_error): New function.
1590
1591 2018-10-26  Tom Tromey  <tom@tromey.com>
1592
1593         * dwarf2read.c (recursively_compute_inclusions): Use std::vector.
1594         (compute_compunit_symtab_includes): Update.
1595         * symtab.h: (symtab_ptr): Remove typedef.  Don't define a VEC.
1596         (compunit_symtab_ptr): Likewise.
1597
1598 2018-10-26  John Baldwin  <jhb@FreeBSD.org>
1599
1600         * fbsd-tdep.c (fbsd_print_auxv_entry): Only use
1601         default_print_auxv_entry for specific tag values.
1602
1603 2018-10-26  John Baldwin  <jhb@FreeBSD.org>
1604
1605         * fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_FREEBSD_HWCAP2.
1606
1607 2018-10-26  Jim Wilson  <jimw@sifive.com>
1608
1609         * riscv-linux-tdep.c: Include tramp-frame.h and trad-frame.h.
1610         (riscv_linux_sigframe_init): Declare.
1611         (RISCV_INST_LI_A7_SIGRETURN, RISCV_INT_ECALL): New.
1612         (riscv_linux_sigframe): New.
1613         (SIGFRAME_SIGINFO_SIZE, UCONTEXT_MCONTEXT_OFFSET): New.
1614         (riscv_linux_sigframe_init): Define.
1615         (riscv_linux_init_abi): Call tramp_frame_prepend_unwinder.
1616
1617         * riscv-tdep.c (riscv_isa_xlen): Refer to riscv-tdep.h comment.
1618         (riscv_isa_flen): Likewise.  Drop static.
1619         * riscv-tdep.h (riscv_isa_xlen): Move riscv-tdep.c comment to here.
1620         (riscv_isa_flen): Likewise.  Declare.
1621
1622 2018-10-26  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
1623             Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1624
1625         * arch/ppc-linux-tdesc.h (tdesc_powerpc_isa207_htm_vsx32l)
1626         (tdesc_powerpc_isa207_htm_vsx64l): Declare.
1627         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_TM_SPRREGSET)
1628         (PPC32_LINUX_SIZEOF_CGPRREGSET, PPC64_LINUX_SIZEOF_CGPRREGSET)
1629         (PPC_LINUX_SIZEOF_CFPRREGSET, PPC_LINUX_SIZEOF_CVMXREGSET)
1630         (PPC_LINUX_SIZEOF_CVSXREGSET, PPC_LINUX_SIZEOF_CPPRREGSET)
1631         (PPC_LINUX_SIZEOF_CDSCRREGSET, PPC_LINUX_SIZEOF_CTARREGSET):
1632         Define.
1633         (struct ppc_linux_features) <htm>: New field.
1634         (ppc_linux_no_features): Add initializer for htm field.
1635         * arch/ppc-linux-common.c (ppc_linux_match_description): Return
1636         new tdescs.
1637         * nat/ppc-linux.h (PPC_FEATURE2_HTM, NT_PPC_TM_CGPR)
1638         (NT_PPC_TM_CFPR, NT_PPC_TM_CVMX, NT_PPC_TM_CVSX)
1639         (NT_PPC_TM_SPR, NT_PPC_TM_CTAR, NT_PPC_TM_CPPR, NT_PPC_TM_CDSCR):
1640         Define if not already defined.
1641         * features/Makefile (WHICH): Add rs6000/powerpc-isa207-htm-vsx32l
1642         and rs6000/powerpc-isa207-htm-vsx64l.
1643         (XMLTOC): Add rs6000/powerpc-isa207-htm-vsx32l.xml and
1644         rs6000/powerpc-isa207-htm-vsx64l.xml.
1645         * features/rs6000/power-htm-spr.xml: New file.
1646         * features/rs6000/power-htm-core.xml: New file.
1647         * features/rs6000/power64-htm-core.xml: New file.
1648         * features/rs6000/power-htm-fpu.xml: New file.
1649         * features/rs6000/power-htm-altivec.xml: New file.
1650         * features/rs6000/power-htm-vsx.xml: New file.
1651         * features/rs6000/power-htm-ppr.xml: New file.
1652         * features/rs6000/power-htm-dscr.xml: New file.
1653         * features/rs6000/power-htm-tar.xml: New file.
1654         * features/rs6000/powerpc-isa207-htm-vsx32l.xml: New file.
1655         * features/rs6000/powerpc-isa207-htm-vsx64l.xml: New file.
1656         * features/rs6000/powerpc-isa207-htm-vsx32l.c: Generate.
1657         * features/rs6000/powerpc-isa207-htm-vsx64l.c: Generate.
1658         * regformats/rs6000/powerpc-isa207-htm-vsx32l.dat: Generate.
1659         * regformats/rs6000/powerpc-isa207-htm-vsx64l.dat: Generate.
1660         * ppc-linux-nat.c (fetch_register, fetch_ppc_registers): Call
1661         fetch_regset with HTM regsets.
1662         (store_register, store_ppc_registers): Call store_regset with HTM
1663         regsets.
1664         (ppc_linux_nat_target::read_description): Set htm field in the
1665         features struct if needed.
1666         * ppc-linux-tdep.c: Include
1667         features/rs6000/powerpc-isa207-htm-vsx32l.c and
1668         features/rs6000/powerpc-isa207-htm-vsx64l.c.
1669         (ppc32_regmap_tm_spr, ppc32_regmap_cgpr, ppc64_le_regmap_cgpr)
1670         (ppc64_be_regmap_cgpr, ppc32_regmap_cfpr, ppc32_le_regmap_cvmx)
1671         (ppc32_be_regmap_cvmx, ppc32_regmap_cvsx, ppc32_regmap_cppr)
1672         (ppc32_regmap_cdscr, ppc32_regmap_ctar): New globals.
1673         (ppc32_linux_tm_sprregset, ppc32_linux_cgprregset)
1674         (ppc64_be_linux_cgprregset, ppc64_le_linux_cgprregset)
1675         (ppc32_linux_cfprregset, ppc32_le_linux_cvmxregset)
1676         (ppc32_be_linux_cvmxregset, ppc32_linux_cvsxregset)
1677         (ppc32_linux_cpprregset, ppc32_linux_cdscrregset)
1678         (ppc32_linux_ctarregset): New globals.
1679         (ppc_linux_cgprregset, ppc_linux_cvmxregset): New functions.
1680         (ppc_linux_collect_core_cpgrregset): New function.
1681         (ppc_linux_iterate_over_regset_sections): Call back with the htm
1682         regsets.
1683         (ppc_linux_core_read_description): Check if the tm spr section is
1684         present and set htm in the features struct.
1685         (_initialize_ppc_linux_tdep): Call
1686         initialize_tdesc_powerpc_isa207_htm_vsx32l and
1687         initialize_tdesc_powerpc_isa207_htm_vsx64l.
1688         * ppc-linux-tdep.h (ppc_linux_cgprregset, ppc_linux_cvmxregset):
1689         Declare.
1690         (ppc32_linux_tm_sprregset, ppc32_linux_cfprregset)
1691         (ppc32_linux_cvsxregset, ppc32_linux_cpprregset)
1692         (ppc32_linux_cdscrregset, ppc32_linux_ctarregset): Declare.
1693         * ppc-tdep.h (struct gdbarch_tdep) <have_htm_spr, have_htm_core>:
1694         New fields.
1695         <have_htm_fpu, have_htm_altivec, have_htm_vsx>:
1696         Likewise.
1697         <ppc_cppr_regnum, ppc_cdscr_regnum, ppc_ctar_regnum>: Likewise.
1698         <ppc_cdl0_regnum, ppc_cvsr0_regnum, ppc_cefpr0_regnum>: Likewise.
1699         (enum) <PPC_TFHAR_REGNUM, PPC_TEXASR_REGNUM, PPC_TFIAR_REGNUM>:
1700         New enum fields.
1701         <PPC_CR0_REGNUM, PPC_CCR_REGNUM, PPC_CXER_REGNUM>: Likewise.
1702         <PPC_CLR_REGNUM, PPC_CCTR_REGNUM, PPC_CF0_REGNUM>: Likewise.
1703         <PPC_CFPSCR_REGNUM, PPC_CVR0_REGNUM, PPC_CVSCR_REGNUM>: Likewise.
1704         <PPC_CVRSAVE_REGNUM, PPC_CVSR0_UPPER_REGNUM>: Likewise.
1705         <PPC_CPPR_REGNUM, PPC_CDSCR_REGNUM>: Likewise.
1706         <PPC_CTAR_REGNUM>: Likewise.
1707         (PPC_IS_TMSPR_REGNUM, PPC_IS_CKPTGP_REGNUM, PPC_IS_CKPTFP_REGNUM)
1708         (PPC_IS_CKPTVMX_REGNUM, PPC_IS_CKPTVSX_REGNUM): Define.
1709         * rs6000-tdep.c (IS_CDFP_PSEUDOREG, IS_CVSX_PSEUDOREG)
1710         (IS_CEFP_PSEUDOREG): Define.
1711         (rs6000_register_name): Hide the upper halves of checkpointed VSX
1712         registers.  Return names for the checkpointed DFP, VSX, and EFP
1713         pseudo registers.
1714         (rs6000_pseudo_register_type): Remove initial assert and raise an
1715         internal error in the else clause instead.  Return types for the
1716         checkpointed DFP, VSX, and EFP pseudo registers.
1717         (dfp_pseudo_register_read, dfp_pseudo_register_write): Handle
1718         checkpointed DFP pseudo registers.
1719         (vsx_pseudo_register_read, vsx_pseudo_register_write): Handle
1720         checkpointed VSX pseudo registers.
1721         (efp_pseudo_register_read, efp_pseudo_register_write): Rename
1722         from efpr_pseudo_register_read and
1723         efpr_pseudo_register_write.  Handle checkpointed EFP pseudo
1724         registers.
1725         (rs6000_pseudo_register_read, rs6000_pseudo_register_write):
1726         Handle checkpointed DFP, VSX, and EFP registers.
1727         (dfp_ax_pseudo_register_collect, vsx_ax_pseudo_register_collect)
1728         (efp_ax_pseudo_register_collect): New functions.
1729         (rs6000_ax_pseudo_register_collect): Move DFP, VSX and EFP pseudo
1730         register logic to new functions.  Handle checkpointed DFP, VSX,
1731         and EFP pseudo registers.
1732         (rs6000_gdbarch_init): Look for and validate the htm features.
1733         Include checkpointed DFP, VSX and EFP pseudo-registers.
1734         * NEWS: Mention access to PPR, DSCR, TAR, EBB/PMU registers and
1735         HTM registers.
1736
1737 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1738
1739         * rs6000-tdep.c (rs6000_gdbarch_init): Reject tdescs with vsx but
1740         without altivec or fpu.
1741
1742 2018-10-26  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
1743             Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1744
1745         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_EBBREGSET)
1746         (PPC_LINUX_SIZEOF_PMUREGSET): Declare.
1747         * nat/ppc-linux.h (PPC_FEATURE2_EBB, NT_PPC_EBB, NT_PPC_PMU):
1748         Define if not already defined.
1749         * features/rs6000/power-ebb.xml: New file.
1750         * features/rs6000/power-linux-pmu.xml: New file.
1751         * features/rs6000/powerpc-isa207-vsx32l.xml: Include ebb and pmu
1752         features.
1753         * features/rs6000/powerpc-isa207-vsx64l.xml: Likewise.
1754         * features/rs6000/powerpc-isa207-vsx32l.c: Re-generate.
1755         * features/rs6000/powerpc-isa207-vsx64l.c: Re-generate.
1756         * regformats/rs6000/powerpc-isa207-vsx32l.dat: Re-generate.
1757         * regformats/rs6000/powerpc-isa207-vsx64l.dat: Re-generate.
1758         * ppc-linux-nat.c (fetch_register, fetch_ppc_registers): Call
1759         fetch_regset with ebb and pmu regsets.
1760         (store_register, store_ppc_registers): Call store_regset with ebb
1761         and pmu regsets.
1762         (ppc_linux_nat_target::read_description): Set isa207 field in the
1763         features struct if ebb and pmu are avaiable.
1764         * ppc-linux-tdep.c (ppc32_regmap_ebb, ppc32_regmap_pmu)
1765         (ppc32_linux_ebbregset, ppc32_linux_pmuregset): New globals.
1766         (ppc_linux_iterate_over_regset_sections): Call back with the ebb
1767         and pmu regsets.
1768         (ppc_linux_core_read_description): Check if the pmu section is
1769         present and set isa207 in the features struct.
1770         * ppc-linux-tdep.h (ppc32_linux_ebbregset)
1771         (ppc32_linux_pmuregset): Declare.
1772         * ppc-tdep.h (struct gdbarch_tdep) <ppc_mmcr0_regnum>: New field.
1773         <ppc_mmcr2_regnum, ppc_siar_regnum, ppc_sdar_regnum>: New fields.
1774         <ppc_sier_regnum>: New field.
1775         (enum): <PPC_BESCR_REGNUM, PPC_EBBHR_REGNUM, PPC_EBBRR_REGNUM>:
1776         New enum values.
1777         <PPC_MMCR0_REGNUM, PPC_MMCR2_REGNUM, PPC_SIAR_REGNUM>: New enum
1778         values.
1779         <PPC_SDAR_REGNUM, PPC_SIER_REGNUM>: New enum values.
1780         (PPC_IS_EBB_REGNUM, PPC_IS_PMU_REGNUM): Define.
1781         * rs6000-tdep.c (rs6000_gdbarch_init): Look for and validate the
1782         ebb and pmu features.
1783
1784 2018-10-26  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
1785             Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1786
1787         * arch/ppc-linux-tdesc.h (tdesc_powerpc_isa207_vsx32l)
1788         (tdesc_powerpc_isa207_vsx64l): Declare.
1789         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_TARREGSET): Define.
1790         (struct ppc_linux_features) <isa207>: New field.
1791         (ppc_linux_no_features): Add initializer for isa207 field.
1792         * arch/ppc-linux-common.c (ppc_linux_match_description): Return
1793         new tdescs.
1794         * nat/ppc-linux.h (PPC_FEATURE2_ARCH_2_07, PPC_FEATURE2_TAR)
1795         (NT_PPC_TAR): Define if not already defined.
1796         * features/Makefile (WHICH): Add rs6000/powerpc-isa207-vsx32l and
1797         rs6000/powerpc-isa207-vsx64l.
1798         (XMLTOC): Add rs6000/powerpc-isa207-vsx32l.xml and
1799         rs6000/powerpc-isa207-vsx64l.xml.
1800         * features/rs6000/power-tar.xml: New file.
1801         * features/rs6000/powerpc-isa207-vsx32l.xml: New file.
1802         * features/rs6000/powerpc-isa207-vsx64l.xml: New file.
1803         * features/rs6000/powerpc-isa207-vsx32l.c: Generate.
1804         * features/rs6000/powerpc-isa207-vsx64l.c: Generate.
1805         * regformats/rs6000/powerpc-isa207-vsx32l.dat: Generate.
1806         * regformats/rs6000/powerpc-isa207-vsx64l.dat: Generate.
1807         * ppc-linux-nat.c (fetch_register, fetch_ppc_registers): Call
1808         fetch_regset with the TAR regset.
1809         (store_register, store_ppc_registers): Call store_regset with the
1810         TAR regset.
1811         (ppc_linux_nat_target::read_description): Set isa207 field in the
1812         features struct if needed.
1813         * ppc-linux-tdep.c: Include
1814         features/rs6000/powerpc-isa207-vsx32l.c and
1815         features/rs6000/powerpc-isa207-vsx64l.c.
1816         (ppc32_regmap_tar, ppc32_linux_tarregset): New globals.
1817         (ppc_linux_iterate_over_regset_sections): Call back with the tar
1818         regset.
1819         (ppc_linux_core_read_description): Check if the tar section is
1820         present and set isa207 in the features struct.
1821         (_initialize_ppc_linux_tdep): Call
1822         initialize_tdesc_powerpc_isa207_vsx32l and
1823         initialize_tdesc_powerpc_isa207_vsx64l.
1824         * ppc-linux-tdep.h (ppc32_linux_tarregset): Declare.
1825         * ppc-tdep.h (gdbarch_tdep) <ppc_tar_regnum>: New field.
1826         (enum) <PPC_TAR_REGNUM>: New enum value.
1827         * rs6000-tdep.c (rs6000_gdbarch_init): Look for and validate tar
1828         feature.
1829         (ppc_process_record_op31): Record changes to TAR.
1830
1831 2018-10-26  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
1832             Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1833
1834         * arch/ppc-linux-tdesc.h (tdesc_powerpc_isa205_ppr_dscr_vsx32l)
1835         (tdesc_powerpc_isa205_ppr_dscr_vsx64l): Declare.
1836         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_PPRREGSET)
1837         (PPC_LINUX_SIZEOF_DSCRREGSET): Define.
1838         (struct ppc_linux_features) <ppr_dscr>: New field.
1839         (ppc_linux_no_features): Add initializer for ppr_dscr field.
1840         * arch/ppc-linux-common.c (ppc_linux_match_description): Return
1841         new tdescs.
1842         * nat/ppc-linux.h (PPC_FEATURE2_DSCR, NT_PPC_PPR, NT_PPC_DSCR):
1843         Define if not already defined.
1844         * features/Makefile (WHICH): Add
1845         rs6000/powerpc-isa205-ppr-dscr-vsx32l and
1846         rs6000/powerpc-isa205-ppr-dscr-vsx64l.
1847         (XMLTOC): Add rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml and
1848         rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml.
1849         * features/rs6000/power-dscr.xml: New file.
1850         * features/rs6000/power-ppr.xml: New file.
1851         * features/rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml: New file.
1852         * features/rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml: New file.
1853         * features/rs6000/powerpc-isa205-ppr-dscr-vsx32l.c: Generate.
1854         * features/rs6000/powerpc-isa205-ppr-dscr-vsx64l.c: Generate.
1855         * regformats/rs6000/powerpc-isa205-ppr-dscr-vsx32l.dat: Generate.
1856         * regformats/rs6000/powerpc-isa205-ppr-dscr-vsx64l.dat: Generate.
1857         * ppc-linux-nat.c: Include <sys/uio.h>.
1858         (fetch_regset, store_regset, check_regset): New functions.
1859         (fetch_register, fetch_ppc_registers): Call fetch_regset with
1860         DSCR and PPR regsets.
1861         (store_register, store_ppc_registers): Call store_regset with
1862         DSCR and PPR regsets.
1863         (ppc_linux_get_hwcap2): New function.
1864         (ppc_linux_nat_target::read_description): Call
1865         ppc_linux_get_hwcap2 and check_regset, set ppr_dscr field in the
1866         features struct if needed.
1867         * ppc-linux-tdep.c: Include
1868         features/rs6000/powerpc-isa205-ppr-dscr-vsx32l.c and
1869         features/rs6000/powerpc-isa205-ppr-dscr-vsx64l.c.
1870         (ppc32_regmap_ppr, ppc32_regmap_dscr, ppc32_linux_pprregset)
1871         (ppc32_linux_dscrregset): New globals.
1872         (ppc_linux_iterate_over_regset_sections): Call back with the ppr
1873         and dscr regsets.
1874         (ppc_linux_core_read_description): Check if the ppr and dscr
1875         sections are present and set ppr_dscr in the features struct.
1876         (_initialize_ppc_linux_tdep): Call
1877         initialize_tdesc_powerpc_isa205_ppr_dscr_vsx32l and
1878         initialize_tdesc_powerpc_isa205_ppr_dscr_vsx64l.
1879         * ppc-linux-tdep.h (ppc32_linux_pprregset)
1880         (ppc32_linux_dscrregset): Declare.
1881         * ppc-tdep.h (struct gdbarch_tdep) <ppc_ppr_regnum>: New field.
1882         <ppc_dscr_regnum>: New field.
1883         (enum) <PPC_PPR_REGNUM, PPC_DSCR_REGNUM>: New enum values.
1884         * rs6000-tdep.c (rs6000_gdbarch_init): Look for and validate ppr
1885         and dscr features.
1886         (ppc_process_record_op31): Record changes to PPR and DSCR.
1887
1888 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1889
1890         * rs6000-tdep.c (rs6000_gdbarch_init): Replace line wrapping by a
1891         second initializer line for the have_* variables.  Initialize
1892         have_fpu to 0 instead of 1.
1893
1894 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1895
1896         * arch/ppc-linux-common.c (ppc_linux_match_description):
1897         Parenthesize tdesc assignements and indent them properly.
1898
1899 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1900
1901         * ppc-linux-nat.c (fetch_register): Change if statement to else
1902         if.
1903         (store_register): Likewise.
1904
1905 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1906
1907         * rs6000-tdep.c: Remove reggroups.h include.
1908         (rs6000_pseudo_register_reggroup_p): Remove.
1909         (rs6000_gdbarch_init): Remove call to
1910         set_tdesc_pseudo_register_reggroup_p.
1911
1912 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1913
1914         * reggroups.c (default_register_reggroup_p): Return true for
1915         decfloat registers and float_reggroup.
1916
1917 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1918
1919         * ppc-linux-tdep.c (ppc_linux_collect_vrregset): Remove.
1920         (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): Replace
1921         ppc_linux_collect_vrregset by regcache_collect_regset.
1922
1923 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1924
1925         * linux-tdep.c (linux_collect_regset_section_cb): Use
1926         std::vector<gdb_byte> instead of char * and malloc for buf.
1927         Remove xfree.
1928
1929 2018-10-26  Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
1930
1931         * xcoffread.c (read_xcoff_symtab): Pass deduced language to
1932         symtab_start instead of always using language_unknown.
1933
1934 2018-10-26  Andrew Burgess  <andrew.burgess@embecosm.com>
1935
1936         * riscv-tdep.c (riscv_read_misa_reg): Update comment, remove
1937         READ_P parameter, catch and ignore register access errors from
1938         either the old or new MISA location.
1939         (riscv_has_feature): Update call to riscv_read_misa_reg.
1940
1941 2018-10-25  Andrew Burgess  <andrew.burgess@embecosm.com>
1942
1943         * python/py-function.c (convert_values_to_python): Return
1944         gdbpy_ref<>.  Add header comment.
1945         (fnpy_call): Adjust.
1946
1947 2018-10-25  Andrew Burgess  <andrew.burgess@embecosm.com>
1948
1949         * python/py-cmd.c (cmdpy_completer_helper): Return gdbpy_ref<>.
1950         (cmdpy_completer_handle_brkchars): Adjust.
1951         (cmdpy_completer): Adjust.
1952
1953 2018-10-25  Andrew Burgess  <andrew.burgess@embecosm.com>
1954
1955         * riscv-linux-nat.c (riscv_linux_nat_target::fetch_registers):
1956         Pass correct regnum to raw_supply_zeroed.
1957
1958 2018-10-23  Hafiz Abid Qadeer  <abidh@codesourcery.com>
1959
1960         * regcache.c (cooked_read_test): Add CSKY to the list of
1961         architectures with a save_reggroup
1962
1963 2018-10-23  Simon Marchi  <simon.marchi@polymtl.ca>
1964
1965         PR gdb/23368
1966         * infrun.c (follow_exec): In the follow_exec_mode_new case,
1967         transfer terminal state from old new new inferior.
1968         * terminal.h (swap_terminal_info): New function.
1969         * inflow.c (swap_terminal_info): New function.
1970
1971 2018-10-23  Tom Tromey  <tom@tromey.com>
1972
1973         * record-btrace.c (get_thread_current_frame_id): Rename from
1974         get_thread_current_frame.  Return a frame_id.
1975         (record_btrace_start_replaying): Update.
1976
1977 2018-10-23  Andrew Burgess  <andrew.burgess@embecosm.com>
1978
1979         * riscv-tdep.c (riscv_register_name): Use the user-friendly names
1980         for CSRs.
1981
1982 2018-10-23  Joel Brobecker  <brobecker@adacore.com>
1983
1984         * riscv-tdep.c (riscv_gdbarch_init): Set the gdbarch's
1985         have_nonsteppable_watchpoint attribute to 1.
1986
1987 2018-10-23  Andrew Burgess  <andrew.burgess@embecosm.com>
1988
1989         * riscv-tdep.c (riscv_gdb_reg_names): Update comment, and all
1990         register names.
1991         (struct register_alias): Rename to...
1992         (struct riscv_register_alias): ...this, and update comment.
1993         (riscv_register_aliases): Update type, and alias names.  Remove
1994         CSR names from this list.
1995         (riscv_register_name): Use riscv_gdb_reg_names for int and float
1996         register names.  Add an extra assertion.
1997         (riscv_is_regnum_a_named_csr): New function.
1998         (riscv_register_reggroup_p): Use riscv_is_regnum_a_named_csr.
1999
2000 2018-10-23  John Darrington  <john@darrington.wattle.id.au>
2001
2002         * configure.tgt: Add configuration for s12z.
2003         * s12z-tdep.c:  New file.
2004         * NEWS: Mention new target.
2005
2006 2018-10-22  Jim Wilson  <jimw@sifive.com>
2007
2008         * riscv-tdep.c (riscv_push_dummy_call) <in_reg>: Check for value in
2009         FP reg smaller than FP reg size, and fill with -1 instead of 0.
2010
2011         * riscv-tdep.c (riscv_fpreg_d_type, riscv_fpreg_q_type): New.
2012         (riscv_register_type): Use them.
2013         (riscv_print_one_register_info): Handle union of floats same as float.
2014         * riscv-tdep.h (struct gdbarch_tdep): Add riscv_fpreg_d_type and
2015         riscv_fpreg_q_type fields.
2016
2017 2018-10-21  Simon Marchi  <simon.marchi@ericsson.com>
2018
2019         * gdbarch.sh (gdbarch_num_cooked_regs): New.
2020         * gdbarch.h: Re-generate.
2021         * ax-gdb.c (gen_expr): Use gdbarch_num_cooked_regs.
2022         * dwarf2-frame.c (dwarf2_frame_cache): Likewise.
2023         * eval.c (evaluate_subexp_standard): Likewise.
2024         * findvar.c (value_of_register): Likewise.
2025         (value_of_register_lazy): Likewise.
2026         (address_from_register): Likewise.
2027         * frame.c (get_frame_register_bytes): Likewise.
2028         * gdbarch-selftests.c (register_to_value_test): Likewise.
2029         * h8300-tdep.c (h8300_register_type): Likewise.
2030         * i386-tdep.c (i386_dbx_reg_to_regnum): Likewise.
2031         (i386_svr4_reg_to_regnum): Likewise.
2032         * infcmd.c (default_print_registers_info): Likewise.
2033         (registers_info): Likewise.
2034         (print_vector_info): Likewise.
2035         (default_print_float_info): Likewise.
2036         * m68hc11-tdep.c (m68hc11_frame_unwind_cache): Likewise.
2037         * mdebugread.c (mdebug_reg_to_regnum): Likewise.
2038         * mi/mi-main.c (mi_cmd_data_list_register_names): Likewise.
2039         (mi_cmd_data_list_changed_registers): Likewise.
2040         (mi_cmd_data_list_register_values): Likewise.
2041         (mi_cmd_data_write_register_values): Likewise.
2042         (mi_cmd_trace_frame_collected): Likewise.
2043         * mips-tdep.c (print_gp_register_row): Likewise.
2044         (mips_print_registers_info): Likewise.
2045         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
2046         * regcache.c (init_regcache_descr): Likewise.
2047         (register_size): Likewise.
2048         (register_dump::dump): Likewise.
2049         (cooked_read_test): Likewise.
2050         (cooked_write_test): Likewise.
2051         * rs6000-tdep.c (rs6000_register_sim_regno): Likewise.
2052         (rs6000_gdbarch_init): Likewise.
2053         * stabsread.c (stab_reg_to_regnum): Likewise.
2054         * stack.c (info_frame_command): Likewise.
2055         * target-descriptions.c (tdesc_register_name): Likewise.
2056         * trad-frame.c (trad_frame_alloc_saved_regs): Likewise.
2057         * tui/tui-regs.c (tui_show_register_group): Likewise.
2058         * user-regs.c (user_reg_map_name_to_regnum): Likewise.
2059         (user_reg_map_regnum_to_name): Likewise.
2060         (value_of_user_reg): Likewise.
2061         (maintenance_print_user_registers): Likewise.
2062         * xtensa-tdep.c (xtensa_find_register_by_name): Likewise.
2063         (xtensa_register_name): Likewise.
2064         (xtensa_register_type): Likewise.
2065         (xtensa_reg_to_regnum): Likewise.
2066         (xtensa_pseudo_register_read): Likewise.
2067         (xtensa_pseudo_register_write): Likewise.
2068
2069 2018-10-21  Simon Marchi  <simon.marchi@polymtl.ca>
2070
2071         * amd64-tdep.c (amd64_pseudo_register_read_value): Use
2072         correctly-sized buffer with raw_read.
2073         (amd64_pseudo_register_write): Use correctly-sized buffer for
2074         raw_read/raw_write.
2075
2076 2018-10-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
2077
2078         * typeprint.c (_initialize_typeprint): Fix wrong prefixname arg
2079         in add_prefix_cmd of set print type.
2080
2081 2018-10-19  Tom Tromey  <tom@tromey.com>
2082
2083         PR tui/18388:
2084         * NEWS: Mention tabset deprecation.
2085         * tui/tui-win.c (tui_tab_width, internal_tab_width): New globals.
2086         (update_tab_width): New function.
2087         (tui_set_tab_width, tui_show_tab_width): New functions.
2088         (tui_set_tab_width_command): Use update_tab_width.
2089         (_initialize_tui_win): Move to end of file.  Deprecate "tabset".
2090         Add new "set tui tab-width" command.
2091         * tui/tui-source.c (tui_set_source_content): Update.
2092         * tui/tui-disasm.c (tui_set_disassem_content): Update.
2093         * tui/tui-data.h (tui_default_tab_len, tui_set_default_tab_len):
2094         Don't declare.
2095         (tui_tab_width): Declare.
2096         * tui/tui-data.c (default_tab_len, tui_default_tab_len)
2097         (tui_set_default_tab_len): Remove.
2098
2099 2018-10-19  Tom Tromey  <tom@tromey.com>
2100
2101         * tui/tui-io.h (key_is_start_sequence, key_is_end_sequence)
2102         (key_is_backspace, tui_getc): Don't declare.
2103         * tui/tui-io.c (key_is_start_sequence): Now static.
2104         (key_is_end_sequence, key_is_backspace): Remove.
2105         (tui_getc): Now static.
2106
2107 2018-10-19  Tom Tromey  <tom@tromey.com>
2108
2109         * symfile.c (reread_symbols): Clear "static_links".
2110
2111 2018-10-19  Alan Hayward  <alan.hayward@arm.com>
2112
2113         * aarch64-linux-tdep.c (AARCH64_SIGCONTEXT_RESERVED_SIZE): New
2114         define.
2115         (aarch64_linux_sigframe_init): Extra boundary checks.
2116
2117 2018-10-19  Andreas Arnez  <arnez@linux.ibm.com>
2118
2119         * s390-tdep.c (s390_pseudo_register_type): For v0-v15 don't yield
2120         the possibly non-existent tdesc type 'vec128', but the type of raw
2121         register v16 instead.
2122
2123 2018-10-19  Gary Benson <gbenson@redhat.com>
2124
2125         * cli/cli-interp.c (cli_interp::~cli_interp): New function.
2126
2127 2018-10-18  Sergio Durigan Junior  <sergiodj@redhat.com>
2128
2129         PR cli/23785
2130         * cli/cli-dump.c (restore_binary_file): Check if "file" is
2131         NULL.
2132
2133 2018-10-17  Paul Koning  <paul_koning@dell.com>
2134
2135         * charset.c (convert_between_encodings): Fix unsigned overflow.
2136
2137 2018-10-17  John Baldwin  <jhb@FreeBSD.org>
2138
2139         * fbsd-nat.c (fbsd_nat_target::info_proc) Use
2140         fbsd_info_proc_mappings_header and fbsd_info_proc_mappings_entry.
2141         * fbsd-tdep.c (fbsd_vm_map_entry_flags): Mark static.
2142         (fbsd_info_proc_mappings_header, fbsd_info_proc_mappings_entry):
2143         New functions.
2144         (fbsd_core_info_proc_mappings): Use fbsd_info_proc_mappings_header
2145         and fbsd_info_proc_mappings_header.
2146         * fbsd-tdep.h (fbsd_vm_map_entry_flags): Remove.
2147         (fbsd_info_proc_mappings_header, fbsd_info_proc_mappings_entry):
2148         New.
2149
2150 2018-10-17  Joel Brobecker  <brobecker@adacore.com>
2151
2152         * MAINTAINERS (Responsible Maintainers): Add Rainer Orth as
2153         Solaris Maintainer.
2154
2155 2018-10-15  Tom Tromey  <tom@tromey.com>
2156
2157         * tui/tui.c (strcat_to_buf): Remove casts.
2158         * tui/tui-winsource.c (tui_show_source_line)
2159         (tui_set_is_exec_point_at, tui_line_is_displayed): Remove casts.
2160         * tui/tui-wingeneral.c (tui_refresh_win, box_win): Remove casts.
2161         * tui/tui-windata.c (tui_first_data_item_displayed)
2162         (tui_delete_data_content_windows, tui_erase_data_content)
2163         (tui_display_all_data, tui_display_data_from)
2164         (tui_refresh_data_win, tui_vertical_data_scroll): Remove casts.
2165         * tui/tui-win.c (tui_set_win_height)
2166         (make_invisible_and_set_new_height, parse_scrolling_args): Remove
2167         casts.
2168         * tui/tui-win.c (tui_resize_all): Remove casts.
2169         (tui_scroll_backward_command, tui_set_focus)
2170         (tui_set_tab_width_command): Likewise.
2171         * tui/tui-source.c (tui_vertical_source_scroll): Remove cast.
2172         * tui/tui-regs.c (tui_show_register_group): Remove cast.
2173         * tui/tui-layout.c (tui_set_layout_by_name): Remove cast.
2174         * tui/tui-disasm.c (tui_vertical_disassem_scroll): Remove cast.
2175         * tui/tui-data.c (tui_partial_win_by_name, tui_free_win_content):
2176         Remove casts.
2177
2178 2018-10-15  Simon Marchi  <simon.marchi@ericsson.com>
2179
2180         * MAINTAINERS (Responsible Maintainers): Add Alan Hayward as
2181         AArch64/ARM maintainer.
2182
2183 2018-10-11  Gary Benson <gbenson@redhat.com>
2184
2185         * interps.h (interp::m_name): Make private and mutable.
2186         * interps.c (interp::~interp): Free m_name.
2187
2188 2018-10-10  Sergio Durigan Junior  <sergiodj@redhat.com>
2189             Simon Marchi <simark@simark.ca>
2190
2191         * README (`configure' options): Add documentation for new
2192         "--enable-unit-tests" option.
2193         * acinclude.m4: Include "selftest.m4".
2194         * configure: Regenerate.
2195         * configure.ac: Use "GDB_AC_SELFTEST".
2196         * maint.c (maintenance_selftest): Update message informing
2197         that selftests have been disabled.
2198         (maintenance_info_selftests): Likewise.
2199         * selftest.m4: New file.
2200
2201 2018-10-10  Gary Benson <gbenson@redhat.com>
2202
2203         * remote.c (remote_target::remote_send_printf): Add
2204         missing va_end found by Coverity.
2205
2206 2018-10-10  Markus Metzger  <markus.t.metzger@intel.com>
2207
2208         * btrace.c (ftrace_update_function): Add indirect jump heuristic.
2209
2210 2018-10-09  Tom Tromey  <tom@tromey.com>
2211
2212         * configure: Rebuild.
2213         * sanitize.m4 (AM_GDB_UBSAN): Default to no.
2214         * NEWS: Update --enable-ubsan documentation.
2215
2216 2018-10-09  Gary Benson <gbenson@redhat.com>
2217
2218         * dwarf2read.c (create_dwp_hash_table): Fix buffer overrun
2219         found by Coverity.
2220
2221 2018-10-08  Tom Tromey  <tom@tromey.com>
2222
2223         * riscv-fbsd-tdep.c (riscv_fbsd_sigframe_init): Remove unused
2224         variable.
2225         (riscv_fbsd_init_abi): Likewise.
2226
2227 2018-10-08  Weimin Pan  <weimin.pan@oracle.com>
2228         * valops.c (value_struct_elt_for_reference): Rename local variable
2229         to work around the shadowing a previous local warning.
2230
2231 2018-10-08  John Baldwin  <jhb@FreeBSD.org>
2232
2233         * Makefile.in (ALLDEPFILES): Add riscv-fbsd-nat.c.
2234         * NEWS: Mention new FreeBSD/riscv native configuration.
2235         * configure.host: Add riscv*-*-freebsd*.
2236         * configure.nat: Likewise.
2237         * riscv-fbsd-nat.c: New file.
2238
2239 2018-10-08  John Baldwin  <jhb@FreeBSD.org>
2240
2241         * Makefile.in (ALL_TARGET_OBS): Add riscv-fbsd-tdep.o.
2242         (HFILES_NO_SRCDIR): Add riscv-fbsd-tdep.h.
2243         (ALLDEPFILES): Add riscv-fbsd-tdep.c.
2244         * NEWS: Mention new FreeBSD/riscv target.
2245         * configure.tgt: Add riscv*-*-freebsd*.
2246         * riscv-fbsd-tdep.c: New file.
2247         * riscv-fbsd-tdep.h: New file.
2248
2249 2018-10-08  John Baldwin  <jhb@FreeBSD.org>
2250
2251         * regcache.h (struct regcache_map_entry): Note that this type can
2252         be used with traditional frame caches.
2253         * trad-frame.c (trad_frame_set_reg_regmap): New.
2254         * trad-frame.h (trad_frame_set_reg_regmap): New.
2255
2256 2018-10-08  Weimin Pan  <weimin.pan@oracle.com>
2257
2258         PR c++/16841
2259         * valops.c (get_virtual_base_offset): New function.
2260         (value_struct_elt_for_reference): Use it to get virtual base offset
2261         and add it in calculating class member address.
2262
2263 2018-10-08  John Darrington  <john@darrington.wattle.id.au>
2264
2265         * dwarf2read.c (dwarf2_cu) <producer_is_codewarrior>: New field.
2266         (check_producer): Check if the producer is codewarrior.
2267         (producer_is_codewarrior): New function.
2268         (lnp_state_machine::record_line): Ignore is_stmt flag for records
2269         produced by codewarrior.
2270         (dwarf2_cu::dwarf2_cu): Initialize producer_is_codewarrior.
2271
2272 2018-10-06  Tom Tromey  <tom@tromey.com>
2273
2274         PR python/19399:
2275         * python/py-inferior.c: Add "architecture" entry.
2276         (infpy_architecture): New function.
2277
2278 2018-10-06  Tom Tromey  <tom@tromey.com>
2279
2280         PR python/21765:
2281         * python/py-symbol.c (gdbpy_initialize_symbols): Redefine
2282         SYMBOL_VARIABLES_DOMAIN, SYMBOL_FUNCTIONS_DOMAIN,
2283         SYMBOL_TYPES_DOMAIN.  Define SYMBOL_MODULE_DOMAIN,
2284         SYMBOL_COMMON_BLOCK_DOMAIN, SYMBOL_LOC_COMMON_BLOCK.
2285
2286 2018-10-06  Tom Tromey  <tom@tromey.com>
2287
2288         PR build/17077:
2289         * Makefile.in (OPCODES_CFLAGS): Remove "-I$(OPCODES_SRC)/..".
2290         * arc-tdep.c, frv-tdep.c, lm32-tdep.c, mep-tdep.c,
2291         microblaze-tdep.c, or1k-tdep.h: Use ../opcodes, not opcodes, in
2292         #include.
2293
2294 2018-10-06  Tom Tromey  <tom@tromey.com>
2295
2296         * python/py-breakpoint.c (bppy_get_location): Handle a
2297         bp_breakpoint without a location.
2298
2299 2018-10-06  Tom Tromey  <tom@tromey.com>
2300
2301         * python/lib/gdb/function/strfns.py (_MemEq, _StrLen, _StrEq)
2302         (_RegEx): Reformat help text.
2303         * python/lib/gdb/function/caller_is.py (CallerIs, CallerMatches)
2304         (AnyCallerIs, AnyCallerMatches): Reformat help text.
2305         * python/lib/gdb/function/as_string.py (_AsString): Reformat help
2306         text.
2307         * python/lib/gdb/command/xmethods.py (InfoXMethod)
2308         (EnableXMethod, DisableXMethod): Remove help indentation.
2309         Capitalize meta-syntactic variables.
2310         * python/lib/gdb/command/unwinders.py (InfoUnwinder)
2311         (EnableUnwinder, DisableUnwinder): Remove help indentation.
2312         Capitalize meta-syntactic variables.
2313         * python/lib/gdb/command/explore.py (ExploreCommand)
2314         (ExploreValueCommand, ExploreTypeCommand): Reformat help text.
2315         * python/lib/gdb/command/type_printers.py (InfoTypePrinter)
2316         (EnableTypePrinter, DisableTypePrinter): Remove help indentation.
2317         * python/lib/gdb/command/pretty_printers.py (InfoPrettyPrinter):
2318         Remove help indentation.
2319         (EnablePrettyPrinter, DisablePrettyPrinter): Likewise.
2320         * python/lib/gdb/command/frame_filters.py (EnableFrameFilter)
2321         (DisableFrameFilter, SetFrameFilterPriority)
2322         (ShowFrameFilterPriority, InfoFrameFilter): Reword help text.
2323
2324 2018-10-06  Tom Tromey  <tom@tromey.com>
2325
2326         PR tui/28819:
2327         * tui/tui-io.c (gdb_wgetch): New function.
2328         (tui_mld_getc, tui_getc): Use it.
2329
2330 2018-10-05  Tom Tromey  <tom@tromey.com>
2331
2332         * sol-thread.c (sol_thread_target::wait): Rename inner
2333         "save_ptid".
2334
2335 2018-10-04  Tom Tromey  <tom@tromey.com>
2336
2337         * configure: Rebuild.
2338         * warning.m4 (AM_GDB_WARNINGS): Add -Wshadow=local.
2339
2340 2018-10-04  Tom Tromey  <tom@tromey.com>
2341
2342         * guile/scm-frame.c (gdbscm_frame_read_var): Remove inner
2343         declaration of "block".
2344
2345 2018-10-04  Tom Tromey  <tom@tromey.com>
2346
2347         * common/filestuff.c (fdwalk): Remove inner declaration of
2348         "result".
2349
2350 2018-10-04  Tom Tromey  <tom@tromey.com>
2351
2352         * msp430-tdep.c (msp430_push_dummy_call): Rename inner
2353         "structs_addr" and hoist declaration.
2354
2355 2018-10-04  Tom Tromey  <tom@tromey.com>
2356
2357         * linux-tdep.c (linux_make_mappings_corefile_notes): Introduce new
2358         variable "size".
2359
2360 2018-10-04  Tom Tromey  <tom@tromey.com>
2361
2362         * mdebugread.c (parse_partial_symbols): Use std::string.
2363
2364 2018-10-04  Tom Tromey  <tom@tromey.com>
2365
2366         * ctf.c (SET_ARRAY_FIELD): Rename "u32".
2367         * p-valprint.c (pascal_val_print): Split inner "i" variable.
2368         * xtensa-tdep.c (xtensa_push_dummy_call): Declare "i" in loop
2369         header.
2370         * xstormy16-tdep.c (xstormy16_push_dummy_call): Declare "val" in
2371         more inner scope.
2372         * xcoffread.c (read_xcoff_symtab): Rename inner "symbol".
2373         * varobj.c (varobj_update): Rename inner "newobj",
2374         "type_changed".
2375         * valprint.c (generic_emit_char): Rename inner "buf".
2376         * valops.c (find_overload_match): Rename inner "temp".
2377         (value_struct_elt_for_reference): Declare "v" in more inner
2378         scope.
2379         * v850-tdep.c (v850_push_dummy_call): Rename "len".
2380         * unittests/array-view-selftests.c (run_tests): Rename inner
2381         "vec".
2382         * tui/tui-stack.c (tui_show_frame_info): Declare "i" in loop
2383         header.
2384         * tracepoint.c (merge_uploaded_trace_state_variables): Declare
2385         "tsv" in more inner scope.
2386         (print_one_static_tracepoint_marker): Rename inner
2387         "tuple_emitter".
2388         * tic6x-tdep.c (tic6x_analyze_prologue): Declare "inst" lower.
2389         (tic6x_push_dummy_call): Don't redeclare "addr".
2390         * target-float.c: Declare "dto" lower.
2391         * symtab.c (lookup_local_symbol): Rename inner "sym".
2392         (find_pc_sect_line): Rename inner "pc".
2393         * stack.c (print_frame): Don't redeclare "gdbarch".
2394         (return_command): Rename inner "gdbarch".
2395         * s390-tdep.c (s390_prologue_frame_unwind_cache): Renam inner
2396         "sp".
2397         * rust-lang.c (rust_internal_print_type): Declare "i" in loop
2398         header.
2399         * rs6000-tdep.c (ppc_process_record): Rename inner "addr".
2400         * riscv-tdep.c (riscv_push_dummy_call): Declare "info" in inner
2401         scope.
2402         * remote.c (remote_target::update_thread_list): Don't redeclare
2403         "tp".
2404         (remote_target::process_initial_stop_replies): Rename inner
2405         "thread".
2406         (remote_target::remote_parse_stop_reply): Don't redeclare "p".
2407         (remote_target::wait_as): Don't redeclare "stop_reply".
2408         (remote_target::get_thread_local_address): Rename inner
2409         "result".
2410         (remote_target::get_tib_address): Likewise.
2411
2412         * regcache.c (cooked_read_test): Rename "regnum".
2413         * record-btrace.c (cmd_record_btrace_start): Rename inner
2414         "exception".
2415         * ppc-sysv-tdep.c (ppc64_sysv_abi_return_value): Declare "i" in
2416         loop header.
2417         * ppc-linux-tdep.c (ppc_linux_syscall_record): Declare "i" in loop
2418         header.
2419         (ppu2spu_sniffer): Rename inner "buf".
2420         * parse.c (operator_check_standard): Rename inner "type",
2421         "objfile".
2422         * p-valprint.c (pascal_val_print): Introduce new scope for
2423         "low_bound", "high_bound".
2424         * p-exp.y (yylex): Declare "i" in loop header.
2425         * objfiles.c (objfile_relocate1): Declare "i" in loop header.
2426         Lower declaration of "s".
2427         * nios2-tdep.c (nios2_analyze_prologue): Declare "i" in loop
2428         header.
2429         (nios2_push_dummy_call): Rename "len".
2430         * nat/linux-osdata.c (linux_xfer_osdata_cpus): Rename static
2431         "buf".
2432         (linux_xfer_osdata_fds, linux_xfer_osdata_shm)
2433         (linux_xfer_osdata_sem, linux_xfer_osdata_msg)
2434         (linux_xfer_osdata_modules): Likewise.
2435         * mips-tdep.c (mips_eabi_push_dummy_call): Rename outer "len".
2436         (mips_n32n64_push_dummy_call, mips_o32_push_dummy_call)
2437         (mips_o64_push_dummy_call): Likewise.
2438         * microblaze-tdep.c (microblaze_analyze_prologue): Rename inner
2439         "op".
2440         * mi/mi-main.c (list_available_thread_groups): Rename inner
2441         "tuple_emitter".
2442         (mi_cmd_data_read_memory): Rename inner "opts".
2443         * mi/mi-cmd-var.c (varobj_update_one): Rename inner
2444         "tuple_emitter".
2445         * mep-tdep.c (mep_analyze_prologue): Declare "rn" in loop header.
2446         * mdebugread.c (parse_symbol): Rename inner "b".  Declare "f" in
2447         more inner scope.
2448         (parse_partial_symbols): Rename inner "pst", "p", "name"
2449         * main.c (captured_main_1): Rename inner "i"s.
2450         * machoread.c (macho_symfile_read_all_oso): Don't redeclare
2451         "oso2".
2452         * linux-tdep.c (linux_info_proc): Rename inner "filename".
2453         * linespec.c (linespec_lexer_lex_string): Rename inner "p".
2454         * infrun.c (handle_no_resumed): Don't redeclare "thread".
2455         (handle_signal_stop): Rename inner "gdbarch".
2456         (handle_command): Declare "signum" in loop header.
2457         * ia64-tdep.c (ia64_pseudo_register_read): Don't redeclare
2458         "status".
2459         (examine_prologue): Rename inner "sol" and "sof".
2460         (ia64_extract_return_value): Rename inner "val".  Declare another
2461         "val" in a more inner scope.
2462         * hppa-bsd-tdep.c (hppabsd_find_global_pointer): Declare "buf" in
2463         inner scope.
2464         * guile/scm-symbol.c (gdbscm_lookup_symbol): Rename inner
2465         "except".
2466         * findvar.c (default_read_var_value): Don't redeclare "addr".
2467         * f-exp.y (yylex): Declare "i" in loop header.
2468         * eval.c (evaluate_subexp_standard): Don't redeclare "type".
2469         Rename inner "type", "expect_type".
2470         (evaluate_subexp_for_sizeof): Rename inner "pc".
2471         * elfread.c (elf_symfile_read): Rename inner "abfd".
2472         * dwarf2read.c (read_debug_names_from_section): Don't redeclare
2473         "bytes_read".
2474         (process_psymtab_comp_unit_reader): Don't redeclare "gdbarch".
2475         (add_partial_subprogram): Rename inner "lowpc" and "highpc".
2476         (dwarf_decode_line_header): Rename inner "lh".
2477         * dwarf2loc.c (dwarf2_compile_expr_to_ax): Don't redeclare
2478         "offset".  Declare "i" in loop header.
2479         (disassemble_dwarf_expression): Rename inner "addr_size".
2480         * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Rename
2481         inner "result".
2482         (dwarf_expr_context::execute_stack_op): Rename inner "offset".
2483         * dwarf2-frame.c (decode_frame_entry_1): Rename inner "length"s.
2484         * disasm.c (do_mixed_source_and_assembly_deprecated): Rename inner
2485         "inner_list_emitter".
2486         (do_mixed_source_and_assembly): Rename inner "tuple_emitter".
2487         * disasm-selftests.c (print_one_insn_test): Wrap "bplen"
2488         declaration in a block.
2489         * csky-tdep.c (csky_analyze_prologue): Declare "offset" lower.
2490         * cp-valprint.c (cp_print_value_fields): Don't redeclare
2491         "obstack_final_size".
2492         * cp-support.c (inspect_type): Declare "i" in loop header.
2493         * compile/compile.c (compile_instance::insert_symbol_error):
2494         Rename inner "e".
2495         * common/agent.c (agent_run_command): Remove inner "ret"
2496         declaration.
2497         * coffread.c (coff_symfile_read): Rename inner "name".
2498         (coff_symfile_read): Rename inner "abfd".
2499         * cli/cli-utils.c (get_number_trailer): Rename inner "val".
2500         * cli/cli-cmds.c (print_disassembly): Rename inner "low" and
2501         "high".
2502         * c-exp.y (lex_one_token): Move "len" declaration lower.
2503         * breakpoint.c (create_longjmp_master_breakpoint): Don't redeclare
2504         "gdbarch".
2505         (create_exception_master_breakpoint): Likewise.  Don't redeclare
2506         "b".
2507         (watch_command_1): Declare "mark" later.
2508         (clear_command): Don't shadow "a" or "b".
2509         (delete_command): Rename inner "b".
2510         (delete_trace_command): Likewise.
2511         * arm-tdep.c (thumb_process_displaced_32bit_insn): Rename inner
2512         "op".
2513         (arm_gdbarch_init): Remove inner "e_flags".
2514         * arch/arm-get-next-pcs.c (thumb_get_next_pcs_raw): Declare
2515         "offset" in inner blocks.
2516
2517 2018-10-04  Simon Marchi  <simon.marchi@ericsson.com>
2518
2519         * dwarf-index-write.c (file_write): Don't write if the vector is
2520         empty.
2521
2522 2018-10-05  Tom de Vries  <tdevries@suse.de>
2523
2524         * python/py-progspace.c (pspy_solib_name): Fix type mismatch in
2525         PyArg_ParseTuple call.
2526
2527 2018-10-05  Tom de Vries  <tdevries@suse.de>
2528
2529         * python/py-record-btrace.c (recpy_bt_goto): Fix type mismatch in
2530         PyArg_ParseTuple call.
2531
2532 2018-10-04  Joel Brobecker  <brobecker@adacore.com>
2533
2534         * psymtab.c (recursively_search_psymtabs): Reformat parameters
2535         to avoid exceeding 80 characters per line limit.
2536
2537 2018-10-04  Tom Tromey  <tom@tromey.com>
2538
2539         * symfile.c (syms_from_objfile_1, finish_new_objfile)
2540         (reread_symbols): Update.
2541         * complaints.h (clear_complaints): Remove argument.
2542         * complaints.c (enum complaint_series): Remove.
2543         (series): Remove global.
2544         (complaint_internal): Update.
2545         (clear_complaints): Remove argument.
2546
2547 2018-10-04  Tom Tromey  <tom@tromey.com>
2548
2549         * symfile.c (symbol_file_add_with_addrs): Do not print "no
2550         debugging symbols" message if there is a separate debug objfile.
2551
2552 2018-10-04  Tom Tromey  <tom@tromey.com>
2553
2554         PR cli/19551:
2555         * symfile.c (symbol_file_add_with_addrs): Update output.
2556         * psymtab.c (require_partial_symbols): Update output.
2557
2558 2018-10-04  Tom Tromey  <tom@tromey.com>
2559
2560         PR cli/22234:
2561         * complaints.c: Emit \n.
2562
2563 2018-10-04  Tom Tromey  <tom@tromey.com>
2564
2565         * symfile.c (symbol_file_add_with_addrs, symbol_file_clear)
2566         (separate_debug_file_exists, find_separate_debug_file)
2567         (add_symbol_file_command, reread_symbols, allocate_symtab)
2568         (allocate_compunit_symtab): Use filtered printing, not
2569         unfiltered.
2570         * psymtab.c (require_partial_symbols, dump_psymtab)
2571         (allocate_psymtab): Use filtered printing, not unfiltered.
2572
2573 2018-10-04  Tom Tromey  <tom@tromey.com>
2574
2575         * complaints.c (complaint_internal): Correctly check complaint
2576         count.
2577
2578 2018-10-04  Tom Tromey  <tom@tromey.com>
2579
2580         * complaints.h (struct complaints): Remove declaration.
2581         * complaints.c (clear_complaints): Remove an unused variable.
2582
2583 2018-10-04  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2584
2585         * MAINTAINERS (Write After Approval): Add self.
2586
2587 2018-10-03  Tom Tromey  <tom@tromey.com>
2588
2589         * guile/scm-value.c (gdbscm_value_to_string): Initialize
2590         "buffer_contents".
2591         * coffread.c (coff_symtab_read): Initialize "newobj".
2592
2593 2018-10-03  Simon Marchi  <simon.marchi@polymtl.ca>
2594
2595         * dwarf2read.c (read_func_scope): Remove struct keyword in
2596         range-based for.
2597
2598 2018-10-03  Tom Tromey  <tom@tromey.com>
2599
2600         * README: Mention --enable-ubsan.
2601         * NEWS: Mention --enable-ubsan.
2602         * acinclude.m4: Include sanitize.m4.
2603         * configure: Rebuild.
2604         * configure.ac: Call AM_GDB_UBSAN.
2605         * sanitize.m4: New file.
2606
2607 2018-10-03  Tom Tromey  <tom@tromey.com>
2608
2609         * expression.h (enum exp_opcode): Use uint8_t as base type.
2610         * expprint.c (op_name): Handle invalid opcodes.
2611
2612 2018-10-03  Tom Tromey  <tom@tromey.com>
2613
2614         * parse.c (prefixify_expression): Add assert.
2615         (parse_exp_in_context_1): Throw exception if the expression is
2616         empty.
2617
2618 2018-10-03  Tom Tromey  <tom@tromey.com>
2619
2620         * dwarf2read.c (read_signed_leb128): Work in ULONGEST.
2621
2622 2018-10-03  Tom Tromey  <tom@tromey.com>
2623
2624         * c-exp.y (parse_number): Work in unsigned.  Remove casts.
2625
2626 2018-10-03  Tom Tromey  <tom@tromey.com>
2627
2628         * dwarf2read.c (read_subrange_type): Make "negative_mask"
2629         unsigned.
2630
2631 2018-10-03  Tom Tromey  <tom@tromey.com>
2632
2633         * findvar.c (extract_integer): Do work in an unsigned type.
2634
2635 2018-10-03  Tom Tromey  <tom@tromey.com>
2636
2637         * common/enum-flags.h (enum_flags::operator~): Add static assert.
2638         * symfile-add-flags.h (enum symfile_add_flag): Use unsigned as
2639         base type.
2640         * objfile-flags.h (enum objfile_flag): Use unsigned as base type.
2641         * gdbtypes.h (enum type_instance_flag_value): Use unsigned as base
2642         type.
2643         * c-lang.h (enum c_string_type_values): Use unsigned as base
2644         type.
2645         * btrace.h (enum btrace_thread_flag): Use unsigned as base type.
2646
2647 2018-10-03  Tom Tromey  <tom@tromey.com>
2648
2649         * dwarf2-frame.h (dwarf2_frame_state_reg_info)
2650         <~dwarf2_frame_state_reg_info>: Update.
2651         <dwarf2_frame_state_reg_info>: Update.
2652         <alloc_regs>: Add assertion.  Update.
2653         <reg>: Now a std::vector.
2654         <num_regs>: Remove.
2655         <swap>: Update.
2656         * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
2657         (execute_cfa_program_test, dwarf2_frame_cache): Update.
2658
2659 2018-10-03  Tom Tromey  <tom@tromey.com>
2660
2661         * namespace.c (add_using_directive): Don't pass NULL to memcpy.
2662
2663 2018-10-03  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
2664
2665         * tid-parse.c (tid_is_in_list): Fix wrong 'See' comment.
2666
2667 2018-10-02  Tom Tromey  <tom@tromey.com>
2668
2669         * aarch64-linux-tdep.c (aarch64_linux_sigframe_init): Use pulongest.
2670
2671 2018-10-02  John Darrington  <john@darrington.wattle.id.au>
2672
2673         * NEWS: Mention changed commands.
2674         * ser-uds.c: New file.
2675         * configure.ac (SER_HARDWIRE): Add ser-uds.o.
2676         * configure: Regenerate.
2677         * Makefile.in: Add new file.
2678         * serial.c (serial_open): Check if filename is a socket
2679         and lookup the appropriate interface accordingly.
2680
2681 2018-10-01  Alan Hayward  <alan.hayward@arm.com>
2682
2683         * aarch64-linux-tdep.c (AARCH64_SIGCONTEXT_RESERVED_OFFSET): Add
2684         define.
2685         (AARCH64_EXTRA_MAGIC): Likewise.
2686         (AARCH64_FPSIMD_MAGIC): Likewise.
2687         (AARCH64_SVE_MAGIC): Likewise.
2688         (AARCH64_EXTRA_DATAP_OFFSET): Likewise.
2689         (AARCH64_FPSIMD_FPSR_OFFSET): Likewise.
2690         (AARCH64_FPSIMD_FPCR_OFFSET): Likewise.
2691         (AARCH64_FPSIMD_V0_OFFSET): Likewise.
2692         (AARCH64_FPSIMD_VREG_SIZE): Likewise.
2693         (AARCH64_SVE_CONTEXT_VL_OFFSET): Likewise.
2694         (AARCH64_SVE_CONTEXT_REGS_OFFSET): Likewise.
2695         (AARCH64_SVE_CONTEXT_P_REGS_OFFSET): Likewise.
2696         (AARCH64_SVE_CONTEXT_FFR_OFFSET): Likewise.
2697         (AARCH64_SVE_CONTEXT_SIZE): Likewise.
2698         (read_aarch64_ctx): Add function.
2699         (aarch64_linux_sigframe_init): Detect FP registers.
2700
2701 2018-10-01  Alan Hayward  <alan.hayward@arm.com>
2702
2703         * aarch64-tdep.c (AARCH64_Q0_REGNUM): Move to here.
2704         (AARCH64_D0_REGNUM): Likewise.
2705         (AARCH64_S0_REGNUM): Likewise.
2706         (AARCH64_H0_REGNUM): Likewise.
2707         (AARCH64_B0_REGNUM): Likewise.
2708         (AARCH64_SVE_V0_REGNUM): Likewise.
2709         * arch/aarch64.h (AARCH64_Q0_REGNUM): Move from here.
2710         (AARCH64_D0_REGNUM): Likewise.
2711         (AARCH64_S0_REGNUM): Likewise.
2712         (AARCH64_H0_REGNUM): Likewise.
2713         (AARCH64_B0_REGNUM): Likewise.
2714         (AARCH64_SVE_V0_REGNUM): Likewise.
2715
2716 2018-10-01  Gary Benson <gbenson@redhat.com>
2717
2718         * gdb_proc_service.h (gdb_prfpregset_t): Remove typedef.
2719         * proc-service.c (ps_lgetfpregs, ps_lsetfpregs): Use
2720         prfpregset_t instead of gdb_prfpregset_t.
2721         * configure.ac (PRFPREGSET_T_BROKEN): Remove check.
2722         * configure, config.in: Rebuild.
2723
2724 2018-10-01  Gary Benson <gbenson@redhat.com>
2725
2726         * common/gdb_proc_service.h: New file, factored out from...
2727         * gdb_proc_service.h: Moved common code to the above file.
2728         * Makefile.in (HFILES_NO_SRCDIR): Add the above new file.
2729
2730 2018-10-01  Gary Benson <gbenson@redhat.com>
2731
2732         * gdb_proc_service.h: Use elf_gregset_t if prgregset_t is
2733         undefined.  Use elf_fpregset_t if prfpregset_t is undefined.
2734
2735 2018-10-01  Gary Benson <gbenson@redhat.com>
2736
2737         * configure.ac: Check if sys/procfs.h defines elf_fpregset_t.
2738         (AC_CHECK_HEADERS): Check for linux/elf.h.
2739         * configure, config.in: Rebuild.
2740         * gdb_proc_service.h: Include linux/elf.h if sys/procfs.h
2741         doesn't define elf_fpregset_t.
2742
2743 2018-10-01  Gary Benson <gbenson@redhat.com>
2744
2745         * gdb_proc_service.h: Whitespace change.
2746
2747 2018-10-01  Tom Tromey  <tom@tromey.com>
2748
2749         * unittests/scoped_mmap-selftests.c: Don't check HAVE_UNISTD_H.
2750         * unittests/scoped_fd-selftests.c: Don't check HAVE_UNISTD_H.
2751         * common/scoped_fd.h: Don't check HAVE_UNISTD_H.
2752
2753 2018-10-01  Tom Tromey  <tom@tromey.com>
2754
2755         * README: Minor change.
2756
2757 2018-09-30  Pedro Alves  <palves@redhat.com>
2758
2759         * darwin-nat-info.c (darwin_debug_regions_recurse)
2760         (info_mach_exceptions_command): Remove unused local variables.
2761         * darwin-nat.c (darwin_decode_notify_message)
2762         (darwin_nat_target::resume, darwin_nat_target::mourn_inferior)
2763         (darwin_stop_inferior, darwin_setup_exceptions)
2764         (darwin_nat_target::kill, darwin_attach_pid, darwin_ptrace_him)
2765         (darwin_nat_target::attach, darwin_nat_target::detach)
2766         (darwin_read_write_inferior, darwin_read_dyld_info): Remove unused
2767         local variables.
2768         * i386-darwin-nat.c (i386_darwin_dr_set): Remove unused local
2769         variables.
2770
2771 2018-09-29  Tom Tromey  <tom@tromey.com>
2772
2773         * README: Remove some leftover text.
2774
2775 2018-09-29  Tom Tromey  <tom@tromey.com>
2776
2777         * PROBLEMS: Rewrite.
2778         * README: Update.
2779
2780 2018-09-28  John Baldwin  <jhb@FreeBSD.org>
2781
2782         * disasm-selftests.c (print_one_insn_test): Add bfd_arch_riscv to
2783         case with explicit breakpoint kind.
2784         * riscv-tdep.c (show_use_compressed_breakpoints): Remove
2785         'additional_info' and related logic.
2786         (riscv_debug_breakpoints): New variable.
2787         (riscv_breakpoint_kind_from_pc): Use the length of the existing
2788         instruction to determine the breakpoint kind.
2789         (_initialize_riscv_tdep): Add 'set/show debug riscv breakpoints'
2790         flag.  Update description of 'set/show riscv
2791         use-compressed-breakpoints' flag.
2792
2793 2018-09-28  Andrew Burgess  <andrew.burgess@embecosm.com>
2794
2795         (NEWS): Mention changes to frame related commands.
2796         * cli/cli-decode.c (add_cmd_suppress_notification): New function.
2797         (add_prefix_cmd_suppress_notification): New function.
2798         (add_com_suppress_notification): Call
2799         add_cmd_suppress_notification.
2800         * command.h (add_cmd_suppress_notification): Declare.
2801         (add_prefix_cmd_suppress_notification): Declare.
2802         * mi/mi-cmd-stack.c: Add 'safe-ctype.h' include.
2803         (parse_frame_specification): Moved from stack.c, with
2804         simplification to handle a single argument.
2805         (mi_cmd_stack_select_frame): Use parse_frame_specification, the
2806         switch to the selected frame.  Add a header comment.
2807         * stack.c: Remove 'safe-ctype.h' include.
2808         (find_frame_for_function): Add declaration.
2809         (find_frame_for_address): New function.
2810         (parse_frame_specification): Moved into mi/mi-cmd-stack.c.
2811         (frame_selection_by_function_completer): New function.
2812         (info_frame_command): Rename to...
2813         (info_frame_command_core): ...this, and update parameter types.
2814         (select_frame_command): Rename to...
2815         (select_frame_command_core): ...this, and update parameter types.
2816         (frame_command): Rename to...
2817         (frame_command_core): ...this, and update parameter types.
2818         (class frame_command_helper): New class to wrap implementations of
2819         frame related sub-commands.
2820         (frame_apply_cmd_list): New static global.
2821         (frame_cmd_list): Make static.
2822         (select_frame_cmd_list): New global for sub-commands.
2823         (info_frame_cmd_list): New global for sub-commands.
2824         (_initialize_stack): Register sub-commands for 'frame',
2825         'select-frame', and 'info frame'.  Update 'frame apply' commands
2826         to use frame_apply_cmd_list.  Move function local static
2827         frame_apply_list to file static frame_apply_cmd_list for
2828         consistency.
2829         * stack.h (select_frame_command): Delete declarationn.
2830         (select_frame_for_mi): Declare new function.
2831
2832 2018-09-26  Andrew Burgess  <andrew.burgess@embecosm.com>
2833
2834         * riscv-tdep.c (riscv_insn::decode): Decode c.lui.
2835         (riscv_scan_prologue): Split handling of AUIPC, LUI, ADD, ADDI,
2836         and NOP.
2837
2838 2018-09-26  Simon Marchi  <simon.marchi@ericsson.com>
2839
2840         * elf32-nds32.c (elf32_nds32_allocate_dynrelocs): Remove.
2841
2842 2018-09-26  Tom Tromey  <tom@tromey.com>
2843
2844         * valops.c (auto_abandon): Remove dead code.
2845
2846 2018-09-26  Tom Tromey  <tom@tromey.com>
2847
2848         * tui/tui-win.c (WIN_HEIGHT_USAGE): Remove extra ">"s.
2849
2850 2018-09-24  Tom Tromey  <tom@tromey.com>
2851
2852         * common/pathstuff.c (get_standard_cache_dir): Make
2853         "xdg_cache_home" and "home" const.
2854         * top.c (init_history): Make "tmpenv" const.
2855         * main.c (get_init_files): Make "homedir" const.
2856
2857 2018-09-23  Tom Tromey  <tom@tromey.com>
2858
2859         PR python/18852:
2860         * python/py-param.c (get_set_value): Use gdbpy_handle_exception.
2861
2862 2018-09-23  Tom Tromey  <tom@tromey.com>
2863
2864         * python/py-function.c (fnpy_call): Use gdbpy_handle_exception.
2865         * python/py-cmd.c (cmdpy_function): Use gdbpy_handle_exception.
2866         * python/python-internal.h (gdbpy_handle_exception): Declare.
2867         * python/py-utils.c (gdbpy_handle_exception): New function.
2868
2869 2018-09-23  Tom Tromey  <tom@tromey.com>
2870
2871         PR python/17284:
2872         * python/py-type.c (typy_template_argument): Check for negative
2873         argument number.
2874
2875 2018-09-23  Tom Tromey  <tom@tromey.com>
2876
2877         PR python/14062:
2878         * python/python.c (gdbpy_run_events): Do not ignore exceptions.
2879
2880 2018-09-23  Tom Tromey  <tom@tromey.com>
2881
2882         PR python/18170:
2883         * python/py-value.c (valpy_int): Allow conversion from pointer
2884         type.
2885
2886 2018-09-23  Tom Tromey  <tom@tromey.com>
2887
2888         PR python/20126:
2889         * python/py-value.c (valpy_int): Respect type sign.
2890
2891 2018-09-23  Tom Tromey  <tom@tromey.com>
2892
2893         PR python/18352;
2894         * python/py-value.c (valpy_float): Allow conversions from int or
2895         char.
2896         (valpy_int, valpy_long): Allow conversions from float.
2897
2898 2018-09-23  Tom Tromey  <tom@tromey.com>
2899
2900         * ctf.c (ctf_start): Use gdb_fopen_cloexec.
2901         * common/scoped_mmap.c (mmap_file): Use gdb_open_cloexec.
2902
2903 2018-09-23  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2904
2905         * amd64-sol2-tdep.c (amd64_sol2_sigtramp_p): Also recognize
2906         __sighndlr.
2907         * i386-sol2-tdep.c (i386_sol2_sigtramp_p): Likewise.
2908
2909 2018-08-02  Jon Turney  <jon.turney@dronecode.org.uk>
2910
2911         * windows-nat.c (windows_nat_target::wait): Remove a spurious
2912         target_terminal::ours().
2913
2914 2018-09-23  Simon Marchi  <simon.marchi@ericsson.com>
2915
2916         * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): Change type
2917         of vl to ULONGEST.
2918
2919 2018-09-21  Yacov Simhony  <ysimhony@gmail.com>
2920
2921         * breakpoint.c (update_inserted_breakpoint_locations): Remove
2922         redundant condition.
2923
2924 2018-09-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2925
2926         * proc-utils.h (PROC_CTL_WORD_TYPE): Remove.
2927
2928         * procfs.c: Don't check for PR_MODEL_NATIVE definition.
2929         * sparc-sol2-nat.c: Likewise.  Remove Linux, __arch64__ references.
2930         * sol-thread.c (ps_pdmodel): Don't guard definition.
2931
2932         * procfs.c: Fix formatting.
2933
2934         * procfs.c (sysset_t_alloc): Remove.
2935         (create_procinfo): Use XNEW instead of sysset_t_alloc.
2936         (procfs_debug_inferior): Likewise.
2937         (procfs_set_exec_trap): Likewise.
2938         (proc_set_traced_sysentry): Don't allocate argp dynamically.
2939         (proc_set_traced_sysexit): Likewise.
2940
2941         * procfs.c (create_procinfo): Use xsnprintf to fix ARI warning.
2942         (dead_procinfo): Likewise.
2943         (proc_warn): Likewise.
2944         (proc_error): Likewise.
2945         (proc_get_LDT_entry): Likewise.
2946         (do_attach): Likewise.
2947         (procfs_target::pid_to_str): Likewise.
2948         (iterate_over_mappings): Likewise.
2949
2950         * procfs.c (create_procinfo): Fix ARI warning.
2951         (proc_get_status): Likewise.
2952         (proc_stop_process): Likewise.
2953         (proc_run_process): Likewise.
2954         (proc_kill): Likewise.
2955         (proc_get_LDT_entry): Likewise.
2956         (procfs_find_LDT_entry): Likewise.
2957         (proc_update_threads): Likewise.
2958         (proc_iterate_over_threads): Likewise.
2959         (do_attach): Likewise.
2960         (procfs_xfer_memory): Likewise.
2961         (invalidate_cache): Likewise.
2962         (procfs_target::resume): Likewise.
2963         (procfs_init_inferior): Likewise.
2964         (procfs_set_exec_trap): Likewise.
2965         (procfs_target::thread_alive): Likewise.
2966         (procfs_target::pid_to_exec_file): Likewise.
2967         (iterate_over_mappings): Likewise.
2968         (procfs_target::make_corefile_notes): Likewise.
2969         * sol-thread.c (sol_thread_target::thread_alive): Likewise.
2970
2971         * procfs.c (procfs_find_LDT_entry): Silence ARI warning.
2972         (procfs_find_LDT_entry): Likewise.
2973         * sol-thread.c (ps_lgetLDT): Likewise.
2974
2975 2018-09-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2976
2977         PR tdep/17903
2978         * procfs.c (procfs_target): Declare pid_to_exec_file.
2979         (procfs_target::pid_to_exec_file): New.
2980
2981 2018-09-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2982
2983         * auxv.c (default_print_auxv_entry): Reflect AT_SUN_CAP_HW1
2984         renaming.
2985         Handle AT_SUN_EMULATOR, AT_SUN_BRANDNAME, AT_SUN_BRAND_AUX1,
2986         AT_SUN_BRAND_AUX2, AT_SUN_BRAND_AUX3, AT_SUN_CAP_HW2.
2987
2988 2018-09-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2989
2990         * i386-v4-nat.c (regmap, supply_gregset, fill_gregset)
2991         (supply_fpregset, fill_fpregset): Move ...
2992         * i386-sol2-nat.c [PR_MODEL_NATIVE != PR_MODEL_LP64]: ... here.
2993         Remove HAVE_GREGSET_T, HAVE_FPREGET_T guards.
2994         Remove references to ioctl-based procfs.
2995         Include <sys/reg.h>.
2996         Remove PR_MODEL_NATIVE guards.
2997         * configure.nat <sol2, i386> (NATDEPFILES): Remove i386-v4-nat.o.
2998         * Makefile.in (ALLDEPFILES): Remove i386-v4-nat.c.
2999
3000 2018-09-19  Xavier Roirand  <roirand@adacore.com>
3001
3002         PR gdb/20981:
3003         * solib-darwin.c (darwin_get_dyld_bfd): New function.
3004         (darwin_solib_get_all_image_info_addr_at_init): Update call.
3005         (darwin_solib_create_inferior_hook): Handle unrelocated dyld.
3006
3007 2018-09-19  John Baldwin  <jhb@FreeBSD.org>
3008
3009         * fbsd-tdep.c (fbsd_print_sockaddr_in): Style fix.
3010         (fbsd_print_sockaddr_in6): Likewise.
3011
3012 2018-09-19  Richard Bunt  <richard.bunt@arm.com>
3013             Chris January  <chris.january@arm.com>
3014
3015         * eval.c (skip_undetermined_arglist): Skip argument list helper.
3016         (evaluate_subexp_standard): Return a dummy type when
3017         honoring EVAL_SKIP in OP_VAR_VALUE and handle skipping in the
3018         OP_F77_UNDETERMINED_ARGLIST case.
3019         * expression.h (enum noside): Update comment.
3020
3021 2018-09-19  George Vasick <george.vasick@oracle.com>
3022
3023         * solib-svr4.c (svr4_same_1): Also handle amd64 ld.so.1.
3024
3025 2018-09-19  Stefan Teleman <stefan.teleman@oracle.com>
3026             April Chin <april.chin@oracle.com>
3027             Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
3028
3029         * procfs.c (MAX_PROC_NAME_SIZE): Allow for 6-digit PID_MAX and
3030         uint_t lwpid_t.
3031         (create_procinfo): Print pids in /proc without leading zeros.
3032
3033 2018-09-18  Sandra Loosemore  <sandra@codesourcery.com>
3034
3035         * nios2-tdep.c (nios2_gcc_target_options): New.
3036         (nios2_gdb_arch_init): Install new hook.
3037
3038 2018-09-18  Simon Marchi  <simon.marchi@ericsson.com>
3039
3040         * patches/0001-Fix-PR-gdb-23558-Use-system-s-getcwd-when-cross-comp.patch:
3041         New file.
3042         * update-gnulib.sh: Apply patch.
3043         * configure: Re-generate.
3044
3045 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
3046
3047         * infcmd.c (_initialize_infcmd): Remove "running" from "info proc"
3048         description.  Make "info proc" command descriptions more
3049         consistent.
3050
3051 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
3052
3053         * NEWS: Mention 'info proc files' command.
3054
3055 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
3056
3057         * fbsd-nat.c (fbsd_nat_target::info_proc): List open file
3058         descriptors for IP_FILES and IP_ALL.
3059
3060 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
3061
3062         * fbsd-tdep.c (KF_FLAGS, KF_OFFSET, KF_VNODE_TYPE, KF_SOCK_DOMAIN)
3063         (KF_SOCK_TYPE, KF_SOCK_PROTOCOL, KF_SA_LOCAL, KF_SA_PEER)
3064         (KINFO_FILE_TYPE_SOCKET, KINFO_FILE_TYPE_PIPE)
3065         (KINFO_FILE_TYPE_FIFO, KINFO_FILE_TYPE_KQUEUE)
3066         (KINFO_FILE_TYPE_CRYPTO, KINFO_FILE_TYPE_MQUEUE)
3067         (KINFO_FILE_TYPE_SHM, KINFO_FILE_TYPE_SEM, KINFO_FILE_TYPE_PTS)
3068         (KINFO_FILE_TYPE_PROCDESC, KINFO_FILE_FD_TYPE_ROOT)
3069         (KINFO_FILE_FD_TYPE_JAIL, KINFO_FILE_FD_TYPE_TRACE)
3070         (KINFO_FILE_FD_TYPE_CTTY, KINFO_FILE_FLAG_READ)
3071         (KINFO_FILE_FLAG_WRITE, KINFO_FILE_FLAG_APPEND)
3072         (KINFO_FILE_FLAG_ASYNC, KINFO_FILE_FLAG_FSYNC)
3073         (KINFO_FILE_FLAG_NONBLOCK, KINFO_FILE_FLAG_DIRECT)
3074         (KINFO_FILE_FLAG_HASLOCK, KINFO_FILE_FLAG_EXEC)
3075         (KINFO_FILE_VTYPE_VREG, KINFO_FILE_VTYPE_VDIR)
3076         (KINFO_FILE_VTYPE_VCHR, KINFO_FILE_VTYPE_VLNK)
3077         (KINFO_FILE_VTYPE_VSOCK, KINFO_FILE_VTYPE_VFIFO, FBSD_AF_UNIX)
3078         (FBSD_AF_INET, FBSD_AF_INET6, FBSD_SOCK_STREAM, FBSD_SOCK_DGRAM)
3079         (FBSD_SOCK_SEQPACKET, FBSD_IPPROTO_ICMP, FBSD_IPPROTO_TCP)
3080         (FBSD_IPPROTO_UDP, FBSD_IPPROTO_SCTP): New defines.
3081         (struct fbsd_sockaddr_in, struct fbsd_sockaddr_in6)
3082         (struct fbsd_sockaddr_un): New types.
3083         (fbsd_file_fd, fbsd_file_type, fbsd_file_flags, fbsd_ipproto)
3084         (fbsd_print_sockaddr_in, fbsd_print_sockaddr_in6)
3085         (fbsd_info_proc_files_header, fbsd_info_proc_files_entry)
3086         (fbsd_core_info_proc_files): New functions.
3087         (fbsd_core_info_proc): List open file descriptors for IP_FILES and
3088         IP_ALL.
3089         * fbsd-tdep.h (fbsd_info_proc_files_header)
3090         (fbsd_info_proc_files_entry): New.
3091
3092 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
3093
3094         * defs.h (enum info_proc_what) [IP_FILES]: New value.
3095         * infcmd.c (info_proc_cmd_files): New function.
3096         (_initialize_infcmd): Register 'info proc files' command.
3097
3098 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
3099
3100         * gnulib/aclocal-m4-deps.mk: Re-generate.
3101         * gnulib/aclocal.m4: Re-generate.
3102         * gnulib/config.in: Re-generate.
3103         * gnulib/configure: Re-generate.
3104         * gnulib/import/Makefile.am: Re-generate.
3105         * gnulib/import/Makefile.in: Re-generate.
3106         * gnulib/import/m4/gnulib-cache.m4: Re-generate.
3107         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
3108         * gnulib/import/arpa_inet.in.h: New file.
3109         * gnulib/import/inet_ntop.c: New file.
3110         * gnulib/import/m4/arpa_inet_h.m4: New file.
3111         * gnulib/import/m4/inet_ntop.m4: New file.
3112         * gnulib/import/m4/netinet_in_h.m4: New file.
3113         * gnulib/import/m4/socklen.m4: New file.
3114         * gnulib/import/m4/sockpfaf.m4: New file.
3115         * gnulib/import/m4/stdalign.m4: New file.
3116         * gnulib/import/m4/sys_uio_h.m4: New file.
3117         * gnulib/import/netinet_in.in.h: New file.
3118         * gnulib/import/stdalign.in.h: New file.
3119         * gnulib/import/sys_socket.c: New file.
3120         * gnulib/import/sys_socket.in.h: New file.
3121         * gnulib/import/sys_uio.in.h: New file.
3122         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add inet_ntop
3123         module.
3124
3125 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
3126
3127         * gnulib/aclocal-m4-deps.mk: New file.
3128         * gnulib/update-gnulib.sh: Generate "aclocal-m4-deps.mk"
3129         deterministically.
3130
3131 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
3132
3133         * fbsd-tdep.c (fbsd_core_vnode_path): Use KF_PATH instead of
3134         KVE_PATH.
3135
3136 2018-09-18  Tom Tromey  <tom@tromey.com>
3137
3138         * compile/compile-object-load.c (struct
3139         link_hash_table_cleanup_data): Add constructor and destructor.
3140         Use DISABLE_COPY_AND_ASSIGN.
3141         (~link_hash_table_cleanup_data): Rename from
3142         link_hash_table_free.  Now a destructor.
3143         (copy_sections): Use gdb::unique_xmalloc_ptr.  Remove cleanups.
3144
3145 2018-09-18  Tom Tromey  <tom@tromey.com>
3146
3147         * compile/compile-object-run.c (do_module_cleanup): Use delete.
3148         * compile/compile-object-load.c (struct munmap_list): Move to
3149         header file.
3150         (munmap_list::add): Rename from munmap_list_add; rewrite.
3151         (munmap_list::~munmap_list): Rename from munmap_list_free.
3152         (munmap_listp_free_cleanup): Remove.
3153         (compile_object_load): Update.
3154         * compile/compile-object-load.h (struct munmap_list): Move from
3155         compile-object-load.c.  Rewrite.
3156
3157 2018-09-18  Alan Hayward  <alan.hayward@arm.com>
3158
3159         * aarch64-tdep.c (pass_in_v): Use register size.
3160         (aarch64_extract_return_value): Likewise.
3161         (aarch64_store_return_value): Likewise.
3162
3163 2018-09-18  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
3164
3165         * utils.c (dump_core) [HAVE_SETRLIMIT]: Cast RLIM_INFINITY to
3166         rlim_t.
3167
3168 2018-09-17  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
3169
3170         * python/lib/gdb/command/frame_filters.py (EnableFrameFilter):
3171         Fix short help line.
3172
3173 2018-09-17  Tom Tromey  <tom@tromey.com>
3174
3175         PR python/20445:
3176         * configure: Rebuild.
3177         * configure.ac: Conditionally use -DNDEBUG for Python.
3178
3179 2018-09-17  Tom Tromey  <tom@tromey.com>
3180
3181         * configure: Rebuild.
3182         * configure.ac: Use gmp as a library dependency when checking for
3183         mpfr.
3184
3185 2018-09-17  Pedro Alves  <palves@redhat.com>
3186
3187         * python/py-inferior.c (find_inferior_object): Delete.
3188
3189 2018-09-17  Simon Marchi  <simon.marchi@ericsson.com>
3190
3191         * compile/compile-cplus-types.c
3192         (compile_cplus_instance::enter_scope): Don't use new_scope after
3193         std::move.
3194
3195 2018-09-17  Tom Tromey  <tom@tromey.com>
3196
3197         * common/pathstuff.c (get_standard_cache_dir): Use
3198         ~/Library/Caches on macOS.
3199         * common/pathstuff.h (get_standard_cache_dir): Update comment.
3200
3201 2018-09-17  Simon Marchi  <simon.marchi@polymtl.ca>
3202
3203         PR python/23669
3204         * breakpoint.c (commands_cmd_element): New.
3205         (_initialize_breakpoint): Assign commands_cmd_element.
3206         * breakpoint.h (commands_cmd_element): New.
3207         * cli/cli-script.c (while_cmd_element, if_command,
3208         define_cmd_element): New.
3209         (command_name_equals): Remove.
3210         (process_next_line): Compare commands by pointer, not by name.
3211         (_initialize_cli_script): Assign the various cmd_list_element
3212         variables.
3213         * compile/compile.c (compile_cmd_element): New.
3214         (_initialize_compile): Assign compile_cmd_element.
3215         * compile/compile.h (compile_cmd_element): New.
3216         * guile/guile.c (guile_cmd_element): New.
3217         (install_gdb_commands): Assign guile_cmd_element.
3218         * guile/guile.h (guile_cmd_element): New.
3219         * python/python.c (python_cmd_element): New.
3220         (_initialize_python): Assign python_cmd_element.
3221         * python/python.h (python_cmd_element): New.
3222         * tracepoint.c (while_stepping_cmd_element): New.
3223         (_initialize_tracepoint): Assign while_stepping_cmd_element.
3224         * tracepoint.h (while_stepping_cmd_element): New.
3225
3226 2018-09-17  Tom Tromey  <tom@tromey.com>
3227
3228         * infrun.c (save_infcall_suspend_state): Return
3229         infcall_suspend_state_up.
3230         (save_infcall_control_state): Return infcall_control_state_up.
3231         * inferior.h (save_infcall_suspend_state)
3232         (save_infcall_control_state): Declare later.  Return unique
3233         pointers.
3234
3235 2018-09-17  Tom Tromey  <tom@tromey.com>
3236
3237         * infrun.c (struct stop_context): Declare constructor,
3238         destructor, "changed" method.
3239         (stop_context::stop_context): Rename from save_stop_context.
3240         (stop_context::~stop_context): Rename from
3241         release_stop_context_cleanup.
3242         (normal_stop): Update.
3243         (stop_context::changed): Rename from stop_context_changed.  Return
3244         bool.
3245
3246 2018-09-17  Tom Tromey  <tom@tromey.com>
3247
3248         * inferior.h (struct infcall_suspend_state_deleter): New.
3249         (infcall_suspend_state_up): New typedef.
3250         (struct infcall_control_state_deleter): New.
3251         (infcall_control_state_up): New typedef.
3252         (make_cleanup_restore_infcall_suspend_state)
3253         (make_cleanup_restore_infcall_control_state): Don't declare.
3254         * infcall.c (call_function_by_hand_dummy): Update.
3255         * infrun.c (do_restore_infcall_suspend_state_cleanup)
3256         (make_cleanup_restore_infcall_suspend_state): Remove.
3257         (do_restore_infcall_control_state_cleanup)
3258         (make_cleanup_restore_infcall_control_state): Remove.
3259
3260 2018-09-17  Tom Tromey  <tom@tromey.com>
3261
3262         * gdbthread.h (struct thread_control_state): Add initializer.
3263         (class thread_info) <control>: Remove initializer.
3264         * inferior.h (struct inferior_control_state): Add initializer.
3265         (class inferior) <control>: Remove initializer.
3266         (exit_inferior_1): Update.
3267         * infrun.c (struct infcall_control_state): Add constructors.
3268         (save_infcall_control_state): Use new.
3269         (restore_infcall_control_state, discard_infcall_control_state):
3270         Use delete.
3271
3272 2018-09-17  Tom Tromey  <tom@tromey.com>
3273
3274         * infrun.c (struct infcall_suspend_state) <registers>: Now a
3275         unique_ptr.
3276         <siginfo_data>: Now a unique_xmalloc_ptr.
3277         (save_infcall_suspend_state, restore_infcall_suspend_state)
3278         (discard_infcall_suspend_state)
3279         (get_infcall_suspend_state_regcache): Update.
3280
3281 2018-09-17  Tom Tromey  <tom@tromey.com>
3282
3283         * gdbthread.h (struct thread_suspend_state): Add initializers.
3284         (class thread_info) <suspend>: Remove initializer.
3285         * infrun.c (struct infcall_suspend_state): Add initializers.
3286         (save_infcall_suspend_state): Use new.
3287         (discard_infcall_suspend_state): Use delete.
3288
3289 2018-09-16  Tom Tromey  <tom@tromey.com>
3290
3291         * python/python-internal.h (CPYCHECKER_STEALS_REFERENCE_TO_ARG):
3292         Remove.
3293         * python/py-varobj.c (py_varobj_iter_ctor): Change pyiter to
3294         rvalue reference.  Remove CPYCHECKER_STEALS_REFERENCE_TO_ARG.
3295         (py_varobj_iter_new): Likewise.
3296         (py_varobj_get_iterator): Use gdbpy_ref.
3297
3298 2018-09-16  Tom Tromey  <tom@tromey.com>
3299
3300         * python/py-threadevent.c (py_get_event_thread): Simplify.
3301         * python/py-inferior.c (infpy_thread_from_thread_handle):
3302         Return immediately after calling thread_to_thread_object.  Use
3303         Py_RETURN_NONE.
3304         (thread_to_thread_object): Set the exception on a NULL return.
3305
3306 2018-09-16  Simon Marchi  <simon.marchi@polymtl.ca>
3307
3308         * Makefile.in (LIBGDB_OBS): Sort COMMON_OBS.
3309
3310 2018-09-16  Tom Tromey  <tom@tromey.com>
3311
3312         * python/python-internal.h (CPYCHECKER_RETURNS_BORROWED_REF):
3313         Remove.
3314
3315 2018-09-16  Tom Tromey  <tom@tromey.com>
3316
3317         * python/python-internal.h (thread_to_thread_object): Change
3318         return type.
3319         * python/py-inferior.c (thread_to_thread_object): Return a new
3320         reference.
3321         (infpy_thread_from_thread_handle): Update.
3322         * python/py-infthread.c (gdbpy_selected_thread): Update.
3323         * python/py-stopevent.c (create_stop_event_object): Update.
3324         * python/py-threadevent.c (py_get_event_thread): Return a new
3325         reference.
3326         (py_get_event_thread): Update.
3327         * python/py-event.h (py_get_event_thread): Change return type.
3328         * python/py-continueevent.c (create_continue_event_object):
3329         Update.
3330
3331 2018-09-16  Tom Tromey  <tom@tromey.com>
3332
3333         * python/py-progspace.c (pspy_get_objfiles): Update.
3334         * python/python-internal.h (objfile_to_objfile_object): Change
3335         return type.
3336         * python/py-newobjfileevent.c (create_new_objfile_event_object):
3337         Update.
3338         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers):
3339         Update.
3340         * python/python.c (gdbpy_get_current_objfile): Update.
3341         (gdbpy_objfiles): Update.
3342         * python/py-objfile.c (objfpy_get_owner, gdbpy_lookup_objfile):
3343         Update.
3344         (objfile_to_objfile_object): Return a new reference.
3345         * python/py-symtab.c (stpy_get_objfile): Update.
3346         * python/py-prettyprint.c (find_pretty_printer_from_objfiles):
3347         Update.
3348
3349 2018-09-16  Tom Tromey  <tom@tromey.com>
3350
3351         * python/py-inferior.c (infpy_get_progspace): Update.
3352         * python/python-internal.h (pspace_to_pspace_object): Change
3353         return type.
3354         * python/py-newobjfileevent.c
3355         (create_clear_objfiles_event_object): Update.
3356         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers):
3357         Update.
3358         * python/python.c (gdbpy_get_current_progspace): Update.
3359         (gdbpy_progspaces): Update.
3360         * python/py-progspace.c (pspace_to_pspace_object): Return a new
3361         reference.
3362         * python/py-objfile.c (objfpy_get_progspace): Update.
3363         * python/py-prettyprint.c (find_pretty_printer_from_progspace):
3364         Update.
3365
3366 2018-09-16  Tom Tromey  <tom@tromey.com>
3367
3368         * python/lib/gdb/__init__.py (current_progspace, objfiles)
3369         (solib_name, block_for_pc, find_pc_line): New functions.
3370         (execute_unwinders): Update.
3371         * python/py-block.c (gdbpy_block_for_pc): Remove.
3372         * python/py-inferior.c (infpy_get_progspace): New function.
3373         (inferior_object_getset) <progspace>: Add.
3374         * python/py-progspace.c (pspy_objfiles): Rewrite.
3375         (pspy_solib_name, pspy_block_for_pc)
3376         (pspy_find_pc_line, pspy_is_valid): New functions.
3377         (progspace_object_methods): Add entries for solib_name,
3378         block_for_pc, find_pc_line, is_valid.
3379         * python/python-internal.h (gdbpy_block_for_pc)
3380         (build_objfiles_list): Don't declare.
3381         * python/python.c: Don't include solib.h.
3382         (gdbpy_solib_name, gdbpy_find_pc_line)
3383         (gdbpy_get_current_progspace, build_objfiles_list)
3384         (gdbpy_objfiles): Remove.
3385         (GdbMethods) <current_progspace, objfiles, block_for_pc,
3386         solib_name, find_pc_line>: Remove entries.
3387
3388 2018-09-16  Tom Tromey  <tom@tromey.com>
3389
3390         * top.c (new_ui_command): Use GNU style for metasyntactic
3391         variables.
3392         * breakpoint.c (stopat_command): Use GNU style for metasyntactic
3393         variables.
3394         * maint.c (maintenance_translate_address): Remove "<>" around
3395         text.
3396         * interps.c (interpreter_exec_cmd): Use GNU style for
3397         metasyntactic variables.
3398         * nto-procfs.c (nto_procfs_target_info): Use GNU style for
3399         metasyntactic variables.
3400         * tracepoint.c (tfind_range_command): Use GNU style for
3401         metasyntactic variables.
3402         (tfind_outside_command): Likewise.
3403         (_initialize_tracepoint): Likewise.
3404         * remote.c (extended_remote_target::create_inferior): Use GNU
3405         style for metasyntactic variables.
3406         * sparc64-tdep.c (adi_examine_command): Use GNU style for
3407         metasyntactic variables.
3408         (adi_assign_command): Likewise.
3409
3410 2018-09-16  Tom Tromey  <tom@tromey.com>
3411
3412         * disasm.c (show_disassembler_options_sfunc): Use GNU style for
3413         metasyntactic variables.  Print message if no disassembler options
3414         are available.
3415
3416 2018-09-15  Tom Tromey  <tom@tromey.com>
3417
3418         * infcmd.c (get_inferior_args): Return const char *.
3419         * inferior.h (get_inferior_args): Return type now const.
3420         * linux-tdep.c (linux_fill_prpsinfo): Update.
3421         * procfs.c (procfs_target::make_corefile_notes): Update.
3422
3423 2018-09-07  Tom Tromey  <tom@tromey.com>
3424
3425         * python/python.c (execute_gdb_command): Call bpstat_do_actions
3426         inside the TRY.
3427
3428 2018-09-14  Sandra Loosemore  <sandra@codesourcery.com>
3429
3430         * nios2-tdep.c (nios2_type_align): New.
3431         (nios2_gdb_arch_init): Install type_align hook.
3432
3433 2018-09-10  Andrew Burgess  <andrew.burgess@embecosm.com>
3434
3435         * eval.c (fake_method::fake_method): Call xzalloc directly for a
3436         type that is neither object file owned, nor gdbarch owned.
3437         * gdbtypes.c (get_type_gdbarch): Add an assert that returned
3438         gdbarch is non-NULL.
3439         (alloc_type_instance): Allocate non-objfile owned types on the
3440         gdbarch obstack.
3441         (copy_type_recursive): Allocate TYPE_FIELDS and TYPE_RANGE_DATA
3442         using TYPE_ALLOC to ensure memory is allocated on the correct
3443         obstack.
3444         * gdbtypes.h (TYPE_ALLOC): Allocate space on either the objfile
3445         obstack, or the gdbarch obstack.
3446         (TYPE_ZALLOC): Rewrite using TYPE_ALLOC.
3447
3448 2018-09-14  Tom Tromey  <tom@tromey.com>
3449
3450         * infcall.c (call_function_by_hand_dummy): Remove unnecessary
3451         block.
3452
3453 2018-09-14  Tom Tromey  <tom@tromey.com>
3454
3455         * nat/fork-inferior.c (get_startup_shell): Remove "static".
3456
3457 2018-09-13  Tom Tromey  <tom@tromey.com>
3458
3459         * python/py-inferior.c (infpy_thread_from_thread_handle): Now
3460         static.
3461
3462 2018-09-13  Tom Tromey  <tom@tromey.com>
3463
3464         * exec.c (try_open_exec_file): Use std::string.
3465
3466 2018-09-13  Tom Tromey  <tom@tromey.com>
3467
3468         * utils.h (gdb_bfd_errmsg): Return std::string.
3469         * exec.c (exec_file_attach): Update.
3470         * compile/compile-object-load.c (compile_object_load): Update.
3471         * utils.c (gdb_bfd_errmsg): Return std::string.
3472
3473 2018-09-13  Tom Tromey  <tom@tromey.com>
3474
3475         * procfs.c (struct procinfo_deleter): New.
3476         (procinfo_up): New typedef.
3477         (do_destroy_procinfo_cleanup): Remove.
3478         (procfs_target::info_proc): Use procinfo_up.  Remove cleanups.
3479
3480 2018-09-13  Tom Tromey  <tom@tromey.com>
3481
3482         * source.c (add_path): Use gdb::unique_xmalloc_ptr.
3483
3484 2018-09-13  Simon Marchi  <simon.marchi@ericsson.com>
3485 2018-09-13  Tom Tromey  <tom@tromey.com>
3486
3487         * python/py-progspace.c (PSPY_REQUIRE_VALID): New macro.
3488         (pspy_get_objfiles): New function.
3489         (progspace_object_methods): New.
3490         (pspace_object_type): Add tp_methods callback.
3491         * python/python-internal.h (build_objfiles_list): New
3492         declaration.
3493         * python/python.c (build_objfiles_list): New function.
3494         (gdbpy_objfiles): Implement using build_objfiles_list.
3495         * NEWS: Mention the Progspace.objfiles method.
3496
3497 2018-09-13  Simon Marchi  <simon.marchi@ericsson.com>
3498
3499         * python/py-inferior.c (infpy_get_progspace): New function.
3500         (inferior_object_getset): Add progspace property.
3501         * NEWS: Mention the new property.
3502
3503 2018-09-13  Tom Tromey  <tom@tromey.com>
3504
3505         PR rust/23650:
3506         * rust-lang.c (rust_evaluate_subexp): Use field name, not "foo".
3507
3508 2018-09-13  Tom Tromey  <tom@tromey.com>
3509
3510         PR rust/23626:
3511         * rust-lang.c (rust_enum_variant): Now static.
3512         (rust_empty_enum_p): New function.
3513         (rust_print_enum, rust_evaluate_subexp, rust_print_struct_def):
3514         Handle empty enum.
3515
3516 2018-09-13  Simon Marchi  <simon.marchi@ericsson.com>
3517
3518         * python/py-inferior.c (infpy_repr): New.
3519         (inferior_object_type): Register infpy_repr.
3520         * python/py-objfile.c (objfpy_repr): New.
3521         (objfile_object_type): Register objfpy_repr.
3522
3523 2018-09-12  John Baldwin  <jhb@FreeBSD.org>
3524
3525         * fbsd-nat.c (fbsd_nat_target::info_proc): Remove unused variable.
3526
3527 2018-09-12  John Baldwin  <jhb@FreeBSD.org>
3528
3529         * aarch64-fbsd-tdep.h (AARCH64_FBSD_SIZEOF_GREGSET): Fix comment
3530         typo.
3531
3532 2018-09-12  Sergio Durigan Junior  <sergiodj@redhat.com>
3533
3534         * common/common-utils.c: Don't include '<sys/stat.h>'.
3535         (is_regular_file): Move to...
3536         * common/filestuff.c (is_regular_file): ... here.
3537         * common/common-utils.h (is_regular_file): Move to...
3538         * common/filestuff.h (is_regular_file): ... here.
3539
3540 2018-09-12  Simon Marchi  <simon.marchi@ericsson.com>
3541
3542         * skip.c (debug_skip): New variable.
3543         (skiplist_entry::do_skip_file_p): Add debug output.
3544         (skiplist_entry::do_skip_gfile_p): Likewise.
3545         (skiplist_entry::skip_function_p): Likewise.
3546         (_initialize_step_skip): Create debug command.
3547         * NEWS: Mention set/show debug skip.
3548
3549 2018-09-11  Xavier Roirand  <roirand@adacore.com>
3550
3551         * darwin-nat.c (should_disable_startup_with_shell):
3552         New function.
3553         (darwin_nat_target::create_inferior): Add call.
3554
3555 2018-09-11  Xavier Roirand  <roirand@adacore.com>
3556
3557         * darwin-nat.h (struct darwin_thread_info) <gdb_port,
3558         inf_port, msg_state>: Initialize.
3559         (struct darwin_thread_info) <signaled, single_step>: Change
3560         type and initialize.
3561         (struct darwin_thread_info) <event>: Initialize.
3562
3563 2018-09-10  Sergio Durigan Junior  <sergiodj@redhat.com>
3564
3565         PR gdb/23555
3566         PR gdb/23558
3567         * gnulib/import/m4/getcwd-path-max.m4: Add cross-compilation
3568         guesses.
3569
3570 2018-09-10  Sergio Durigan Junior  <sergiodj@redhat.com>
3571
3572         Revert:
3573         2018-08-29  Sergio Durigan Junior  <sergiodj@redhat.com>
3574
3575         PR gdb/23555
3576         PR gdb/23558
3577         * gnulib/aclocal.m4: Regenerate.
3578         * gnulib/config.in: Regenerate.
3579         * gnulib/configure: Regenerate.
3580         * gnulib/import/Makefile.am: Update.
3581         * gnulib/import/Makefile.in: Update.
3582         * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
3583         * gnulib/import/_Noreturn.h: ... this.
3584         * gnulib/import/alloca.in.h: Update.
3585         * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
3586         * gnulib/import/arg-nonnull.h: ... this.
3587         * gnulib/import/assure.h: Update.
3588         * gnulib/import/at-func.c: Update.
3589         * gnulib/import/basename-lgpl.c: Update.
3590         * gnulib/import/extra/snippet/c++defs.h: Rename to...
3591         * gnulib/import/c++defs.h: ... this.
3592         * gnulib/import/canonicalize-lgpl.c: Update.
3593         * gnulib/import/cdefs.h: Update.
3594         * gnulib/import/chdir-long.c: Update.
3595         * gnulib/import/chdir-long.h: Update.
3596         * gnulib/import/cloexec.c: Update.
3597         * gnulib/import/cloexec.h: Update.
3598         * gnulib/import/close.c: Update.
3599         * gnulib/import/closedir.c: Update.
3600         * gnulib/import/config.charset: Update.
3601         * gnulib/import/dirent-private.h: Update.
3602         * gnulib/import/dirent.in.h: Update.
3603         * gnulib/import/dirfd.c: Update.
3604         * gnulib/import/dirname-lgpl.c: Update.
3605         * gnulib/import/dirname.h: Update.
3606         * gnulib/import/dosname.h: Update.
3607         * gnulib/import/dup-safer-flag.c: Update.
3608         * gnulib/import/dup-safer.c: Update.
3609         * gnulib/import/dup.c: Update.
3610         * gnulib/import/dup2.c: Update.
3611         * gnulib/import/errno.in.h: Update.
3612         * gnulib/import/error.c: Update.
3613         * gnulib/import/error.h: Update.
3614         * gnulib/import/exitfail.c: Update.
3615         * gnulib/import/exitfail.h: Update.
3616         * gnulib/import/extra/update-copyright: Update.
3617         * gnulib/import/fchdir.c: Update.
3618         * gnulib/import/fcntl.c: Update.
3619         * gnulib/import/fcntl.in.h: Update.
3620         * gnulib/import/fd-hook.c: Update.
3621         * gnulib/import/fd-hook.h: Update.
3622         * gnulib/import/fd-safer-flag.c: Update.
3623         * gnulib/import/fd-safer.c: Update.
3624         * gnulib/import/fdopendir.c: Update.
3625         * gnulib/import/filename.h: Update.
3626         * gnulib/import/filenamecat-lgpl.c: Update.
3627         * gnulib/import/filenamecat.h: Update.
3628         * gnulib/import/flexmember.h: Update.
3629         * gnulib/import/float+.h: Update.
3630         * gnulib/import/float.c: Update.
3631         * gnulib/import/float.in.h: Update.
3632         * gnulib/import/fnmatch.c: Update.
3633         * gnulib/import/fnmatch.in.h: Update.
3634         * gnulib/import/fnmatch_loop.c: Update.
3635         * gnulib/import/fpucw.h: Update.
3636         * gnulib/import/frexp.c: Update.
3637         * gnulib/import/frexpl.c: Update.
3638         * gnulib/import/fstat.c: Update.
3639         * gnulib/import/fstatat.c: Update.
3640         * gnulib/import/getcwd-lgpl.c: Update.
3641         * gnulib/import/getcwd.c: Update.
3642         * gnulib/import/getdtablesize.c: Update.
3643         * gnulib/import/getlogin_r.c: Update.
3644         * gnulib/import/getprogname.c: Update.
3645         * gnulib/import/getprogname.h: Update.
3646         * gnulib/import/gettext.h: Update.
3647         * gnulib/import/gettimeofday.c: Update.
3648         * gnulib/import/glob-libc.h: Update.
3649         * gnulib/import/glob.c: Update.
3650         * gnulib/import/glob.in.h: Update.
3651         * gnulib/import/glob_internal.h: Update.
3652         * gnulib/import/glob_pattern_p.c: Update.
3653         * gnulib/import/globfree.c: Update.
3654         * gnulib/import/hard-locale.c: Update.
3655         * gnulib/import/hard-locale.h: Update.
3656         * gnulib/import/intprops.h: Update.
3657         * gnulib/import/inttypes.in.h: Update.
3658         * gnulib/import/isnan.c: Update.
3659         * gnulib/import/isnand-nolibm.h: Update.
3660         * gnulib/import/isnand.c: Update.
3661         * gnulib/import/isnanl-nolibm.h: Update.
3662         * gnulib/import/isnanl.c: Update.
3663         * gnulib/import/itold.c: Update.
3664         * gnulib/import/libc-config.h: Update.
3665         * gnulib/import/limits.in.h: Update.
3666         * gnulib/import/localcharset.c: Update.
3667         * gnulib/import/localcharset.h: Update.
3668         * gnulib/import/localtime-buffer.c: Update.
3669         * gnulib/import/localtime-buffer.h: Update.
3670         * gnulib/import/lstat.c: Update.
3671         * gnulib/import/m4/00gnulib.m4: Update.
3672         * gnulib/import/m4/__inline.m4: Update.
3673         * gnulib/import/m4/absolute-header.m4: Update.
3674         * gnulib/import/m4/alloca.m4: Update.
3675         * gnulib/import/m4/builtin-expect.m4: Update.
3676         * gnulib/import/m4/canonicalize.m4: Update.
3677         * gnulib/import/m4/chdir-long.m4: Update.
3678         * gnulib/import/m4/close.m4: Update.
3679         * gnulib/import/m4/closedir.m4: Update.
3680         * gnulib/import/m4/configmake.m4: Update.
3681         * gnulib/import/m4/d-ino.m4: Update.
3682         * gnulib/import/m4/d-type.m4: Update.
3683         * gnulib/import/m4/dirent_h.m4: Update.
3684         * gnulib/import/m4/dirfd.m4: Update.
3685         * gnulib/import/m4/dirname.m4: Update.
3686         * gnulib/import/m4/double-slash-root.m4: Update.
3687         * gnulib/import/m4/dup.m4: Update.
3688         * gnulib/import/m4/dup2.m4: Update.
3689         * gnulib/import/m4/eealloc.m4: Update.
3690         * gnulib/import/m4/environ.m4: Update.
3691         * gnulib/import/m4/errno_h.m4: Update.
3692         * gnulib/import/m4/error.m4: Update.
3693         * gnulib/import/m4/exponentd.m4: Update.
3694         * gnulib/import/m4/exponentl.m4: Update.
3695         * gnulib/import/m4/extensions.m4: Update.
3696         * gnulib/import/m4/extern-inline.m4: Update.
3697         * gnulib/import/m4/fchdir.m4: Update.
3698         * gnulib/import/m4/fcntl-o.m4: Update.
3699         * gnulib/import/m4/fcntl.m4: Update.
3700         * gnulib/import/m4/fcntl_h.m4: Update.
3701         * gnulib/import/m4/fdopendir.m4: Update.
3702         * gnulib/import/m4/filenamecat.m4: Update.
3703         * gnulib/import/m4/flexmember.m4: Update.
3704         * gnulib/import/m4/float_h.m4: Update.
3705         * gnulib/import/m4/fnmatch.m4: Update.
3706         * gnulib/import/m4/fnmatch_h.m4: Update.
3707         * gnulib/import/m4/fpieee.m4: Update.
3708         * gnulib/import/m4/frexp.m4: Update.
3709         * gnulib/import/m4/frexpl.m4: Update.
3710         * gnulib/import/m4/fstat.m4: Update.
3711         * gnulib/import/m4/fstatat.m4: Update.
3712         * gnulib/import/m4/getcwd-abort-bug.m4: Update.
3713         * gnulib/import/m4/getcwd-path-max.m4: Update.
3714         * gnulib/import/m4/getcwd.m4: Update.
3715         * gnulib/import/m4/getdtablesize.m4: Update.
3716         * gnulib/import/m4/getlogin.m4: Update.
3717         * gnulib/import/m4/getlogin_r.m4: Update.
3718         * gnulib/import/m4/getpagesize.m4: Update.
3719         * gnulib/import/m4/getprogname.m4: Update.
3720         * gnulib/import/m4/gettimeofday.m4: Update.
3721         * gnulib/import/m4/glibc21.m4: Update.
3722         * gnulib/import/m4/glob.m4: Update.
3723         * gnulib/import/m4/glob_h.m4: Update.
3724         * gnulib/import/m4/gnulib-cache.m4: Update.
3725         * gnulib/import/m4/gnulib-common.m4: Update.
3726         * gnulib/import/m4/gnulib-comp.m4: Update.
3727         * gnulib/import/m4/gnulib-tool.m4: Update.
3728         * gnulib/import/m4/hard-locale.m4: Update.
3729         * gnulib/import/m4/include_next.m4: Update.
3730         * gnulib/import/m4/inttypes-pri.m4: Update.
3731         * gnulib/import/m4/inttypes.m4: Update.
3732         * gnulib/import/m4/isnand.m4: Update.
3733         * gnulib/import/m4/isnanl.m4: Update.
3734         * gnulib/import/m4/largefile.m4: Update.
3735         * gnulib/import/m4/limits-h.m4: Update.
3736         * gnulib/import/m4/localcharset.m4: Update.
3737         * gnulib/import/m4/locale-fr.m4: Update.
3738         * gnulib/import/m4/locale-ja.m4: Update.
3739         * gnulib/import/m4/locale-zh.m4: Update.
3740         * gnulib/import/m4/localtime-buffer.m4: Update.
3741         * gnulib/import/m4/longlong.m4: Update.
3742         * gnulib/import/m4/lstat.m4: Update.
3743         * gnulib/import/m4/malloc.m4: Update.
3744         * gnulib/import/m4/malloca.m4: Update.
3745         * gnulib/import/m4/math_h.m4: Update.
3746         * gnulib/import/m4/mbrtowc.m4: Update.
3747         * gnulib/import/m4/mbsinit.m4: Update.
3748         * gnulib/import/m4/mbsrtowcs.m4: Update.
3749         * gnulib/import/m4/mbstate_t.m4: Update.
3750         * gnulib/import/m4/memchr.m4: Update.
3751         * gnulib/import/m4/memmem.m4: Update.
3752         * gnulib/import/m4/mempcpy.m4: Update.
3753         * gnulib/import/m4/memrchr.m4: Update.
3754         * gnulib/import/m4/mkdir.m4: Update.
3755         * gnulib/import/m4/mkstemp.m4: Update.
3756         * gnulib/import/m4/mmap-anon.m4: Update.
3757         * gnulib/import/m4/mode_t.m4: Update.
3758         * gnulib/import/m4/msvc-inval.m4: Update.
3759         * gnulib/import/m4/msvc-nothrow.m4: Update.
3760         * gnulib/import/m4/multiarch.m4: Update.
3761         * gnulib/import/m4/nocrash.m4: Update.
3762         * gnulib/import/m4/off_t.m4: Update.
3763         * gnulib/import/m4/onceonly.m4: Update.
3764         * gnulib/import/m4/open-cloexec.m4: Update.
3765         * gnulib/import/m4/open.m4: Update.
3766         * gnulib/import/m4/openat.m4: Update.
3767         * gnulib/import/m4/opendir.m4: Update.
3768         * gnulib/import/m4/pathmax.m4: Update.
3769         * gnulib/import/m4/rawmemchr.m4: Update.
3770         * gnulib/import/m4/readdir.m4: Update.
3771         * gnulib/import/m4/readlink.m4: Update.
3772         * gnulib/import/m4/realloc.m4: Update.
3773         * gnulib/import/m4/rename.m4: Update.
3774         * gnulib/import/m4/rewinddir.m4: Update.
3775         * gnulib/import/m4/rmdir.m4: Update.
3776         * gnulib/import/m4/save-cwd.m4: Update.
3777         * gnulib/import/m4/secure_getenv.m4: Update.
3778         * gnulib/import/m4/setenv.m4: Update.
3779         * gnulib/import/m4/signal_h.m4: Update.
3780         * gnulib/import/m4/ssize_t.m4: Update.
3781         * gnulib/import/m4/stat-time.m4: Update.
3782         * gnulib/import/m4/stat.m4: Update.
3783         * gnulib/import/m4/std-gnu11.m4: Update.
3784         * gnulib/import/m4/stdbool.m4: Update.
3785         * gnulib/import/m4/stddef_h.m4: Update.
3786         * gnulib/import/m4/stdint.m4: Update.
3787         * gnulib/import/m4/stdio_h.m4: Update.
3788         * gnulib/import/m4/stdlib_h.m4: Update.
3789         * gnulib/import/m4/strchrnul.m4: Update.
3790         * gnulib/import/m4/strdup.m4: Update.
3791         * gnulib/import/m4/strerror.m4: Update.
3792         * gnulib/import/m4/string_h.m4: Update.
3793         * gnulib/import/m4/strstr.m4: Update.
3794         * gnulib/import/m4/strtok_r.m4: Update.
3795         * gnulib/import/m4/sys_socket_h.m4: Update.
3796         * gnulib/import/m4/sys_stat_h.m4: Update.
3797         * gnulib/import/m4/sys_time_h.m4: Update.
3798         * gnulib/import/m4/sys_types_h.m4: Update.
3799         * gnulib/import/m4/tempname.m4: Update.
3800         * gnulib/import/m4/time_h.m4: Update.
3801         * gnulib/import/m4/unistd-safer.m4: Update.
3802         * gnulib/import/m4/unistd_h.m4: Update.
3803         * gnulib/import/m4/warn-on-use.m4: Update.
3804         * gnulib/import/m4/wchar_h.m4: Update.
3805         * gnulib/import/m4/wchar_t.m4: Update.
3806         * gnulib/import/m4/wctype_h.m4: Update.
3807         * gnulib/import/m4/wint_t.m4: Update.
3808         * gnulib/import/malloc.c: Update.
3809         * gnulib/import/malloc/scratch_buffer.h: Update.
3810         * gnulib/import/malloc/scratch_buffer_grow.c: Update.
3811         * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
3812         * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
3813         * gnulib/import/malloca.c: Update.
3814         * gnulib/import/malloca.h: Update.
3815         * gnulib/import/malloca.valgrind: Update.
3816         * gnulib/import/math.in.h: Update.
3817         * gnulib/import/mbrtowc.c: Update.
3818         * gnulib/import/mbsinit.c: Update.
3819         * gnulib/import/mbsrtowcs-impl.h: Update.
3820         * gnulib/import/mbsrtowcs-state.c: Update.
3821         * gnulib/import/mbsrtowcs.c: Update.
3822         * gnulib/import/memchr.c: Update.
3823         * gnulib/import/memmem.c: Update.
3824         * gnulib/import/mempcpy.c: Update.
3825         * gnulib/import/memrchr.c: Update.
3826         * gnulib/import/mkdir.c: Update.
3827         * gnulib/import/mkstemp.c: Update.
3828         * gnulib/import/msvc-inval.c: Update.
3829         * gnulib/import/msvc-inval.h: Update.
3830         * gnulib/import/msvc-nothrow.c: Update.
3831         * gnulib/import/msvc-nothrow.h: Update.
3832         * gnulib/import/open.c: Update.
3833         * gnulib/import/openat-die.c: Update.
3834         * gnulib/import/openat-priv.h: Update.
3835         * gnulib/import/openat-proc.c: Update.
3836         * gnulib/import/openat.c: Update.
3837         * gnulib/import/openat.h: Update.
3838         * gnulib/import/opendir.c: Update.
3839         * gnulib/import/pathmax.h: Update.
3840         * gnulib/import/pipe-safer.c: Update.
3841         * gnulib/import/rawmemchr.c: Update.
3842         * gnulib/import/readdir.c: Update.
3843         * gnulib/import/readlink.c: Update.
3844         * gnulib/import/realloc.c: Update.
3845         * gnulib/import/ref-add.sin: Update.
3846         * gnulib/import/ref-del.sin: Update.
3847         * gnulib/import/rename.c: Update.
3848         * gnulib/import/rewinddir.c: Update.
3849         * gnulib/import/rmdir.c: Update.
3850         * gnulib/import/same-inode.h: Update.
3851         * gnulib/import/save-cwd.c: Update.
3852         * gnulib/import/save-cwd.h: Update.
3853         * gnulib/import/scratch_buffer.h: Update.
3854         * gnulib/import/secure_getenv.c: Update.
3855         * gnulib/import/setenv.c: Update.
3856         * gnulib/import/signal.in.h: Update.
3857         * gnulib/import/stat-time.c: Update.
3858         * gnulib/import/stat-time.h: Update.
3859         * gnulib/import/stat-w32.c: Update.
3860         * gnulib/import/stat-w32.h: Update.
3861         * gnulib/import/stat.c: Update.
3862         * gnulib/import/stdbool.in.h: Update.
3863         * gnulib/import/stddef.in.h: Update.
3864         * gnulib/import/stdint.in.h: Update.
3865         * gnulib/import/stdio.in.h: Update.
3866         * gnulib/import/stdlib.in.h: Update.
3867         * gnulib/import/str-two-way.h: Update.
3868         * gnulib/import/strchrnul.c: Update.
3869         * gnulib/import/strdup.c: Update.
3870         * gnulib/import/streq.h: Update.
3871         * gnulib/import/strerror-override.c: Update.
3872         * gnulib/import/strerror-override.h: Update.
3873         * gnulib/import/strerror.c: Update.
3874         * gnulib/import/string.in.h: Update.
3875         * gnulib/import/stripslash.c: Update.
3876         * gnulib/import/strnlen1.c: Update.
3877         * gnulib/import/strnlen1.h: Update.
3878         * gnulib/import/strstr.c: Update.
3879         * gnulib/import/strtok_r.c: Update.
3880         * gnulib/import/sys_stat.in.h: Update.
3881         * gnulib/import/sys_time.in.h: Update.
3882         * gnulib/import/sys_types.in.h: Update.
3883         * gnulib/import/tempname.c: Update.
3884         * gnulib/import/tempname.h: Update.
3885         * gnulib/import/time.in.h: Update.
3886         * gnulib/import/unistd--.h: Update.
3887         * gnulib/import/unistd-safer.h: Update.
3888         * gnulib/import/unistd.in.h: Update.
3889         * gnulib/import/unsetenv.c: Update.
3890         * gnulib/import/verify.h: Update.
3891         * gnulib/import/extra/snippet/warn-on-use.h: Update.
3892         * gnulib/import/wchar.in.h: Update.
3893         * gnulib/import/wctype.in.h: Update.
3894         * gnulib/import/xalloc-oversized.h: Update.
3895         * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
3896         "53e2c179f26a890fa6685af4b6c1397ee370433b".
3897
3898 2018-09-10  Simon Marchi  <simon.marchi@ericsson.com>
3899
3900         * record-btrace.c (get_thread_current_frame): Remove
3901         old_inferior_ptid.
3902
3903 2018-09-10  Jerome Guitton  <guitton@adacore.com>
3904
3905         * ada-lang.c (ada_value_struct_elt): Call ada_to_fixed_type
3906         with check_tag to 1 if and only if the type is tagged and the
3907         component being searched cannot been found in the current
3908         view. Otherwise, always call ada_to_fixed_type with
3909         check_tag to 0.
3910
3911 2018-09-10  Xavier Roirand  <roirand@adacore.com>
3912
3913         * ada-lang.c (ada_is_access_to_unconstrained_array): Remove static
3914         declaration.
3915         * ada-lang.h: add ada_is_access_to_unconstrained_array prototype.
3916         * ada-varobj.c (ada_varobj_get_number_of_children,
3917         ada_varobj_describe_child, ada_value_is_changeable_p): Cleanup code.
3918
3919 2018-09-10  Xavier Roirand  <roirand@adacore.com>
3920
3921         * ada-valprint.c (ada_value_print): Use type instead of
3922         enclosing type.
3923
3924 2018-09-10  Xavier Roirand  <roirand@adacore.com>
3925
3926         * ada-lang.c (ada_value_subscript): Handle case when parameter is
3927         an array of access to unconstrained array.
3928
3929 2018-09-10  Xavier Roirand  <roirand@adacore.com>
3930
3931         * ada-lang.c (ada_is_access_to_unconstrained_array): New function.
3932         (ada_check_typedef): Use it.
3933
3934 2018-09-10  Xavier Roirand  <roirand@adacore.com>
3935
3936         * ada-varobj.c (ada_varobj_describe_struct_child)
3937         (ada_varobj_describe_child): Handle union case like struct one.
3938
3939 2018-09-10  Tom Tromey  <tom@tromey.com>
3940
3941         PR python/18380:
3942         * python/python.c (_initialize_python): Make example in "python"
3943         help work in Python 3.
3944
3945 2018-09-10  Eli Zaretskii  <eliz@gnu.org>
3946
3947         * Makefile.in (transformed_name): Use INSTALL_SCRIPT instead of
3948         INSTALL_PROGRAM to install gdb-add-index.sh.  Don't append
3949         $(EXEEXT) to the script, as it is not a program.
3950
3951 2018-09-09  Simon Marchi  <simon.marchi@ericsson.com>
3952
3953         * python/py-prettyprint.c (pretty_print_one_value): Return
3954         gdbpy_ref<>.
3955         (print_string_repr): Adjust.
3956         (apply_varobj_pretty_printer): Return gdbpy_ref<>.
3957         * python/python-internal.h (apply_varobj_pretty_printer): Return
3958         gdbpy_ref<>.
3959         * varobj.c (varobj_value_get_print_value): Adjust.
3960
3961 2018-09-08  Tom Tromey  <tom@tromey.com>
3962
3963         PR python/16047:
3964         * python/py-prettyprint.c (pretty_print_one_value): Check for
3965         to_string method.
3966
3967 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
3968
3969         * ada-lang.c (resolve_subexp): Pass correct OPLEN in call to
3970         replace_operator_with_call.
3971
3972 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
3973
3974         * ada-lang.c (ada_value_cast): Remove unnecessary parentheses.
3975
3976 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
3977
3978         * ada-typeprint.c (print_range): Print the bounds using TYPE
3979         rather than its TYPE_TARGET_TYPE.
3980
3981 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
3982
3983         * ada-lang.c (ada_to_fixed_value): Minor reformatting in
3984         call to ada_to_fixed_value_create.
3985
3986 2018-09-08  Jerome Guitton  <guitton@adacore.com>
3987
3988         * ada-lang.c (ada_decode): strip dot prefix in symbol name.
3989
3990 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
3991
3992         * ada-lang.c (ada_exception_sal): Replace gdb_assert calls
3993         by calls to error.
3994
3995 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
3996
3997         * ada-lang.c (ada_unhandled_exception_name_addr_from_raise):
3998         Move update of loop variable "fi".
3999
4000 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
4001
4002         * ada-lang.c (value_assign_to_component): In the case of
4003         big-endian targets, extract the bits of the given VAL
4004         using an src_offset of zero if container is not a scalar.
4005
4006 2018-09-06  Simon Ser  <contact@emersion.fr>
4007
4008         PR gdb/23105
4009         * fbsd-nat.c (fbsd_nat_target::xfer_partial): Add support for
4010         TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
4011         * fbsd-tdep.c (fbsd_make_note_desc): New.
4012         (fbsd_make_corefile_notes): Write NT_PROCSTAT_AUXV,
4013         NT_PROCSTAT_VMMAP and NT_PROCSTAT_PS_STRINGS notes.
4014         * target.h (enum target_object) Add FreeBSD-specific
4015         TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
4016
4017 2018-09-06  Simon Marchi  <simon.marchi@ericsson.com>
4018
4019         * compile/compile-c.h (generate_c_for_variable_locations):
4020         Change reference to pointer.
4021         * compile/compile-c-support.c (compile_program) <compute>:
4022         Likewise.
4023         * compile/compile-c-symbols.c (generate_vla_size): Likewise.
4024         (generate_c_for_for_one_variable): Likewise
4025         (generate_c_for_variable_locations): Likewise
4026         * compile/compile-c-types.c (compile_c_instance::convert_type):
4027         Likewise
4028         * compile/compile-cplus-symbols.c (convert_one_symbol):
4029         std::move the scope passed to enter_scope.
4030         * compile/compile-cplus-types.c
4031         (compile_cplus_instance::enter_scope): Make parameter
4032         rvalue-reference.
4033         (compile_cplus_instance::new_scope): Change reference to
4034         pointer.
4035         (compile_cplus_instance::convert_type): Likewise
4036         (compile_cplus_convert_typedef): std::move the scope passed to
4037         enter_scope.
4038         (compile_cplus_convert_struct_or_union): Likewise.
4039         (compile_cplus_convert_enum): Likewise.
4040         (compile_cplus_convert_namespace): Likewise.
4041         * compile/compile-cplus.h (compile_cplus_instance)
4042         <enter_scope>: Make parameter rvalue-reference.
4043         * compile/compile-internal.h (compile_instance)
4044         <get_cached_type>: Likewise
4045         * compile/compile-loc2c.c (push): Likewise
4046         (pushf): Likewise
4047         (unary): Likewise
4048         (binary): Likewise
4049         (print_label): Likewise
4050         (pushf_register_address): Likewise
4051         (pushf_register): Likewise
4052         (do_compile_dwarf_expr_to_c): Likewise
4053         (compile_dwarf_expr_to_c): Likewise
4054         (compile_dwarf_bounds_to_c): Likewise
4055         * compile/compile.c (compile_instance::get_cached_type):
4056         Likewise
4057         * compile/compile.h (compile_dwarf_expr_to_c): Likewise.
4058         (compile_dwarf_bounds_to_c): Likewise
4059         * dwarf2loc.c (locexpr_generate_c_location): Likewise.
4060         (dwarf2_compile_property_to_c): Likewise
4061         * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise
4062         * symtab.h (struct symbol_computed_ops) <generate_c_location>:
4063         Likewise
4064
4065 2018-09-06  Simon Marchi  <simon.marchi@ericsson.com>
4066
4067         * tui/tui-data.h (struct tui_win_element) <highlight>: Remove.
4068         * tui/tui-data.c (init_content_element): Don't initialize it.
4069
4070 2018-09-06  Simon Marchi  <simon.marchi@ericsson.com>
4071
4072         * tui/tui-data.h (struct tui_win_info)
4073         <detail::opaque>: Remove.
4074         * tui/tui-data.c (init_win_info): Remove assignment.
4075
4076 2018-09-05  Tom Tromey  <tom@tromey.com>
4077
4078         * warning.m4 (AM_GDB_WARNINGS): Add -Wformat when testing
4079         -Wformat-nonliteral.
4080         * target-float.c (host_float_ops<T>::to_string)
4081         (host_float_ops<T>::from_string): Use
4082         DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
4083         * configure: Rebuild.
4084
4085 2018-09-05  Simon Marchi  <simon.marchi@ericsson.com>
4086
4087         * printcmd.c (printf_c_string): Use
4088         DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
4089         (printf_wide_c_string, printf_pointer, ui_printf): Likewise.
4090
4091 2018-09-05  Tom Tromey  <tom@tromey.com>
4092
4093         * cli/cli-cmds.c (shell_escape, edit_command): Remove cast.
4094
4095 2018-09-05  Tom de Vries  <tdevries@suse.de>
4096
4097         * dwarf2loc.c (sect_variable_value): Call indirect_synthetic_pointer
4098         with resolve_abstract_p == true.
4099         (indirect_synthetic_pointer): Add resolve_abstract_p parameter,
4100         defaulting to false. Propagate resolve_abstract_p to
4101         dwarf2_fetch_die_loc_sect_off.
4102         * dwarf2loc.h (dwarf2_fetch_die_loc_sect_off): Add resolve_abstract_p
4103         parameter, defaulting to false.
4104         * dwarf2read.c (read_variable): Add variable to abstract_to_concrete.
4105         (dwarf2_fetch_die_loc_sect_off): Add and handle resolve_abstract_p
4106         parameter.
4107         * dwarf2read.h (struct die_info): Forward-declare.
4108         (die_info_ptr): New typedef.
4109         (struct dwarf2_per_objfile): Add abstract_to_concrete field.
4110
4111 2018-09-05  Joel Brobecker  <brobecker@adacore.com>
4112
4113         GDB 8.2 released.
4114
4115 2018-09-04  Sergio Durigan Junior  <sergiodj@redhat.com>
4116             Pedro Alves  <palves@redhat.com>
4117
4118         * gnulib/Makefile.in (aclocal_m4_deps): Move to
4119         "aclocal-m4-deps.mk".  Include file here.
4120         $(srcdir)/aclocal.m4: Add "configure.ac".
4121         * gnulib/aclocal-m4-deps.mk: New file.
4122         * gnulib/update-gnulib.sh: Automatically update
4123         "aclocal-m4-deps.mk".
4124
4125 2018-09-04  Tom Tromey  <tom@tromey.com>
4126
4127         * configure: Rebuild.
4128         * configure.ac: Remove multi-ice code.
4129
4130 2018-09-04  Tom Tromey  <tom@tromey.com>
4131
4132         * Makefile.in (GDB_WARN_CFLAGS_NO_DEFS): Remove.
4133         (ada-exp.o): Update.
4134
4135 2018-09-04  Tom Tromey  <tom@tromey.com>
4136
4137         * Makefile.in (printcmd.o, target-float.o): Remove.
4138         (GDB_WARN_CFLAGS_NO_FORMAT): Remove.
4139
4140 2018-09-04  Tom Tromey  <tom@tromey.com>
4141
4142         * gnulib/Makefile.in: Remove obsolete comment.
4143         * Makefile.in: Remove obsolete comment.
4144
4145 2018-09-04  Andrew Burgess  <andrew.burgess@embecosm.com>
4146
4147         * riscv-tdep.c (riscv_frame_cache): Fix ARI warning, don't end a
4148         line with '+'.
4149
4150 2018-09-03  Andrew Burgess  <andrew.burgess@embecosm.com>
4151
4152         * riscv-tdep.c: Add 'prologue-value.h' include.
4153         (struct riscv_unwind_cache): New struct.
4154         (riscv_debug_unwinder): New global.
4155         (riscv_scan_prologue): Update arguments, capture register details
4156         from prologue scan.
4157         (riscv_skip_prologue): Reformat arguments line, move end of
4158         prologue calculation into riscv_scan_prologue.
4159         (riscv_frame_cache): Update return type, create
4160         riscv_unwind_cache, scan the prologue, and fill in remaining cache
4161         details.
4162         (riscv_frame_this_id): Use frame id computed in riscv_frame_cache.
4163         (riscv_frame_prev_register): Use the trad_frame within the
4164         riscv_unwind_cache.
4165         (_initialize_riscv_tdep): Add 'set/show debug riscv unwinder'
4166         flag.
4167
4168 2018-09-03  Andrew Burgess  <andrew.burgess@embecosm.com>
4169
4170         * trad-frame.h (trad_frame_set_realreg): Declare.
4171         (trad_frame_set_addr): Declare.
4172         * trad-frame.c (trad_frame_set_realreg): Define new function.
4173         (trad_frame_set_addr): Define new function.
4174         (trad_frame_set_reg_realreg): Use new function.
4175         (trad_frame_set_reg_addr): Use new function.
4176
4177 2018-09-01  Keith Seitz  <keiths@redhat.com>
4178
4179         * compile/compile-cplus-types.c (compile_cplus_debug_output_1): Use
4180         pulongest instead of "%lld".
4181         * compile/compile-cplus-symbols.c (gcc_cplus_convert_symbol): Remove
4182         ATTRIBUTE_UNUSED.
4183
4184 2018-08-31  Tom Tromey  <tom@tromey.com>
4185
4186         * dwarf2read.c (dwarf2_add_field): Set the TYPE_LENGTH of the
4187         variant part type.
4188
4189 2018-08-31  Pedro Alves  <palves@redhat.com>
4190
4191         * gdbarch.h: Regenerate.
4192
4193 2018-08-31  Pedro Alves  <palves@redhat.com>
4194
4195         * gdbarch.sh (have_nonsteppable_watchpoint): Add comment.
4196         * target.h (Hardware watchpoint interfaces): Describe
4197         continuable/steppable/non-steppable watchpoints.
4198         * gdbarch.h, gdbarch.c: Regenerate.
4199
4200 2018-08-31  Pedro Alves  <palves@redhat.com>
4201
4202         * nto-procfs.c (nto_procfs_target::have_continuable_watchpoint):
4203         Delete.
4204         * s390-linux-nat.c
4205         (s390_linux_nat_target::have_continuable_watchpoint): Delete.
4206         * target.h (target_ops::have_continuable_watchpoint): Delete.
4207         (target_have_continuable_watchpoint): Delete.
4208         * x86-nat.h (x86_nat_target::have_continuable_watchpoint): Delete.
4209         * target-delegates.c: Regenerate.
4210
4211 2018-08-31  Sergio Durigan Junior  <sergiodj@redhat.com>
4212
4213         * gnulib/Makefile.in (aclocal_m4_deps): Update according to
4214         the files present in "gnulib/import/m4/".
4215
4216 2018-08-30  Andrew Burgess  <andrew.burgess@embecosm.com>
4217
4218         * riscv-tdep.c (riscv_insn::decode): Decode c.addi4spn, c.sd,
4219         c.sw, c.swsp, and c.sdsp.
4220
4221 2018-08-30  Andrew Burgess  <andrew.burgess@embecosm.com>
4222
4223         * riscv-tdep.c (struct riscv_inferior_data): Delete.
4224         (riscv_read_misa_reg): Don't cache value read into inferior data.
4225         (riscv_new_inferior_data): Delete.
4226         (riscv_inferior_data_cleanup): Delete.
4227         (riscv_inferior_data): Delete.
4228         (riscv_invalidate_inferior_data): Delete.
4229         (_initialize_riscv_tdep): Remove initialisation of inferior data.
4230
4231 2018-08-30  Simon Marchi  <simon.marchi@ericsson.com>
4232
4233         * compile/compile-cplus-types.c
4234         (compile_cplus_instance::leave_scope): Take the address of scope
4235         object.
4236         (compile_cplus_instance::convert_qualified_base): Compare quals
4237         to 0.
4238
4239 2018-08-30  Keith Seitz  <keiths@redhat.com>
4240
4241         * compile/compile-cplus-types.c (compile_cplus_instance::enter_scope):
4242         Use "%s" and host_address_to_string instead of "%p" in printf.
4243
4244 2018-08-29  Keith Seitz  <keiths@redhat.com>
4245
4246         * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Add compile-cplus-symbols.c
4247         and compile-cplus-types.c.
4248         (HFILES_NO_SRCDIR): Add gcc-cp-plugin.h.
4249         * c-lang.c (cplus_language_defn): Set C++ compile functions.
4250         * c-lang.h (cplus_get_compile_context, cplus_compute_program):
4251         Declare.
4252         * compile/compile-c-support.c: Include compile-cplus.h.
4253         (load_libcompile): Templatize.
4254         (get_compile_context): "New" function.
4255         (c_get_compile_context): Use get_compile_context.
4256         (cplus_get_compile_context): New function.
4257         (cplus_push_user_expression, cplus_pop_user_expression)
4258         (cplus_add_code_header, cplus_add_input, cplus_compile_program)
4259         (cplus_compute_program): Define new structs/functions.
4260         * compile/compile-cplus-symmbols.c: New file.
4261         * compile/compile-cplus-types.c: New file.
4262         * compile/compile-cplus.h: New file.
4263         * compile/compile-internal.h (debug_compile_oracle, GCC_TYPE_NONE):
4264         Declare.
4265         * compile/compile-object-load.c (get_out_value_type): Use
4266         strncmp_iw when comparing symbol names.
4267         (compile_object_load): Add mst_bss and mst_data.
4268         * compile/compile.c (_initialize_compile): Remove
4269         -Wno-implicit-function-declaration from `compile_args'.
4270         * compile/gcc-cp-plugin.h: New file.
4271         * NEWS: Mention C++ compile support and new debug options.
4272
4273 2018-08-29  Keith Seitz  <keiths@redhat.com>
4274
4275         * linespec.c (collect_info::add_symbol): Make virtual.
4276         (struct symbol_searcher_collect_info): New struct.
4277         (symbol_searcher::find_all_symbols): New method.
4278         * symtab.h (class symbol_searcher): New class.
4279
4280 2018-08-29  Keith Seitz  <keiths@redhat.com>
4281
4282         * linespec.c (struct linespec) <function_symbols, label_symbols>:
4283         Change to vector of block_symbol.  Update all users.
4284         (struct collect_info) <symbols>: Likewise.
4285         (collect_info::add_symbol): Take block_symbol as argument.
4286         Update all callers.
4287         (decode_compound_collector) <m_symbols>: Change type to vector
4288         of block_symbol.  Update all users.
4289         (decode_compound_collector::operator ()): Change parameter type
4290         to block_symbol.
4291         (find_method, find_function_symbols, find_linespec_symbols)
4292         (find_label_symbols_in_block, find_label_symbols): Change symbol
4293         vectors to block_symbol vectors.
4294         * symtab.h (symbol_found_callback_ftype): Change parameter type to
4295         block_symbol.
4296
4297 2018-08-29  Keith Seitz  <keiths@redhat.com>
4298
4299         * linespec.c (symbolp): Remove typedef and VEC definitions.
4300         (bound_minimal_symbol_d): Likewise.
4301
4302 2018-08-29  Keith Seitz  <keiths@redhat.com>
4303
4304         * linespec.c (decode_compound_collector::decode_compound_collector):
4305         Remove initialization for `m_symtabs'.
4306         (decode_compound_collector::release_symbols): Change return type
4307         to std::vector.  Update all callers.
4308         (class decode_compound_collector) <m_symbols>: Change type to
4309         std::vector.
4310         (lookup_prefix_sym): Change return type to std::vector.  Update all
4311         callers.
4312         (compare_symbols): Remove.
4313         (std_compare_symbols): Rename to `compare_symbols'.
4314         (find_method): Change `sym_classes' parameter to std::vector.
4315         Update all callers.  Use std::sort to sort sym_classes.
4316         (find_linespec_symbols): Remove cleanup.
4317
4318 2018-08-29  Keith Seitz  <keiths@redhat.com>
4319
4320         * linespec.c (struct linespec) <minimal_symbols>: Change type to
4321         std::vector.  Update all users.
4322         (convert_linespec_to_sals): Use std::sort to sort minimal symbols.
4323         (struct collect_info) <minimal_symbols>: Likewise.
4324         (compare_msymbols): Return bool.  Change parameters to const
4325         bound_minimal_symbol references.
4326         (find_method, find_function_symbols, find_linespec_symbols): Change
4327         `minsyms' parameter to std::vector.  Update all callers.
4328
4329 2018-08-29  Keith Seitz  <keiths@redhat.com>
4330
4331         * linespec.c (struct linespec) <label_symbols>: Change type to
4332         std::vector.  Update all users.
4333         (find_label_symbols_in_block): Change `result' parameter to
4334         std::vector.  Update all callers.
4335         (find_label_symbols): Return std::vector.  Update all callers.
4336
4337 2018-08-29  Keith Seitz  <keiths@redhat.com>
4338
4339         * linespec.c (struct linespec) <function_symbols>: Change type to
4340         std::vector.  Update all users.
4341         (struct collect_info) <function_symbols>: Likewise.
4342         (convert_linespec_to_sals): Use std::sort to sort function_symbols.
4343         (std_compare_symbols): New function.
4344         (find_method, find_function_symbols, find_linespec_symbols)
4345         (find_label_symbols_in_block): Change `symbols' parameter to
4346         std::vector.  Update all callers.
4347         (find_label_symbols): Likewise for `function_symbols' and
4348         `label_funcs_ret'.
4349
4350 2018-08-29  Keith Seitz  <keiths@redhat.com>
4351
4352         * linespec.c (symtab_vector_up): Define.
4353         (struct linespec) <file_symtabs>: Change type to std::vector *.
4354         Update all uses.
4355         (struct collect_info) <file_symtabs>: Likewise.
4356         (collect_symtabs_from_filename): Return symtab_vector_up.
4357         Update all callers.
4358         (decode_objc): Remove cleanup.
4359         (symtab_collector::symtab_collector): Initialize `m_symtabs'.
4360         (symtab_collector::release_symtabs): Return symtab_vector_up.
4361         Update all callers.
4362         (class symtab_collector) <m_symtabs>: Change type to symtab_vector_up.
4363         Update all users.
4364         (collect_symtabs_from_filename, symtabs_from_filename): Return
4365         symtab_vector_up.  Update all callers.
4366
4367 2018-08-29  Tom Tromey  <tom@tromey.com>
4368
4369         * csky-tdep.c (csky_analyze_prologue): Use
4370         core_addr_to_string_nz.
4371
4372 2018-08-29  Tom Tromey  <tom@tromey.com>
4373
4374         * windows-nat.c (struct xlate_exception) <them>: Change type to
4375         DWORD.
4376         (xlate): Fix formatting.  Remove last entry.
4377         (struct xlate_exception, xlate): Comment out.
4378         (windows_nat_target::resume): Use ranged for.
4379
4380 2018-08-29  Jim Wilson  <jimw@sifive.com>
4381
4382         * riscv-linux-nat.c: Include elf/common.h instead of elf.h.
4383         (riscv_linux_nat_target::fetch_registers): Use NT_FPREGSET instead
4384         of NT_PRFPREG.
4385         (riscv_linux_nat_target::store_registers): Likewise.
4386
4387 2018-08-29  Sergio Durigan Junior  <sergiodj@redhat.com>
4388
4389         PR gdb/23555
4390         PR gdb/23558
4391         * gnulib/aclocal.m4: Regenerate.
4392         * gnulib/config.in: Regenerate.
4393         * gnulib/configure: Regenerate.
4394         * gnulib/import/Makefile.am: Update.
4395         * gnulib/import/Makefile.in: Update.
4396         * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
4397         * gnulib/import/_Noreturn.h: ... this.
4398         * gnulib/import/alloca.in.h: Update.
4399         * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
4400         * gnulib/import/arg-nonnull.h: ... this.
4401         * gnulib/import/assure.h: Update.
4402         * gnulib/import/at-func.c: Update.
4403         * gnulib/import/basename-lgpl.c: Update.
4404         * gnulib/import/extra/snippet/c++defs.h: Rename to...
4405         * gnulib/import/c++defs.h: ... this.
4406         * gnulib/import/canonicalize-lgpl.c: Update.
4407         * gnulib/import/cdefs.h: Update.
4408         * gnulib/import/chdir-long.c: Update.
4409         * gnulib/import/chdir-long.h: Update.
4410         * gnulib/import/cloexec.c: Update.
4411         * gnulib/import/cloexec.h: Update.
4412         * gnulib/import/close.c: Update.
4413         * gnulib/import/closedir.c: Update.
4414         * gnulib/import/config.charset: Update.
4415         * gnulib/import/dirent-private.h: Update.
4416         * gnulib/import/dirent.in.h: Update.
4417         * gnulib/import/dirfd.c: Update.
4418         * gnulib/import/dirname-lgpl.c: Update.
4419         * gnulib/import/dirname.h: Update.
4420         * gnulib/import/dosname.h: Update.
4421         * gnulib/import/dup-safer-flag.c: Update.
4422         * gnulib/import/dup-safer.c: Update.
4423         * gnulib/import/dup.c: Update.
4424         * gnulib/import/dup2.c: Update.
4425         * gnulib/import/errno.in.h: Update.
4426         * gnulib/import/error.c: Update.
4427         * gnulib/import/error.h: Update.
4428         * gnulib/import/exitfail.c: Update.
4429         * gnulib/import/exitfail.h: Update.
4430         * gnulib/import/extra/update-copyright: Update.
4431         * gnulib/import/fchdir.c: Update.
4432         * gnulib/import/fcntl.c: Update.
4433         * gnulib/import/fcntl.in.h: Update.
4434         * gnulib/import/fd-hook.c: Update.
4435         * gnulib/import/fd-hook.h: Update.
4436         * gnulib/import/fd-safer-flag.c: Update.
4437         * gnulib/import/fd-safer.c: Update.
4438         * gnulib/import/fdopendir.c: Update.
4439         * gnulib/import/filename.h: Update.
4440         * gnulib/import/filenamecat-lgpl.c: Update.
4441         * gnulib/import/filenamecat.h: Update.
4442         * gnulib/import/flexmember.h: Update.
4443         * gnulib/import/float+.h: Update.
4444         * gnulib/import/float.c: Update.
4445         * gnulib/import/float.in.h: Update.
4446         * gnulib/import/fnmatch.c: Update.
4447         * gnulib/import/fnmatch.in.h: Update.
4448         * gnulib/import/fnmatch_loop.c: Update.
4449         * gnulib/import/fpucw.h: Update.
4450         * gnulib/import/frexp.c: Update.
4451         * gnulib/import/frexpl.c: Update.
4452         * gnulib/import/fstat.c: Update.
4453         * gnulib/import/fstatat.c: Update.
4454         * gnulib/import/getcwd-lgpl.c: Update.
4455         * gnulib/import/getcwd.c: Update.
4456         * gnulib/import/getdtablesize.c: Update.
4457         * gnulib/import/getlogin_r.c: Update.
4458         * gnulib/import/getprogname.c: Update.
4459         * gnulib/import/getprogname.h: Update.
4460         * gnulib/import/gettext.h: Update.
4461         * gnulib/import/gettimeofday.c: Update.
4462         * gnulib/import/glob-libc.h: Update.
4463         * gnulib/import/glob.c: Update.
4464         * gnulib/import/glob.in.h: Update.
4465         * gnulib/import/glob_internal.h: Update.
4466         * gnulib/import/glob_pattern_p.c: Update.
4467         * gnulib/import/globfree.c: Update.
4468         * gnulib/import/hard-locale.c: Update.
4469         * gnulib/import/hard-locale.h: Update.
4470         * gnulib/import/intprops.h: Update.
4471         * gnulib/import/inttypes.in.h: Update.
4472         * gnulib/import/isnan.c: Update.
4473         * gnulib/import/isnand-nolibm.h: Update.
4474         * gnulib/import/isnand.c: Update.
4475         * gnulib/import/isnanl-nolibm.h: Update.
4476         * gnulib/import/isnanl.c: Update.
4477         * gnulib/import/itold.c: Update.
4478         * gnulib/import/libc-config.h: Update.
4479         * gnulib/import/limits.in.h: Update.
4480         * gnulib/import/localcharset.c: Update.
4481         * gnulib/import/localcharset.h: Update.
4482         * gnulib/import/localtime-buffer.c: Update.
4483         * gnulib/import/localtime-buffer.h: Update.
4484         * gnulib/import/lstat.c: Update.
4485         * gnulib/import/m4/00gnulib.m4: Update.
4486         * gnulib/import/m4/__inline.m4: Update.
4487         * gnulib/import/m4/absolute-header.m4: Update.
4488         * gnulib/import/m4/alloca.m4: Update.
4489         * gnulib/import/m4/builtin-expect.m4: Update.
4490         * gnulib/import/m4/canonicalize.m4: Update.
4491         * gnulib/import/m4/chdir-long.m4: Update.
4492         * gnulib/import/m4/close.m4: Update.
4493         * gnulib/import/m4/closedir.m4: Update.
4494         * gnulib/import/m4/configmake.m4: Update.
4495         * gnulib/import/m4/d-ino.m4: Update.
4496         * gnulib/import/m4/d-type.m4: Update.
4497         * gnulib/import/m4/dirent_h.m4: Update.
4498         * gnulib/import/m4/dirfd.m4: Update.
4499         * gnulib/import/m4/dirname.m4: Update.
4500         * gnulib/import/m4/double-slash-root.m4: Update.
4501         * gnulib/import/m4/dup.m4: Update.
4502         * gnulib/import/m4/dup2.m4: Update.
4503         * gnulib/import/m4/eealloc.m4: Update.
4504         * gnulib/import/m4/environ.m4: Update.
4505         * gnulib/import/m4/errno_h.m4: Update.
4506         * gnulib/import/m4/error.m4: Update.
4507         * gnulib/import/m4/exponentd.m4: Update.
4508         * gnulib/import/m4/exponentl.m4: Update.
4509         * gnulib/import/m4/extensions.m4: Update.
4510         * gnulib/import/m4/extern-inline.m4: Update.
4511         * gnulib/import/m4/fchdir.m4: Update.
4512         * gnulib/import/m4/fcntl-o.m4: Update.
4513         * gnulib/import/m4/fcntl.m4: Update.
4514         * gnulib/import/m4/fcntl_h.m4: Update.
4515         * gnulib/import/m4/fdopendir.m4: Update.
4516         * gnulib/import/m4/filenamecat.m4: Update.
4517         * gnulib/import/m4/flexmember.m4: Update.
4518         * gnulib/import/m4/float_h.m4: Update.
4519         * gnulib/import/m4/fnmatch.m4: Update.
4520         * gnulib/import/m4/fnmatch_h.m4: Update.
4521         * gnulib/import/m4/fpieee.m4: Update.
4522         * gnulib/import/m4/frexp.m4: Update.
4523         * gnulib/import/m4/frexpl.m4: Update.
4524         * gnulib/import/m4/fstat.m4: Update.
4525         * gnulib/import/m4/fstatat.m4: Update.
4526         * gnulib/import/m4/getcwd-abort-bug.m4: Update.
4527         * gnulib/import/m4/getcwd-path-max.m4: Update.
4528         * gnulib/import/m4/getcwd.m4: Update.
4529         * gnulib/import/m4/getdtablesize.m4: Update.
4530         * gnulib/import/m4/getlogin.m4: Update.
4531         * gnulib/import/m4/getlogin_r.m4: Update.
4532         * gnulib/import/m4/getpagesize.m4: Update.
4533         * gnulib/import/m4/getprogname.m4: Update.
4534         * gnulib/import/m4/gettimeofday.m4: Update.
4535         * gnulib/import/m4/glibc21.m4: Update.
4536         * gnulib/import/m4/glob.m4: Update.
4537         * gnulib/import/m4/glob_h.m4: Update.
4538         * gnulib/import/m4/gnulib-cache.m4: Update.
4539         * gnulib/import/m4/gnulib-common.m4: Update.
4540         * gnulib/import/m4/gnulib-comp.m4: Update.
4541         * gnulib/import/m4/gnulib-tool.m4: Update.
4542         * gnulib/import/m4/hard-locale.m4: Update.
4543         * gnulib/import/m4/include_next.m4: Update.
4544         * gnulib/import/m4/inttypes-pri.m4: Update.
4545         * gnulib/import/m4/inttypes.m4: Update.
4546         * gnulib/import/m4/isnand.m4: Update.
4547         * gnulib/import/m4/isnanl.m4: Update.
4548         * gnulib/import/m4/largefile.m4: Update.
4549         * gnulib/import/m4/limits-h.m4: Update.
4550         * gnulib/import/m4/localcharset.m4: Update.
4551         * gnulib/import/m4/locale-fr.m4: Update.
4552         * gnulib/import/m4/locale-ja.m4: Update.
4553         * gnulib/import/m4/locale-zh.m4: Update.
4554         * gnulib/import/m4/localtime-buffer.m4: Update.
4555         * gnulib/import/m4/longlong.m4: Update.
4556         * gnulib/import/m4/lstat.m4: Update.
4557         * gnulib/import/m4/malloc.m4: Update.
4558         * gnulib/import/m4/malloca.m4: Update.
4559         * gnulib/import/m4/math_h.m4: Update.
4560         * gnulib/import/m4/mbrtowc.m4: Update.
4561         * gnulib/import/m4/mbsinit.m4: Update.
4562         * gnulib/import/m4/mbsrtowcs.m4: Update.
4563         * gnulib/import/m4/mbstate_t.m4: Update.
4564         * gnulib/import/m4/memchr.m4: Update.
4565         * gnulib/import/m4/memmem.m4: Update.
4566         * gnulib/import/m4/mempcpy.m4: Update.
4567         * gnulib/import/m4/memrchr.m4: Update.
4568         * gnulib/import/m4/mkdir.m4: Update.
4569         * gnulib/import/m4/mkstemp.m4: Update.
4570         * gnulib/import/m4/mmap-anon.m4: Update.
4571         * gnulib/import/m4/mode_t.m4: Update.
4572         * gnulib/import/m4/msvc-inval.m4: Update.
4573         * gnulib/import/m4/msvc-nothrow.m4: Update.
4574         * gnulib/import/m4/multiarch.m4: Update.
4575         * gnulib/import/m4/nocrash.m4: Update.
4576         * gnulib/import/m4/off_t.m4: Update.
4577         * gnulib/import/m4/onceonly.m4: Update.
4578         * gnulib/import/m4/open-cloexec.m4: Update.
4579         * gnulib/import/m4/open.m4: Update.
4580         * gnulib/import/m4/openat.m4: Update.
4581         * gnulib/import/m4/opendir.m4: Update.
4582         * gnulib/import/m4/pathmax.m4: Update.
4583         * gnulib/import/m4/rawmemchr.m4: Update.
4584         * gnulib/import/m4/readdir.m4: Update.
4585         * gnulib/import/m4/readlink.m4: Update.
4586         * gnulib/import/m4/realloc.m4: Update.
4587         * gnulib/import/m4/rename.m4: Update.
4588         * gnulib/import/m4/rewinddir.m4: Update.
4589         * gnulib/import/m4/rmdir.m4: Update.
4590         * gnulib/import/m4/save-cwd.m4: Update.
4591         * gnulib/import/m4/secure_getenv.m4: Update.
4592         * gnulib/import/m4/setenv.m4: Update.
4593         * gnulib/import/m4/signal_h.m4: Update.
4594         * gnulib/import/m4/ssize_t.m4: Update.
4595         * gnulib/import/m4/stat-time.m4: Update.
4596         * gnulib/import/m4/stat.m4: Update.
4597         * gnulib/import/m4/std-gnu11.m4: Update.
4598         * gnulib/import/m4/stdbool.m4: Update.
4599         * gnulib/import/m4/stddef_h.m4: Update.
4600         * gnulib/import/m4/stdint.m4: Update.
4601         * gnulib/import/m4/stdio_h.m4: Update.
4602         * gnulib/import/m4/stdlib_h.m4: Update.
4603         * gnulib/import/m4/strchrnul.m4: Update.
4604         * gnulib/import/m4/strdup.m4: Update.
4605         * gnulib/import/m4/strerror.m4: Update.
4606         * gnulib/import/m4/string_h.m4: Update.
4607         * gnulib/import/m4/strstr.m4: Update.
4608         * gnulib/import/m4/strtok_r.m4: Update.
4609         * gnulib/import/m4/sys_socket_h.m4: Update.
4610         * gnulib/import/m4/sys_stat_h.m4: Update.
4611         * gnulib/import/m4/sys_time_h.m4: Update.
4612         * gnulib/import/m4/sys_types_h.m4: Update.
4613         * gnulib/import/m4/tempname.m4: Update.
4614         * gnulib/import/m4/time_h.m4: Update.
4615         * gnulib/import/m4/unistd-safer.m4: Update.
4616         * gnulib/import/m4/unistd_h.m4: Update.
4617         * gnulib/import/m4/warn-on-use.m4: Update.
4618         * gnulib/import/m4/wchar_h.m4: Update.
4619         * gnulib/import/m4/wchar_t.m4: Update.
4620         * gnulib/import/m4/wctype_h.m4: Update.
4621         * gnulib/import/m4/wint_t.m4: Update.
4622         * gnulib/import/malloc.c: Update.
4623         * gnulib/import/malloc/scratch_buffer.h: Update.
4624         * gnulib/import/malloc/scratch_buffer_grow.c: Update.
4625         * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
4626         * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
4627         * gnulib/import/malloca.c: Update.
4628         * gnulib/import/malloca.h: Update.
4629         * gnulib/import/malloca.valgrind: Update.
4630         * gnulib/import/math.in.h: Update.
4631         * gnulib/import/mbrtowc.c: Update.
4632         * gnulib/import/mbsinit.c: Update.
4633         * gnulib/import/mbsrtowcs-impl.h: Update.
4634         * gnulib/import/mbsrtowcs-state.c: Update.
4635         * gnulib/import/mbsrtowcs.c: Update.
4636         * gnulib/import/memchr.c: Update.
4637         * gnulib/import/memmem.c: Update.
4638         * gnulib/import/mempcpy.c: Update.
4639         * gnulib/import/memrchr.c: Update.
4640         * gnulib/import/mkdir.c: Update.
4641         * gnulib/import/mkstemp.c: Update.
4642         * gnulib/import/msvc-inval.c: Update.
4643         * gnulib/import/msvc-inval.h: Update.
4644         * gnulib/import/msvc-nothrow.c: Update.
4645         * gnulib/import/msvc-nothrow.h: Update.
4646         * gnulib/import/open.c: Update.
4647         * gnulib/import/openat-die.c: Update.
4648         * gnulib/import/openat-priv.h: Update.
4649         * gnulib/import/openat-proc.c: Update.
4650         * gnulib/import/openat.c: Update.
4651         * gnulib/import/openat.h: Update.
4652         * gnulib/import/opendir.c: Update.
4653         * gnulib/import/pathmax.h: Update.
4654         * gnulib/import/pipe-safer.c: Update.
4655         * gnulib/import/rawmemchr.c: Update.
4656         * gnulib/import/readdir.c: Update.
4657         * gnulib/import/readlink.c: Update.
4658         * gnulib/import/realloc.c: Update.
4659         * gnulib/import/ref-add.sin: Update.
4660         * gnulib/import/ref-del.sin: Update.
4661         * gnulib/import/rename.c: Update.
4662         * gnulib/import/rewinddir.c: Update.
4663         * gnulib/import/rmdir.c: Update.
4664         * gnulib/import/same-inode.h: Update.
4665         * gnulib/import/save-cwd.c: Update.
4666         * gnulib/import/save-cwd.h: Update.
4667         * gnulib/import/scratch_buffer.h: Update.
4668         * gnulib/import/secure_getenv.c: Update.
4669         * gnulib/import/setenv.c: Update.
4670         * gnulib/import/signal.in.h: Update.
4671         * gnulib/import/stat-time.c: Update.
4672         * gnulib/import/stat-time.h: Update.
4673         * gnulib/import/stat-w32.c: Update.
4674         * gnulib/import/stat-w32.h: Update.
4675         * gnulib/import/stat.c: Update.
4676         * gnulib/import/stdbool.in.h: Update.
4677         * gnulib/import/stddef.in.h: Update.
4678         * gnulib/import/stdint.in.h: Update.
4679         * gnulib/import/stdio.in.h: Update.
4680         * gnulib/import/stdlib.in.h: Update.
4681         * gnulib/import/str-two-way.h: Update.
4682         * gnulib/import/strchrnul.c: Update.
4683         * gnulib/import/strdup.c: Update.
4684         * gnulib/import/streq.h: Update.
4685         * gnulib/import/strerror-override.c: Update.
4686         * gnulib/import/strerror-override.h: Update.
4687         * gnulib/import/strerror.c: Update.
4688         * gnulib/import/string.in.h: Update.
4689         * gnulib/import/stripslash.c: Update.
4690         * gnulib/import/strnlen1.c: Update.
4691         * gnulib/import/strnlen1.h: Update.
4692         * gnulib/import/strstr.c: Update.
4693         * gnulib/import/strtok_r.c: Update.
4694         * gnulib/import/sys_stat.in.h: Update.
4695         * gnulib/import/sys_time.in.h: Update.
4696         * gnulib/import/sys_types.in.h: Update.
4697         * gnulib/import/tempname.c: Update.
4698         * gnulib/import/tempname.h: Update.
4699         * gnulib/import/time.in.h: Update.
4700         * gnulib/import/unistd--.h: Update.
4701         * gnulib/import/unistd-safer.h: Update.
4702         * gnulib/import/unistd.in.h: Update.
4703         * gnulib/import/unsetenv.c: Update.
4704         * gnulib/import/verify.h: Update.
4705         * gnulib/import/extra/snippet/warn-on-use.h: Update.
4706         * gnulib/import/wchar.in.h: Update.
4707         * gnulib/import/wctype.in.h: Update.
4708         * gnulib/import/xalloc-oversized.h: Update.
4709         * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
4710         "53e2c179f26a890fa6685af4b6c1397ee370433b".
4711
4712 2018-08-16  Gary Benson <gbenson@redhat.com>
4713
4714         PR gdb/13000:
4715         * gdb/main.c (captured_main_1): Exit with nonzero status
4716         in batch mode if the last command to be executed failed.
4717         * NEWS: Mention the above.
4718
4719 2018-08-29  Simon Marchi  <simon.marchi@ericsson.com>
4720
4721         * csky-tdep.c (csky_memory_insert_breakpoint): Remove newline at
4722         end of warning message.
4723
4724 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
4725
4726         PR gdb/22943:
4727         * aarch64-tdep.c (is_hfa_or_hva): Remove function.
4728         (aarch64_extract_return_value): Use
4729         aapcs_is_vfp_call_or_return_candidate.
4730         (aarch64_return_in_memory): Likewise.
4731         (aarch64_store_return_value): Likewise.
4732
4733 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
4734
4735         * aarch64-tdep.c
4736         (aapcs_is_vfp_call_or_return_candidate): Make static
4737         (pass_in_v_or_stack): Remove function.
4738         (pass_in_v_vfp_candidate): New function.
4739         (aarch64_push_dummy_call): Check for float register candidates.
4740
4741 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
4742
4743         * aarch64-tdep.c (HA_MAX_NUM_FLDS): New macro.
4744         (aapcs_is_vfp_call_or_return_candidate_1): New function.
4745         (aapcs_is_vfp_call_or_return_candidate): Likewise.
4746
4747 2018-08-28  Simon Marchi  <simon.marchi@polymtl.ca>
4748
4749         PR build/23399
4750         * common/agent.c (IPA_SYM_STRUCT_NAME): Define.
4751         (struct ipa_sym_addresses): Rename to...
4752         (struct ipa_sym_addresses_common): ... this.
4753         * common/agent.h (IPA_SYM): Use IPA_SYM_STRUCT_NAME.
4754
4755 2018-08-28  Tom Tromey  <tom@tromey.com>
4756
4757         * c-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
4758         (token_fifo): Now a std::vector.
4759         (yylex, c_parse): Update.
4760         * d-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
4761         (token_fifo): Now a std::vector.
4762         (yylex, d_parse): Update.
4763         * go-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
4764         (token_fifo): Now a std::vector.
4765         (yylex, go_parse): Update.
4766
4767 2018-08-28  Simon Marchi  <simon.marchi@ericsson.com>
4768
4769         * parser-defs.h (struct type_stack) <elements>: Change type to
4770         std::vector<union type_stack_elt>.
4771         <depth, size>: Remove.
4772         * parse.c (parse_exp_in_context_1): Adjust.
4773         (type_stack_reserve): Remove.
4774         (check_type_stack_depth): Remove.
4775         (insert_into_type_stack): Adjust to std::vector.
4776         (insert_type): Likewise.
4777         (push_type): Likewise.
4778         (push_type_int): Likewise.
4779         (insert_type_address_space): Likewise.
4780         (pop_type): Likewise.
4781         (pop_type_int): Likewise.
4782         (pop_typelist): Likewise.
4783         (pop_type_stack): Likewise.
4784         (append_type_stack): Likewise.
4785         (push_type_stack): Likewise.
4786         (get_type_stack): Likewise.
4787         (type_stack_cleanup): Likewise.
4788         (push_typelist): Likewise.
4789         (follow_types): Likewise.
4790         (_initialize_parse): Likewise.
4791
4792 2018-08-28  Hafiz Abid Qadeer  <abidh@codesourcery.com>
4793
4794         * NEWS: Mention csky target.
4795
4796 2018-08-28  Jiangshuai Li  <jiangshuai_li@c-sky.com>
4797             Hafiz Abid Qadeer  <abidh@codesourcery.com>
4798             Don Breazeal  <donb@codesourcery.com>
4799
4800         * csky-linux-tdep.c: New file.
4801         * csky-tdep.c: Likewise.
4802         * csky-tdep.h: Likewise.
4803         * Makefile.in (ALL_TARGET_OBS): Add csky-linux-tdep.o and
4804         csky-tdep.o.
4805         (HFILES_NO_SRCDIR): Add csky-tdep.h.
4806         (ALLDEPFILES): Add csky-linux-tdep.c and csky-tdep.c
4807         * configure.tgt: Add csky support.
4808
4809 2018-08-27  Jan Vrany  <jan.vrany@fit.cvut.cz>
4810
4811         * python/py-framefilter.c (py_print_frame): Print frame architecture
4812         when printing on an MI output.
4813
4814 2018-08-27  Tom Tromey  <tom@tromey.com>
4815
4816         PR build/23087:
4817         * configure: Rebuild.
4818         * warning.m4 (AM_GDB_WARNINGS): Remove -Wno-narrowing.
4819
4820 2018-08-27  Tom Tromey  <tom@tromey.com>
4821
4822         * aarch64-linux-tdep.c
4823         (aarch64_linux_iterate_over_regset_sections) <sve_regmap>: Add
4824         casts to int.
4825
4826 2018-08-27  Tom Tromey  <tom@tromey.com>
4827
4828         * ppc64-tdep.c (insn_d, insn_ds, insn_xfx): Add casts to
4829         unsigned.
4830         (ppc64_standard_linkage1, ppc64_standard_linkage2)
4831         (ppc64_standard_linkage3, ppc64_standard_linkage4)
4832         (ppc64_standard_linkage5, ppc64_standard_linkage6)
4833         (ppc64_standard_linkage7, ppc64_standard_linkage8): Add casts to
4834         unsigned.
4835
4836 2018-08-27  Tom Tromey  <tom@tromey.com>
4837
4838         * xtensa-tdep.h (XTREG_END): Add cast to unsigned.
4839         (XTENSA_GDBARCH_TDEP_INSTANTIATE): Likewise.
4840
4841 2018-08-27  Tom Tromey  <tom@tromey.com>
4842
4843         * tramp-frame.h (TRAMP_SENTINEL_INSN): Redefine.
4844         * tilegx-linux-tdep.c (tilegx_linux_rt_sigframe): Use
4845         ULONGEST_MAX.
4846         * tic6x-linux-tdep.c (tic6x_linux_rt_sigreturn_tramp_frame): Use
4847         ULONGEST_MAX.
4848         * sparc64-linux-tdep.c (sparc64_linux_rt_sigframe): Use
4849         ULONGEST_MAX.
4850         * sparc-linux-tdep.c (sparc32_linux_sigframe)
4851         (sparc32_linux_rt_sigframe): Use ULONGEST_MAX.
4852         * ppc-nbsd-tdep.c (ppcnbsd_sigtramp, ppcnbsd2_sigtramp): Use
4853         ULONGEST_MAX.
4854         * ppc-linux-tdep.c (ppc32_linux_sigaction_tramp_frame)
4855         (ppc64_linux_sigaction_tramp_frame)
4856         (ppc32_linux_sighandler_tramp_frame)
4857         (ppc64_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
4858         * nios2-linux-tdep.c (nios2_r1_linux_rt_sigreturn_tramp_frame)
4859         (nios2_r2_linux_rt_sigreturn_tramp_frame): Use ULONGEST_MAX.
4860         * mn10300-linux-tdep.c (am33_linux_sigframe)
4861         (am33_linux_rt_sigframe): Use ULONGEST_MAX.
4862         * mips64-obsd-tdep.c (mips64obsd_sigframe): Use ULONGEST_MAX.
4863         * mips-linux-tdep.c (mips_linux_o32_sigframe)
4864         (mips_linux_o32_rt_sigframe, mips_linux_n32_rt_sigframe)
4865         (mips_linux_n64_rt_sigframe, micromips_linux_o32_sigframe)
4866         (micromips_linux_o32_rt_sigframe, micromips_linux_n32_rt_sigframe)
4867         (micromips_linux_n64_rt_sigframe): Use ULONGEST_MAX.
4868         * mips-fbsd-tdep.c (mips_fbsd_sigframe, mipsn32_fbsd_sigframe)
4869         (mips64_fbsd_sigframe): Use ULONGEST_MAX.
4870         * microblaze-linux-tdep.c
4871         (microblaze_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
4872         * i386-nbsd-tdep.c (i386nbsd_sigtramp_sc16, i386nbsd_sigtramp_sc2)
4873         (i386nbsd_sigtramp_si2, i386nbsd_sigtramp_si31)
4874         (i386nbsd_sigtramp_si4): Use ULONGEST_MAX.
4875         * hppa-nbsd-tdep.c (hppanbsd_sigtramp_si4): Use ULONGEST_MAX.
4876         * common/common-types.h (ULONGEST_MAX): New define.
4877         (CORE_ADDR_MAX): Fix formatting.
4878         * bfin-linux-tdep.c (bfin_linux_sigframe): Use ULONGEST_MAX.
4879         * arm-obsd-tdep.c (armobsd_sigframe): Use ULONGEST_MAX.
4880         * arm-linux-tdep.c (arm_linux_sigreturn_tramp_frame)
4881         (arm_linux_rt_sigreturn_tramp_frame)
4882         (arm_eabi_linux_sigreturn_tramp_frame)
4883         (arm_eabi_linux_rt_sigreturn_tramp_frame)
4884         (thumb2_eabi_linux_sigreturn_tramp_frame)
4885         (thumb2_eabi_linux_rt_sigreturn_tramp_frame)
4886         (arm_linux_restart_syscall_tramp_frame)
4887         (arm_kernel_linux_restart_syscall_tramp_frame): Use ULONGEST_MAX.
4888         * arm-fbsd-tdep.c (arm_fbsd_sigframe): Use ULONGEST_MAX.
4889         * aarch64-linux-tdep.c (aarch64_linux_rt_sigframe): Use
4890         ULONGEST_MAX.
4891         * aarch64-fbsd-tdep.c (aarch64_fbsd_sigframe): Use ULONGEST_MAX.
4892
4893 2018-08-27  Tom Tromey  <tom@tromey.com>
4894
4895         * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Use
4896         CORE_ADDR_MAX.
4897         * mips-tdep.c (mips_deal_with_atomic_sequence)
4898         (micromips_deal_with_atomic_sequence): Use CORE_ADDR_MAX.
4899         * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw)
4900         (arm_deal_with_atomic_sequence_raw): Use CORE_ADDR_MAX.
4901         * alpha-tdep.c (alpha_deal_with_atomic_sequence): Use
4902         CORE_ADDR_MAX.
4903         * aarch64-tdep.c (aarch64_software_single_step): Use
4904         CORE_ADDR_MAX.
4905
4906 2018-08-27  Tom Tromey  <tom@tromey.com>
4907
4908         * linespec.c (complete_linespec_component): Add cast to "char".
4909         * completer.c (completion_tracker::build_completion_result): Add
4910         cast to "char".
4911
4912 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
4913
4914         * solist.h (struct solist, struct target_so_ops): Fix
4915         indentation.
4916
4917 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
4918
4919         * ada-tasks.c (ada_task_info_s): Remove typedef.
4920         (DEF_VEC_O(ada_task_info_s)): Remove.
4921         (struct ada_tasks_inferior_data): Initialize fields.
4922         <task_list>: Make an std::vector.
4923         (get_ada_tasks_inferior_data): Allocate with new.
4924         (ada_get_task_number): Adjust.
4925         (get_task_number_from_id): Likewise.
4926         (valid_task_id): Likewise.
4927         (ada_get_task_info_from_ptid): Likewise.
4928         (iterate_over_live_ada_tasks): Likewise.
4929         (add_ada_task): Likewise.
4930         (read_known_tasks): Likewise.
4931         (ada_build_task_list): Likewise.
4932         (print_ada_task_info): Likewise.
4933         (info_task): Likewise.
4934         (task_command_1): Likewise.
4935
4936 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
4937
4938         * ada-lang.c (add_angle_brackets): Return std::string.
4939
4940 2018-08-25  Simon Marchi  <simon.marchi@polymtl.ca>
4941
4942         * python/py-threadevent.c (py_get_event_thread): Initialize
4943         pythread.
4944
4945 2018-08-24  Pedro Alves  <palves@redhat.com>
4946
4947         * python/py-bpevent.c (create_breakpoint_event_object): Use
4948         copy-initialization.
4949         * python/py-continueevent.c (emit_continue_event): Use
4950         copy-initialization.
4951         * python/py-exitedevent.c (create_exited_event_object): Return a
4952         gdbpy_ref<>.
4953         (emit_exited_event): Use copy-initialization.
4954         * python/py-inferior.c (python_new_inferior)
4955         (python_inferior_deleted, add_thread_object): Use
4956         copy-initialization.
4957         * python/py-infevents.c (create_inferior_call_event_object)
4958         (create_register_changed_event_object)
4959         (create_memory_changed_event_object): Return a gdbpy_ref<>.
4960         (emit_inferior_call_event, emit_memory_changed_event)
4961         (emit_register_changed_event): Use copy-initialization.
4962         * python/py-newobjfileevent.c (create_new_objfile_event_object):
4963         Return a gdbpy_ref<>.
4964         (emit_new_objfile_event): Use copy-initialization.
4965         (create_clear_objfiles_event_object): Return a gdbpy_ref<>.
4966         (emit_clear_objfiles_event): Use copy-initialization.
4967         * python/py-signalevent.c (create_signal_event_object): Use
4968         copy-initialization.
4969         * python/py-threadevent.c (create_thread_event_object): Use
4970         copy-initialization.
4971
4972 2018-08-24  Pedro Alves  <palves@redhat.com>
4973             Simon Marchi  <simon.marchi@ericsson.com>
4974
4975         PR gdb/23379
4976         * python/py-continueevent.c: Include "gdbthread.h".
4977         (create_continue_event_object): Add intro comment.  Add 'ptid'
4978         parameter.  Use it to find thread to pass to
4979         create_thread_event_object.
4980         (emit_continue_event): Pass PTID down to
4981         create_continue_event_object.
4982         * python/py-event.h (py_get_event_thread): Declare.
4983         (create_thread_event_object): Remove default from 'thread'
4984         parameter.
4985         * python/py-stopevent.c (create_stop_event_object): Use
4986         py_get_event_thread.
4987         * python/py-threadevent.c (get_event_thread): Rename to ...
4988         (py_get_event_thread): ... this, make extern, add 'ptid' parameter
4989         and use it to find the thread.
4990         (create_thread_event_object): Assert that THREAD isn't null.
4991         Don't find the event thread here.
4992
4993 2018-08-23  Kevin Buettner  <kevinb@redhat.com>
4994
4995         * block.h (blockrange, blockranges): New struct declarations.
4996         (struct block): Add new field named `ranges'.
4997         (BLOCK_RANGES, BLOCK_NRANGES, BLOCK_RANGE, BLOCK_CONTIGUOUS_P)
4998         (BLOCK_RANGE_START, BLOCK_RANGE_END, BLOCK_ENTRY_PC): New
4999         macros for accessing ranges in struct block.
5000         (make_blockranges): New declaration.
5001         block.c (make_blockranges): New function.
5002         * dwarf2read.c (dwarf2_record_block_ranges): Fill in BLOCK_RANGES
5003         for block.
5004         * symtab.h (find_pc_partial_function): Add new parameter `block'.
5005         * blockframe.c (cache_pc_function_block): New static global.
5006         (clear_pc_function_cache): Clear cache_pc_function_block.
5007         (find_pc_partial_function): Move comment to symtab.h.  Add
5008         support for non-contiguous blocks.
5009         * cli/cli-cmds.c (block.h): Include.
5010         (print_disassembly): Handle printing of non-contiguous blocks.
5011         (disassemble_current_function): Likewise.
5012         (disassemble_command): Likewise.
5013
5014         * ax-gdb.c (gen_var_ref): Use BLOCK_ENTRY_PC in place of
5015         BLOCK_START.
5016         * blockframe.c (get_pc_function_start): Likewise.
5017         * compile/compile-c-symbols.c (convert_one_symbol): Likewise.
5018         (gcc_symbol_address): Likewise.
5019         * compile/compile-object-run.c (compile_object_run): Likewise.
5020         * compile/compile.c (get_expr_block_and_pc): Likewise.
5021         * dwarf2loc.c (dwarf2_find_location_expression): Likewise.
5022         (func_addr_to_tail_call_list): Likewise.
5023         * findvar.c (default_read_var_value): Likewise.
5024         * inline-frame.c (inline_frame_this_id): Likewise.
5025         (skip-inline_frames): Likewise.
5026         * infcmd.c (until_next_command): Likewise.
5027         * linespec.c (convert_linespec_to_sals): Likewise.
5028         * parse.c (parse_exp_in_context_1): Likewise.
5029         * printcmd.c (build_address_symbolic): likewise.
5030         (info_address_command): Likewise.
5031         symtab.c (find_function_start_sal): Likewise.
5032         (skip_prologue_sal): Likewise.
5033         (find_function_alias_target): Likewise.
5034         (find_gnu_ifunc): Likewise.
5035         * stack.c (find_frame_funname): Likewise.
5036         * symtab.c (fixup_symbol_section): Likewise.
5037         (find_function_start_sal): Likewise.
5038         (skip_prologue_sal): Likewsie.
5039         (find_function_alias_target): Likewise.
5040         (find_gnu_ifunc): Likewise.
5041         * tracepoint.c (info_scope_command): Likewise.
5042         * value.c (value_fn_field): Likewise.
5043
5044         * infrun.c (fill_in_stop_func): Use find_function_entry_range_from_pc
5045         in place of find_pc_partial_function.
5046         * blockframe.c (find_function_entry_range_from_pc): New function.
5047         * symtab.h (find_function_entry_range_from_pc): Declare and document.
5048         * objfiles.c (objfile_relocate1): Relocate start and end addresses
5049         for each range in a block.
5050
5051
5052 2018-08-23  Xavier Roirand  <roirand@adacore.com>
5053
5054         * machoread.c (macho_symfile_read_all_oso): Remove uneeded
5055         incrementation.
5056
5057 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
5058
5059         * solib-svr4.c (read_program_headers_from_bfd): Return
5060         gdb::optional<gdb::byte_vector>.
5061         (svr4_exec_displacement): Adjust.
5062
5063 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
5064
5065         * solib-svr4.c (read_program_header): Return
5066         gdb::optional<gdb::byte_vector>, remove p_sect_size param.
5067         (find_program_interpreter): Return
5068         gdb::optional<gdb::byte_vector>.
5069         (scan_dyntag_auxv): Adjust.
5070         (enable_break): Adjust.
5071         (svr4_exec_displacement): Adjust.
5072
5073 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
5074
5075         * inf-child.h (inf_child_target) <terminal_save_inferior>: New.
5076         * inf-child.c (inf_child_target::terminal_save_inferior): New.
5077
5078 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
5079
5080         * guile/scm-string.c (gdbscm_scm_from_printf): Use
5081         string_vprintf.
5082         * guile/scm-utils.c (gdbscm_printf): Likewise.
5083         * serial.c (serial_printf): Likewise.
5084         * xml-support.c (gdb_xml_parser::vdebug): Likewise.
5085
5086 2018-08-22  Jan Vrany  <jan.vrany@fit.cvut.cz>
5087
5088         * stack.c (print_frame): Print frame architecture when printing on
5089         an MI output.
5090         * NEWS: Mention new "arch" attribute in frame output.
5091
5092 2018-08-21  Alan Hayward  <alan.hayward@arm.com>
5093
5094         * arch/aarch64.h (aarch64_regnum): Update comment.
5095
5096 2018-08-21  Alan Hayward  <alan.hayward@arm.com>
5097
5098         * NEWS: Add SVE to 8.2 section.
5099
5100 2018-08-21  Pedro Alves  <palves@redhat.com>
5101
5102         * guile/scm-utils.c (gdbscm_parse_function_args_1): New, factored
5103         out from gdbscm_parse_function_args.
5104         (gdbscm_parse_function_args): Rework to use gdbscm_wrap and
5105         gdbscm_parse_function_args_1.
5106
5107 2018-08-21  Simon Marchi  <simon.marchi@ericsson.com>
5108
5109         PR gdb/17816
5110         * m32c-tdep.c (m32c_decode_srcdest4): Remove unnecessary ternary
5111         operator.
5112
5113 2018-08-19  Simon Marchi  <simon.marchi@polymtl.ca>
5114
5115         * solib-svr4.c (svr4_exec_displacement): Fix formatting.
5116
5117 2018-08-19  Michael Spang  <spang@google.com>
5118
5119         PR gdb/11786
5120         * solib-svr4.c (svr4_exec_displacement): Ignore memsz fields
5121         for PT_TLS segments.
5122
5123 2018-08-18  Kevin Buettner  <kevinb@redhat.com>
5124
5125         * dwarf2expr.h (struct dwarf_expr_context): Add virtual method
5126         dwarf_variable_value.
5127         * dwarf2-frame.c (class dwarf_expr_executor):
5128         Add override for dwarf_variable_value.
5129         * dwarf2loc.c (class dwarf_evaluate_loc_desc): Likewise.
5130         (class symbol_needs_eval_context): Likewise.
5131         (indirect_synthetic_pointer): Add forward declaration.
5132         (sect_variable_value): New function.
5133         (dwarf2_compile_expr_to_ax): Add case for DW_OP_GNU_variable_value.
5134         * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Add case
5135         for DW_OP_GNU_variable_value.
5136
5137 2018-08-16  Tom Tromey  <tom@tromey.com>
5138
5139         * top.c (read_command_file): Update.
5140         (command_line_input): Remove "repeat" argument.
5141         * ada-lang.c (get_selections): Update.
5142         * linespec.c (decode_line_2): Update.
5143         * defs.h (command_line_input): Remove argument.
5144         * cli/cli-script.c (read_next_line): Update.
5145         * python/py-gdb-readline.c: Update.
5146
5147 2018-08-17  Tom Tromey  <tom@tromey.com>
5148
5149         * cli/cli-script.c (read_next_line): Pass 0 as repeat argument to
5150         command_line_input.
5151
5152 2018-08-15  Tom Tromey  <tom@tromey.com>
5153
5154         * aarch64-linux-tdep.c (aarch64_linux_core_read_vq): Use pulongest.
5155
5156 2018-08-14  Jan Vrany  <jan.vrany@fit.cvut.cz>
5157
5158         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Add -a option.
5159         If used, use find_pc_partial_function to find address range
5160         to disassemble.
5161         * mi/mi-main.c (mi_cmd_list_features): Report
5162         "data-disassemble-a-option" feature.
5163         * NEWS: Mention new -data-disassemble option -a.
5164
5165 2018-08-13  Tom Tromey  <tom@tromey.com>
5166
5167         * common/common-defs.h (_FORTIFY_SOURCE): Define.
5168
5169 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
5170
5171         * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): New function.
5172         (aarch64_linux_collect_sve_regset): Likewise.
5173         (aarch64_linux_iterate_over_regset_sections): Check for SVE.
5174         * regcache.h (regcache_map_entry_size): New function.
5175
5176 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
5177
5178         * aarch64-linux-tdep.c (SVE_HEADER_SIZE_LENGTH): Add define.
5179         (SVE_HEADER_MAX_SIZE_LENGTH): Likewise.
5180         (SVE_HEADER_VL_LENGTH): Likewise.
5181         (SVE_HEADER_MAX_VL_LENGTH): Likewise.
5182         (SVE_HEADER_FLAGS_LENGTH): Likewise.
5183         (SVE_HEADER_RESERVED_LENGTH): Likewise.
5184         (SVE_HEADER_SIZE_OFFSET): Likewise.
5185         (SVE_HEADER_MAX_SIZE_OFFSET): Likewise.
5186         (SVE_HEADER_VL_OFFSET): Likewise.
5187         (SVE_HEADER_MAX_VL_OFFSET): Likewise.
5188         (SVE_HEADER_FLAGS_OFFSET): Likewise.
5189         (SVE_HEADER_RESERVED_OFFSET): Likewise.
5190         (SVE_HEADER_SIZE): Likewise.
5191         (aarch64_linux_core_read_vq): Add function.
5192         (aarch64_linux_core_read_description): Check for SVE section.
5193
5194 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
5195
5196         * aarch64-fbsd-tdep.c
5197         (aarch64_fbsd_iterate_over_regset_sections): Add supply_size and
5198         collect_size.
5199         * aarch64-linux-tdep.c
5200         (aarch64_linux_iterate_over_regset_sections): Likewise.
5201         * alpha-linux-tdep.c
5202         (alpha_linux_iterate_over_regset_sections):
5203         * alpha-nbsd-tdep.c
5204         (alphanbsd_iterate_over_regset_sections): Likewise.
5205         * amd64-fbsd-tdep.c
5206         (amd64fbsd_iterate_over_regset_sections): Likewise.
5207         * amd64-linux-tdep.c
5208         (amd64_linux_iterate_over_regset_sections): Likewise.
5209         * arm-bsd-tdep.c
5210         (armbsd_iterate_over_regset_sections): Likewise.
5211         * arm-fbsd-tdep.c
5212         (arm_fbsd_iterate_over_regset_sections): Likewise.
5213         * arm-linux-tdep.c
5214         (arm_linux_iterate_over_regset_sections): Likewise.
5215         * corelow.c (get_core_registers_cb): Likewise.
5216         (core_target::fetch_registers): Likewise.
5217         * fbsd-tdep.c (fbsd_collect_regset_section_cb): Likewise.
5218         * frv-linux-tdep.c (frv_linux_iterate_over_regset_sections): Likewise.
5219         * gdbarch.h (void): Regenerate.
5220         * gdbarch.sh: Add supply_size and collect_size.
5221         * hppa-linux-tdep.c (hppa_linux_iterate_over_regset_sections): Likewise.
5222         * hppa-nbsd-tdep.c (hppanbsd_iterate_over_regset_sections): Likewise.
5223         * hppa-obsd-tdep.c (hppaobsd_iterate_over_regset_sections): Likewise.
5224         * i386-fbsd-tdep.c (i386fbsd_iterate_over_regset_sections): Likewise.
5225         * i386-linux-tdep.c (i386_linux_iterate_over_regset_sections): Likewise.
5226         * i386-tdep.c (i386_iterate_over_regset_sections): Likewise.
5227         * ia64-linux-tdep.c (ia64_linux_iterate_over_regset_sections): Likewise.
5228         * linux-tdep.c (linux_collect_regset_section_cb): Likewise.
5229         * m32r-linux-tdep.c (m32r_linux_iterate_over_regset_sections): Likewise.
5230         * m68k-bsd-tdep.c (m68kbsd_iterate_over_regset_sections): Likewise.
5231         * m68k-linux-tdep.c (m68k_linux_iterate_over_regset_sections): Likewise.
5232         * mips-fbsd-tdep.c (mips_fbsd_iterate_over_regset_sections): Likewise.
5233         * mips-linux-tdep.c (mips_linux_iterate_over_regset_sections): Likewise.
5234         * mips-nbsd-tdep.c (mipsnbsd_iterate_over_regset_sections): Likewise.
5235         * mips64-obsd-tdep.c (mips64obsd_iterate_over_regset_sections):
5236         Likewise.
5237         * mn10300-linux-tdep.c (am33_iterate_over_regset_sections): Likewise.
5238         * nios2-linux-tdep.c (nios2_iterate_over_regset_sections): Likewise.
5239         * ppc-fbsd-tdep.c (ppcfbsd_iterate_over_regset_sections): Likewise.
5240         * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections): Likewise.
5241         * ppc-nbsd-tdep.c (ppcnbsd_iterate_over_regset_sections): Likewise.
5242         * ppc-obsd-tdep.c (ppcobsd_iterate_over_regset_sections): Likewise.
5243         * riscv-linux-tdep.c (riscv_linux_iterate_over_regset_sections):
5244         Likewise.
5245         * rs6000-aix-tdep.c (rs6000_aix_iterate_over_regset_sections): Likewise.
5246         * s390-linux-tdep.c (s390_iterate_over_regset_sections): Likewise.
5247         * score-tdep.c (score7_linux_iterate_over_regset_sections): Likewise.
5248         * sh-tdep.c (sh_iterate_over_regset_sections): Likewise.
5249         * sparc-tdep.c (sparc_iterate_over_regset_sections): Likewise.
5250         * tilegx-linux-tdep.c (tilegx_iterate_over_regset_sections): Likewise.
5251         * vax-tdep.c (vax_iterate_over_regset_sections): Likewise.
5252         * xtensa-tdep.c (xtensa_iterate_over_regset_sections): Likewise.
5253
5254 2018-08-10  Simon Marchi  <simon.marchi@ericsson.com>
5255
5256         * nat/linux-osdata.c (commandline_from_pid): Replace xstrprintf
5257         with string_printf.
5258
5259 2018-08-10  Keith Seitz  <keiths@redhat.com>
5260
5261         * compile/compile-c-support.c (add_code_header, add_code_footer):
5262         Move into policy class.
5263         (c_push_user_expression, pop_user_expression_nop)
5264         (c_add_code_header, c_add_code_footer, c_add_input): New policy class.
5265         (compile_program): New host class.
5266         (c_compile_program): New typedef.
5267         (c_compute_porgram): Use c_compile_program.
5268
5269 2018-08-10  Keith Seitz  <keiths@redhat.com>
5270
5271         * compile/compile-internal.h (compile_instance::~compile_instance):
5272         Remove calls to htab_delete.
5273         <m_type_map, m_symbol_err_map>: Switch type to htab_up.
5274         * compile.c (compile_instance::compile_instance): Initialize
5275         htab unique pointers.
5276         (compile_instance::get_cached_type, compile_instance::insert_type)
5277         (compile_instance::error_symbol_once): Update for unique_ptr.
5278
5279 2018-08-10  Keith Seitz  <keiths@redhat.com>
5280
5281         * compile/compile-c-symbols.c (struct symbol_error)
5282         (hash_symbol_error, eq_symbol_error, del_symbol_error)
5283         (compile_instance::insert_symbol_error)
5284         (compile_instance::error_symbol_once): Move to ...
5285         * compile/compile.c: ... here.
5286
5287 2018-08-10  Keith Seitz  <keiths@redhat.com>
5288
5289         * compile/compile-c-support.c (c_get_compile_context): Use `new'
5290         instead of `new_compile_instance'.
5291         * compile/compile-c-symbols.c (compile_instance::insert_symbol_error):
5292         Update description.
5293         If the symbol error map is not initialized, create it.
5294         (generate_c_for_for_one_symbol): Do not check/initialize
5295         the symbol error map.
5296         * compile/compile-c-types.c (compile_c_instance): Make a class.
5297         Update all callers.
5298         (compile_instance::compile_instance): Initialize the type cache.
5299         (get_cached_type): New function.
5300         (insert_type): Update description.
5301         (compile_c_instance::m_default_cflags): Define.
5302         (convert_type): Update description.  Use get_cached_type.
5303         (delete_instance): Moved to destructor.
5304         (new_compile_instance): Moved to constructor.
5305         * compile/compile-c.h (compile_c_instance): Make class inheriting
5306         from compile_instance.
5307         <base>: Remove field.
5308         <type_map, symbol_err_map>: Move to base class.
5309         <c_plugin>: Rename to `m_plugin' and remove pointer type.
5310         * compile/compile-internal.h (compile_instance): Make class.
5311         <type_map_t, symbol_err_map_t>: Define.
5312         <fe>: Rename to `m_gcc_fe'.
5313         <scope, block, gcc_target_options>: Add `m_' prefix.
5314         <m_type_map, m_symbol_err_map>: New fields, moved from
5315         compile_c_instance.
5316         <destroy>: Remove.
5317         (convert_type, new_compile_instance): Remove.
5318         * compile/compile.c (cleanup_compile_instance): Remove.
5319         (compile_to_object): Use unique_ptr to eliminate cleanups.
5320         (compile_instance::set_print_callback, compile_instance::version)
5321         (compile_instance::set_verbose)
5322         (compile_instance::set_driver_filename)
5323         (compile_instance::set_triplet_regexp)
5324         (compile_instance::set_arguments)
5325         (compile_instance::set_source_file)
5326         (compile_instance::compile): Define.
5327
5328 2018-08-10  Keith Seitz  <keiths@redhat.com>
5329
5330         * Makefile.in (HFILES_NO_SRCDIR): Add compile/gcc-c-plugin.h.
5331         * compile/compile-c-types.c: Define GCC_METHODN macros and include
5332         gcc-c-fe.def to define C plugin.
5333         (delete_instance): Delete `c_plugin'.
5334         (new_compile_instance): Initialize `c_plugin'.
5335         * compile/compile-c.h: Include gcc_c_plugin.h.
5336         (struct compile_c_instance) <c_plugin>: New member.
5337         * gcc-c-plugin.h: New file.
5338         Update all callers with API change.
5339
5340 2018-08-10  Keith Seitz  <keiths@redhat.com>
5341
5342         * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Move header files ...
5343         (HFILES_NO_SRCDIR): ... to here.
5344         Add compile-internal.h and compile-c.h.
5345         * compile/compile-c-support.c: Include compile-c.h.
5346         * compile/compile-c-symbols.c: Include compile-c.h.
5347         (generate_c_for_variable_locations): Update comment.
5348         * compile/compile-c-types.c: Include compile-c.h.
5349         * compile/compile-c.h: New file -- moved C language declarations
5350         from other files here.
5351         * compile/compile-internal.h: Do not include hashtab.h or
5352         common/enum-flags.h.
5353         (gcc_qualifiers_flags, struct compile_c_instance, C_CTX)
5354         (gcc_convert_symbol, gcc_symbol_address)
5355         (generate_c_for_variable_locations, c_get_mode_for_size)
5356         (c_get_range_decl_name): Definitions moved to compile-c.h.
5357         * compile/compile-loc2c.c: Include compile-c.h.
5358
5359 2018-08-10  Keith Seitz  <keiths@redhat.com>
5360
5361         * compile/compile-c-symbols.c (symbol_substitution_name): Rename to ...
5362         (c_symbol_substitution_name): ... this.
5363         Update all callers.
5364
5365 2018-08-10  Keith Seitz  <keiths@redhat.com>
5366
5367         * compile/compile-c-support.c (c_compute_program): Use
5368         unique_xmalloc_ptr to eliminate cleanup.
5369         * compile/compile-c-symbols.c (generate_c_for_variable_locations):
5370         Return a unique_xmalloc_ptr and eliminate cleanup.
5371         * compile/compile-internal.h (generate_c_for_variable_locations):
5372         Return unique_xmalloc_ptr and update description.
5373
5374 2018-08-10  Alan Hayward  <alan.hayward@arm.com>
5375
5376         * corelow.c (core_target::get_core_register_section): Rename
5377         min_size to section_min_size.
5378
5379 2018-08-09  Jim Wilson  <jimw@sifive.com>
5380
5381         * Makefile.in (ALL_TARGET_OBS): Add riscv-linux-tdep.c.
5382         (ALLDEPFILES): Add riscv-linux-nat.c, and riscv-linux-tdep.c.
5383         * NEWS: Mention new GNU/Linux RISC-V target.
5384         * configure.host: Add riscv*-*-linux*.
5385         * configure.nat: Add riscv*.
5386         * configure.tgt: Add riscv*-*-linux*.
5387         * riscv-linux-nat.c: New file.
5388         * riscv-linux-tdep.c: New file.
5389
5390 2018-08-09  Andrew Burgess  <andrew.burgess@embecosm.com>
5391
5392         * infrun.c (resume): Make static, add forward declaration.
5393         (proceed): Update header comment.
5394         * infrun.h (resume): Delete declaration.
5395
5396 2018-08-09  Tom Tromey  <tom@tromey.com>
5397
5398         * riscv-tdep.h: Minor formatting fixes.
5399
5400 2018-08-09  Simon Marchi  <simon.marchi@ericsson.com>
5401
5402         * common/scoped_mmap.c (mmap_file): Silence ARI warning.
5403         * dwarf-index-cache.c (create_dir_and_check): Likewise.
5404         (test_mkdir_recursive): Likewise.
5405         * dwarf-index-write.c (write_psymtabs_to_index): Likewise.
5406
5407 2018-08-09  Andrew Burgess  <andrew.burgess@embecosm.com>
5408
5409         * valarith.c (value_subscripted_rvalue): If an array is not in
5410         memory, and we don't know the upper bound, then we can't know that
5411         the requested element exists or not.
5412
5413 2018-08-08  Simon Marchi  <simon.marchi@ericsson.com>
5414
5415         * target.c (str_comma_list_concat_elem): Fix typo in comment.
5416         (target_options_to_string): Add comment.
5417
5418 2018-08-08  Tom Tromey  <tom@tromey.com>
5419
5420         * unittests/scoped_mmap-selftests.c: Check result of "write".
5421
5422 2018-08-08  Jim Wilson  <jimw@sifive.com>
5423
5424         * riscv-tdep.c (enum opcode): Add jump, branch, lr, and sc opcodes.
5425         (decode_register_index_short): New.
5426         (decode_j_type_insn, decode_cj_type_insn): New.
5427         (decode_b_type_insn, decode_cb_type_insn): New.
5428         (riscv_insn::decode): Add support for jumps, branches, lr, and sc.  New
5429         local xlen.  Check xlen when decoding ambiguous compressed insns.  In
5430         compressed decode, use is_c_lui_insn instead of is_lui_insn, and
5431         is_c_sw_insn instead of is_sw_insn.
5432         (riscv_next_pc, riscv_next_pc_atomic_sequence): New.
5433         (riscv_software_single_step): New.
5434         * riscv-tdep.h (riscv_software_single_step): Declare.
5435
5436         * riscv-tdep.c (riscv_isa_xlen): Drop static.
5437         * riscv-tdep.h (riscv_isa_xlen): Add extern declaration.
5438
5439 2018-08-08  Andrew Burgess  <andrew.burgess@embecosm.com>
5440
5441         PR gdb/18050:
5442         * target.c (dispose_inferior): Don't dispose of inferiors that are
5443         already killed.
5444
5445 2018-08-08  Szabolcs Nagy  <szabolcs.nagy@arm.com>
5446
5447         * remote.c (remote_target::download_tracepoint): Change char* to
5448         const char*.
5449
5450 2018-08-07  Simon Marchi  <simon.marchi@polymtl.ca>
5451
5452         * target.h (target_options_to_string): Return an std::string.
5453         * target.c (str_comma_list_concat_elem): Return void, use
5454         std::string.
5455         (do_option): Likewise.
5456         (target_options_to_string): Return an std::string.
5457         * linux-nat.c (linux_nat_target::wait): Adjust.
5458         * target-debug.h (target_debug_print_options): Adjust.
5459
5460 2018-08-07  Tom Tromey  <tom@tromey.com>
5461
5462         * Makefile.in (CPPFLAGS): New variable.
5463         (INTERNAL_CPPFLAGS): Use it.
5464
5465 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
5466
5467         * NEWS: Mention the index cache.
5468
5469 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
5470
5471         * common/pathstuff.h (get_standard_cache_dir): New.
5472         * common/pathstuff.c (get_standard_cache_dir): New.
5473         * build-id.h (build_id_to_string): New.
5474         * dwarf-index-common.h (INDEX4_SUFFIX, INDEX5_SUFFIX,
5475         DEBUG_STR_SUFFIX): Move to here.
5476         * dwarf-index-write.c (INDEX4_SUFFIX, INDEX5_SUFFIX,
5477         DEBUG_STR_SUFFIX): Move from there.
5478         (write_psymtabs_to_index): Make non-static, add basename
5479         parameter.  Write to temporary files, rename when done.
5480         (save_gdb_index_command): Adjust call to
5481         write_psymtabs_to_index.
5482         * dwarf2read.h (dwarf2_per_objfile) <index_cache_res>: New
5483         field.
5484         * dwarf2read.c (dwz_file) <index_cache_res>: New field.
5485         (get_gdb_index_contents_from_cache): New.
5486         (get_gdb_index_contents_from_cache_dwz): New.
5487         (dwarf2_initialize_objfile): Read index from cache.
5488         (dwarf2_build_psymtabs): Save to index.
5489         * dwarf-index-cache.h: New file.
5490         * dwarf-index-cache.c: New file.
5491         * dwarf-index-write.h: New file.
5492
5493 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
5494
5495         * gnulib/aclocal.m4: Re-generate.
5496         * gnulib/config.in: Re-generate.
5497         * gnulib/configure: Re-generate.
5498         * gnulib/import/Makefile.am: Re-generate.
5499         * gnulib/import/Makefile.in: Re-generate.
5500         * gnulib/import/m4/gnulib-cache.m4: Re-generate.
5501         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
5502         * gnulib/import/m4/mkdir.m4: New file.
5503         * gnulib/import/mkdir.c: New file.
5504         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkdir
5505         module.
5506
5507 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
5508
5509         * Makefile.in (COMMON_SFILES): Add common/scoped_mmap.c.
5510         * common/scoped_mmap.c: New file.
5511         * common/scoped_mmap.h (destroy): New method.
5512         (~scoped_mmap, reset): Use destroy.
5513         (scoped_mmap): New move constructor.
5514         (mmap_file): New declaration.
5515         * unittests/scoped_mmap-selftests.c (test_normal,
5516         test_invalid_filename, run_tests): New functions.
5517         (_initialize_scoped_mmap_selftests): Register selftest.
5518
5519 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
5520
5521         * dwarf2read.c (read_gdb_index_from_section): Rename to...
5522         (read_gdb_index_from_buffer): ... this.  Remove section
5523         parameter, add buffer parameter.
5524         (get_gdb_index_contents_ftype,
5525         get_gdb_index_contents_dwz_ftype): New typedefs.
5526         (dwarf2_read_gdb_index): Add callback parameters to get the
5527         index contents.
5528         (get_gdb_index_contents_from_section): New.
5529         (dwarf2_initialize_objfile): Update call to
5530         dwarf2_read_gdb_index.
5531
5532 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
5533
5534         * common/filestuff.h (gdb_fopen_cloexec): New overload.
5535         (gdb_open_cloexec): Likewise.
5536         * nat/linux-osdata.c (command_from_pid): Use string_printf.
5537         (commandline_from_pid): Likewise.
5538         (linux_xfer_osdata_threads): Likewise.
5539         (linux_xfer_osdata_fds): Likewise.
5540         * ada-lang.c (is_package_name): Likewise.
5541         * auxv.c (procfs_xfer_auxv): Likewise.
5542         * breakpoint.c (print_one_breakpoint_location): Use
5543         uiout::field_fmt.
5544         (print_one_catch_solib): Use string_printf.
5545         * coff-pe-read.c (add_pe_exported_sym): Likewise.
5546         (add_pe_forwarded_sym): Likewise.
5547         * dwarf2read.c (create_type_unit_group): Likewise.
5548         (build_error_marker_type): Likewise.
5549         * infcall.c (get_function_name): Likewise.
5550         * valprint.c (print_converted_chars_to_obstack): Likewise.
5551         * xtensa-tdep.c (xtensa_register_type): Likewise.
5552
5553 2018-08-06  Simon Marchi  <simon.marchi@ericsson.com>
5554
5555         * remote.c (remote_target::download_tracepoint): Fix format
5556         string errors.
5557
5558 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
5559
5560         * tracefile.c: Include common/byte-vector.h.
5561         (trace_save): Change type of buf to gdb::byte_vector.  Initialize
5562         with trace_regblock_size if needed.  Update uses of buf.
5563
5564 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
5565
5566         * tracepoint.h (collection_list) <m_regs_mask>: Change type to
5567         std::vector<unsigned char>.
5568         * tracepoint.c (collection_list::collection_list): Remove
5569         m_regs_mask initializer from initializer list.  Resize
5570         m_regs_mask using the largest remote register number.
5571         (collection_list::add_remote_register): Remove size check on
5572         m_regs_mask.  Use at to access element.
5573         (collection_list::stringify): Change type of temp_buf to
5574         gdb::char_vector.  Update uses of temp_buf.  Resize if needed to
5575         stringify the register mask.  Use pack_hex_byte for the register
5576         mask.
5577
5578 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
5579
5580         * tracepoint.h (class collection_list) <add_register>: Remove.
5581         <add_remote_register, add_ax_registers, add_local_register>:
5582         Declare.
5583         <add_memrange>: Add scope parameter.
5584         * tracepoint.c (encode_actions_1): Likewise.
5585         (collection_list::add_register): Rename to ...
5586         (collection_list::add_remote_register): ... this.  Update
5587         comment.
5588         (collection_list::add_ax_registers, add_local_register): New
5589         methods.
5590         (collection_list::add_memrange): Add scope parameter.  Call
5591         add_local_register instead of add_register.
5592         (finalize_tracepoint_aexpr): New function.
5593         (collection_list::collect_symbol): Update calls to add_memrange.
5594         Call add_local_register instead of add_register.  Call
5595         add_ax_registers.  Call finalize_tracepoint_aexpr.
5596         (encode_actions_1): Get remote regnos for $reg action.  Call
5597         add_remote_register, add_ax_registers, and add_local_register.
5598         Update call to add_memrange.  Call finalize_tracepoint_aexpr.
5599         (validate_actionline): Call finalize_tracepoint_aexpr.
5600
5601 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
5602
5603         * remote.c (remote_target::download_tracepoint): Remove BUF_SIZE.
5604         Replace array buf with gdb::char_vector buf, of size
5605         get_remote_packet_size ().  Replace references to buf and
5606         BUF_SIZE to buf.data () and buf.size ().  Replace strcpy, strcat
5607         and xsnprintf with snprintf.  Raise errors if the buffer is too
5608         small.
5609
5610 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
5611
5612         * remote.c (remote_target::download_tracepoint): Fix the has_more
5613         predicate in the QTDP action list iteration.
5614
5615 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
5616
5617         * remote.c (remote_target::download_tracepoint): Fix indentation
5618         in for block.
5619
5620 2018-08-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
5621
5622         * proc-api.c (_initialize_proc_api): Remove c, unused.
5623         * procfs.c (procfs_init_inferior): Remove signals, unused.
5624         (procfs_target::make_corefile_notes): Remove old_chain, fpregs,
5625         unused.
5626
5627 2018-08-06  Sergey Korolev  <s.korolev@ndmsystems.com>
5628             Andrew Burgess  <andrew.burgess@embecosm.com>
5629
5630         * linux-nat.c (linux_nat_target::follow_fork): Avoid using
5631         'W_STOPCODE (0)' as this could be ambiguous.
5632
5633 2018-08-03  Sergio Durigan Junior  <sergiodj@redhat.com>
5634
5635         * ser-tcp.c (net_open): Fix thinko when deciding whether to
5636         disable TCP's Nagle algorithm (use "ai_protocol" instead of
5637         "ai_socktype").
5638
5639 2018-08-02  Tom Tromey  <tom@tromey.com>
5640
5641         PR symtab/16842.
5642         * dwarf2read.c (read_func_scope): Set symtab on template parameter
5643         symbols.
5644         (process_structure_scope): Likewise.
5645
5646 2018-08-02  Xavier Roirand  <roirand@adacore.com>
5647
5648         PR gdb/22629:
5649         * darwin-nat.c (darwin_kill_inferior): Fix handling of
5650         kill inferior.
5651
5652 2018-08-02  Tom Tromey  <tom@tromey.com>
5653
5654         * darwin-nat.c (find_inferior_task_it, darwin_find_thread)
5655         (darwin_suspend_inferior, darwin_resume_inferior)
5656         (darwin_decode_notify_message, darwin_resume_inferior_threads)
5657         (darwin_check_new_threads): Check result of get_darwin_inferior.
5658
5659 2018-07-31  Joel Brobecker  <brobecker@adacore.com>
5660
5661         GDB 8.1.1 released.
5662
5663 2018-07-31  Jan Vrany  <jan.vrany@fit.cvut.cz>
5664
5665         * varobj.c (varobj_get_path_expr_parent): Report an error if
5666         parent is a dynamic varobj.
5667
5668 2018-07-31  Simon Marchi  <simon.marchi@ericsson.com>
5669
5670         * gnulib/aclocal.m4: Re-generate.
5671         * gnulib/config.in: Re-generate.
5672         * gnulib/configure: Re-generate.
5673         * gnulib/import/Makefile.in: Re-generate.
5674         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
5675         * gnulib/import/m4/onceonly.m4: Re-generate.
5676
5677 2018-07-31  Simon Marchi  <simon.marchi@ericsson.com>
5678
5679         * target-descriptions.c (struct xml_test_tdesc): New.
5680         (xml_tdesc): Change type to std::vector<xml_test_tdesc>.
5681         (record_xml_tdesc): Update.
5682         (maintenance_check_xml_descriptions): Update.
5683         * target-descriptions.h (record_xml_tdesc): Update comment.
5684
5685 2018-07-30  Andrew Burgess  <andrew.burgess@embecosm.com>
5686
5687         * eval.c (evaluate_subexp_for_sizeof): Check for array type before
5688         checking array bounds are defined.
5689
5690 2018-07-30  Tom Tromey  <tom@tromey.com>
5691
5692         * nat/linux-osdata.c (pid_pgid_entry::operator<): Fix
5693         irreflexivity violation.
5694
5695 2018-07-30  Tom Tromey  <tom@tromey.com>
5696
5697         * cli/cli-decode.c (lookup_cmd): Remove lint code.
5698         * value.c (unpack_long): Remove lint code.
5699         * valops.c (value_ind): Remove lint code.
5700         * valarith.c (value_x_binop, value_x_unop, value_equal)
5701         (value_pos): Remove lint code.
5702
5703 2018-07-28  Tom de Vries  <tdevries@suse.de>
5704
5705         * eval.c (evaluate_subexp_for_sizeof): Interpret size of dynamic type
5706         with undefined upper bound as <optimized out>.
5707
5708 2018-07-27  Sergio Durigan Junior  <sergiodj@redhat.com>
5709
5710         * gcore.in: Rename variable "name" to "prefix".  Expand
5711         "usage" text.
5712
5713 2018-07-14  Jon Turney  <jon.turney@dronecode.org.uk>
5714
5715         * windows-nat.c (windows_nat_target::create_inferior): Update to
5716         call close() in global namespace.
5717
5718 2018-07-26  Tom Tromey  <tom@tromey.com>
5719
5720         * dwarf-index-write.c (add_address_entry): Don't add objfile
5721         offsets.
5722         * dbxread.c (find_stab_function): Rename from
5723         find_stab_function_addr.  Return a bound_minimal_symbol.
5724         (read_dbx_symtab): Use raw_text_low, raw_text_high.
5725         Don't add objfile offsets.
5726         (end_psymtab): Use raw_text_low, raw_text_high,
5727         MSYMBOL_VALUE_RAW_ADDRESS.
5728         (read_ofile_symtab): Update.
5729         (process_one_symbol): Update.
5730         * dwarf2read.c (create_addrmap_from_index): Don't add objfile
5731         offsets.
5732         (dw2_relocate): Remove.
5733         (dw2_find_pc_sect_symtab): Bias PC by the text offset before
5734         searching addrmap.
5735         (dwarf2_gdb_index_functions, dwarf2_debug_names_functions):
5736         Update.
5737         (process_psymtab_comp_unit_reader, add_partial_symbol)
5738         (add_partial_subprogram, dwarf2_ranges_read): Update.
5739         (load_partial_dies): Update.
5740         (add_address_entry): Don't add objfile offsets.
5741         (dwarf2_build_include_psymtabs): Update.
5742         (create_addrmap_from_aranges): Don't add objfile offsets.
5743         (dw2_find_pc_sect_compunit_symtab): Update.
5744         * mdebugread.c (parse_symbol): Don't add objfile offsets.
5745         (parse_lines): Remove 'pst' parameter, replace with 'textlow'.
5746         Update.
5747         (parse_partial_symbols): Don't add objfile offsets.  Use
5748         raw_text_low, raw_text_high.  Update.
5749         (handle_psymbol_enumerators, psymtab_to_symtab_1): Update.
5750         * objfiles.c (objfile_relocate1): Don't relocate psymtabs_addrmap
5751         or call 'relocate' quick function.  Clear psymbol_map.
5752         * psympriv.h (struct partial_symbol) <address>: Add section
5753         offset.
5754         <set_unrelocated_address>: Rename from set_address.
5755         <raw_text_low, raw_text_high>: New methods.
5756         <text_low, text_high>: Add objfile parameter.
5757         (add_psymbol_to_bcache): Add 'section' parameter.  Call
5758         set_unrelocated_address.
5759         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
5760         (find_pc_psymbol): Update.
5761         (fixup_psymbol_section, relocate_psymtabs): Remove.
5762         (dump_psymtab, psym_functions): Update.
5763         (add_psymbol_to_bcache, add_psymbol_to_list): Add 'section'
5764         parameter.
5765         (maintenance_info_psymtabs, maintenance_check_psymtabs): Update.
5766         (start_psymtab_common): Update.
5767         * symfile-debug.c (debug_qf_relocate): Remove.
5768         (debug_sym_quick_functions): Update.
5769         * symfile.h (struct quick_symbol_functions) <relocate>: Remove.
5770         * xcoffread.c (scan_xcoff_symtab): Don't add objfile offsets.
5771         Update.
5772
5773 2018-07-26  Tom Tromey  <tromey@redhat.com>
5774
5775         * dbxread.c (end_psymtab): Use text_high_valid and
5776         text_low_valid.
5777         * mdebugread.c (parse_partial_symbols): Use text_low_valid.
5778         (psymtab_to_symtab_1): Use text_high_valid and text_low_valid.
5779         * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
5780         Update comment.
5781         <text_low_valid, text_high_valid>: New fields.
5782         <set_text_low, set_text_high>: Update.
5783         * xcoffread.c (scan_xcoff_symtab): Use text_low_valid.
5784
5785 2018-07-26  Tom Tromey  <tom@tromey.com>
5786
5787         * dbxread.c (read_dbx_symtab, end_psymtab, read_ofile_symtab):
5788         Update.
5789         * dwarf2read.c (dwarf2_create_include_psymtab): Don't initialize
5790         textlow and texthigh fields.
5791         (process_psymtab_comp_unit_reader, dwarf2_build_include_psymtabs):
5792         Update.
5793         * mdebugread.c (parse_lines, parse_partial_symbols)
5794         (psymtab_to_symtab_1): Update.
5795         * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
5796         Rename fields.  Update comment.  Now private.
5797         <text_low, text_high, set_text_low, set_text_high>: New methods.
5798         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
5799         (find_pc_sect_psymbol, relocate_psymtabs, dump_psymtab)
5800         (start_psymtab_common, maintenance_info_psymtabs)
5801         (maintenance_check_psymtabs): Update.
5802         * xcoffread.c (xcoff_end_psymtab): Don't initialize textlow and
5803         texthigh fields.
5804         (scan_xcoff_symtab): Update.
5805
5806 2018-07-26  Tom Tromey  <tromey@redhat.com>
5807
5808         * psympriv.h (struct partial_symbol) <unrelocated_address,
5809         address, set_address>: New methods.
5810         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymbol)
5811         (fixup_psymbol_section, relocate_psymtabs): Update.
5812         (print_partial_symbols): Add 'objfile' parameter.  Update.
5813         (dump_psymtab, add_psymbol_to_bcache, psym_fill_psymbol_map):
5814         Update.
5815
5816 2018-07-26  Tom Tromey  <tom@tromey.com>
5817
5818         * dwarf-index-write.c (write_psymbols, debug_names::insert)
5819         (debug_names::write_psymbols): Update.
5820         * psympriv.h (struct partial_symbol): Derive from
5821         general_symbol_info.
5822         <obj_section>: New method.
5823         (PSYMBOL_DOMAIN, PSYMBOL_CLASS): Remove.n
5824         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
5825         (find_pc_sect_psymbol, fixup_psymbol_section)
5826         (match_partial_symbol, lookup_partial_symbol, relocate_psymtabs)
5827         (print_partial_symbols, recursively_search_psymtabs)
5828         (compare_psymbols, psymbol_hash, psymbol_compare)
5829         (add_psymbol_to_bcache, maintenance_check_psymtabs)
5830         (psymbol_name_matches, psym_fill_psymbol_map): Update.
5831
5832 2018-07-26  Tom Tromey  <tromey@redhat.com>
5833
5834         * dbxread.c (end_psymtab): Remove dead code.
5835
5836 2018-07-26  Andrew Burgess  <andrew.burgess@embecosm.com>
5837
5838         * dwarf2-frame-tailcall.c (tailcall_frame_sniffer): Exit early if
5839         DWARF unwinders are disabled.
5840         * dwarf2-frame.c: Add dwarf2read.h include.
5841         (dwarf2_frame_sniffer): Exit early if DWARF unwinders are
5842         disabled.
5843         (dwarf2_frame_unwinders_enabled_p): Define.
5844         (show_dwarf_unwinders_enabled_p): New function.
5845         (_initialize_dwarf2_frame): Register switch to control DWARF
5846         unwinder use.
5847         * dwarf2-frame.h (dwarf2_frame_unwinders_enabled_p): Declare.
5848         * dwarf2read.c (set_dwarf_cmdlist): Remove static keyword.
5849         (show_dwarf_cmdlist): Remove static keyword.
5850         * dwarf2read.h (set_dwarf_cmdlist): Declare.
5851         (show_dwarf_cmdlist): Declare.
5852         * NEWS: Document new feature.
5853
5854 2018-07-26  Tom de Vries  <tdevries@suse.de>
5855
5856         PR breakpoints/23366
5857         * infcmd.c (info_program_command): Handle ptid == minus_one_ptid.
5858
5859 2018-07-26  Tom de Vries  <tdevries@suse.de>
5860
5861         * dwarf2read.c (read_subrange_type): Warn if DW_AT_upper_bound or
5862         DW_AT_count can't be translated to a dynamic prop.
5863
5864 2018-07-25  Tom de Vries  <tdevries@suse.de>
5865
5866         * dwarf2loc.c (dwarf2_locexpr_baton_eval): Wrap ctx.eval call in
5867         try/catch.
5868
5869 2018-07-25  Jan Vrany  <jan.vrany@fit.cvut.cz>
5870
5871         * breakpoint.c (enable_disable_bp_num_loc): Notify observers.
5872
5873 2018-07-25  Joel Brobecker  <brobecker@adacore.com>
5874
5875         * MAINTAINERS (Global Maintainers): Add Tom Tromey.
5876
5877 2018-07-24  Keith Seitz  <keiths@redhat.comt
5878
5879         PR symtab/23010
5880         * dwarf2read.c (dw2_add_symbol_to_list): New function.
5881         (fixup_go_packaging, new_symbol): Use dw2_add_symbol_to_list
5882         instead of add_symbol_to_list.
5883         (read_file_scope): Call prepare_one_comp_unit before reading
5884         any other DIEs.
5885
5886 2018-07-24  Simon Marchi  <simon.marchi@ericsson.com>
5887
5888         * common/scoped_mmap.h (class scoped_mmap): Fix indentation.
5889
5890 2018-07-24  Tom Tromey  <tom@tromey.com>
5891
5892         * utils.c (malloc, realloc, free): Don't declare.
5893         * configure, config.in: Rebuild.
5894         * configure.ac: Don't check for declarations of free, malloc, or
5895         realloc.
5896
5897 2018-07-22  Simon Marchi  <simon.marchi@polymtl.ca>
5898
5899         * aarch64-linux-nat.c
5900         (aarch64_linux_nat_target::stopped_data_address): Remove unused
5901         variable.
5902         * arm-linux-nat.c (fetch_regs): Likewise.
5903         (store_regs): Likewise.
5904         (fetch_vfp_regs): Likewise.
5905         (store_vfp_regs): Likewise.
5906         (arm_linux_nat_target::insert_hw_breakpoint): Likewise.
5907         (arm_linux_nat_target::remove_hw_breakpoint): Likewise.
5908         (arm_linux_nat_target::insert_watchpoint): Likewise.
5909         (arm_linux_nat_target::remove_watchpoint): Likewise.
5910         * mips-linux-nat.c (mips_linux_nat_target::insert_watchpoint):
5911         Likewise.
5912         * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs):
5913         Likewise.
5914         * ppc-linux-nat.c (fetch_register): Likewise.
5915         (fetch_all_gp_regs): Likewise.
5916         (fetch_ppc_registers): Likewise.
5917         (store_all_gp_regs): Likewise.
5918         (store_ppc_registers): Likewise.
5919         (hwdebug_insert_point): Likewise.
5920         (can_use_watchpoint_cond_accel): Likewise.
5921         * remote-sim.c (gdb_os_write_stdout): Likewise.
5922
5923 2018-07-22  Simon Marchi  <simon.marchi@polymtl.ca>
5924             Tom Tromey  <tom@tromey.com>
5925
5926         * warning.m4 (AM_GDB_WARNINGS): Add -Wunused-variable and special
5927         test for it.
5928         * configure: Rebuild.
5929
5930 2018-07-22  Tom Tromey  <tom@tromey.com>
5931
5932         * regformats/regdat.sh: Define xmltarget_${name} inside
5933         #ifndef IN_PROCESS_AGENT.
5934
5935 2018-07-22  Tom Tromey  <tom@tromey.com>
5936
5937         * value.c (value_fetch_lazy_bitfield): Remove unused variable.
5938
5939 2018-07-22  Tom Tromey  <tom@tromey.com>
5940
5941         * symfile.c (reread_symbols): Notify iter, not objfile.
5942
5943 2018-07-22  Tom Tromey  <tom@tromey.com>
5944
5945         * ravenscar-thread.c (ravenscar_thread_target::store_registers):
5946         Use arch_ops.
5947         (ravenscar_thread_target::prepare_to_store): Likewise.
5948
5949 2018-07-22  Tom Tromey  <tom@tromey.com>
5950
5951         * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Remove
5952         unused variable.  Call value_fetch_lazy when needed.
5953         * guile/scm-pretty-print.c (gdbscm_apply_val_pretty_printer):
5954         Remove unused variable.  Call value_fetch_lazy when needed.
5955
5956 2018-07-22  Tom Tromey  <tom@tromey.com>
5957
5958         * m32c-tdep.c (mark_dma): Return void.
5959         (make_regs): Remove unused declarations.
5960
5961 2018-07-22  Tom Tromey  <tom@tromey.com>
5962
5963         * guile/scm-cmd.c (gdbscm_dont_repeat): Call
5964         cmdscm_get_valid_command_smob_arg_unsafe for effect.
5965         * guile/scm-block.c (gdbscm_make_block_syms_iter): Call
5966         bkscm_get_valid_block_smob_arg_unsafe for effect.
5967
5968 2018-07-22  Tom Tromey  <tom@tromey.com>
5969
5970         * bfin-tdep.c (bfin_push_dummy_call): Use arg_type, not
5971         value_type.
5972
5973 2018-07-22  Tom Tromey  <tom@tromey.com>
5974
5975         * windows-nat.c (saved_context): Conditionally define.
5976         * remote.c (remote_target::remote_btrace_maybe_reopen):
5977         Conditionally declare "warned".
5978         * inflow.c (sigquit_ours): Conditionally define.
5979         (new_tty): Move "tty" declaration inside #if.
5980         * guile/guile.c (guile_datadir): Conditionally define.
5981         * charset.c (set_be_le_names): Move some declarations inside #if.
5982         * btrace.c (parse_xml_btrace): Move "errcode" declaration inside
5983         #if.
5984         (parse_xml_btrace_conf): Likewise.
5985
5986 2018-07-22  Tom Tromey  <tom@tromey.com>
5987
5988         * spu-tdep.c (spu_get_overlay_table): Remove unused variable.
5989
5990 2018-07-22  Tom Tromey  <tom@tromey.com>
5991
5992         * guile/scm-value.c (gdbscm_value_call): Remove unused variables.
5993         * guile/scm-math.c (vlscm_unop_gdbthrow, vlscm_binop_gdbthrow)
5994         (vlscm_convert_typed_value_from_scheme): Remove unused variable.
5995         * buildsym-legacy.c (get_macro_table): Remove unused variable.
5996         * stack.c (frame_apply_level_command): Remove unused variable.
5997         * tic6x-tdep.c (tic6x_push_dummy_call): Remove unused variable.
5998         * sparc64-tdep.c (adi_examine_command): Remove unused variable.
5999         * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Remove
6000         unused variable.
6001         * nios2-tdep.c (nios2_push_dummy_call): Remove unused variable.
6002         * mep-tdep.c (mep_push_dummy_call): Remove unused variable.
6003         * ada-lang.c (ada_lookup_symbol_list_worker): Remove unused
6004         variable.
6005         * amd64-tdep.c (amd64_supply_xsave): Remove unused variable.
6006         * arm-tdep.c (arm_record_data_proc_misc_ld_str): Remove unused
6007         variable.
6008         * breakpoint.c (check_no_tracepoint_commands, update_watchpoint):
6009         Remove unused variable.
6010         * cli/cli-script.c (recurse_read_control_structure): Remove unused
6011         variable.
6012         * common/tdesc.c (print_xml_feature::visit): Remove unused
6013         variable.
6014         * compile/compile-object-load.c (store_regs): Remove unused
6015         variables.
6016         * complaints.c (clear_complaints): Remove unused variable.
6017         * corelow.c (core_target_open): Remove unused variable.
6018         * fbsd-tdep.c (fbsd_core_info_proc_status): Remove unused
6019         variable.
6020         * guile/scm-frame.c (gdbscm_frame_read_var): Remove unused
6021         variable.
6022         * guile/scm-symtab.c (stscm_print_sal_smob): Remove unused
6023         variable.
6024         * guile/scm-type.c (gdbscm_field_baseclass_p): Remove unused
6025         variable.
6026         * guile/scm-utils.c (gdbscm_parse_function_args): Remove unused
6027         variable.
6028         * hppa-tdep.c (hppa_stub_frame_unwind_cache): Remove unused
6029         variable.
6030         * ia64-tdep.c (examine_prologue): Remove unused variable.
6031         * infcall.c (run_inferior_call): Remove unused variable.
6032         * inferior.c (exit_inferior): Remove unused variable.
6033         * infrun.c (infrun_thread_ptid_changed): Remove unused variable.
6034         * linespec.c (decode_line_2): Remove unused variable.
6035         * linux-nat.c (super_close): Remove.
6036         * linux-tdep.c (linux_info_proc): Remove unused variable.
6037         * mi/mi-main.c (mi_execute_command): Remove unused variable.
6038         * microblaze-linux-tdep.c (microblaze_linux_sigtramp_cache):
6039         Remove unused variable.
6040         * parse.c (find_minsym_type_and_address): Remove unused variable.
6041         * printcmd.c (info_symbol_command, printf_floating): Remove unused
6042         variable.
6043         * python/py-breakpoint.c (bppy_set_commands): Remove unused
6044         variable.
6045         * python/py-unwind.c (unwind_infopy_dealloc): Remove unused
6046         variables.
6047         * record-btrace.c (record_btrace_target::store_registers): Remove
6048         unused variable.
6049         (cmd_show_record_btrace_cpu): Remove unused variable.
6050         * riscv-tdep.c (riscv_register_reggroup_p)
6051         (riscv_push_dummy_call, riscv_return_value): Remove unused
6052         variable.
6053         * rust-exp.y (literal): Remove unused variable.
6054         * rust-lang.c (rust_evaluate_subexp) <OP_RUST_ARARAY>: Remove
6055         unused variable.
6056         <STRUCTOP_ANONYMOUS>: Likewise.
6057         * s390-linux-tdep.c (s390_linux_init_abi_31)
6058         (s390_linux_init_abi_64): Remove unused variable.
6059         * ser-ming2.c (ser_windows_read_prim, pipe_select_thread)
6060         (file_select_thread, net_windows_open, _initialize_ser_windows):
6061         Remove unused variables.
6062         * symtab.c (find_pc_sect_line): Remove unused variable.
6063         * target-memory.c (compute_garbled_blocks): Remove unused
6064         variable.
6065         (target_write_memory_blocks): Remove unused variable.
6066         * target.c (target_stack::unpush): Remove unused variables.
6067         * tracepoint.c (start_tracing, all_tracepoint_actions)
6068         (merge_uploaded_trace_state_variables)
6069         (print_one_static_tracepoint_marker): Remove unused variable.
6070         * unittests/basic_string_view/element_access/char/1.cc (test01):
6071         Remove unused variable.
6072         * windows-nat.c (windows_continue, windows_add_all_dlls)
6073         (do_initial_windows_stuff, windows_nat_target::create_inferior):
6074         Remove unused variables.
6075
6076 2018-07-21  Simon Marchi  <simon.marchi@polymtl.ca>
6077
6078         * arm-tdep.c (arm_gdbarch_init): Declare attr_arch and
6079         attr_profile in HAVE_ELF.
6080         * rs6000-tdep.c (bfd_uses_spe_extensions): Declare vector_abi in
6081         HAVE_ELF.
6082
6083 2018-07-20  Simon Marchi  <simon.marchi@polymtl.ca>
6084
6085         * frame.c (frame_register_unwind): Change parameter name.
6086         (frame_unwind_register): Likewise.
6087         (frame_unwind_register_value): Likewise.
6088         (frame_unwind_register_signed): Likewise.
6089         (frame_unwind_register_unsigned): Likewise.
6090         * frame.h (frame_register_unwind): Likewise.
6091         (frame_unwind_register): Likewise.
6092         (frame_unwind_register_value): Likewise.
6093         (frame_unwind_register_signed): Likewise.
6094         (frame_unwind_register_unsigned): Likewise.
6095         (frame_unwind_arch): Likewise.
6096
6097 2018-07-20  Maciej W. Rozycki  <macro@mips.com>
6098
6099         * MAINTAINERS: Update my e-mail address, downgrade to MIPS I-IV
6100         ISA maintenance.
6101
6102 2018-07-20  Maciej W. Rozycki  <macro@mips.com>
6103
6104         * mips-linux-nat.c (mips_linux_nat_target::read_description):
6105         Call `get_ptrace_pid' rather than extracting the ptrace PID by
6106         hand.
6107
6108 2018-07-20  Keith Seitz  <keiths@redhat.com>
6109
6110         * buildsym.h (struct buildsym_compunit) <m_objfile, m_subfiles,
6111         m_main_subfile, m_comp_dir, m_producer, m_debugformat,
6112         m_compunit_symtab, m_language>: Add "m_" prefix.
6113         Update all uses.
6114         * buildsym.c: Update all uses.
6115
6116 2018-07-20  Tom Tromey  <tom@tromey.com>
6117
6118         * buildsym-legacy.h (record_line): Don't use record_line_ftype.
6119         * buildsym.h (record_line_ftype): Remove typedef.
6120
6121 2018-07-20  Tom Tromey  <tom@tromey.com>
6122
6123         * buildsym-legacy.h (augment_type_symtab): Don't declare.
6124         (end_expandable_symtab): Likewise.
6125         (end_symtab_get_static_block): Likewise.
6126         (end_symtab_from_static_block): Likewise.
6127         * buildsym-legacy.c (augment_type_symtab): Remove.
6128         (end_expandable_symtab): Remove.
6129         (end_symtab_get_static_block): Remove.
6130         (end_symtab_from_static_block): Remove.
6131
6132 2018-07-20  Tom Tromey  <tom@tromey.com>
6133
6134         * dwarf2read.c: Include buildsym.h.
6135         (struct dwarf2_cu) <builder>: New method.
6136         (fixup_go_packaging): Update.
6137         (process_full_comp_unit, process_full_type_unit): Update.  Don't
6138         use scoped_free_pendings.
6139         (using_directives): Add "cu" parameter, remove "language".
6140         (read_import_statement, setup_type_unit_groups, )
6141         (read_func_scope, read_lexical_block_scope)
6142         (dwarf2_record_block_ranges, read_namespace): Update.
6143         (lnp_state_machine::lnp_state_machine): Add cu parameter.
6144         (lnp_state_machine::handle_end_sequence): Update.
6145         (class lnp_state_machine) <m_cu>: New member.
6146         <m_record_line_callback>: Remove.
6147         <m_currently_recording_lines>: New member.
6148         (lnp_state_machine::handle_set_file): Update.
6149         (noop_record_line): Remove.
6150         (dwarf_record_line_p): Add cu parameter.
6151         (dwarf_record_line_1, dwarf_finish_line): Likewise.
6152         (lnp_state_machine::record_line)
6153         (lnp_state_machine::lnp_state_machine)
6154         (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
6155         (dwarf_decode_lines): Update.
6156         (dwarf2_start_subfile): Add cu parameter.
6157         (dwarf2_start_symtab, new_symbol): Update.
6158         (macro_start_file, dwarf_decode_macro_bytes): Add cu parameter.
6159         Remove dwarf2_per_objfile parameter.
6160         (dwarf_decode_macros): Update.
6161
6162 2018-07-20  Tom Tromey  <tom@tromey.com>
6163
6164         * stabsread.c (define_symbol): Update.
6165         * buildsym-legacy.h (get_buildsym_compunit): Declare.
6166         * dwarf2read.c (new_symbol): Update.
6167         * cp-support.h (cp_scan_for_anonymous_namespaces): Update.
6168         * cp-namespace.c: Include buildsym.h.
6169         (cp_scan_for_anonymous_namespaces): Add "compunit" parameter.
6170         * buildsym-legacy.c (get_buildsym_compunit): New function.
6171
6172 2018-07-20  Tom Tromey  <tom@tromey.com>
6173
6174         * xcoffread.c: Include buildsym-legacy.h.
6175         * windows-nat.c: Include buildsym-legacy.h.
6176         * stabsread.c: Include buildsym-legacy.h.
6177         * mdebugread.c: Include buildsym-legacy.h.
6178         * buildsym-legacy.h: New file.
6179         * buildsym-legacy.c: New file, from buildsym.c.
6180         * go32-nat.c: Include buildsym-legacy.h.
6181         * dwarf2read.c: Include buildsym-legacy.h.
6182         * dbxread.c: Include buildsym-legacy.h.
6183         * cp-namespace.c: Include buildsym-legacy.h.
6184         * coffread.c: Include buildsym-legacy.h.
6185         * buildsym.h: Move some contents to buildsym-legacy.h.
6186         * buildsym.c: Include buildsym-legacy.h.  Move many functions to
6187         buildsym-legacy.c.
6188         * Makefile.in (HFILES_NO_SRCDIR): Add buildsym-legacy.h.
6189
6190 2018-07-20  Tom Tromey  <tom@tromey.com>
6191
6192         * buildsym.h (struct buildsym_compunit): Move from buildsym.c.
6193         * buildsym.c (struct buildsym_compunit): Move to buildsym.h.
6194         (buildsym_compunit::buildsym_compunit)
6195         (buildsym_compunit::~buildsym_compunit)
6196         (buildsym_compunit::get_macro_table): Define.
6197
6198 2018-07-20  Tom Tromey  <tom@tromey.com>
6199
6200         * buildsym.c (reset_symtab_globals): Remove.
6201         (buildsym_compunit::end_symtab_from_static_block): Update.
6202         (buildsym_compunit::augment_type_symtab): Update.
6203         (end_symtab_from_static_block): Call free_buildsym_compunit.
6204         (augment_type_symtab, end_symtab, end_expandable_symtab):
6205         Likewise.
6206
6207 2018-07-20  Tom Tromey  <tom@tromey.com>
6208
6209         * arch-utils.c: Do not include buildsym.h.
6210         * mipsread.c: Do not include buildsym.h.
6211         * machoread.c: Do not include buildsym.h.
6212         * elfread.c: Do not include buildsym.h.
6213
6214 2018-07-20  Tom Tromey  <tom@tromey.com>
6215
6216         * buildsym.c (buildsym_compunit::buildsym_compunit): Do more
6217         initialization.
6218         (buildsym_compunit): Add new constructor.
6219         (struct buildsym_compunit) <get_last_source_file, finish_block,
6220         record_block_range, start_subfile, patch_subfile_names,
6221         push_subfile, pop_subfile, record_line, get_compunit_symtab,
6222         set_last_source_start_addr, get_last_source_start_addr,
6223         get_local_using_directives, set_local_using_directives,
6224         get_global_using_directives, outermost_context_p,
6225         get_current_context_stack, get_context_stack_depth,
6226         get_current_subfile, get_local_symbols, get_file_symbols,
6227         get_global_symbols, record_debugformat, record_producer,
6228         push_context, pop_context, end_symtab_get_static_block,
6229         end_symtab_from_static_block, end_symtab, end_expandable_symtab>:
6230         New public methods.
6231         <record_pending_block, finish_block_internal, make_blockvector,
6232         watch_main_source_file_lossage, end_symtab_with_blockvector>: New
6233         private methods.
6234         Update all users.
6235
6236 2018-05-22  Tom Tromey  <tom@tromey.com>
6237
6238         * buildsym.c (record_pending_block): Move earlier.  Remove objfile
6239         parameter.
6240         (finish_block_internal): Update.
6241
6242 2018-07-20  Tom Tromey  <tom@tromey.com>
6243
6244         * buildsym.c (record_pending_block): Move earlier.  Remove objfile
6245         parameter.
6246         (finish_block_internal): Update.
6247
6248 2018-07-20  Tom Tromey  <tom@tromey.com>
6249
6250         * buildsym.h (EXTERN): Don't define or undef.
6251         * buildsym.c (EXTERN): Don't define.
6252
6253 2018-07-20  Tom Tromey  <tom@tromey.com>
6254
6255         * buildsym.c: Remove TODO comment.
6256
6257 2018-07-20  Tom Tromey  <tom@tromey.com>
6258
6259         * coffread.c (coff_symtab_read): Update.
6260         * xcoffread.c (xcoff_psymtab_to_symtab_1): Update.
6261         (xcoff_new_init): Update.
6262         * mipsread.c (mipscoff_new_init): Update.
6263         * mdebugread.c (mdebug_build_psymtabs): Update.
6264         * elfread.c (elf_new_init): Update.
6265         * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
6266         Update.
6267         * dbxread.c (dbx_new_init, dbx_psymtab_to_symtab_1)
6268         (coffstab_build_psymtabs, elfstab_build_psymtabs)
6269         (stabsect_build_psymtabs): Update.
6270         * buildsym.h (buildsym_init): Don't declare.
6271         * buildsym.c: Update comment.
6272         (prepare_for_building): Remove.
6273         (start_symtab, restart_symtab): Update.
6274         (reset_symtab_globals): Update comment.
6275         (buildsym_init): Remove.
6276
6277 2018-07-20  Tom Tromey  <tom@tromey.com>
6278
6279         * xcoffread.c (read_xcoff_symtab, process_xcoff_symbol): Update.
6280         * stabsread.c (patch_block_stabs, define_symbol, read_type)
6281         (read_enum_type, common_block_start, common_block_end)
6282         (cleanup_undefined_types_1, finish_global_stabs): Update.
6283         * mdebugread.c (psymtab_to_symtab_1): Update.
6284         * dwarf2read.c (fixup_go_packaging, read_func_scope)
6285         (read_lexical_block_scope, new_symbol): Update.
6286         * dbxread.c (process_one_symbol): Update.
6287         * coffread.c (coff_symtab_read, process_coff_symbol)
6288         (coff_read_enum_type): Update.
6289         * buildsym.h (file_symbols, global_symbols, local_symbols): Don't
6290         declare.
6291         (get_local_symbols, get_file_symbols, get_global_symbols): New
6292         functions.
6293         * buildsym.c (~buildsym_compunit): Clean up m_file_symbols and
6294         m_global_symbols.
6295         <m_file_symbols, m_local_symbols, m_global_symbols>: New members.
6296         (~scoped_free_pendings): Update.
6297         (finish_block, prepare_for_building, reset_symtab_globals)
6298         (end_symtab_get_static_block, end_symtab_with_blockvector)
6299         (augment_type_symtab, push_context): Update.
6300         (get_local_symbols, get_file_symbols, get_global_symbols): New
6301         functions.
6302         (buildsym_init): Update.
6303
6304 2018-07-20  Tom Tromey  <tom@tromey.com>
6305
6306         * dwarf2read.c (process_full_comp_unit): Do not set list_in_scope.
6307         (process_full_type_unit): Likewise.
6308         (dwarf2_start_symtab): Set list_in_scope.
6309
6310 2018-07-20  Tom Tromey  <tom@tromey.com>
6311
6312         * dwarf2read.c (process_psymtab_comp_unit_reader)
6313         (build_type_psymtabs_reader): Do not set list_in_scope.
6314
6315 2018-07-20  Tom Tromey  <tom@tromey.com>
6316
6317         * buildsym.c (free_pendings): Remove.
6318         (add_symbol_to_list, scoped_free_pendings)
6319         (finish_block_internal, buildsym_init): Update.
6320
6321 2018-07-20  Tom Tromey  <tom@tromey.com>
6322
6323         * xcoffread.c (read_xcoff_symtab): Update.
6324         * dwarf2read.c (read_func_scope, read_lexical_block_scope):
6325         Update.
6326         * dbxread.c (process_one_symbol): Update.
6327         * coffread.c (coff_symtab_read): Update.
6328         * buildsym.h (finish_block): Update.
6329         * buildsym.c (finish_block): Remove "listhead" argument.
6330         (end_symtab_get_static_block): Update.
6331
6332 2018-07-20  Tom Tromey  <tom@tromey.com>
6333
6334         * buildsym.h (class scoped_free_pendings): Remove constructor.
6335         * buildsym.c (struct buildsym_compunit) <free_pending_blocks>: New
6336         method.
6337         <m_pending_block_obstack, m_pending_blocks>: New members.
6338         (pending_block_obstack, pending_blocks): Remove.
6339         (scoped_free_pendings::scoped_free_pendings): Default.
6340         (~scoped_free_pendings): Update.
6341         (free_pending_blocks): Remove.
6342         (finish_block_internal, record_pending_block, make_blockvector)
6343         (end_symtab_get_static_block, augment_type_symtab, push_context)
6344         (buildsym_init): Update.
6345
6346 2018-07-20  Tom Tromey  <tom@tromey.com>
6347
6348         * buildsym.c (struct buildsym_compunit) <m_pending_addrmap,
6349         m_pending_addrmap_obstack, m_pending_addrmap_interesting>: New
6350         members.
6351         (pending_addrmap, pending_addrmap_obstack)
6352         (pending_addrmap_interesting): Remove.
6353         (scoped_free_pendings, record_block_range, make_blockvector)
6354         (prepare_for_building, reset_symtab_globals, buildsym_init):
6355         Update.
6356
6357 2018-07-20  Tom Tromey  <tom@tromey.com>
6358
6359         * xcoffread.c (process_linenos): Update.
6360         * stabsread.c (define_symbol, read_type, read_enum_type): Update.
6361         * mdebugread.c (psymtab_to_symtab_1): Update.
6362         * dwarf2read.c (setup_type_unit_groups)
6363         (lnp_state_machine::handle_set_file, dwarf_record_line_p)
6364         (lnp_state_machine::record_line, dwarf_decode_lines): Update.
6365         * dbxread.c (process_one_symbol): Update.
6366         * coffread.c (coff_symtab_read, enter_linenos)
6367         (process_coff_symbol): Update.
6368         * buildsym.h (current_subfile): Don't declare.
6369         (get_current_subfile): Declare.
6370         * buildsym.c (struct buildsym_compunit) <m_current_subfile>: New
6371         member.
6372         (start_subfile, free_buildsym_compunit, push_subfile)
6373         (prepare_for_building, start_symtab): Update.
6374         (get_current_subfile): New function.
6375
6376 2018-07-20  Tom Tromey  <tom@tromey.com>
6377
6378         * coffread.c (coff_symtab_read): Update.
6379         * xcoffread.c (read_xcoff_symtab): Update.
6380         * dwarf2read.c (new_symbol): Update.
6381         (read_func_scope, read_lexical_block_scope): Update.
6382         * dbxread.c (process_one_symbol): Update.
6383         * buildsym.h (context_stack, context_stack_depth): Don't declare.
6384         (outermost_context_p): Remove macro.
6385         (outermost_context_p, get_current_context_stack)
6386         (get_context_stack_depth): Declare.
6387         (pop_context): Return struct context_stack.
6388         * buildsym.c (struct buildsym_compunit) <m_context_stack: New
6389         member.
6390         (context_stack_size): Remove.
6391         (INITIAL_CONTEXT_STACK_SIZE): Remove.
6392         (prepare_for_building, end_symtab_get_static_block)
6393         (augment_type_symtab, push_context): Update.
6394         (pop_context): Return struct context_stack.
6395         (outermost_context_p, get_current_context_stack)
6396         (get_context_stack_depth): New functions.
6397         (buildsym_init): Update.
6398
6399 2018-07-20  Tom Tromey  <tom@tromey.com>
6400
6401         * rust-exp.y: Now a pure parser.  Update all rules.
6402         (%union): Move earlier.
6403         (current_parser, work_obstack): Remove globals.
6404         (rust_parser, ~rust_parser): Update.
6405         (class rust_parser) <copy_name, concat3, crate_name, super_name,
6406         lex_character, lex_number, lex_string, lex_identifier,
6407         rust_lookup_type, convert_params_to_types, convert_ast_to_type,
6408         convert_name, convert_params_to_expression,
6409         convert_ast_to_expression, ast_basic_type, ast_operation,
6410         ast_compound_assignment, rust_op, ast_literal, ast_dliteral,
6411         ast_structop, ast_structop_anonymous, ast_unary, ast_cast,
6412         ast_call_ish, ast_path, ast_string, ast_struct, ast_range,
6413         ast_array_type, ast_slice_type, ast_reference_type,
6414         ast_pointer_type, ast_function_type, ast_tuple_type>: New methods.
6415         (rust_parse): Update.
6416         (rustyyerror, rustyylex): Add parser parameter.
6417         (rust_lex_test_one, rust_lex_int_test, rust_lex_exception_test)
6418         (rust_lex_stringish_test, rust_lex_test_sequence)
6419         (rust_lex_test_trailing_dot, rust_lex_test_completion)
6420         (rust_lex_test_push_back, rust_lex_tests): Update.
6421
6422 2018-07-19  Pedro Alves  <palves@redhat.com>
6423
6424         * guile/guile-internal.h (gdbscm_scm_to_c_string): Now returns a
6425         gdb::unique_xmalloc_ptr.
6426         * guile/scm-breakpoint.c (gdbscm_set_breakpoint_condition_x):
6427         Adjust to use dbscm_wrap and gdb::unique_xmalloc_ptr.
6428         * guile/scm-exception.c (gdbscm_exception_message_to_string): Use
6429         copy-initialization.
6430         * guile/scm-pretty-print.c (ppscm_print_children): Use
6431         gdb::unique_xmalloc_ptr instead of cleanups.
6432         (gdbscm_apply_val_pretty_printer): Remove cleanups.
6433         * guile/scm-string.c (gdbscm_scm_to_c_string): Now returns a
6434         gdb::unique_xmalloc_ptr.
6435         * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
6436         Adjust to use gdb::unique_xmalloc_ptr.
6437         * guile/scm-utils.c (extract_arg): Adjust.
6438         * guile/scm-value.c (gdbscm_value_field): Adjust to use
6439         gdb::unique_xmalloc_ptr instead of a cleanup.
6440
6441 2018-07-19  Tom Tromey  <tom@tromey.com>
6442
6443         * utils.c (do_value_free_to_mark)
6444         (make_cleanup_value_free_to_mark): Remove.
6445         * utils.h (make_cleanup_value_free_to_mark): Remove.
6446
6447 2018-07-19  Pedro Alves  <palves@redhat.com>
6448
6449         * guile/guile-internal.h (gdbscm_wrap): Really make 'args' a
6450         forwarding reference.
6451
6452 2018-07-18  Pedro Alves  <palves@redhat.com>
6453
6454         * guile/guile.c (gdbscm_execute_gdb_command): Adjust to use
6455         gdbscm_wrap.  Use gdb::unique_xmalloc_ptr<char> instead of a
6456         cleanup.
6457
6458 2018-07-18  Pedro Alves  <palves@redhat.com>
6459
6460         * guile/guile-internal.h: Add comment about mixing GDB and Scheme
6461         exceptions.
6462         (GDBSCM_HANDLE_GDB_EXCEPTION_WITH_CLEANUPS): Delete.
6463         (gdbscm_wrap): New.
6464         * guile/scm-frame.c (gdbscm_frame_read_register): Use xfree
6465         directly instead of a cleanup.
6466         * guile/scm-math.c (vlscm_unop_gdbthrow): New, factored out from ...
6467         (vlscm_unop): ... this.  Reimplement using gdbscm_wrap.
6468         (vlscm_binop_gdbthrow): New, factored out from ...
6469         (vlscm_binop): ... this.  Reimplement using gdbscm_wrap.
6470         (vlscm_rich_compare): Use gdbscm_wrap.
6471         * guile/scm-symbol.c (gdbscm_lookup_symbol): Use xfree directly
6472         instead of a cleanup.
6473         (gdbscm_lookup_global_symbol): Use xfree directly instead of a
6474         cleanup.
6475         * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
6476         Use xfree directly instead of a cleanup.
6477         * guile/scm-value.c (gdbscm_make_value, gdbscm_make_lazy_value):
6478         Adjust to use gdbscm_wrap and scoped_value_mark.
6479         (gdbscm_value_optimized_out_p): Adjust to use gdbscm_wrap.
6480         (gdbscm_value_address, gdbscm_value_dereference)
6481         (gdbscm_value_referenced_value): Adjust to use gdbscm_wrap and
6482         scoped_value_mark.
6483         (gdbscm_value_dynamic_type): Use scoped_value_mark.
6484         (vlscm_do_cast, gdbscm_value_field): Adjust to use gdbscm_wrap and
6485         scoped_value_mark.
6486         (gdbscm_value_subscript, gdbscm_value_call): Adjust to use
6487         gdbscm_wrap and scoped_value_mark.
6488         (gdbscm_value_to_string): Use xfree directly instead of a
6489         cleanup.  Move 'buffer' unique_ptr to TRY scope.
6490         (gdbscm_value_to_lazy_string): Use xfree directly instead of a
6491         cleanup.  Move 'buffer' unique_ptr to TRY scope.  Use
6492         scoped_value_mark.
6493         (gdbscm_value_fetch_lazy_x): Use gdbscm_wrap.
6494         (gdbscm_parse_and_eval): Adjust to use gdbscm_wrap and
6495         scoped_value_mark.
6496         (gdbscm_history_ref, gdbscm_history_append_x): Adjust to use
6497         gdbscm_wrap.
6498
6499 2018-07-18  Tom de Vries  <tdevries@suse.de>
6500
6501         * findvar.c (default_read_var_value): Also resolve dynamic type for
6502         LOC_OPTIMIZED_OUT vars.
6503
6504 2018-07-18  Maciej W. Rozycki  <macro@mips.com>
6505
6506         * mips-tdep.c (micromips_next_pc): Add SYSCALL instruction
6507         decoding.
6508
6509 2018-07-17  Tom Tromey  <tom@tromey.com>
6510
6511         * guile/scm-param.c (pascm_set_func, pascm_show_func)
6512         (compute_enum_list, pascm_set_param_value_x)
6513         (gdbscm_parameter_value): Update.
6514         * guile/guile-internal.h (gdbscm_scm_to_string): Update.
6515         (gdbscm_scm_to_host_string): Update.
6516         * guile/scm-math.c (vlscm_convert_typed_value_from_scheme):
6517         Update.
6518         * guile/scm-cmd.c (cmdscm_add_completion): Update.
6519         * guile/scm-pretty-print.c (ppscm_print_string_repr): Update.
6520         * guile/scm-string.c (gdbscm_scm_to_string): Return
6521         unique_xmalloc_ptr.
6522         (gdbscm_scm_to_host_string): Likewise.
6523
6524 2018-07-17  Tom Tromey  <tom@tromey.com>
6525
6526         * guile/guile.c (gdbscm_eval_from_control_command): Update.
6527         * guile/guile-internal.h (gdbscm_safe_eval_string): Update.
6528         * guile/scm-objfile.c (gdbscm_execute_objfile_script): Update.
6529         * guile/scm-safe-call.c (gdbscm_safe_eval_string): Return
6530         unique_xmalloc_ptr.
6531
6532 2018-07-17  Tom Tromey  <tom@tromey.com>
6533
6534         * guile/scm-param.c (pascm_signal_setshow_error): Update.
6535         * guile/guile-internal.h (gdbscm_exception_message_to_string):
6536         Update.
6537         * guile/scm-cmd.c (cmdscm_function): Update.
6538         * guile/scm-pretty-print.c
6539         (ppscm_print_exception_unless_memory_error): Update.
6540         * guile/scm-exception.c (gdbscm_exception_message_to_string):
6541         Return unique_xmalloc_ptr.
6542
6543 2018-07-17  Tom Tromey  <tom@tromey.com>
6544
6545         * guile/scm-pretty-print.c (ppscm_make_pp_type_error_exception):
6546         Use string_printf.
6547
6548 2018-07-17  Jim Wilson  <jimw@sifive.com>
6549
6550         * riscv-tdep.c (riscv_has_feature): Delete comment that refers to
6551         set_gdbarch_decr_pc_after_break.  Call riscv_read_misa_reg always.
6552         (riscv_gdbarch_init): Delete local has_compressed_isa.  Delete now
6553         unecessary braces after EF_RISCV_RVC test.  Delete call to
6554         set_gdbarch_decr_pc_after_break.
6555
6556         * riscv-tdep.h (DECLARE_CSR): Use RISCV_FIRST_CSR_REGNUM instead of
6557         RISCV_LAST_FP_REGNUM + 1.
6558         (RSICV_CSR_LEGACY_MISA_REGNUM): Add RISCV_FIRST_CSR_REGNUM.
6559
6560 2018-07-17  Tom Tromey  <tom@tromey.com>
6561
6562         * configure.ac: Remove --disable-gdbcli.
6563         * configure: Rebuild.
6564         * Makefile.in (SUBDIR_CLI_DEPS, SUBDIR_CLI_LDFLAGS)
6565         (SUBDIR_CLI_CFLAGS): Remove.
6566         (SFILES): Use SUBDIR_CLI_SRCS.
6567         (COMMON_OBS): Use SUBDIR_CLI_OBS.
6568
6569 2018-07-17  Tom Tromey  <tom@tromey.com>
6570
6571         PR gdb/18624:
6572         * coffread.c (coff_symtab_read): Use scoped_free_pendings.
6573
6574 2018-07-16  Jim Wilson  <jimw@sifive.com>
6575
6576         * riscv-tdep.c (riscv_gdbarch_init): Call gdbarch_init_osabi.
6577
6578 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
6579
6580         * ia64-libunwind-tdep.c (libunwind_frame_cache): Remove unused
6581         variable.
6582         (libunwind_frame_sniffer): Likewise.
6583         (libunwind_frame_prev_register): Likewise.
6584         (libunwind_sigtramp_frame_sniffer): Likewise.
6585         * ia64-tdep.c (ia64_access_reg): Likewise.
6586         (ia64_access_rse_reg): Likewise.
6587         (ia64_libunwind_sigtramp_frame_this_id): Likewise.
6588         * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Likewise.
6589
6590 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
6591
6592         * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Add cast.
6593
6594 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
6595
6596         * remote-sim.c (gdbsim_target::close,
6597         gdbsim_target::mourn_inferior): Remove unused variables.
6598
6599 2018-07-16  Simon Marchi  <simon.marchi@polymtl.ca>
6600
6601         * ia64-tdep.c (ktab_buf): New global.
6602         (getunwind_table): Return a gdb::optional<gdb::byte_vector>.
6603         (get_kernel_table): Adjust.
6604
6605 2018-07-16  Tom Tromey  <tom@tromey.com>
6606
6607         * xcoffread.c (read_xcoff_symtab): Use outermost_context_p.
6608         * dwarf2read.c (using_directives, new_symbol): Use
6609         outermost_context_p.
6610         * dbxread.c (process_one_symbol): Use outermost_context_p.
6611         * coffread.c (coff_symtab_read): Use outermost_context_p.
6612
6613 2018-07-16  Tom Tromey  <tom@tromey.com>
6614
6615         * dwarf2read.c (using_directives, read_func_scope)
6616         (read_lexical_block_scope): Update.
6617         * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
6618         * buildsym.h (local_using_directives, global_using_directives):
6619         Don't declare.
6620         (get_local_using_directives, set_local_using_directives)
6621         (get_global_using_directives): Declare.
6622         * buildsym.c (struct buildsym_compunit) <m_local_using_directives,
6623         m_global_using_directives>: New members.
6624         (finish_block_internal, prepare_for_building)
6625         (reset_symtab_globals, end_symtab_get_static_block)
6626         (push_context): Update.
6627         (get_local_using_directives, set_local_using_directives)
6628         (get_global_using_directives): New functions.
6629         (buildsym_init): Update.
6630
6631 2018-07-16  Tom Tromey  <tom@tromey.com>
6632
6633         * xcoffread.c (xcoff_initial_scan): Don't call
6634         free_pending_blocks.
6635         * dbxread.c (dbx_symfile_read): Don't call free_pending_blocks.
6636         * buildsym.h (class scoped_free_pendings): Add constructor.
6637         (free_pending_blocks): Don't declare.
6638         * buildsym.c (scoped_free_pendings::scoped_free_pendings): New.
6639         (free_pending_blocks): Now static.
6640
6641 2018-07-16  Tom Tromey  <tom@tromey.com>
6642
6643         * buildsym.h (push_subfile, pop_subfile): Update declarations.
6644         * buildsym.c (struct buildsym_compunit) <m_subfile_stack>: New
6645         member.
6646         (struct subfile_stack): Remove.
6647         (subfile_stack): Remove.
6648         (push_subfile, pop_subfile, buildsym_init): Update.
6649
6650 2018-07-16  Tom Tromey  <tom@tromey.com>
6651
6652         * buildsym.c (push_subfile): Use gdb_assert.
6653         (pop_subfile): Use gdb_assert.
6654
6655 2018-07-16  Tom Tromey  <tom@tromey.com>
6656
6657         * buildsym.h (merge_symbol_lists): Remove.
6658         * buildsym.c (merge_symbol_lists): Remove.
6659
6660 2018-07-16  Tom Tromey  <tom@tromey.com>
6661
6662         * stabsread.c (scan_file_globals): Update comment.
6663         * stabsread.h (scan_file_globals): Move from buildsym.h.
6664         * buildsym.h (scan_file_globals): Move to stabsread.h.
6665
6666 2018-07-16  Tom Tromey  <tom@tromey.com>
6667
6668         * xcoffread.c (xcoff_new_init): Update.
6669         * mipsread.c (mipscoff_new_init): Update.
6670         * mdebugread.c (mdebug_build_psymtabs): Update.
6671         * elfread.c (elf_new_init): Update.
6672         * dbxread.c (dbx_new_init, coffstab_build_psymtabs)
6673         (elfstab_build_psymtabs, stabsect_build_psymtabs): Update.
6674         * buildsym.h (buildsym_new_init): Don't declare.
6675         * buildsym.c (buildsym_new_init): Remove.
6676
6677 2018-07-16  Tom Tromey  <tom@tromey.com>
6678
6679         * stabsread.h (within_function): Move from buildsym.h.
6680         * stabsread.c (start_stabs): Clear within_function.
6681         * coffread.c (coff_start_symtab): Clear within_function.
6682         * buildsym.h (within_function): Move to stabsread.h.
6683         * buildsym.c (prepare_for_building): Update.
6684
6685 2018-07-16  Tom Tromey  <tom@tromey.com>
6686
6687         * stabsread.h (processing_gcc_compilation): Move from buildsym.h.
6688         * dwarf2read.c (dwarf2_start_symtab): Don't set
6689         processing_gcc_compilation.
6690         * buildsym.h (processing_gcc_compilation): Move to stabsread.h.
6691
6692 2018-07-16  Tom Tromey  <tom@tromey.com>
6693
6694         * stabsread.h (HASHSIZE, hashname, symnum, next_symbol_text)
6695         (next_symbol_text_func): Move from buildsym.h.
6696         * stabsread.c (hashname): Move from buildsym.c.
6697         * buildsym.h (HASHSIZE, symnum, next_symbol_text)
6698         (next_symbol_text_func, hashname): Move to stabsread.h.
6699         * buildsym.c: Don't include bcache.h
6700         (hashname): Move to stasbread.c.
6701
6702 2018-07-16  Tom Tromey  <tom@tromey.com>
6703
6704         * buildsym.h (context_stack_size): Don't declare.
6705         * buildsym.c (context_stack_size): New global.
6706
6707 2018-07-16  Tom Tromey  <tom@tromey.com>
6708
6709         * dbxread.c (processing_acc_compilation): New global.
6710         * buildsym.h (processing_acc_compilation): Don't declare.
6711
6712 2018-07-16  Tom Tromey  <tom@tromey.com>
6713
6714         * xcoffread.c (aix_process_linenos, complete_symtab): Update.
6715         * dbxread.c (read_ofile_symtab): Update.
6716         * coffread.c (coff_start_symtab, coff_end_symtab): Update.
6717         * buildsym.h (last_source_start_addr): Remove.
6718         (set_last_source_start_addr, get_last_source_start_addr):
6719         Declare.
6720         * buildsym.c (buildsym_compunit::buildsym_compunit): Add last_addr
6721         parameter.
6722         (struct buildsym_compunit) <m_last_source_start_addr>: New
6723         member.
6724         (prepare_for_building): Remove start_addr parameter.
6725         (start_symtab, restart_symtab, end_symtab_get_static_block)
6726         (end_symtab_with_blockvector): Update.
6727         (set_last_source_start_addr, get_last_source_start_addr): New
6728         functions.
6729
6730 2018-07-16  Tom Tromey  <tom@tromey.com>
6731
6732         * buildsym.c (struct buildsym_compunit) <m_have_line_numbers>: New
6733         member.
6734         (have_line_numbers): Remove.
6735         (record_line, prepare_for_building, end_symtab_get_static_block)
6736         (augment_type_symtab): Update.
6737
6738 2018-07-16  Tom Tromey  <tom@tromey.com>
6739
6740         * buildsym.c (~buildsym_compunit): Free the macro table.
6741         (struct buildsym_compunit) <get_macro_table, release_macros>: New
6742         methods.
6743         <m_pending_macros>: New member.
6744         (pending_macros): Remove.
6745         (~scoped_free_pendings, get_macro_table, prepare_for_building)
6746         (reset_symtab_globals, end_symtab_get_static_block)
6747         (end_symtab_with_blockvector, augment_type_symtab)
6748         (buildsym_init): Update.
6749
6750 2018-07-16  Tom Tromey  <tom@tromey.com>
6751
6752         * buildsym.c (buildsym_compunit::buildsym_compunit): Add name
6753         parameter.
6754         (buildsym_compunit::set_last_source_file): New method.
6755         <m_last_source_file>: New member.
6756         (prepare_for_building): Remove "name" parameter.
6757         (start_symtab, restart_symtab, reset_symtab_globals): Update.
6758         (last_source_file): Remove.
6759         (set_last_source_file, get_last_source_file): Update.
6760
6761 2018-07-16  Tom Tromey  <tom@tromey.com>
6762
6763         * buildsym.c (prepare_for_building): Add assert.
6764
6765 2018-07-16  Tom Tromey  <tom@tromey.com>
6766
6767         * buildsym.c (~buildsym_compunit): Update.
6768         (struct buildsym_compunit) <comp_unit>: Now a unique_xmalloc_ptr.
6769         (start_subfile, patch_subfile_names)
6770         (end_symtab_with_blockvector): Update.
6771
6772 2018-07-16  Tom Tromey  <tom@tromey.com>
6773
6774         * buildsym.c (struct buildsym_compunit): Add constructor,
6775         destructor, initializers.
6776         (start_buildsym_compunit): Remove.
6777         (free_buildsym_compunit): Use "delete".
6778         (start_symtab, restart_symtab): Use "new".
6779
6780 2018-07-13  Simon Marchi  <simon.marchi@polymtl.ca>
6781
6782         * symfile.c (set_objfile_default_section_offset): Remove struct
6783         keyword.
6784
6785 2018-07-14  Stafford Horne  <shorne@gmail.com>
6786
6787         * (Responsible Maintainers): Add myself as or1k maintainer.
6788
6789 2018-07-13  Tom Tromey  <tom@tromey.com>
6790
6791         * symfile.c (set_objfile_default_section_offset): Use extra braces
6792         around initializer.
6793
6794 2018-07-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6795
6796         * s390-tdep.c (s390_displaced_step_fixup): Adjust PC for a
6797         non-branching basr.
6798
6799 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
6800
6801         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6802         unittests/cli-utils-selftests.c
6803         * unittests/cli-utils-selftests.c: New file.
6804
6805 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
6806
6807         * NEWS: Mention new commands. Mention change to 'thread apply'.
6808
6809 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
6810
6811         * thread.c (thr_try_catch_cmd): New function.
6812         (thread_apply_all_command): Handle qcs flags.
6813         (thread_apply_command): Handle qcs flags.
6814         (taas_command): New function.
6815         (tfaas_command): New function.
6816         (_initialize_thread): Update to setup the new commands 'taas
6817         and 'tfaas'. Change doc string for 'thread apply'.
6818
6819 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
6820
6821         * stack.c: (trailing_outermost_frame): New function, mostly
6822         extracted from backtrace_command_1.
6823         (leading_innermost_frame): New function.
6824         (backtrace_command_1): Update to call trailing_outermost_frame.
6825         (frame_apply_command_count): New function.
6826         (frame_apply_level_command): New function.
6827         (frame_apply_all_command): New function.
6828         (frame_apply_command): New function.
6829         (faas_command): New function.
6830         (frame_cmd_list): New variable.
6831         (_initialize_stack): Update to setup the new commands 'frame apply'
6832         and 'faas'.
6833
6834 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
6835
6836         * cli-utils.c (number_or_range_parser::get_number): Only handle
6837         numbers or convenience var as numbers.
6838         (parse_flags): New function.
6839         (parse_flags_qcs): New function.
6840         (number_or_range_parser::finished): Ensure parsing end is detected
6841         before end of string.
6842         * cli-utils.h (parse_flags): New function.
6843         (parse_flags_qcs): New function.
6844         (number_or_range_parser): Remove m_finished bool.
6845         (number_or_range_parser::skip_range): Set m_in_range to false.
6846
6847 2018-07-12  Sergio Durigan Junior  <sergiodj@redhat.com>
6848
6849         * ser-tcp.c (try_connect): Declare 'ioarg' as 'u_long' if building
6850         on Windows.
6851
6852 2018-07-11  Sergio Durigan Junior  <sergiodj@redhat.com>
6853             Jan Kratochvil  <jan.kratochvil@redhat.com>
6854             Paul Fertser  <fercerpav@gmail.com>
6855             Tsutomu Seki  <sekiriki@gmail.com>
6856             Pedro Alves  <palves@redhat.com>
6857
6858         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6859         'unittests/parse-connection-spec-selftests.c'.
6860         (COMMON_SFILES): Add 'common/netstuff.c'.
6861         (HFILES_NO_SRCDIR): Add 'common/netstuff.h'.
6862         * NEWS (Changes since GDB 8.2): Mention IPv6 support.
6863         * common/netstuff.c: New file.
6864         * common/netstuff.h: New file.
6865         * ser-tcp.c: Include 'netstuff.h' and 'wspiapi.h'.
6866         (wait_for_connect): Update comment.  New parameter
6867         'gdb::optional<int> sock' instead of 'struct serial *scb'.
6868         Use 'sock' directly instead of 'scb->fd'.
6869         (try_connect): New function, with code from 'net_open'.
6870         (net_open): Rewrite main loop to deal with multiple
6871         sockets/addresses.  Handle IPv6-style hostnames; implement
6872         support for IPv6 connections.
6873         * unittests/parse-connection-spec-selftests.c: New file.
6874
6875 2018-07-11  Pedro Alves  <palves@redhat.com>
6876
6877         PR gdb/23377
6878         * remote.c (remote_target::remote_detach_pid): Call
6879         set_current_process.
6880
6881 2018-07-11  Pedro Alves  <palves@redhat.com>
6882
6883         * h8300-tdep.c (h8300_gdbarch_init): Remove
6884         set_gdbarch_ecoff_reg_to_regnum calls.
6885
6886 2018-07-11  Sergio Durigan Junior  <sergiodj@redhat.com>
6887
6888         PR c++/23373
6889         * c-typeprint.c (c_type_print_base_struct_union): Don't print
6890         offsets/sizes for static members of a class/struct.
6891
6892 2018-07-11  Alan Hayward  <alan.hayward@arm.com>
6893
6894         * target-descriptions.c (tdesc_register_bitsize): Rename.
6895         * target-descriptions.h (tdesc_register_bitsize): Likewise.
6896         * rs6000-tdep.c (rs6000_gdbarch_init): Use new name.
6897         * aarch64-tdep.c (aarch64_get_tdesc_vq): Convert size.
6898
6899 2018-07-10  Tom Tromey  <tom@tromey.com>
6900
6901         * breakpoint.c (moribund_locations): Now static and a
6902         std::vector.
6903         (breakpoint_init_inferior, moribund_breakpoint_here_p)
6904         (build_bpstat_chain, update_global_location_list)
6905         (breakpoint_retire_moribund): Update.
6906         * breakpoint.h (bp_location_p): Remove typedef.  Don't declare
6907         VEC.
6908
6909 2018-07-10  Andrew Burgess  <andrew.burgess@embecosm.com>
6910
6911         * riscv-tdep.c (riscv_is_fp_regno_p): New function.
6912         (riscv_register_reggroup_p): Use new function, remove unneeded
6913         parenthesis.
6914         (riscv_push_dummy_call): Extend assert to compare against xlen or
6915         flen based on register type.
6916
6917 2018-07-10  Andrew Burgess  <andrew.burgess@embecosm.com>
6918
6919         * riscv-tdep.c (riscv_print_arg_location): Use TYPE_SAFE_NAME.
6920
6921 2018-07-09  Andrew Burgess  <andrew.burgess@embecosm.com>
6922
6923         * remote.c (show_hardware_watchpoint_limit): New function.
6924         (show_hardware_watchpoint_length_limit): New function.
6925         (show_hardware_breakpoint_limit): New function.
6926         (_initialize_remote): Use add_setshow_zuinteger_unlimited_cmd
6927         where appropriate, update help text.
6928
6929 2018-07-09  Tom Tromey  <tom@tromey.com>
6930
6931         * Makefile.in (CDEPS): Don't mention XM_CDEPS.
6932         (CLIBS): Don't mention NAT_CLIBS.
6933
6934 2018-07-09  Tom Tromey  <tom@tromey.com>
6935
6936         * Makefile.in (ADD_FILES, ADD_DEPS): Remove.
6937         (LIBGDB_OBS, clean mostlyclean): Update.
6938         (gdb$(EXEEXT), insight$(EXEEXT)): Update.
6939
6940 2018-07-09  Tom Tromey  <tom@tromey.com>
6941
6942         * Makefile.in (%.c: %.y): Use ECHO_YACC.
6943         (%.c: %.l): Use ECHO_LEX.  Just fail if flex not available.
6944         * silent-rules.mk (ECHO_YACC, ECHO_LEX): New variables.
6945
6946 2018-07-09  Tom Tromey  <tom@tromey.com>
6947
6948         * Makefile.in (ALLDEPFILES): Remove exec.c.
6949         (COMMON_OBS): Remove exec.o.
6950         (COMMON_SFILES): Add exec.c.
6951
6952 2018-07-09  Tom Tromey  <tom@tromey.com>
6953
6954         * Makefile.in (LINT, LINTFLAGS, LINTFILES, lint): Remove.
6955
6956 2018-07-09  Tom Tromey  <tom@tromey.com>
6957
6958         * Makefile.in (clean mostlyclean): Remove stamp-version.
6959         (version.c): Depend on stamp-version.
6960         (stamp-version): New rule, from version.c rule.
6961
6962 2018-07-09  Tom Tromey  <tom@tromey.com>
6963
6964         * Makefile.in (init.c): Depend on stamp-init.
6965         (stamp-init): New rule, from init.c rule.
6966         (clean mostlyclean): Remove stamp-init.
6967
6968 2018-07-09  Tom Tromey  <tom@tromey.com>
6969
6970         * Makefile.in (INIT_FILES): Remove CONFIG_SRCS,
6971         SUBDIR_GCC_COMPILE_SRCS.
6972
6973 2018-07-09  Tom Tromey  <tom@tromey.com>
6974
6975         * Makefile.in (init.c): Remove some unused sed rules.
6976
6977 2018-07-09  Tom Tromey  <tom@tromey.com>
6978
6979         * Makefile.in (TSOBS): Remove.
6980         (INIT_FILES): Update.
6981         (LIBGDB_OBS): Update.
6982         (COMMON_SFILES): Add inflow.c.
6983         (SFILES): Remove inflow.c.
6984
6985 2018-07-07  Jan Kratochvil  <jan.kratochvil@redhat.com>
6986
6987         * contrib/gdb-add-index.sh ($dwarf5): New, use it.
6988
6989 2018-07-07  Simon Marchi  <simon.marchi@polymtl.ca>
6990
6991         * ia64-libunwind-tdep.c (get_reg_name, get_fpreg_name,
6992         get_saveloc_name, is_signal_frame_name, step_name,
6993         init_remote_name, create_addr_space_name,
6994         destroy_addr_space_name, search_unwind_table_name,
6995         find_dyn_list_name): Constify.
6996
6997 2018-07-05  Simon Marchi  <simon.marchi@polymtl.ca>
6998
6999         * darwin-nat.c (darwin_pthread_kill): New function.
7000         (darwin_resume_thread): Use darwin_pthread_kill.
7001
7002 2018-07-05  Tom de Vries  <tdevries@suse.de>
7003
7004         * macroexp.c (macro_buffer) <operator=>: New member function.
7005
7006 2018-07-04  Tom Tromey  <tom@tromey.com>
7007
7008         * darwin-nat.c (darwin_attach_pid): Use exit_inferior.
7009
7010 2018-07-04  Simon Marchi  <simon.marchi@polymtl.ca>
7011
7012         * common/common-defs.h (HAVE_USEFUL_SBRK): Define.
7013         * main.c: Use HAVE_USEFUL_SBRK instead of HAVE_SBRK.
7014         * maint.c: Likewise.
7015         * top.c: Likewise.
7016
7017 2018-07-04  Joel Brobecker  <brobecker@adacore.com>
7018
7019         * NEWS: Create a new section for the next release branch.
7020         Rename the section of the current branch, now that it has
7021         been cut.
7022
7023 2018-07-04  Joel Brobecker  <brobecker@adacore.com>
7024
7025         GDB 8.2 branch created (1b919490e8ba30bf1d6941df0ed112b0e557017e):
7026         * version.in: Bump version to 8.2.50.DATE-git.
7027
7028 2018-07-04  Vyacheslav Barinov  <v.barinov@samsung.com>
7029             Pedro Alves  <palves@redhat.com>
7030
7031         * linux-nat.c (linux_init_ptrace): Rename to ...
7032         (linux_init_ptrace_procfs): ... this.  Call
7033         linux_proc_init_warnings.
7034         (linux_nat_target::post_attach)
7035         (linux_nat_target::post_startup_inferior): Adjust.
7036         * nat/linux-procfs.c (linux_proc_init_warnings): Define function.
7037         * nat/linux-procfs.h (linux_proc_init_warnings): Declare function.
7038
7039 2018-07-04  Tom de Vries  <tdevries@suse.de>
7040
7041         * dwarf2read.c (error_check_comp_unit_head): Move dwarf version
7042         check ...
7043         (read_comp_unit_head): ... here.
7044
7045 2018-07-03  Tom Tromey  <tom@tromey.com>
7046
7047         * tracepoint.c (process_tracepoint_on_disconnect, start_tracing)
7048         (stop_tracing, tstatus_command)
7049         (find_matching_tracepoint_location, merge_uploaded_tracepoints)
7050         (print_one_static_tracepoint_marker): Update.
7051         * breakpoint.c (static_tracepoints_here, all_tracepoints): Return
7052         std::vector.
7053         * breakpoint.h (breakpoint_p): Remove typedef.  Don't declare
7054         VEC.
7055         (all_tracepoints, static_tracepoints_here): Return std::vector.
7056
7057 2018-07-03  Tom Tromey  <tom@tromey.com>
7058
7059         * common/ptid.c (ptid_equal): Remove.
7060         * common/ptid.h (ptid_equal): Don't declare.
7061         * ada-tasks.c: Update.
7062         * breakpoint.c: Update.
7063         * common/agent.c: Update.
7064         * corelow.c: Update.
7065         * darwin-nat-info.c: Update.
7066         * darwin-nat.c: Update.
7067         * dcache.c: Update.
7068         * dtrace-probe.c: Update.
7069         * dummy-frame.c: Update.
7070         * fbsd-nat.c: Update.
7071         * frame.c: Update.
7072         * gdbthread.h: Update.
7073         * gnu-nat.c: Update.
7074         * go32-nat.c: Update.
7075         * inf-loop.c: Update.
7076         * inf-ptrace.c: Update.
7077         * infcall.c: Update.
7078         * infcmd.c: Update.
7079         * inflow.c: Update.
7080         * infrun.c: Update.
7081         * linux-fork.c: Update.
7082         * linux-nat.c: Update.
7083         * linux-thread-db.c: Update.
7084         * mi/mi-cmd-var.c: Update.
7085         * mi/mi-interp.c: Update.
7086         * mi/mi-main.c: Update.
7087         * nto-procfs.c: Update.
7088         * ppc-linux-tdep.c: Update.
7089         * procfs.c: Update.
7090         * python/py-inferior.c: Update.
7091         * python/py-record-btrace.c: Update.
7092         * python/py-record.c: Update.
7093         * ravenscar-thread.c: Update.
7094         * regcache.c: Update.
7095         * remote-sim.c: Update.
7096         * remote.c: Update.
7097         * sol-thread.c: Update.
7098         * solib.c: Update.
7099         * target.c: Update.
7100         * tui/tui-stack.c: Update.
7101         * varobj.c: Update.
7102         * windows-nat.c: Update.
7103         * windows-tdep.c: Update.
7104
7105 2018-07-03  Tom Tromey  <tom@tromey.com>
7106
7107         * common/ptid.c (ptid_match): Remove.
7108         * common/ptid.h (ptid_match): Don't declare.
7109         * fbsd-nat.c: Update.
7110         * infcmd.c: Update.
7111         * infrun.c: Update.
7112         * linux-nat.c: Update.
7113         * record-btrace.c: Update.
7114         * regcache.c: Update.
7115         * remote.c: Update.
7116
7117 2018-07-03  Tom Tromey  <tom@tromey.com>
7118
7119         * common/ptid.c (ptid_tid_p): Remove.
7120         * common/ptid.h (ptid_tid_p): Don't declare.
7121         * sol-thread.c: Update.
7122
7123 2018-07-03  Tom Tromey  <tom@tromey.com>
7124
7125         * common/ptid.c (ptid_lwp_p): Remove.
7126         * common/ptid.h (ptid_lwp_p): Don't declare.
7127         * fbsd-nat.c: Update.
7128         * linux-nat.c: Update.
7129         * nat/linux-procfs.c: Update.
7130         * nat/x86-linux-dregs.c: Update.
7131         * sol-thread.c: Update.
7132
7133 2018-07-03  Tom Tromey  <tom@tromey.com>
7134
7135         * common/ptid.c (ptid_is_pid): Remove.
7136         * common/ptid.h (ptid_is_pid): Don't declare.
7137         * infrun.c: Update.
7138         * linux-nat.c: Update.
7139         * mi/mi-interp.c: Update.
7140         * remote.c: Update.
7141         * thread.c: Update.
7142
7143 2018-07-03  Tom Tromey  <tom@tromey.com>
7144
7145         * common/ptid.c (ptid_get_tid): Remove.
7146         * common/ptid.h (ptid_get_tid): Don't declare.
7147         * ada-tasks.c: Update.
7148         * aix-thread.c: Update.
7149         * bsd-uthread.c: Update.
7150         * darwin-nat.c: Update.
7151         * fbsd-nat.c: Update.
7152         * i386-darwin-nat.c: Update.
7153         * infrun.c: Update.
7154         * linux-tdep.c: Update.
7155         * nto-procfs.c: Update.
7156         * ppc-ravenscar-thread.c: Update.
7157         * python/py-infthread.c: Update.
7158         * ravenscar-thread.c: Update.
7159         * sol-thread.c: Update.
7160         * sparc-ravenscar-thread.c: Update.
7161         * windows-nat.c: Update.
7162
7163 2018-07-03  Tom Tromey  <tom@tromey.com>
7164
7165         * common/ptid.c (ptid_get_lwp): Remove.
7166         * common/ptid.h (ptid_get_lwp): Don't declare.
7167         * aarch64-linux-nat.c: Update.
7168         * ada-tasks.c: Update.
7169         * aix-thread.c: Update.
7170         * amd64-linux-nat.c: Update.
7171         * arm-linux-nat.c: Update.
7172         * corelow.c: Update.
7173         * fbsd-nat.c: Update.
7174         * fbsd-tdep.c: Update.
7175         * gnu-nat.c: Update.
7176         * i386-cygwin-tdep.c: Update.
7177         * i386-gnu-nat.c: Update.
7178         * i386-linux-nat.c: Update.
7179         * ia64-linux-nat.c: Update.
7180         * inf-ptrace.c: Update.
7181         * infrun.c: Update.
7182         * linux-fork.c: Update.
7183         * linux-nat.c: Update.
7184         * linux-tdep.c: Update.
7185         * linux-thread-db.c: Update.
7186         * mips-linux-nat.c: Update.
7187         * nat/aarch64-linux-hw-point.c: Update.
7188         * nat/aarch64-linux.c: Update.
7189         * nat/linux-btrace.c: Update.
7190         * nat/linux-osdata.c: Update.
7191         * nat/linux-procfs.c: Update.
7192         * nat/x86-linux-dregs.c: Update.
7193         * obsd-nat.c: Update.
7194         * ppc-fbsd-nat.c: Update.
7195         * ppc-linux-nat.c: Update.
7196         * procfs.c: Update.
7197         * python/py-infthread.c: Update.
7198         * ravenscar-thread.c: Update.
7199         * remote.c: Update.
7200         * s390-linux-nat.c: Update.
7201         * sol-thread.c: Update.
7202         * sol2-tdep.c: Update.
7203         * spu-linux-nat.c: Update.
7204         * x86-linux-nat.c: Update.
7205         * xtensa-linux-nat.c: Update.
7206
7207 2018-07-03  Tom Tromey  <tom@tromey.com>
7208
7209         * common/ptid.c (ptid_get_pid): Remove.
7210         * common/ptid.h (ptid_get_pid): Don't declare.
7211         * aarch64-linux-nat.c: Update.
7212         * ada-lang.c: Update.
7213         * aix-thread.c: Update.
7214         * alpha-bsd-nat.c: Update.
7215         * amd64-fbsd-nat.c: Update.
7216         * amd64-linux-nat.c: Update.
7217         * arm-linux-nat.c: Update.
7218         * arm-nbsd-nat.c: Update.
7219         * auxv.c: Update.
7220         * break-catch-syscall.c: Update.
7221         * breakpoint.c: Update.
7222         * bsd-uthread.c: Update.
7223         * corelow.c: Update.
7224         * ctf.c: Update.
7225         * darwin-nat.c: Update.
7226         * fbsd-nat.c: Update.
7227         * fbsd-tdep.c: Update.
7228         * gcore.c: Update.
7229         * gnu-nat.c: Update.
7230         * hppa-nbsd-nat.c: Update.
7231         * hppa-obsd-nat.c: Update.
7232         * i386-fbsd-nat.c: Update.
7233         * ia64-linux-nat.c: Update.
7234         * inf-ptrace.c: Update.
7235         * infcmd.c: Update.
7236         * inferior.c: Update.
7237         * inferior.h: Update.
7238         * inflow.c: Update.
7239         * infrun.c: Update.
7240         * linux-fork.c: Update.
7241         * linux-nat.c: Update.
7242         * linux-tdep.c: Update.
7243         * linux-thread-db.c: Update.
7244         * m68k-bsd-nat.c: Update.
7245         * mi/mi-interp.c: Update.
7246         * mi/mi-main.c: Update.
7247         * mips-linux-nat.c: Update.
7248         * mips-nbsd-nat.c: Update.
7249         * mips64-obsd-nat.c: Update.
7250         * nat/aarch64-linux-hw-point.c: Update.
7251         * nat/aarch64-linux.c: Update.
7252         * nat/linux-btrace.c: Update.
7253         * nat/linux-osdata.c: Update.
7254         * nat/linux-procfs.c: Update.
7255         * nat/x86-linux-dregs.c: Update.
7256         * nto-procfs.c: Update.
7257         * obsd-nat.c: Update.
7258         * ppc-linux-nat.c: Update.
7259         * ppc-nbsd-nat.c: Update.
7260         * ppc-obsd-nat.c: Update.
7261         * proc-service.c: Update.
7262         * procfs.c: Update.
7263         * python/py-inferior.c: Update.
7264         * python/py-infthread.c: Update.
7265         * ravenscar-thread.c: Update.
7266         * record.c: Update.
7267         * remote-sim.c: Update.
7268         * remote.c: Update.
7269         * rs6000-nat.c: Update.
7270         * s390-linux-nat.c: Update.
7271         * sh-nbsd-nat.c: Update.
7272         * sol-thread.c: Update.
7273         * sparc-nat.c: Update.
7274         * sparc64-tdep.c: Update.
7275         * spu-linux-nat.c: Update.
7276         * spu-tdep.c: Update.
7277         * target-debug.h: Update.
7278         * target.c: Update.
7279         * thread.c: Update.
7280         * tid-parse.c: Update.
7281         * tracefile-tfile.c: Update.
7282         * vax-bsd-nat.c: Update.
7283         * windows-nat.c: Update.
7284         * x86-linux-nat.c: Update.
7285         * x86-nat.c: Update.
7286
7287 2018-07-03  Tom Tromey  <tom@tromey.com>
7288
7289         * common/ptid.c (pid_to_ptid): Remove.
7290         * common/ptid.h (pid_to_ptid): Don't declare.
7291         * aix-thread.c: Update.
7292         * arm-linux-nat.c: Update.
7293         * common/ptid.c: Update.
7294         * common/ptid.h: Update.
7295         * corelow.c: Update.
7296         * ctf.c: Update.
7297         * darwin-nat.c: Update.
7298         * fbsd-nat.c: Update.
7299         * fork-child.c: Update.
7300         * gnu-nat.c: Update.
7301         * go32-nat.c: Update.
7302         * inf-ptrace.c: Update.
7303         * infcmd.c: Update.
7304         * inferior.c: Update.
7305         * infrun.c: Update.
7306         * linux-fork.c: Update.
7307         * linux-nat.c: Update.
7308         * nat/aarch64-linux-hw-point.c: Update.
7309         * nat/fork-inferior.c: Update.
7310         * nat/x86-linux-dregs.c: Update.
7311         * nto-procfs.c: Update.
7312         * obsd-nat.c: Update.
7313         * procfs.c: Update.
7314         * progspace.c: Update.
7315         * remote.c: Update.
7316         * rs6000-nat.c: Update.
7317         * s390-linux-nat.c: Update.
7318         * sol-thread.c: Update.
7319         * spu-linux-nat.c: Update.
7320         * target.c: Update.
7321         * top.c: Update.
7322         * tracefile-tfile.c: Update.
7323         * windows-nat.c: Update.
7324
7325 2018-07-03  Tom Tromey  <tom@tromey.com>
7326
7327         * common/ptid.h (ptid_build): Don't declare.
7328         * common/ptid.c (ptid_build): Remove.
7329         * aix-thread.c: Update.
7330         * bsd-kvm.c: Update.
7331         * bsd-uthread.c: Update.
7332         * common/agent.c: Update.
7333         * common/ptid.c: Update.
7334         * common/ptid.h: Update.
7335         * corelow.c: Update.
7336         * darwin-nat.c: Update.
7337         * fbsd-nat.c: Update.
7338         * gnu-nat.c: Update.
7339         * linux-fork.c: Update.
7340         * linux-nat.c: Update.
7341         * linux-thread-db.c: Update.
7342         * nat/linux-osdata.c: Update.
7343         * nat/linux-procfs.c: Update.
7344         * nto-procfs.c: Update.
7345         * obsd-nat.c: Update.
7346         * proc-service.c: Update.
7347         * procfs.c: Update.
7348         * ravenscar-thread.c: Update.
7349         * remote-sim.c: Update.
7350         * remote.c: Update.
7351         * sol-thread.c: Update.
7352         * target.c: Update.
7353         * windows-nat.c: Update.
7354
7355 2018-07-03  Tom Tromey  <tom@tromey.com>
7356
7357         * infrun.c (follow_exec): Use exit_inferior_silent.
7358         * inferior.c (exit_inferior_num_silent): Remove.
7359         * inferior.h (exit_inferior_num_silent): Don't declare.
7360
7361 2018-07-03  Tom Tromey  <tom@tromey.com>
7362
7363         PR cli/23340:
7364         * darwin-nat.c (darwin_attach_pid): Reset inferior and
7365         inferior_ptid on error.
7366
7367 2018-07-02  Maciej W. Rozycki  <macro@mips.com>
7368             Simon Marchi  <simon.marchi@polymtl.ca>
7369
7370         PR tdep/8282
7371         * disasm.h (gdb_disassembler): Add
7372         `m_disassembler_options_holder'. member
7373         * disasm.c (get_all_disassembler_options): New function.
7374         (gdb_disassembler::gdb_disassembler): Use it.
7375         (gdb_buffered_insn_length_init_dis): Likewise.
7376         (gdb_buffered_insn_length): Adjust accordingly.
7377         (set_disassembler_options): Handle options with arguments.
7378         (show_disassembler_options_sfunc): Likewise.  Add a leading new
7379         line if showing options with descriptions.
7380         (disassembler_options_completer): Adapt to using the
7381         `disasm_options_and_args_t' structure.
7382         * mips-tdep.c (mips_disassembler_options): New variable.
7383         (mips_disassembler_options_o32): Likewise.
7384         (mips_disassembler_options_n32): Likewise.
7385         (mips_disassembler_options_n64): Likewise.
7386         (gdb_print_insn_mips): Don't set `disassembler_options'.
7387         (gdb_print_insn_mips_n32, gdb_print_insn_mips_n64): Remove
7388         functions.
7389         (mips_gdbarch_init): Always set `gdbarch_print_insn' to
7390         `gdb_print_insn_mips'.  Set `gdbarch_disassembler_options',
7391         `gdbarch_disassembler_options_implicit' and
7392         `gdbarch_valid_disassembler_options'.
7393         * arm-tdep.c (_initialize_arm_tdep): Adapt to using the
7394         `disasm_options_and_args_t' structure.
7395         * gdbarch.sh (disassembler_options_implicit): New `gdbarch'
7396         method.
7397         (valid_disassembler_options): Switch from `disasm_options_t' to
7398         the `disasm_options_and_args_t' structure.
7399         * NEWS: Document `set disassembler-options' support for the MIPS
7400         target.
7401         * gdbarch.h: Regenerate.
7402         * gdbarch.c: Regenerate.
7403
7404 2018-07-02  Sebastian Huber  <sebastian.huber@embedded-brains.de>
7405
7406         * riscv-tdep.c (riscv_register_aliases): Swap "fp" and "s0" entries.
7407
7408 2018-06-29  Joel Brobecker  <brobecker@adacore.com>
7409
7410         * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Add missing
7411         parameter in call to amd64_target_description.
7412         * amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise.
7413         * amd64-fbsd-tdep.c (amd64fbsd_core_read_description)
7414         (amd64fbsd_init_abi): Likewise.
7415         * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
7416         * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
7417         * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
7418         * amd64-fbsd-nat.c (amd64_fbsd_nat_target): Likewise.
7419
7420 2018-06-29  Pedro Alves  <palves@redhat.com>
7421
7422         * gdb/amd64-tdep.h (amd64_create_target_description): Add
7423         "segments" parameter.
7424         * gdb/amd64-tdep.c (amd64_none_init_abi, amd64_x32_none_init_abi)
7425         (_initialize_amd64_tdep): Update call to
7426         amd64_create_target_description.
7427         (amd64_target_description): Add "segments" parameter.  Adjust
7428         the implementation to use it.
7429         * gdb/amd64-linux-tdep.c (amd64_linux_read_description): Update
7430         call to amd64_create_target_description.
7431         * gdb/amd64-windows-tdep.c (amd64_windows_init_abi): Likewise.
7432         * gdb/arch/amd64.h (amd64_create_target_description): Add
7433         "segments" register.
7434         * gdb/arch/amd64.c (amd64_create_target_description): Add
7435         "segments" parameter.  Call create_feature_i386_64bit_segments
7436         only if SEGMENTS is true.
7437         * gdb/gdbserver/win32-i386-low.c (i386_arch_setup): Update
7438         call to amd64_create_target_description.
7439
7440 2018-06-29  Pedro Alves  <palves@redhat.com>
7441
7442         * thread.c (thread_target_id_str): New, factored out from ...
7443         (print_thread_info_1): ... here.  Use it to compute the max
7444         "Target Id" column width.
7445
7446 2018-06-29  Pedro Alves  <palves@redhat.com>
7447
7448         * remote.c (remote_target::extra_thread_info): Delete
7449         'display_buf' and 'n' locals.  from the cache, regardless of
7450         packet mechanims is in use.  Use cache for qThreadExtra and qP
7451         methods too.
7452
7453 2018-06-29  Pedro Alves  <palves@redhat.com>
7454
7455         * blockframe.c (find_pc_sect_containing_function): New function.
7456         * breakpoint.c (print_breakpoint_location): Don't call
7457         find_pc_sect_function.
7458         * linespec.c (create_sals_line_offset): Record the location's
7459         symbol in the sal.
7460         * linespec.c (convert_address_location_to_sals): Fill in sal's
7461         symbol with find_pc_sect_containing_function.
7462         * symtab.c (find_function_start_sal): Rename to ...
7463         (find_function_start_sal_1): ... this.
7464         (find_function_start_sal): Reimplement as wrapper around
7465         find_function_start_sal_1, and use
7466         find_pc_sect_containing_function to fill in the sal's symbol.
7467         (find_function_start_sal(symbol*, bool)): Adjust.
7468         * symtab.h (find_pc_function, find_pc_sect_function): Adjust
7469         comments.
7470         (find_pc_sect_containing_function): Declare.
7471
7472 2018-06-29  Pedro Alves  <palves@redhat.com>
7473
7474         * inline-frame.c (stopped_by_user_bp_inline_frame): Return
7475         true if the the location has no symbol.
7476
7477 2018-06-28  Tom Tromey  <tom@tromey.com>
7478
7479         * NEWS: Mention --enable-codesign.
7480         * silent-rules.mk (ECHO_SIGN): New variable.
7481         * configure.ac: Add --enable-codesign.
7482         * configure: Rebuild.
7483         * Makefile.in (CODESIGN, CODESIGN_CERT): New variables.
7484         (gdb$(EXEEXT)): Optionally invoke codesign.
7485
7486 2018-06-28  Pedro Alves  <palves@redhat.com>
7487
7488         * gdbthread.h (struct thread_suspend_state) <stop_pc>: Extend
7489         comments.
7490         (switch_to_thread_no_regs): Adjust comment.
7491         * infcmd.c (stop_pc): Delete.
7492         (post_create_inferior, info_program_command): Replace references
7493         to stop_pc with references to thread_info->suspend.stop_pc.
7494         * inferior.h (stop_pc): Delete declaration.
7495         * infrun.c (proceed, handle_syscall_event, fill_in_stop_func)
7496         (handle_inferior_event_1, handle_signal_stop)
7497         (process_event_stop_test, keep_going_stepped_thread)
7498         (handle_step_into_function, handle_step_into_function_backward)
7499         (print_stop_location): Replace references to stop_pc with
7500         references to thread_info->suspend.stop_pc.
7501         (struct infcall_suspend_state) <stop_pc>: Delete field.
7502         (save_infcall_suspend_state, restore_infcall_suspend_state):
7503         Remove references to inf_stat->stop_pc.
7504         * linux-fork.c (fork_load_infrun_state): Likewise.
7505         * record-btrace.c (record_btrace_set_replay): Likewise.
7506         * record-full.c (record_full_goto_entry): Likewise.
7507         * remote.c (print_one_stopped_thread): Likewise.
7508         * target.c (target_resume): Extend comment.
7509         * thread.c (set_executing_thread): New.
7510         (set_executing): Use it.
7511         (switch_to_thread_no_regs, switch_to_no_thread, switch_to_thread):
7512         Remove references to stop_pc.
7513
7514 2018-06-28  Pedro Alves  <palves@redhat.com>
7515
7516         * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>:
7517         Moving fetching stop_pc until after ecs->event_thread is refreshed.
7518
7519 2018-06-28  Tom Tromey  <tom@tromey.com>
7520
7521         * coffread.c (coff_symfile_finish): Update.
7522         * xcoffread.c (xcoff_symfile_finish): Update.
7523         * elfread.c (elf_symfile_finish): Update.
7524         * symfile.h (dwarf2_free_objfile): Don't declare.
7525         * dwarf2read.c (_initialize_dwarf2_read): Use
7526         register_objfile_data_with_cleanup.
7527         (dwarf2_free_objfile): Now static.  Change signature.
7528
7529 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
7530
7531         * symfile.c (add_symbol_file_command, _initialize_symfile): Add
7532         option "-o" to add-symbol-file-load to add an offset to each
7533         section's load address.
7534         * symfile.c (set_objfile_default_section_offset): New function.
7535
7536 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
7537
7538         * symfile.c (add_symbol_file_command): Make sure that sections
7539         with the same name are sorted in the same order.
7540
7541 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
7542
7543         * symfile.c (add_symbol_file_command, _initialize_symfile): Do not
7544         require the second argument.  If omitted, load sections at the
7545         addresses specified in the file.
7546
7547 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
7548
7549         * symfile.c (symbol_file_command, symbol_file_add_main_1)
7550         (_initialize_symfile): Add option "-o" to symbol-file to add an
7551         offset to each section of the symbol file.
7552
7553 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
7554
7555         * MAINTAINERS (Write After Approval): Add Petr Tesarik.
7556
7557 2018-06-27  Tom Tromey  <tom@tromey.com>
7558
7559         * stack.c (_initialize_stack): Update "func" help text.
7560
7561 2018-06-27  Tom Tromey  <tom@tromey.com>
7562
7563         * python/py-unwind.c (unwind_info_object) <saved_regs>: Now a
7564         std::vector.
7565         (unwind_infopy_str, pyuw_create_unwind_info)
7566         (unwind_infopy_add_saved_register, pyuw_sniffer)
7567         (unwind_infopy_dealloc, unwind_infopy_add_saved_register):
7568         Update.
7569         (struct saved_reg): Add constructor.
7570         <value>: Now a gdbpy_ref<>.
7571
7572 2018-06-27  Tom Tromey  <tom@tromey.com>
7573
7574         * machoread.c (macho_symfile_read): Define "symbol_table" earlier.
7575
7576 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
7577
7578         * gdb-gdb.py.in: Format using autopep8.
7579
7580 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
7581
7582         * gdb-gdb.py.in (CoreAddrPrettyPrinter): New class.
7583         (type_lookup_function): Recognize CORE_ADDR values.
7584
7585 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
7586
7587         * gdb-gdb.py.in (StructMainTypePrettyPrinter) <to_string>: Don't
7588         print tag_name.
7589
7590 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
7591
7592         * gdb-gdb.py.in (TypeFlag) <__cmp__>: Remove.
7593         <__lt__>: Add.
7594
7595 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
7596
7597         * gdb-gdb.py: Move to...
7598         * gdb-gdb.py.in: ... here.
7599         * configure.ac (AC_CONFIG_FILES): Add gdb-gdb.py.
7600         * Makefile.in (all): Add gdb-gdb.gdb and gdb-gdb.py as
7601         dependencies.
7602         (distclean): Remove gdb-gdb.py when cleaning.
7603         (gdb-gdb.py, gdb-gdb.gdb): New rules.
7604         * configure: Re-generate.
7605
7606 2018-06-27  Pedro Alves  <palves@redhat.com>
7607
7608         * proc-service.c (get_ps_regcache): New.
7609         (ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
7610         (ps_lsetfpregs): Use it.
7611
7612 2018-06-27  Omair Javaid  <omair.javaid@linaro.org>
7613
7614         PR gdb/21695
7615         * dwarf2read.c (lnp_state_machine::check_line_address): Update
7616         declaration.
7617         (dwarf_decode_lines_1): Adjust.
7618
7619 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
7620
7621         * fbsd-nat.h (class fbsd_nat_target) <find_memory_regions>: Add
7622         override.
7623         <info_proc>: Likewise.
7624
7625 2018-06-26  Joel Brobecker  <brobecker@adacore.com>
7626
7627         * windows-nat.c (do_windows_fetch_inferior_registers): Rename
7628         to windows_fetch_one_register, and only handle the case of
7629         fetching one register.  Move the code that reloads the context
7630         and iterates over all registers if R is negative to...
7631         (windows_nat_target::fetch_registers): ... here.
7632         (do_windows_store_inferior_registers): Rename to
7633         windows_store_one_register, and only handle the case of storing
7634         one register.  Move the code that handles the case where r is
7635         negative to...
7636         (windows_nat_target::store_registers) ... here.
7637
7638 2018-06-26  Tom Tromey  <tom@tromey.com>
7639
7640         PR rust/22574:
7641         * typeprint.c (whatis_exp): Allow ptype/o for Rust.
7642         * rust-lang.c (rust_print_struct_def): Add podata parameter.
7643         Update.
7644         (rust_internal_print_type): Add podata parameter.
7645         (rust_print_type): Update.
7646
7647 2018-06-26  Tom Tromey  <tom@tromey.com>
7648
7649         * typeprint.h (struct print_offset_data) <update, finish,
7650         maybe_print_hole>: New methods.
7651         <indentation>: New constant.
7652         * typeprint.c (print_offset_data::indentation): Define.
7653         (print_offset_data::maybe_print_hole, print_offset_data::update)
7654         (print_offset_data::finish): Move from c-typeprint.c and rename.
7655         * c-typeprint.c (OFFSET_SPC_LEN): Remove.
7656         (print_spaces_filtered_with_print_options): Update.
7657         (c_print_type_union_field_offset, maybe_print_hole)
7658         (c_print_type_struct_field_offset): Move to typeprint.c and
7659         rename.
7660         (c_type_print_base_struct_union): Update.
7661
7662 2018-06-25  Pedro Alves  <palves@redhat.com>
7663
7664         * gdbthread.h (thread_info_ref, delete_thread)
7665         (delete_thread_silent, first_thread_of_inferior)
7666         (any_thread_of_inferior, switch_to_thread)
7667         (enable_thread_stack_temporaries)
7668         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
7669         (get_last_thread_stack_temporary)
7670         (value_in_thread_stack_temporaries, can_access_registers_thread):
7671         Spell out "struct thread_info" instead of just "thread_info".
7672         * inferior.h (notice_new_inferior): Likewise.
7673
7674 2018-06-25  Pedro Alves  <palves@redhat.com>
7675
7676         * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
7677         pass thread_info pointer to delete_thread.
7678         (windows_nat_target::detach): Pass inferior pointer to
7679         detach_inferior.
7680         * aix-thread.c (sync_threadlists): Pass thread_info pointer to
7681         delete_thread.
7682         * bsd-kvm.c (bsd_kvm_target::close): Use discard_all_inferiors.
7683         * darwin-nat.c (darwin_check_new_threads): Use find_thread_ptid
7684         and pass a thread_info pointer to delete_thread.
7685         * fbsd-nat.c (fbsd_nat_target::wait): Use find_thread_ptid and
7686         pass thread_info pointer to delete_thread.
7687         * go32-nat.c (go32_nat_target::mourn_inferior): Remove
7688         delete_thread_silent call.
7689         * procfs.c (procfs_target::detach): Pass inferior pointer to
7690         detach_inferior.
7691         (procfs_target::wait): Pass thread_info pointer to delete_thread.
7692         * remote-sim.c (gdbsim_target::mourn_inferior): Remove
7693         delete_thread_silent call.
7694         * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
7695         pass thread_info pointer to delete_thread.
7696         (windows_nat_target::detach): Pass inferior pointer to
7697         delete_inferior.
7698
7699 2018-06-22  Alan Hayward  <alan.hayward@arm.com>
7700
7701         * regcache.c (readable_regcache::read_part): Fix asserts.
7702         (reg_buffer::raw_collect_part): New function.
7703         (regcache::write_part): Fix asserts.
7704         (reg_buffer::raw_supply_part): New function.
7705         (regcache::transfer_regset_register): New helper function.
7706         (regcache::transfer_regset): Call new functions.
7707         (regcache_supply_regset): Use gdb_byte*.
7708         (regcache::supply_regset): Likewise.
7709         (regcache_collect_regset): Likewise.
7710         (regcache::collect_regset): Likewise.
7711         * regcache.h (reg_buffer::raw_collect_part): New declaration.
7712         (reg_buffer::raw_supply_part): Likewise.
7713         (regcache::transfer_regset_register): Likewise.
7714         (regcache::transfer_regset): Use gdb_byte*.
7715
7716 2018-06-22  Alan Hayward  <alan.hayward@arm.com>
7717
7718         * nat/aarch64-sve-linux-ptrace.h (HAS_SVE_STATE): Use &.
7719
7720 2018-06-21  Pedro Alves  <palves@redhat.com>
7721
7722         * ada-lang.h (ada_get_task_number): Take a thread_info pointer
7723         instead of a ptid_t.  All callers adjusted.
7724         * ada-tasks.c (ada_get_task_number): Likewise.  All callers
7725         adjusted.
7726         (print_ada_task_info, display_current_task_id, task_command_1):
7727         Adjust.
7728         * breakpoint.c (watchpoint_in_thread_scope): Adjust to use
7729         inferior_thread.
7730         (breakpoint_kind): Adjust.
7731         (remove_breakpoints_pid): Rename to ...
7732         (remove_breakpoints_inf): ... this.  Adjust to take an inferior
7733         pointer.  All callers adjusted.
7734         (bpstat_clear_actions): Use inferior_thread.
7735         (get_bpstat_thread): New.
7736         (bpstat_do_actions): Use it.
7737         (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust
7738         to take a thread_info pointer.  All callers adjusted.
7739         (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint)
7740         (breakpoint_re_set_thread): Use inferior_thread.
7741         * breakpoint.h (struct inferior): Forward declare.
7742         (bpstat_stop_status): Update.
7743         (remove_breakpoints_pid): Delete.
7744         (remove_breakpoints_inf): New.
7745         * bsd-uthread.c (bsd_uthread_target::wait)
7746         (bsd_uthread_target::update_thread_list): Use find_thread_ptid.
7747         * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch)
7748         (maint_btrace_packet_history_cmd)
7749         (maint_btrace_clear_packet_history_cmd): Adjust.
7750         (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use
7751         inferior_thread.
7752         * cli/cli-interp.c: Include "inferior.h".
7753         * common/refcounted-object.h (struct
7754         refcounted_object_ref_policy): New.
7755         * compile/compile-object-load.c: Include gdbthread.h.
7756         (store_regs): Use inferior_thread.
7757         * corelow.c (core_target::close): Use current_inferior.
7758         (core_target_open): Adjust to use first_thread_of_inferior and use
7759         the current inferior.
7760         * ctf.c (ctf_target::close): Adjust to use current_inferior.
7761         * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ...
7762         <thread>: ... this new field.  All references adjusted.
7763         (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor):
7764         Take a thread_info pointer instead of a ptid_t.
7765         * dummy-frame.h (dummy_frame_push, dummy_frame_pop)
7766         (dummy_frame_discard, register_dummy_frame_dtor): Take a
7767         thread_info pointer instead of a ptid_t.
7768         * elfread.c: Include "inferior.h".
7769         (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop):
7770         Use inferior_thread.
7771         * eval.c (evaluate_subexp): Likewise.
7772         * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use
7773         inferior_thread.
7774         * gdb_proc_service.h (struct thread_info): Forward declare.
7775         (struct ps_prochandle) <ptid>: Delete, replaced by ...
7776         <thread>: ... this new field.  All references adjusted.
7777         * gdbarch.h, gdbarch.c: Regenerate.
7778         * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a
7779         'thread' parameter.  All implementations and callers adjusted.
7780         * gdbthread.h (thread_info) <set_running>: New method.
7781         (delete_thread, delete_thread_silent): Take a thread_info pointer
7782         instead of a ptid.
7783         (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete.
7784         (first_thread_of_process): Delete, replaced by ...
7785         (first_thread_of_inferior): ... this new function.  All callers
7786         adjusted.
7787         (any_live_thread_of_process): Delete, replaced by ...
7788         (any_live_thread_of_inferior): ... this new function.  All callers
7789         adjusted.
7790         (switch_to_thread, switch_to_no_thread): Declare.
7791         (is_executing): Delete.
7792         (enable_thread_stack_temporaries): Update comment.
7793         <enable_thread_stack_temporaries>: Take a thread_info pointer
7794         instead of a ptid_t.  Incref the thread.
7795         <~enable_thread_stack_temporaries>: Decref the thread.
7796         <m_ptid>: Delete
7797         <m_thr>: New.
7798         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
7799         (get_last_thread_stack_temporary)
7800         (value_in_thread_stack_temporaries, can_access_registers_thread):
7801         Take a thread_info pointer instead of a ptid_t.  All callers
7802         adjusted.
7803         * infcall.c (get_call_return_value): Use inferior_thread.
7804         (run_inferior_call): Work with thread pointers instead of ptid_t.
7805         (call_function_by_hand_dummy): Work with thread pointers instead
7806         of ptid_t.  Use thread_info_ref.
7807         * infcmd.c (proceed_thread_callback): Access thread's state
7808         directly.
7809         (ensure_valid_thread, ensure_not_running): Use inferior_thread,
7810         access thread's state directly.
7811         (continue_command): Use inferior_thread.
7812         (info_program_command): Use find_thread_ptid and access thread
7813         state directly.
7814         (proceed_after_attach_callback): Use thread state directly.
7815         (notice_new_inferior): Take a thread_info pointer instead of a
7816         ptid_t.  All callers adjusted.
7817         (exit_inferior): Take an inferior pointer instead of a pid.  All
7818         callers adjusted.
7819         (exit_inferior_silent): New.
7820         (detach_inferior): Delete.
7821         (valid_gdb_inferior_id, pid_to_gdb_inferior_id)
7822         (gdb_inferior_id_to_pid, in_inferior_list): Delete.
7823         (detach_inferior_command, kill_inferior_command): Use
7824         find_inferior_id instead of valid_gdb_inferior_id and
7825         gdb_inferior_id_to_pid.
7826         (inferior_command): Use inferior and thread pointers.
7827         * inferior.h (struct thread_info): Forward declare.
7828         (notice_new_inferior): Take a thread_info pointer instead of a
7829         ptid_t.  All callers adjusted.
7830         (detach_inferior): Delete declaration.
7831         (exit_inferior, exit_inferior_silent): Take an inferior pointer
7832         instead of a pid.  All callers adjusted.
7833         (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
7834         (valid_gdb_inferior_id): Delete.
7835         * infrun.c (follow_fork_inferior, proceed_after_vfork_done)
7836         (handle_vfork_child_exec_or_exit, follow_exec): Adjust.
7837         (struct displaced_step_inferior_state) <pid>: Delete, replaced by
7838         ...
7839         <inf>: ... this new field.
7840         <step_ptid>: Delete, replaced by ...
7841         <step_thread>: ... this new field.
7842         (get_displaced_stepping_state): Take an inferior pointer instead
7843         of a pid.  All callers adjusted.
7844         (displaced_step_in_progress_any_inferior): Adjust.
7845         (displaced_step_in_progress_thread): Take a thread pointer instead
7846         of a ptid_t.  All callers adjusted.
7847         (displaced_step_in_progress, add_displaced_stepping_state): Take
7848         an inferior pointer instead of a pid.  All callers adjusted.
7849         (get_displaced_step_closure_by_addr): Adjust.
7850         (remove_displaced_stepping_state): Take an inferior pointer
7851         instead of a pid.  All callers adjusted.
7852         (displaced_step_prepare_throw, displaced_step_prepare)
7853         (displaced_step_fixup): Take a thread pointer instead of a ptid_t.
7854         All callers adjusted.
7855         (start_step_over): Adjust.
7856         (infrun_thread_ptid_changed): Remove bit updating ptids in the
7857         displaced step queue.
7858         (do_target_resume): Adjust.
7859         (fetch_inferior_event): Use inferior_thread.
7860         (context_switch, get_inferior_stop_soon): Take an
7861         execution_control_state pointer instead of a ptid_t.  All callers
7862         adjusted.
7863         (switch_to_thread_cleanup): Delete.
7864         (stop_all_threads): Use scoped_restore_current_thread.
7865         * inline-frame.c: Include "gdbthread.h".
7866         (inline_state) <inline_state>: Take a thread pointer instead of a
7867         ptid_t.  All callers adjusted.
7868         <ptid>: Delete, replaced by ...
7869         <thread>: ... this new field.
7870         (find_inline_frame_state): Take a thread pointer instead of a
7871         ptid_t.  All callers adjusted.
7872         (skip_inline_frames, step_into_inline_frame)
7873         (inline_skipped_frames, inline_skipped_symbol): Take a thread
7874         pointer instead of a ptid_t.  All callers adjusted.
7875         * inline-frame.h (skip_inline_frames, step_into_inline_frame)
7876         (inline_skipped_frames, inline_skipped_symbol): Likewise.
7877         * linux-fork.c (delete_checkpoint_command): Adjust to use thread
7878         pointers directly.
7879         * linux-nat.c (get_detach_signal): Likewise.
7880         * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter.
7881         (thread_db_notice_clone): Adjust.
7882         (thread_db_find_new_threads_silently)
7883         (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take
7884         a thread pointer instead of a ptid_t.  All callers adjusted.
7885         * mi/mi-cmd-var.c: Include "inferior.h".
7886         (mi_cmd_var_update_iter): Update to use thread pointers.
7887         * mi/mi-interp.c (mi_new_thread): Update to use the thread's
7888         inferior directly.
7889         (mi_output_running_pid, mi_inferior_count): Delete, bits factored
7890         out to ...
7891         (mi_output_running): ... this new function.
7892         (mi_on_resume_1): Adjust to use it.
7893         (mi_user_selected_context_changed): Adjust to use inferior_thread.
7894         * mi/mi-main.c (proceed_thread): Adjust to use thread pointers
7895         directly.
7896         (interrupt_thread_callback): : Adjust to use thread and inferior
7897         pointers.
7898         * proc-service.c: Include "gdbthread.h".
7899         (ps_pglobal_lookup): Adjust to use the thread's inferior directly.
7900         * progspace-and-thread.c: Include "inferior.h".
7901         * progspace.c: Include "inferior.h".
7902         * python/py-exitedevent.c (create_exited_event_object): Adjust to
7903         hold a reference to an inferior_object.
7904         * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use
7905         inferior_thread.
7906         * python/py-inferior.c (struct inferior_object): Give the type a
7907         tag name instead of a typedef.
7908         (python_on_normal_stop): No need to check if the current thread is
7909         listed.
7910         (inferior_to_inferior_object): Change return type to
7911         inferior_object.  All callers adjusted.
7912         (find_thread_object): Delete, bits factored out to ...
7913         (thread_to_thread_object): ... this new function.
7914         * python/py-infthread.c (create_thread_object): Use
7915         inferior_to_inferior_object.
7916         (thpy_is_stopped): Use thread pointer directly.
7917         (gdbpy_selected_thread): Use inferior_thread.
7918         * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete
7919         field, replaced with ...
7920         <thread>: ... this new field.  All users adjusted.
7921         (btpy_insn_or_gap_new): Drop const.
7922         (btpy_list_new): Take a thread pointer instead of a ptid_t.  All
7923         callers adjusted.
7924         * python/py-record.c: Include "gdbthread.h".
7925         (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
7926         a ptid_t.  All callers adjusted.
7927         (gdbpy_current_recording): Use inferior_thread.
7928         * python/py-record.h (recpy_record_object) <ptid>: Delete
7929         field, replaced with ...
7930         <thread>: ... this new field.  All users adjusted.
7931         (recpy_element_object) <ptid>: Delete
7932         field, replaced with ...
7933         <thread>: ... this new field.  All users adjusted.
7934         (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
7935         a ptid_t.  All callers adjusted.
7936         * python/py-threadevent.c: Include "gdbthread.h".
7937         (get_event_thread): Use thread_to_thread_object.
7938         * python/python-internal.h (struct inferior_object): Forward
7939         declare.
7940         (find_thread_object, find_inferior_object): Delete declarations.
7941         (thread_to_thread_object, inferior_to_inferior_object): New
7942         declarations.
7943         * record-btrace.c: Include "inferior.h".
7944         (require_btrace_thread): Use inferior_thread.
7945         (record_btrace_frame_sniffer)
7946         (record_btrace_tailcall_frame_sniffer): Use inferior_thread.
7947         (get_thread_current_frame): Use scoped_restore_current_thread and
7948         switch_to_thread.
7949         (get_thread_current_frame): Use thread pointer directly.
7950         (record_btrace_replay_at_breakpoint): Use thread's inferior
7951         pointer directly.
7952         * record-full.c: Include "inferior.h".
7953         * regcache.c: Include "gdbthread.h".
7954         (get_thread_arch_regcache): Use the inferior's address space
7955         directly.
7956         (get_thread_regcache, registers_changed_thread): New.
7957         * regcache.h (get_thread_regcache(thread_info *thread)): New
7958         overload.
7959         (registers_changed_thread): New.
7960         (remote_target) <remote_detach_1>: Swap order of parameters.
7961         (remote_add_thread): <remote_add_thread>: Return the new thread.
7962         (get_remote_thread_info(ptid_t)): New overload.
7963         (remote_target::remote_notice_new_inferior): Use thread pointers
7964         directly.
7965         (remote_target::process_initial_stop_replies): Use
7966         thread_info::set_running.
7967         (remote_target::remote_detach_1, remote_target::detach)
7968         (extended_remote_target::detach): Adjust.
7969         * stack.c (frame_show_address): Use inferior_thread.
7970         * target-debug.h (target_debug_print_thread_info_pp): New.
7971         * target-delegates.c: Regenerate.
7972         * target.c (default_thread_address_space): Delete.
7973         (memory_xfer_partial_1): Use current_inferior.
7974         (target_detach): Use current_inferior.
7975         (target_thread_address_space): Delete.
7976         (generic_mourn_inferior): Use current_inferior.
7977         * target.h (struct target_ops) <thread_address_space>: Delete.
7978         (target_thread_address_space): Delete.
7979         * thread.c (init_thread_list): Use ALL_THREADS_SAFE.  Use thread
7980         pointers directly.
7981         (delete_thread_1, delete_thread, delete_thread_silent): Take a
7982         thread pointer instead of a ptid_t.  Adjust all callers.
7983         (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete.
7984         (first_thread_of_process): Delete, replaced by ...
7985         (first_thread_of_inferior): ... this new function.  All callers
7986         adjusted.
7987         (any_thread_of_process): Rename to ...
7988         (any_thread_of_inferior): ... this, and take an inferior pointer.
7989         (any_live_thread_of_process): Rename to ...
7990         (any_live_thread_of_inferior): ... this, and take an inferior
7991         pointer.
7992         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
7993         (value_in_thread_stack_temporaries)
7994         (get_last_thread_stack_temporary): Take a thread pointer instead
7995         of a ptid_t.  Adjust all callers.
7996         (thread_info::set_running): New.
7997         (validate_registers_access): Use inferior_thread.
7998         (can_access_registers_ptid): Rename to ...
7999         (can_access_registers_thread): ... this, and take a thread
8000         pointer.
8001         (print_thread_info_1): Adjust to compare thread pointers instead
8002         of ptids.
8003         (switch_to_no_thread, switch_to_thread): Make extern.
8004         (scoped_restore_current_thread::~scoped_restore_current_thread):
8005         Use m_thread pointer directly.
8006         (scoped_restore_current_thread::scoped_restore_current_thread):
8007         Use inferior_thread.
8008         (thread_command): Use thread pointer directly.
8009         (thread_num_make_value_helper): Use inferior_thread.
8010         * top.c (execute_command): Use inferior_thread.
8011         * tui/tui-interp.c: Include "inferior.h".
8012         * varobj.c (varobj_create): Use inferior_thread.
8013         (value_of_root_1): Use find_thread_global_id instead of
8014         global_thread_id_to_ptid.
8015
8016 2018-06-21  Alan Hayward  <alan.hayward@arm.com>
8017
8018         * regcache.c (readable_regcache::read_part): Avoid memcpy when
8019         possible.
8020         (regcache::write_part): Likewise.
8021         (readable_regcache::cooked_read_part): Update comment.
8022         (readable_regcache::cooked_write_part): Likewise.
8023         * regcache.h: (readable_regcache::read_part): Likewise.
8024         (regcache::write_part): Likewise.
8025
8026 2018-06-21  Richard Bunt  <richard.bunt@arm.com>
8027             Dirk Schubert  <dirk.schubert@arm.com>
8028
8029         * aarch64-linux-nat.c (post_attach): New.
8030         (aarch64_linux_nat_target::post_attach): Override post_attach to
8031         record the number of hardware debug registers.
8032
8033 2018-06-20  Tom Tromey  <tom@tromey.com>
8034
8035         * python/py-param.c (add_setshow_generic): Make parameters const.
8036         (parmpy_init): Update.
8037
8038 2018-06-20  Simon Marchi  <simon.marchi@polymtl.ca>
8039
8040         * regcache.h (regcache_cooked_read_ftype): Rename to...
8041         (register_read_ftype): ...this, change type to function_view.
8042         (class reg_buffer) <save>: Remove src parameter.
8043         (readonly_detached_regcache) <readonly_detached_regcache>: Make
8044         parameter non-const in first overload.  Remove src parameter in
8045         second overload.
8046         * regcache.c (do_cooked_read): Remove.
8047         (readonly_detached_regcache::readonly_detached_regcache): Make
8048         parameter non-const, adjust call to other constructor.
8049         (reg_buffer::save): Remove src parameter.
8050         * frame.c (do_frame_register_read): Remove.
8051         (frame_save_as_regcache): Use lambda function.
8052         * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
8053         parameter to ppu2spu_data *.
8054         (ppu2spu_sniffer): Use lambda function.
8055
8056 2018-06-20  Simon Marchi  <simon.marchi@polymtl.ca>
8057
8058         * record-full.c (record_full_target::insert_breakpoint): Remove
8059         "struct" keyword, add const.
8060
8061 2018-06-19  Simon Marchi  <simon.marchi@ericsson.com>
8062
8063         * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
8064         PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
8065         * configure.ac: Remove AC_PREREQ, add missing quoting.
8066         * gnulib/configure.ac: Modernize usage of
8067         AC_INIT/AM_INIT_AUTOMAKE.  Remove AC_PREREQ.
8068         * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
8069         (AUTOMAKE_VERSION): Bump to 1.15.1.
8070         * configure: Re-generate.
8071         * config.in: Re-generate.
8072         * aclocal.m4: Re-generate.
8073         * gnulib/aclocal.m4: Re-generate.
8074         * gnulib/config.in: Re-generate.
8075         * gnulib/configure: Re-generate.
8076         * gnulib/import/Makefile.in: Re-generate.
8077
8078 2018-06-19  Pedro Alves  <palves@redhat.com>
8079
8080         * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
8081         (lookup_minimal_symbol_by_pc_section): ... here with
8082         gdb_assert_not_reached added.
8083
8084 2018-06-19  Pedro Alves  <palves@redhat.com>
8085
8086         * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
8087         parameter with a block parameter.  Compare location's block symbol
8088         with the frame's block instead of addresses.
8089         (skip_inline_frames): Pass the current block instead of the
8090         frame's address.  Break out as soon as we determine the frame
8091         should not be skipped.
8092
8093 2018-06-18  Tom Tromey  <tom@tromey.com>
8094
8095         * solib-aix.c (solib_aix_get_section_offsets): Return
8096         unique_xmalloc_ptr.
8097         (solib_aix_solib_create_inferior_hook): Update.
8098
8099 2018-06-18  Tom Tromey  <tom@tromey.com>
8100
8101         * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
8102
8103 2018-06-18  Tom Tromey  <tom@tromey.com>
8104
8105         * solib-frv.c (frv_relocate_main_executable): Use
8106         unique_xmalloc_ptr.
8107         * solib-dsbt.c (dsbt_relocate_main_executable): Use
8108         unique_xmalloc_ptr.
8109
8110 2018-06-18  Tom Tromey  <tom@tromey.com>
8111
8112         * objfiles.h (inhibit_section_map_updates): Update.
8113         (resume_section_map_updates, resume_section_map_updates_cleanup):
8114         Remove.
8115         * solib-svr4.c (svr4_handle_solib_event): Update.
8116         * objfiles.c (inhibit_section_map_updates): Return
8117         scoped_restore_tmpl<int>.
8118         (resume_section_map_updates, resume_section_map_updates_cleanup):
8119         Remove.
8120
8121 2018-06-18  Tom Tromey  <tom@tromey.com>
8122
8123         * valprint.h (read_string): Update.
8124         * valprint.c (read_string): Change type of "buffer".
8125         (val_print_string): Update.
8126         * python/py-value.c (valpy_string): Update.
8127         * language.h (struct language_defn) <la_get_string>: Change
8128         type of "buffer".
8129         (default_get_string, c_get_string): Update.
8130         * language.c (default_get_string): Change type of "buffer".
8131         * guile/scm-value.c (gdbscm_value_to_string): Update.
8132         * c-lang.c (c_get_string): Change type of "buffer".
8133
8134 2018-06-18  Tom Tromey  <tom@tromey.com>
8135
8136         * ser-mingw.c (struct pipe_state_destroyer): New.
8137         (pipe_state_up): New typedef.
8138         (cleanup_pipe_state): Remove.
8139         (pipe_windows_open): Use pipe_state_up.  Don't release argv.
8140
8141 2018-06-18  Tom Tromey  <tom@tromey.com>
8142
8143         * rust-lang.h (rust_yyerror): Don't declare.
8144         * rust-lang.c (rust_language_defn): Update.
8145         * rust-exp.y (yyerror): Now static.
8146         * parse.c (parse_exp_in_context_1): Update.
8147         * p-lang.h (p_yyerror): Don't declare.
8148         * p-lang.c (p_language_defn): Update.
8149         * p-exp.y (yyerror): Now static.
8150         * opencl-lang.c (opencl_language_defn): Update.
8151         * objc-lang.c (objc_language_defn): Update.
8152         * m2-lang.h (m2_yyerror): Don't declare.
8153         * m2-lang.c (m2_language_defn): Update.
8154         * m2-exp.y (yyerror): Now static.
8155         * language.h (struct language_defn) <la_error>: Remove.
8156         * language.c (unk_lang_error): Remove.
8157         (unknown_language_defn, auto_language_defn): Remove.
8158         * go-lang.h (go_yyerror): Don't declare.
8159         * go-lang.c (go_language_defn): Update.
8160         * go-exp.y (yyerror): Now static.
8161         * f-lang.h (f_yyerror): Don't declare.
8162         * f-lang.c (f_language_defn): Update.
8163         * f-exp.y (yyerror): Now static.
8164         * d-lang.h (d_yyerror): Don't declare.
8165         * d-lang.c (d_language_defn): Update.
8166         * d-exp.y (yyerror): Now static.
8167         * c-lang.h (c_yyerror): Don't declare.
8168         * c-lang.c (c_language_defn, cplus_language_defn)
8169         (asm_language_defn, minimal_language_defn): Update.
8170         * c-exp.y (yyerror): Now static.
8171         * ada-lang.h (ada_yyerror): Don't declare.
8172         * ada-lang.c (ada_language_defn): Update.
8173         * ada-exp.y (yyerror): Now static.
8174
8175 2018-06-18  Alan Hayward  <alan.hayward@arm.com>
8176
8177         * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
8178         (store_sveregs_to_thread): Likewise.
8179         (aarch64_linux_fetch_inferior_registers): Check for SVE.
8180         (aarch64_linux_store_inferior_registers): Likewise.
8181         * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
8182         function.
8183         (aarch64_sve_regs_copy_to_regcache): Likewise.
8184         (aarch64_sve_regs_copy_from_regcache): Likewise.
8185         * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
8186         declaration.
8187         (aarch64_sve_regs_copy_to_regcache): Likewise.
8188         (aarch64_sve_regs_copy_from_regcache): Likewise.
8189         (sve_context): Structure from Linux headers.
8190         (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
8191         (SVE_SIG_ZREG_SIZE): Likewise.
8192         (SVE_SIG_PREG_SIZE): Likewise.
8193         (SVE_SIG_FFR_SIZE): Likewise.
8194         (SVE_SIG_REGS_OFFSET): Likewise.
8195         (SVE_SIG_ZREGS_OFFSET): Likewise.
8196         (SVE_SIG_ZREG_OFFSET): Likewise.
8197         (SVE_SIG_ZREGS_SIZE): Likewise.
8198         (SVE_SIG_PREGS_OFFSET): Likewise.
8199         (SVE_SIG_PREG_OFFSET): Likewise.
8200         (SVE_SIG_PREGS_SIZE): Likewise.
8201         (SVE_SIG_FFR_OFFSET): Likewise.
8202         (SVE_SIG_REGS_SIZE): Likewise.
8203         (SVE_SIG_CONTEXT_SIZE): Likewise.
8204         (SVE_PT_REGS_MASK): Likewise.
8205         (SVE_PT_REGS_FPSIMD): Likewise.
8206         (SVE_PT_REGS_SVE): Likewise.
8207         (SVE_PT_VL_INHERIT): Likewise.
8208         (SVE_PT_VL_ONEXEC): Likewise.
8209         (SVE_PT_REGS_OFFSET): Likewise.
8210         (SVE_PT_FPSIMD_OFFSET): Likewise.
8211         (SVE_PT_FPSIMD_SIZE): Likewise.
8212         (SVE_PT_SVE_ZREG_SIZE): Likewise.
8213         (SVE_PT_SVE_PREG_SIZE): Likewise.
8214         (SVE_PT_SVE_FFR_SIZE): Likewise.
8215         (SVE_PT_SVE_FPSR_SIZE): Likewise.
8216         (SVE_PT_SVE_FPCR_SIZE): Likewise.
8217         (__SVE_SIG_TO_PT): Likewise.
8218         (SVE_PT_SVE_OFFSET): Likewise.
8219         (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
8220         (SVE_PT_SVE_ZREG_OFFSET): Likewise.
8221         (SVE_PT_SVE_ZREGS_SIZE): Likewise.
8222         (SVE_PT_SVE_PREGS_OFFSET): Likewise.
8223         (SVE_PT_SVE_PREG_OFFSET): Likewise.
8224         (SVE_PT_SVE_PREGS_SIZE): Likewise.
8225         (SVE_PT_SVE_FFR_OFFSET): Likewise.
8226         (SVE_PT_SVE_FPSR_OFFSET): Likewise.
8227         (SVE_PT_SVE_FPCR_OFFSET): Likewise.
8228         (SVE_PT_SVE_SIZE): Likewise.
8229         (SVE_PT_SIZE): Likewise.
8230         (HAS_SVE_STATE): New define.
8231
8232 2018-06-18  Alan Hayward  <alan.hayward@arm.com>
8233
8234         * nat/aarch64-sve-linux-sigcontext.h: New file.
8235         * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
8236         new files.
8237         (SVE_VQ_MIN): Likewise.
8238         (SVE_VQ_MAX): Likewise.
8239         (SVE_VL_MIN): Likewise.
8240         (SVE_VL_MAX): Likewise.
8241         (SVE_NUM_ZREGS): Likewise.
8242         (SVE_NUM_PREGS): Likewise.
8243         (sve_vl_valid): Likewise.
8244         (struct user_sve_header): Likewise.
8245
8246 2018-06-16  Andrew Burgess  <andrew.burgess@embecosm.com>
8247             Richard Bunt <Richard.Bunt@arm.com>
8248
8249         * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
8250         was requested by GDB.
8251
8252 2018-06-15  Tom de Vries  <tdevries@suse.de>
8253
8254         * MAINTAINERS (Write After Approval): Add Tom de Vries.
8255
8256 2018-06-14  Simon Marchi  <simon.marchi@polymtl.ca>
8257
8258         * gnulib/update-gnulib.sh: Print expected versions of
8259         autoconf/aclocal.
8260
8261 2018-06-14  Simon Marchi  <simon.marchi@ericsson.com>
8262
8263         * arch-utils.c (default_type_align): Use type_length_units.
8264         * gdbtypes.c (type_align): Use type_length_units.
8265
8266 2018-06-14  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
8267
8268         * cli/cli-script.c (_initialize_cli_script): Fix online documentation
8269         of 'define' command.
8270
8271 2018-06-14  Tom de Vries  <tdevries@suse.de>
8272
8273         PR cli/22573
8274         * infcmd.c (print_return_value_1): Use get_user_print_options instead of
8275         get_no_prettyformat_print_options.
8276
8277 2018-06-13  Simon Marchi  <simon.marchi@ericsson.com>
8278
8279         * sparc-nat.h: Include target.h.
8280         * sparc64-linux-nat.c (class sparc64_linux_nat_target)
8281         <fetch_registers>: Remove this argument in function call.
8282         <store_registers>: Remove this argument in function call, remove
8283         extra semicolon.
8284         <low_forget_process>: Call sparc64_forget_process instead of
8285         sparc_forget_process.
8286
8287 2018-06-13  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
8288
8289         * procfs.c (_initialize_procfs): Use add_inf_child_target.
8290         (procfs_target::make_corefile_notes): Adjust to new
8291         target_read_alloc return type.
8292
8293 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
8294             Stephen Roberts  <stephen.roberts@arm.com>
8295
8296         PR gdb/22882
8297         * infrun.c (fetch_inferior_event): If GDB is not proceeding then
8298         run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
8299         Move should_notify_stop local into more inner scope.
8300
8301 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
8302             Stephen Roberts  <stephen.roberts@arm.com>
8303
8304         PR gdb/22882
8305         * infrun.c (resume_1): Add call to mark_async_event_handler.
8306
8307 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
8308
8309         * infrun.c (do_target_wait): Change old version of $pc printed.
8310
8311 2018-06-11  Simon Marchi  <simon.marchi@ericsson.com>
8312
8313         * dwarf2read.c (read_index_from_section): Rename to...
8314         (read_gdb_index_from_section): ... this, update all callers.
8315         (dwarf2_read_index): Rename to...
8316         (dwarf2_read_gdb_index): ... this, update all callers.
8317
8318 2018-06-11  John David Anglin  <danglin@gcc.gnu.org>
8319
8320         * hppa-linux-nat.c
8321         (hppa_linux_nat_target::fetch_inferior_registers): Rename to
8322         hppa_linux_nat_target::fetch_registers.
8323
8324 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
8325
8326         * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
8327         * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
8328         (AARCH64_DWARF_SVE_FFR): Likewise.
8329         (AARCH64_DWARF_SVE_P0): Likewise.
8330         (AARCH64_DWARF_SVE_Z0): Likewise.
8331
8332 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
8333
8334         * common/common-regcache.h (raw_compare): New function.
8335         * regcache.c (regcache::raw_compare): Likewise.
8336         * regcache.h (regcache::raw_compare): New declaration.
8337
8338 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
8339
8340         * common/common-regcache.h (reg_buffer_common): New structure.
8341         * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
8342         (reg_buffer::raw_supply): Likewise.
8343         (reg_buffer::raw_supply_integer): Likewise.
8344         (reg_buffer::raw_supply_zeroed): Likewise.
8345         (reg_buffer::raw_collect): Likewise.
8346         (reg_buffer::raw_collect_integer): Likewise.
8347         * regcache.h (reg_buffer::invalidate): Move from detached_regcache.
8348         (reg_buffer::raw_supply): Likewise.
8349         (reg_buffer::raw_supply_integer): Likewise.
8350         (reg_buffer::raw_supply_zeroed): Likewise.
8351         (reg_buffer::raw_collect): Likewise.
8352         (reg_buffer::raw_collect_integer): Likewise.
8353
8354 2018-06-10  Tom Tromey  <tom@tromey.com>
8355
8356         * remote.c (stop_reply_p): Remove typedef.  Don't declare queue.
8357         (class remote_state) <stop_reply_queue>: Now std::vector.
8358         (remote_state::~remote_state)
8359         (remote_target::stop_reply_queue_length): Update.
8360         (struct queue_iter_param, remove_child_of_pending_fork)
8361         (struct check_pending_event_prevents_wildcard_vcont_callback_data)
8362         (check_pending_event_prevents_wildcard_vcont_callback)
8363         (remove_stop_reply_for_inferior)
8364         (remove_stop_reply_of_remote_state)
8365         (remote_notif_remove_once_on_match)
8366         (stop_reply_match_ptid_and_ws)
8367         (remote_kill_child_of_pending_fork): Remove.
8368         (remote_target::remove_new_fork_children)
8369         (remote_target::check_pending_events_prevent_wildcard_vcont)
8370         (remote_target::discard_pending_stop_replies)
8371         (remote_target::discard_pending_stop_replies_in_queue)
8372         (remote_target::remote_notif_remove_queued_reply)
8373         (remote_target::queued_stop_reply)
8374         (remote_target::push_stop_reply, remote_target::peek_stop_reply)
8375         (remote_target::wait, remote_target::kill_new_fork_children)
8376         (remote_target::async): Update.
8377
8378 2018-06-10  Tom Tromey  <tom@tromey.com>
8379
8380         * record-full.c (record_full_arch_list_cleanups): Remove.
8381         (record_full_message): Use try/catch.
8382         (record_full_wait_cleanups): Remove.
8383         (record_full_wait_1): Use try/catch.
8384         (record_full_restore): Likewise.
8385
8386 2018-06-10  Tom Tromey  <tom@tromey.com>
8387
8388         * record-full.c (record_full_breakpoint_p): Remove typedef.  Don't
8389         declare VEC.  Add constructor.
8390         <in_target_beneath>: Now bool.
8391         (record_full_breakpoints): Now a std::vector, static.
8392         (record_full_sync_record_breakpoints)
8393         (record_full_init_record_breakpoints)
8394         (record_full_target::insert_breakpoint)
8395         (record_full_target::remove_breakpoint): Update.  Don't use XNEW.
8396
8397 2018-06-10  Simon Marchi  <simon.marchi@polymtl.ca>
8398
8399         * dwarf2read.c (process_cu_includes): Remove struct keyword.
8400         * serial.c (serial_interface_lookup): Remove struct keyword.
8401
8402 2018-06-10  Tom Tromey  <tom@tromey.com>
8403
8404         * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
8405         method.
8406         * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
8407         a method.
8408         * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
8409         method.
8410         * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
8411         "beneath" as a method.
8412         * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
8413         Use "beneath" as a method.
8414
8415 2018-06-10  Tom Tromey  <tom@tromey.com>
8416
8417         * tracefile.c (struct trace_file_writer_deleter): New.
8418         <operator()>: Rename from trace_file_writer_xfree.
8419         (trace_file_writer_up): New typedef.
8420         (tsave_command, trace_save_tfile, trace_save_ctf): Update.
8421
8422 2018-06-09  Simon Marchi  <simon.marchi@ericsson.com>
8423
8424         * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
8425         <m_registers, m_register_status>: Change type to
8426         std::unique_ptr.
8427         * regcache.c (reg_buffer::reg_buffer): Use new instead of
8428         XCNEWVEC.
8429
8430 2018-06-09  Simon Marchi  <simon.marchi@ericsson.com>
8431
8432         * common/common-regcache.h (enum register_status): Add
8433         underlying type "signed char".
8434         * regcache.h (reg_buffer) <m_register_status>: Change type to
8435         register_status *.
8436         * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
8437         register_status instead of signed char.
8438         (reg_buffer::save): Use REG_UNKNOWN instead of 0.
8439         (reg_buffer::get_register_status): Remove cast.
8440         (readable_regcache::raw_read): Remove cast.
8441         (readable_regcache::cooked_read): Remove cast.
8442
8443 2018-06-09  Tom Tromey  <tom@tromey.com>
8444
8445         * source.c (reverse_search_command, forward_search_command): Use
8446         scoped_fd.
8447
8448 2018-06-09  Tom Tromey  <tom@tromey.com>
8449
8450         * serial.c (serial_ops_p): Remove typedef.  Don't declare VEC.
8451         (serial_ops_list): Now static, std::vector.
8452         (serial_interface_lookup, serial_add_interface): Update.
8453
8454 2018-06-09  Tom Tromey  <tom@tromey.com>
8455
8456         * dwarf2read.c (process_cu_includes): Update.
8457         (process_full_comp_unit): Update.
8458         * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
8459         std::vector.
8460
8461 2018-06-08  Paul Koning  <paul_koning@dell.com>
8462
8463         PR gdb/23252
8464
8465         * python/python.c (do_start_initialization):
8466         Avoid call to internal Python API.
8467         (init__gdb_module): New function.
8468
8469 2018-06-08  Gary Benson <gbenson@redhat.com>
8470
8471         * linux-thread-db.c (valprint.h): New include.
8472         (struct check_thread_db_info): New structure.
8473         (check_thread_db_on_load, tdb_testinfo): New static globals.
8474         (check_thread_db, check_thread_db_callback): New functions.
8475         (try_thread_db_load_1): Run integrity checks if requested.
8476         (maintenance_check_libthread_db): New function.
8477         (_initialize_thread_db): Register "maint check libthread-db"
8478         and "maint set/show check-libthread-db".
8479         * NEWS: Mention the above new commands.
8480
8481 2018-06-08  Tom Tromey  <tom@tromey.com>
8482
8483         * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
8484         now a method.
8485
8486 2018-06-08  Tom Tromey  <tom@tromey.com>
8487
8488         * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
8489
8490 2018-06-08  Tom Tromey  <tom@tromey.com>
8491
8492         * common/btrace-common.h (struct btrace_data): Add constructor,
8493         destructor, move assignment operator.
8494         <empty, clear, fini>: New methods.
8495         <format>: Initialize.
8496         (btrace_data_init, btrace_data_fini, btrace_data_clear)
8497         (btrace_data_empty): Don't declare.
8498         * common/btrace-common.c (btrace_data_init): Remove.
8499         (btrace_data::fini): Rename from btrace_data_fini.
8500         (btrace_data::empty): Rename from btrace_data_empty.
8501         (btrace_data::clear): Rename from btrace_data_clear.  Return
8502         bool.
8503         * btrace.h (make_cleanup_btrace_data): Don't declare.
8504         * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
8505         (parse_xml_btrace): Update.
8506         (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
8507         (maint_btrace_clear_packet_history_cmd): Update.
8508
8509 2018-06-07  Pedro Alves  <palves@redhat.com>
8510
8511         * target.h (target_ops) <beneath>: Now a method.  All references
8512         updated.
8513         (class target_stack): New.
8514         * target.c (g_target_stack): New.
8515         (g_current_top_target): Delete.
8516         (current_top_target): Get the top target out of g_target_stack.
8517         (target_stack::push, target_stack::unpush): New.
8518         (push_target, unpush_target): Reimplement.
8519         (target_is_pushed): Reimplement in terms of g_target_stack.
8520         (target_ops::beneath, target_stack::find_beneath): New.
8521
8522 2018-06-07  Pedro Alves  <palves@redhat.com>
8523
8524         * target.h (find_target_beneath): Delete declaration.
8525         * target.c (find_target_beneath): Delete definition.
8526         * aix-thread.c: All callers of find_target_beneath adjusted to
8527         call target_ops::beneath instead.
8528         * bsd-uthread.c: Likewise.
8529         * linux-thread-db.c: Likewise.
8530         * ravenscar-thread.c: Likewise.
8531         * sol-thread.c: Likewise.
8532         * spu-multiarch.c: Likewise.
8533
8534 2018-06-07  Pedro Alves  <palves@redhat.com>
8535
8536         * target.h (target_ops) <beneath>: Now a method.  All references
8537         updated.
8538         (target_ops) <m_beneath>: New.
8539         * target.c (target_ops::beneath): New.
8540         * corelow.c: Adjust all references to target_ops::beneath.
8541         * linux-thread-db.c: Likewise.
8542         * make-target-delegates: Likewise.
8543         * record-btrace.c: Likewise.
8544         * record-full.c: Likewise.
8545         * remote.c: Likewise.
8546         * target.c: Likewise.
8547         * target-delegates.c: Regenerate.
8548
8549 2018-06-07  Pedro Alves  <palves@redhat.com>
8550
8551         * target.h (target_stack): Delete.
8552         (current_top_target): Declare function.
8553         * target.c (target_stack): Delete.
8554         (g_current_top_target): New.
8555         (current_top_target): New function.
8556         * auxv.c: Use current_top_target instead of target_stack
8557         throughout.
8558         * avr-tdep.c: Likewise.
8559         * breakpoint.c: Likewise.
8560         * corefile.c: Likewise.
8561         * elfread.c: Likewise.
8562         * eval.c: Likewise.
8563         * exceptions.c: Likewise.
8564         * frame.c: Likewise.
8565         * gdbarch-selftests.c: Likewise.
8566         * gnu-v3-abi.c: Likewise.
8567         * ia64-tdep.c: Likewise.
8568         * ia64-vms-tdep.c: Likewise.
8569         * infcall.c: Likewise.
8570         * infcmd.c: Likewise.
8571         * infrun.c: Likewise.
8572         * linespec.c: Likewise.
8573         * linux-tdep.c: Likewise.
8574         * minsyms.c: Likewise.
8575         * ppc-linux-nat.c: Likewise.
8576         * ppc-linux-tdep.c: Likewise.
8577         * procfs.c: Likewise.
8578         * regcache.c: Likewise.
8579         * remote.c: Likewise.
8580         * rs6000-tdep.c: Likewise.
8581         * s390-linux-nat.c: Likewise.
8582         * s390-tdep.c: Likewise.
8583         * solib-aix.c: Likewise.
8584         * solib-darwin.c: Likewise.
8585         * solib-dsbt.c: Likewise.
8586         * solib-spu.c: Likewise.
8587         * solib-svr4.c: Likewise.
8588         * solib-target.c: Likewise.
8589         * sparc-tdep.c: Likewise.
8590         * sparc64-tdep.c: Likewise.
8591         * spu-tdep.c: Likewise.
8592         * symfile.c: Likewise.
8593         * symtab.c: Likewise.
8594         * target-descriptions.c: Likewise.
8595         * target-memory.c: Likewise.
8596         * target.c: Likewise.
8597         * target.h: Likewise.
8598         * tracefile-tfile.c: Likewise.
8599         * tracepoint.c: Likewise.
8600         * valops.c: Likewise.
8601         * valprint.c: Likewise.
8602         * value.c: Likewise.
8603         * windows-tdep.c: Likewise.
8604         * mi/mi-main.c: Likewise.
8605
8606 2018-06-07  Tom Tromey  <tom@tromey.com>
8607
8608         * valprint.h (build_address_symbolic): Declare.
8609         * printcmd.c (print_address_symbolic): Update.
8610         (build_address_symbolic): Change "name" and "filename" to
8611         std::string.
8612         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
8613         Update.
8614         * defs.h (build_address_symbolic): Remove declaration.
8615
8616 2018-06-07  Alan Hayward  <alan.hayward@arm.com>
8617
8618         * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
8619         (aarch64_vnv_type): Add function.
8620         (aarch64_pseudo_register_name): Add V regs for SVE.
8621         (aarch64_pseudo_register_type): Likewise.
8622         (aarch64_pseudo_register_reggroup_p): Likewise.
8623         (aarch64_pseudo_read_value_2): Use V0 offset for SVE
8624         (aarch64_pseudo_read_value): Add V regs for SVE.
8625         (aarch64_pseudo_write_2): Use V0 offset for SVE
8626         (aarch64_pseudo_write): Add V regs for SVE.
8627         * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
8628
8629 2018-06-06  Sergio Durigan Junior  <sergiodj@redhat.com>
8630
8631         * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
8632         (sve_vl_from_vq): Likewise.
8633
8634 2018-06-05  Tom Tromey  <tom@tromey.com>
8635
8636         * cli/cli-cmds.c (show_version): Update.
8637         * top.c (print_gdb_version): Add "interactive" parameter.
8638         Update.
8639         * main.c (captured_main_1): Update.
8640         * top.h (print_gdb_version): Add "interactive" parameter and a
8641         comment.
8642
8643 2018-06-05  David Malcolm  <dmalcolm@redhat.com>
8644
8645         * common/enum-flags.h: Add trailing semicolon to example in
8646         comment.
8647
8648 2018-06-05  Tom Tromey  <tom@tromey.com>
8649
8650         PR cli/12326:
8651         * NEWS: Add entry about pager.
8652         * utils.c (pagination_disabled_for_command): New global.
8653         (prompt_for_continue): Allow "c" response to prompt.
8654         (reinitialize_more_filter): Clear
8655         pagination_disabled_for_command.
8656         (fputs_maybe_filtered): Check pagination_disabled_for_command.
8657
8658 2018-06-04  Tom Tromey  <tom@tromey.com>
8659
8660         * ada-lang.h (ada_lookup_symbol_list): Update.
8661         * ada-lang.c (resolve_subexp): Update.
8662         (symbols_are_identical_enums): Change type of syms.  Remove nsyms
8663         parameter.
8664         (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
8665         (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
8666         results parameter to std::vector.
8667         (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
8668         Update.
8669         * ada-exp.y (block_lookup): Update.
8670         (select_possible_type_sym): Change type of syms.  Remove nsyms
8671         parameter.
8672         (write_var_or_type, write_name_assoc): Update.
8673
8674 2018-06-04  Joel Brobecker  <brobecker@adacore.com>
8675
8676         * windows-nat.c (windows_nat_target::xfer_partial): Return
8677         TARGET_XFER_E_IO if we need to delegate to the target beneath
8678         but BENEATH is NULL.
8679
8680 2018-06-04  Simon Marchi  <simon.marchi@ericsson.com>
8681
8682         * Makefile.in (config.status): Add configure.nat as a
8683         dependency.
8684
8685 2018-06-04  Tom Tromey  <tom@tromey.com>
8686
8687         * cp-name-parser.y (cpname_state): Add method declarations.
8688         (HANDLE_QUAL): Update.
8689         (cpname_state::d_grab, cpname_state::fill_comp)
8690         (cpname_state::make_operator, cpname_state::make_dtor)
8691         (cpname_state::make_builtin_type, cpname_state::make_name)
8692         (cpname_state::d_qualify, cpname_state::d_int_type)
8693         (cpname_state::d_unary, cpname_state::d_binary): Now methods.
8694         (%union): Move earlier.
8695
8696 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
8697
8698         * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
8699
8700 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
8701
8702         * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
8703         (aarch64_pseudo_write_1): Likewise.
8704         (aarch64_pseudo_read_value): Use helper.
8705         (aarch64_pseudo_write): Likewise.
8706
8707 2018-06-04  Pedro Alves  <palves@redhat.com>
8708
8709         * darwin-nat.c (darwin_ops): Delete.
8710         (darwin_attach_pid): Use get_native_target.
8711
8712 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
8713
8714         * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
8715         * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
8716
8717 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
8718
8719         * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
8720         * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
8721         (aarch64_gdbarch_init): Check for SVE.
8722         * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
8723
8724 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
8725
8726         * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
8727         * aarch64-tdep.h (aarch64_read_description): Likewise.
8728         * arch/aarch64.c (aarch64_create_target_description): Likewise.
8729         * arch/aarch64.h (aarch64_create_target_description): Likewise.
8730         * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
8731         * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
8732         * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
8733
8734 2018-06-02  Simon Marchi  <simon.marchi@ericsson.com>
8735
8736         * value.c (value_fetch_lazy_bitfield): New.
8737         (value_fetch_lazy_memory): New.
8738         (value_fetch_lazy_register): New.
8739         (value_fetch_lazy): Factor out to smaller functions.
8740
8741 2018-06-01  Tom Tromey  <tom@tromey.com>
8742
8743         * cp-name-parser.y (backslashable, represented): Now const.
8744
8745 2018-06-01  Tom Tromey  <tom@tromey.com>
8746
8747         * cp-name-parser.y: Include parser-defs.h.
8748         (parser_fprintf): Remove declaration.
8749
8750 2018-06-01  Tom Tromey  <tom@tromey.com>
8751
8752         * cp-name-parser.y: Use %pure-parser, %lex-param, and
8753         %parse-param.
8754         (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
8755         (global_result): Remove globals.
8756         (struct cpname_state): New.
8757         (yyparse): Don't declare.
8758         (yylex, yyerror): Move declarations after %union.
8759         (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
8760         (make_name): Add state parameter.
8761         Update all callers.
8762         (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
8763         parameter.
8764         (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
8765         Update.
8766         (yylex): Add lvalp, state parameters.
8767         (yyerror): Add state parameter.
8768         (cp_demangled_name_to_comp): Update.
8769
8770 2018-06-01  Tom Tromey  <tom@tromey.com>
8771
8772         * cp-name-parser.y (parser_fprintf): Declare.
8773         (GDB_YY_REMAP_PREFIX): Define.
8774         Include yy-remap.h.  Don't redefine yy* identifiers.
8775
8776 2018-06-01  Tom Tromey  <tom@tromey.com>
8777
8778         * python/py-type.c (typy_legacy_template_argument): Update.
8779         * cp-support.h (cp_demangled_name_to_comp): Update.
8780         * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
8781         parameter to be a "std::string *".
8782         (main): Update.
8783
8784 2018-06-01  H.J. Lu  <hongjiu.lu@intel.com>
8785
8786         * ada-lex.l: Include "diagnostics.h" instead of
8787         "common/diagnostics.h".
8788         * unittests/environ-selftests.c: Likewise.
8789         * common/diagnostics.h: Moved to ../include.
8790
8791 2018-06-01  Joel Brobecker  <brobecker@adacore.com>
8792
8793         * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
8794         to language_mode_manual while calling breakpoint_re_set_one.
8795
8796 2018-06-01  Tom Tromey  <tom@tromey.com>
8797
8798         * valops.c (value_cast_structs, destructor_name_p): Update.
8799         * symtab.c (gdb_mangle_name): Update.
8800         * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
8801         Update.
8802         * p-valprint.c (pascal_object_is_vtbl_ptr_type)
8803         (pascal_object_print_value_fields, pascal_object_print_value):
8804         Update.
8805         * p-typeprint.c (pascal_type_print_derivation_info): Update.
8806         * linespec.c (find_methods): Update.
8807         * gdbtypes.h (type_name_no_tag): Remove.
8808         (type_name_or_error): Rename from type_name_no_tag_or_error.
8809         * gdbtypes.c (type_name_no_tag): Remove.
8810         (type_name_or_error): Rename from type_name_no_tag_or_error.
8811         (lookup_struct_elt_type, check_typedef): Update.
8812         * expprint.c (print_subexp_standard): Update.
8813         * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
8814         * d-namespace.c (d_lookup_nested_symbol): Update.
8815         * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
8816         (cp_print_class_member): Update.
8817         * cp-namespace.c (cp_lookup_nested_symbol): Update.
8818         * completer.c (add_struct_fields): Update.
8819         * c-typeprint.c (cp_type_print_derivation_info)
8820         (c_type_print_varspec_prefix, c_type_print_base_struct_union):
8821         Update.
8822         * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
8823         (ada_prefer_type, ada_is_exception_sym): Update.
8824
8825 2018-06-01  Tom Tromey  <tom@tromey.com>
8826
8827         * valops.c (enum_constant_from_type, value_namespace_elt)
8828         (value_maybe_namespace_elt): Update.
8829         * valarith.c (find_size_for_pointer_math): Update.
8830         * target-descriptions.c (make_gdb_type): Update.
8831         * symmisc.c (print_symbol): Update.
8832         * stabsread.c (define_symbol, read_type)
8833         (complain_about_struct_wipeout, add_undefined_type)
8834         (cleanup_undefined_types_1): Update.
8835         * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
8836         (rust_range_type_p, val_print_struct, rust_print_struct_def)
8837         (rust_internal_print_type, rust_composite_type)
8838         (rust_evaluate_funcall, rust_evaluate_subexp)
8839         (rust_inclusive_range_type_p): Update.
8840         * python/py-type.c (typy_get_tag): Update.
8841         * p-typeprint.c (pascal_type_print_base): Update.
8842         * mdebugread.c (parse_symbol, parse_type): Update.
8843         * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
8844         Update.
8845         * guile/scm-type.c (gdbscm_type_tag): Update.
8846         * go-lang.c (sixg_string_p): Update.
8847         * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
8848         Update.
8849         * gdbtypes.h (struct main_type) <tag_name>: Remove.
8850         (TYPE_TAG_NAME): Remove.
8851         * gdbtypes.c (type_name_no_tag): Simplify.
8852         (check_typedef, check_types_equal, recursive_dump_type)
8853         (copy_type_recursive, arch_composite_type): Update.
8854         * f-typeprint.c (f_type_print_base): Update.  Print "Type" prefix
8855         in summary mode when needed.
8856         * eval.c (evaluate_funcall): Update.
8857         * dwarf2read.c (fixup_go_packaging, read_structure_type)
8858         (process_structure_scope, read_enumeration_type)
8859         (read_namespace_type, read_module_type, determine_prefix): Update.
8860         * cp-support.c (inspect_type): Update.
8861         * coffread.c (process_coff_symbol, decode_base_type): Update.
8862         * c-varobj.c (c_is_path_expr_parent): Update.
8863         * c-typeprint.c (c_type_print_base_struct_union): Update.
8864         (c_type_print_base_1): Update.  Print struct/class/union/enum in
8865         summary when using C language.
8866         * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
8867         (gen_maybe_namespace_elt): Update.
8868         * ada-lang.c (ada_type_name): Simplify.
8869         (empty_record, ada_template_to_fixed_record_type_1)
8870         (template_to_static_fixed_type)
8871         (to_record_with_fixed_variant_part, ada_check_typedef): Update.
8872
8873 2018-06-01  Tom Tromey  <tom@tromey.com>
8874
8875         * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
8876         c_print_type.
8877         * c-typeprint.c (c_print_type_1): Add "language" parameter.
8878         (c_print_type): Update.
8879         (c_print_type): New overload.
8880         (c_type_print_varspec_prefix, c_type_print_args)
8881         (c_type_print_varspec_suffix, c_print_type_no_offsets)
8882         (c_type_print_base_struct_union, c_type_print_base_1)
8883         (cp_type_print_method_args): Add "language" parameter.
8884         (c_type_print_base): Update.
8885         * c-lang.h (c_print_type): Add new overload.
8886
8887 2018-06-01  Tom Tromey  <tom@tromey.com>
8888
8889         * typeprint.h (c_type_print_varspec_suffix): Don't declare.
8890         * c-typeprint.c (c_type_print_varspec_suffix): Now static.
8891
8892 2018-06-01  Alan Hayward  <alan.hayward@arm.com>
8893
8894         * aarch64-tdep.c (aarch64_sve_register_names): New const
8895         var.
8896         * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
8897         (AARCH64_SVE_Z_REGS_NUM): New define.
8898         (AARCH64_SVE_P_REGS_NUM): Likewise.
8899         (AARCH64_SVE_NUM_REGS): Likewise.
8900
8901 2018-05-31  Uros Bizjak  <ubizjak@gmail.com>
8902
8903         * nat/linux-ptrace.h [__alpha__]
8904         (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
8905         definitions.
8906
8907 2018-05-31  Maciej W. Rozycki  <macro@mips.com>
8908
8909         * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
8910         the endianness selected.
8911         * NEWS: Document `set endian auto' mode operation update.
8912
8913 2018-05-31  Alan Hayward  <alan.hayward@arm.com>
8914
8915         * Makefile.in: Add new header.
8916         * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
8917         (sve_vl_from_vg): Likewise.
8918         (sve_vq_from_vl): Likewise.
8919         (sve_vl_from_vq): Likewise.
8920         (sve_vq_from_vg): Likewise.
8921         (sve_vg_from_vq): Likewise.
8922         * configure.nat: Add new c file.
8923         * nat/aarch64-sve-linux-ptrace.c: New file.
8924         * nat/aarch64-sve-linux-ptrace.h: New file.
8925
8926 2018-05-31  Alan Hayward  <alan.hayward@arm.com>
8927
8928         * aarch64-linux-nat.c (aarch64_linux_read_description):
8929         Add parmeter zero.
8930         * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
8931         Likewise.
8932         * aarch64-tdep.c (tdesc_aarch64_list): Add.
8933         (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
8934         (aarch64_gdbarch_init): Add parmeter zero.
8935         * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
8936         * arch/aarch64.c (aarch64_create_target_description): Check VQ.
8937         * arch/aarch64.h (aarch64_create_target_description): Add VQ.
8938         parmeter.
8939         * doc/gdb.texinfo: Describe SVE feature
8940         * features/aarch64-sve.c: New file.
8941
8942 2018-05-31  Omair Javaid  <omair.javaid@linaro.org>
8943
8944         PR gdb/23210
8945         * gdbarch.sh (significant_addr_bit): Default to zero when
8946         not set by target architecture.
8947         * gdbarch.c: Re-generated.
8948         * utils.c (address_significant): Update.
8949
8950 2018-05-30  Joel Brobecker  <brobecker@adacore.com>
8951
8952         * stack.c (func_command): Remove trailing newline in call to error.
8953
8954 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
8955
8956         * regcache.h (regcache_raw_collect): Remove, update callers to
8957         use regcache::raw_collect.
8958         * regcache.c (regcache_raw_collect): Remove.
8959
8960 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
8961
8962         * regcache.h (regcache_raw_supply): Remove, update callers to
8963         use detached_regcache::raw_supply.
8964         * regcache.c (regcache_raw_supply): Remove.
8965
8966 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
8967
8968         * regcache.h (regcache_cooked_write_part): Remove, update
8969         callers to use regcache::cooked_write_part.
8970         * regcache.c (regcache_cooked_write_part): Remove.
8971
8972 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
8973
8974         * regcache.h (regcache_cooked_read_part): Remove, update callers
8975         to use readable_regcache::cooked_read_part.
8976         * regcache.c (regcache_cooked_read_part): Remove.
8977
8978 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
8979
8980         * regcache.h (regcache_cooked_read_value): Remove, update
8981         callers to use readable_regcache::cooked_read_value.
8982         * regcache.c (regcache_cooked_read_value): Remove.
8983
8984 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
8985
8986         * regcache.h (regcache_cooked_write): Remove, update callers to
8987         use regcache::cooked_write.
8988         * regcache.c (regcache_cooked_write): Remove.
8989
8990 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
8991
8992         * regcache.h (regcache_invalidate): Remove, update callers to
8993         use detached_regcache::invalidate instead.
8994         * regcache.c (regcache_invalidate): Remove.
8995
8996 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
8997
8998         * regcache.h (regcache_raw_write_part): Remove, update callers
8999         to use regcache::raw_write_part instead.
9000         * regcache.c (regcache_raw_write_part): Remove.
9001
9002 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
9003
9004         * regcache.h (regcache_raw_read_part): Remove, update callers to
9005         use readable_regcache::raw_read_part instead.
9006         * regcache.c (regcache_raw_read_part): Remove.
9007
9008 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
9009
9010         * regcache.h (regcache_cooked_read): Remove, update callers to
9011         use readable_regcache::cooked_read instead.
9012         * regcache.c (regcache_cooked_read): Remove.
9013
9014 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
9015
9016         * regcache.h (regcache_raw_write): Remove, update callers to use
9017         regcache::raw_write instead.
9018         * regcache.c (regcache_raw_write): Remove.
9019
9020 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
9021
9022         * regcache.h (regcache_raw_read): Remove, update callers to use
9023         readable_regcache::raw_read instead.
9024         * regcache.c (regcache_raw_read): Remove.
9025
9026 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
9027
9028         * regcache.h (regcache_raw_update): Remove, update callers to
9029         use readable_regcache::raw_update instead.
9030         * regcache.c (regcache_raw_update): Remove.
9031
9032 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
9033
9034         * regcache.h (regcache_register_status): Remove, update callers
9035         to use reg_buffer::get_register_status directly instead.
9036         * regcache.c (regcache_register_status): Remove.
9037
9038 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
9039
9040         * regcache.h (regcache_get_ptid): Remove, update all callers to
9041         call regcache::ptid instead.
9042         * regcache.c (regcache_get_ptid): Remove.
9043
9044 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
9045
9046         * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
9047
9048 2018-05-30  Pedro Alves  <palves@redhat.com>
9049
9050         * common/common-exceptions.h (exception_rethrow): Use
9051         ATTRIBUTE_NORETURN.
9052
9053 2018-05-29  Simon Marchi  <simon.marchi@polymtl.ca>
9054
9055         * breakpoint.c (print_solib_event, check_status_catch_solib):
9056         Remove struct keyword in range-based for loops.
9057         * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
9058         * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
9059         Likewise.
9060         * linespec.c (find_superclass_methods, search_minsyms_for_name):
9061         Likewise.
9062         * symfile.c (addr_info_make_relative): Likewise.
9063         * thread.c (value_in_thread_stack_temporaries): Likewise.
9064
9065 2018-06-12  Weimin Pan  <weimin.pan@oracle.com>
9066
9067         PR gdb/16841
9068         * valops.c (value_struct_elt_for_reference): Call check_typedef on
9069         aggregate type to get its real type before accessing it.
9070
9071 2018-05-29  Weimin Pan  <weimin.pan@oracle.com>
9072
9073         * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
9074         * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
9075         * coff-pe-read.c (add_pe_forwarded_sym): Replace
9076         lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
9077         * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
9078         * jit.c (jit_breakpoint_re_set_internal): Likewise.
9079         * printcmd.c (info_address_command): Likewise.
9080
9081 2018-05-29  Tom Tromey  <tom@tromey.com>
9082
9083         * windows-nat.c (handle_exception): Update fall-through comment.
9084
9085 2018-05-29  Tom Tromey  <tom@tromey.com>
9086
9087         * progspace.h (so_list_ptr): Remove typedef.  Don't declare VEC.
9088         (struct program_space) <added_solibs>: Now a std::vector.
9089         * breakpoint.c (print_solib_event): Update.
9090         (check_status_catch_solib): Update.
9091         * progspace.c (clear_program_space_solib_cache): Update.
9092         * solib.c (update_solib_list): Update.
9093
9094 2018-05-29  Tom Tromey  <tom@tromey.com>
9095
9096         * python/py-type.c (typy_richcompare): Update.
9097         * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
9098         * gdbtypes.h (types_deeply_equal): Return bool.
9099         (types_equal): Likewise.
9100         * gdbtypes.c (type_equality_entry_d): Remove typedef.  Don't
9101         declare VEC.
9102         (check_types_equal): Change worklist to std::vector.  Return
9103         bool.
9104         (struct type_equality_entry): Add constructor.
9105         (compare_maybe_null_strings): Return bool.
9106         (check_types_worklist): Return bool.  Change worklist to
9107         std::vector.
9108         (types_deeply_equal): Use std::vector.
9109         (types_equal): Return bool.
9110         (compare_maybe_null_strings): Simplify.
9111
9112 2018-05-29  Tom Tromey  <tom@tromey.com>
9113
9114         * record-btrace.c (tp_t): Remove typedef.  Don't declare VEC.
9115
9116 2018-05-29  Tom Tromey  <tom@tromey.com>
9117
9118         * objc-lang.h: Don't include cp-support.h.
9119         * common/gdb_vecs.h (const_char_ptr): Remove typedef.  Don't
9120         declare VEC.
9121
9122 2018-05-27  Tom Tromey  <tom@tromey.com>
9123
9124         * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
9125
9126 2018-05-25  Tom Tromey  <tom@tromey.com>
9127
9128         * value.c (value::location): Initialize.
9129
9130 2018-05-25  Tom Tromey  <tom@tromey.com>
9131
9132         * dbxread.c (init_bincl_list): Remove.
9133         (bincl_list): Now a std::vector.
9134         (bincls_allocated, next_bincl): Remove.
9135         (free_bincl_list, do_free_bincl_list_cleanup)
9136         (make_cleanup_free_bincl_list): Remove.
9137         (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
9138         unique_xmalloc_ptr.
9139         (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
9140         (struct header_file_location): Add constructor.
9141         (add_bincl_to_list): Remove.
9142
9143 2018-05-25  Tom Tromey  <tom@tromey.com>
9144
9145         * tui/tui.c (tui_enable): Update.
9146         * mi/mi-interp.c (mi_interp::init): Update.
9147         * interps.h (class interp) <name>: New method.
9148         <m_name>: Rename from name.
9149         (~scoped_restore_interp): Update.
9150         * interps.c (interp::interp): Update.
9151         (interp_add, interp_set, interp_lookup_existing)
9152         (current_interp_named_p): Update.
9153
9154 2018-05-25  Tom Tromey  <tom@tromey.com>
9155
9156         * interps.c (interp_name): Remove.
9157         * mi/mi-interp.c (mi_interp::init): Update.
9158         * interps.h (interp_name): Remove.
9159         (~scoped_restore_interp): Update.
9160         * tui/tui.c (tui_enable): Update.
9161
9162 2018-05-25  Tom Tromey  <tom@tromey.com>
9163
9164         * utils.c (fputs_maybe_filtered): Update.
9165         * linespec.c (decode_line_full): Update.
9166         * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
9167         (mi_print_breakpoint_for_event, mi_solib_loaded)
9168         (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
9169         (mi_user_selected_context_changed): Update.
9170         * mi/mi-main.c (mi_execute_command): Update.
9171         * cli/cli-script.c (execute_control_command): Update.
9172         * python/python.c (execute_gdb_command): Update.
9173         * solib.c (info_sharedlibrary_command): Update.
9174         * interps.c (interp_ui_out): Remove.
9175         * interps.h (interp_ui_out): Remove.
9176
9177 2018-05-25  Tom Tromey  <tom@tromey.com>
9178
9179         * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
9180         * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
9181         * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
9182
9183 2018-05-25  Tom Tromey  <tom@tromey.com>
9184
9185         * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
9186         * interps.c (interp_exec): Use scoped_restore.
9187
9188 2018-05-25  Tom Tromey  <tom@tromey.com>
9189
9190         * remote.c (remote_target::remote_file_get): Use
9191         gdb::byte_vector.
9192         (remote_target::remote_file_put): Likewise.
9193
9194 2018-05-25  Tom Tromey  <tom@tromey.com>
9195
9196         * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
9197         a std::string.
9198         (get_pe_section_index, add_pe_exported_sym): Update.
9199         (read_pe_exported_syms): Use gdb::def_vector.
9200
9201 2018-05-25  Tom Tromey  <tom@tromey.com>
9202
9203         * frame.c (remove_prev_frame): Remove.
9204         (get_prev_frame_if_no_cycle): Use TRY/CATCH.
9205
9206 2018-05-25  Maciej W. Rozycki  <macro@mips.com>
9207
9208         * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
9209         Remove prototypes.
9210         * mips-linux-nat.c (supply_fpregset): Always call
9211         `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
9212         (fill_fpregset): Always call `mips64_fill_fpregset' rather than
9213         `mips_fill_fpregset'.
9214         * mips-linux-tdep.c (mips_supply_fpregset)
9215         (mips_supply_fpregset_wrapper, mips_fill_fpregset)
9216         (mips_fill_fpregset_wrapper): Remove functions.
9217         (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
9218         (mips_linux_fpregset): Remove variable.
9219         (mips_linux_iterate_over_regset_sections): Use
9220         `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
9221         (mips_linux_o32_sigframe_init): Remove comment.
9222
9223 2018-05-25  Pedro Alves  <palves@redhat.com>
9224
9225         * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
9226         (struct readahead_cache, struct packet_reg, struct
9227         remote_arch_state, class remote_state): Move higher up in the
9228         file.
9229         (remote_target::m_remote_state): Now an object instead of a pointer.
9230         (remote_target::get_remote_state): Adjust.
9231
9232 2018-05-24  Andrew Burgess  <andrew.burgess@embecosm.com>
9233
9234         * stack.c (select_and_print_frame): Delete.
9235         (struct function_bounds): Move struct within function.
9236         (func_command): Most content moved into new function
9237         find_frame_for_function, use new function, print result, add
9238         function comment.
9239         (find_frame_for_function): New function, now returns a result.
9240
9241 2018-05-24  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
9242
9243         * stack.c (iterate_over_block_arg_vars): Fix comment.
9244         (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
9245
9246 2018-05-24  Andrew Burgess  <andrew.burgess@embecosm.com>
9247
9248         PR gdb/23203
9249         * frame.c
9250         (scoped_restore_selected_frame::scoped_restore_selected_frame):
9251         Define.
9252         (scoped_restore_selected_frame::~scoped_restore_selected_frame):
9253         Define.
9254         * frame.h (class scoped_restore_selected_frame): New class.
9255         * stack.c (print_frame_local_vars): Remove catching and rethrowing
9256         of any exception, use scoped_restore_selected_frame to restore the
9257         frame instead.
9258
9259 2018-05-24  Pedro Alves  <palves@redhat.com>
9260
9261         * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
9262         override.
9263
9264 2018-05-23  Tom Tromey  <tom@tromey.com>
9265
9266         * complaints.c (struct complaints): Remove.
9267         (symfile_complaint_book): Remove.
9268         (series): New global.
9269         (complaint_internal): Update.
9270         (clear_complaints): Update.
9271
9272 2018-05-23  Tom Tromey  <tom@tromey.com>
9273
9274         * complaints.c (counters): New global.
9275         (struct complain): Remove.
9276         (struct complaints) <root>: Remove.
9277         (complaint_sentinel): Remove.
9278         (symfile_complaint_book): Update.
9279         (find_complaint) Remove.
9280         (complaint_internal, clear_complaints): Update.
9281
9282 2018-05-23  Tom Tromey  <tom@tromey.com>
9283
9284         * complaints.c (struct complain) <file, line>: Remove.
9285         (find_complaint): Remove file, line parameters.
9286         (complaint_internal): Update.
9287
9288 2018-05-23  Tom Tromey  <tom@tromey.com>
9289
9290         * complaints.c (vcomplaint): Remove.
9291         (complaint_internal) Merge in contents of vcomplaint.
9292
9293 2018-05-23  Tom Tromey  <tom@tromey.com>
9294
9295         * complaints.c (struct complaints) <explanation>: Remove.
9296         (symfile_explanations): Remove.
9297         (symfile_complaint_book): Update.
9298         (vcomplaint): Update.
9299         (struct explanation): Remove.
9300
9301 2018-05-23  Tom Tromey  <tom@tromey.com>
9302
9303         * complaints.c (symfile_complaints): Remove.
9304         (complaint_internal): Remove "complaints" parameter.
9305         (clear_complaints, vcomplaint): Remove "c" parameter.
9306         (get_complaints): Remove.
9307         * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
9308         (dwarf2_debug_line_missing_file_complaint)
9309         (dwarf2_debug_line_missing_end_sequence_complaint)
9310         (dwarf2_complex_location_expr_complaint)
9311         (dwarf2_const_value_length_mismatch_complaint)
9312         (dwarf2_section_buffer_overflow_complaint)
9313         (dwarf2_macro_malformed_definition_complaint)
9314         (dwarf2_invalid_attrib_class_complaint)
9315         (create_addrmap_from_index, dw2_symtab_iter_next)
9316         (dw2_expand_marked_cus)
9317         (dw2_debug_names_iterator::find_vec_in_debug_names)
9318         (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
9319         (create_debug_type_hash_table, init_cutu_and_read_dies)
9320         (partial_die_parent_scope, add_partial_enumeration)
9321         (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
9322         (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
9323         (read_import_statement, read_file_scope, create_dwo_cu_reader)
9324         (create_cus_hash_table, create_dwp_hash_table)
9325         (inherit_abstract_dies, read_func_scope, read_call_site_scope)
9326         (dwarf2_rnglists_process, dwarf2_ranges_process)
9327         (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
9328         (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
9329         (handle_struct_member_die, process_structure_scope)
9330         (read_array_type, read_common_block, read_module_type)
9331         (read_tag_pointer_type, read_typedef, read_base_type)
9332         (read_subrange_type, load_partial_dies, partial_die_info::read)
9333         (partial_die_info::read, partial_die_info::read)
9334         (partial_die_info::read, read_checked_initial_length_and_offset)
9335         (dwarf2_string_attr, read_formatted_entries)
9336         (dwarf_decode_line_header)
9337         (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
9338         (new_symbol, dwarf2_const_value_attr, lookup_die_type)
9339         (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
9340         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
9341         (get_signatured_type, get_DW_AT_signature_type)
9342         (decode_locdesc, file_file_name, consume_improper_spaces)
9343         (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
9344         (dwarf_decode_macro_bytes, dwarf_decode_macros)
9345         (dwarf2_symbol_mark_computed, set_die_type)
9346         (read_attribute_value): Update.
9347         * stap-probe.c (handle_stap_probe, get_stap_base_address):
9348         Update.
9349         * dbxread.c (unknown_symtype_complaint)
9350         (lbrac_mismatch_complaint, repeated_header_complaint)
9351         (set_namestring, function_outside_compilation_unit_complaint)
9352         (read_dbx_symtab, process_one_symbol): Update.
9353         * gdbtypes.c (stub_noname_complaint): Update.
9354         * windows-nat.c (handle_unload_dll): Update.
9355         * coffread.c (coff_symtab_read, enter_linenos, decode_type)
9356         (decode_base_type): Update.
9357         * xcoffread.c (bf_notfound_complaint, ef_complaint)
9358         (eb_complaint, record_include_begin, record_include_end)
9359         (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
9360         (process_xcoff_symbol, read_symbol)
9361         (function_outside_compilation_unit_complaint)
9362         (scan_xcoff_symtab): Update.
9363         * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
9364         * buildsym.c (finish_block_internal, make_blockvector)
9365         (end_symtab_get_static_block, augment_type_symtab): Update.
9366         * dtrace-probe.c (dtrace_process_dof)
9367         (dtrace_static_probe_ops::get_probes): Update.
9368         * complaints.h (struct complaint): Don't declare.
9369         (symfile_complaints): Remove.
9370         (complaint_internal): Remove "complaints" parameter.
9371         (complaint): Likewise.
9372         (clear_complaints): Likewise.
9373         * symfile.c (syms_from_objfile_1, finish_new_objfile)
9374         (reread_symbols): Update.
9375         * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
9376         (dwarf2_frame_cache, decode_frame_entry): Update.
9377         * dwarf2loc.c (dwarf_reg_to_regnum): Update.
9378         * objc-lang.c (lookup_objc_class, lookup_child_selector)
9379         (info_selectors_command): Update.
9380         * macrotab.c (macro_include, check_for_redefinition)
9381         (macro_undef): Update.
9382         * objfiles.c (filter_overlapping_sections): Update.
9383         * stabsread.c (invalid_cpp_abbrev_complaint)
9384         (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
9385         (define_symbol, error_type, read_type, rs6000_builtin_type)
9386         (stabs_method_name_from_physname, read_member_functions)
9387         (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
9388         (attach_fields_to_type, complain_about_struct_wipeout)
9389         (read_range_type, read_args, common_block_start)
9390         (common_block_end, cleanup_undefined_types_1, scan_file_globals):
9391         Update.
9392         * mdebugread.c (index_complaint, unknown_ext_complaint)
9393         (basic_type_complaint, bad_tag_guess_complaint)
9394         (bad_rfd_entry_complaint, unexpected_type_code_complaint)
9395         (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
9396         (parse_procedure, parse_lines)
9397         (function_outside_compilation_unit_complaint)
9398         (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
9399         (bad_tag_guess_complaint, reg_value_complaint): Update.
9400         * cp-support.c (demangled_name_complaint): Update.
9401         * macroscope.c (sal_macro_scope): Update.
9402         * dwarf-index-write.c (class debug_names): Update.
9403
9404 2018-05-23  Tom Tromey  <tom@tromey.com>
9405
9406         * complaints.c (clear_complaints): Remove "noisy" parameter.
9407         * complaints.h (clear_complaints): Update.
9408         * symfile.c (syms_from_objfile_1, finish_new_objfile)
9409         (reread_symbols): Update.
9410
9411 2018-05-23  Tom Tromey  <tom@tromey.com>
9412
9413         * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
9414         SUBSEQUENT_MESSAGE.
9415         (vcomplaint, clear_complaints): Update.
9416         (symfile_explanations): Remove some messages.
9417
9418 2018-05-23  Tom Tromey  <tom@tromey.com>
9419
9420         * complaints.c (internal_complaint): Remove.
9421         * complaints.h (internal_complaint): Remove.
9422
9423 2018-05-22  Maciej W. Rozycki  <macro@mips.com>
9424
9425         * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
9426
9427 2018-05-22  Pedro Alves  <palves@redhat.com>
9428
9429         * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
9430         (remote_fileio_badfd, remote_fileio_return_errno)
9431         (remote_fileio_return_success, remote_fileio_func_open)
9432         (remote_fileio_func_open, remote_fileio_func_close)
9433         (remote_fileio_func_read, remote_fileio_func_write)
9434         (remote_fileio_func_lseek, remote_fileio_func_rename)
9435         (remote_fileio_func_unlink, remote_fileio_func_stat)
9436         (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
9437         (remote_fileio_func_isatty, remote_fileio_func_system): Add
9438         remote_target parameter.
9439         (remote_fio_func_map) <func>: Add remote_target parameter.
9440         (do_remote_fileio_request, remote_fileio_request):
9441         * remote-fileio.h (remote_fileio_request):
9442         * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
9443         remote_target parameter.
9444         (remote_notif_process, handle_notification): Adjust to pass down
9445         the remote.
9446         (remote_notif_state_allocate): Add remote_target parameter.  Save
9447         it.
9448         * remote-notif.h (struct remote_target): Forward declare.
9449         (struct notif_client) <parse, ack, can_get_pending_events>: Add
9450         remote_target parameter.
9451         (struct remote_notif_state) <remote>: New field.
9452         (remote_notif_ack, remote_notif_parse): Add remote_target
9453         parameter.
9454         (remote_notif_state_allocate, remote_notif_state_allocate): Add
9455         remote_target parameter.
9456         * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
9457         (threads_listing_context, rmt_thread_action, protocol_feature)
9458         (packet_reg, stop_reply, stop_reply_p, enum packet_support)
9459         (packet_result, struct threads_listing_context, remote_state):
9460         Move definitions and declarations higher up.
9461         (remote_target) <~remote_target>: Declare.
9462         (remote_download_command_source, remote_file_put, remote_file_get)
9463         (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
9464         (remote_hostio_pread_vFile, remote_hostio_send_command)
9465         (remote_hostio_set_filesystem, remote_hostio_open)
9466         (remote_hostio_close, remote_hostio_unlink, remote_state)
9467         (get_remote_state, get_remote_packet_size, get_memory_packet_size)
9468         (get_memory_write_packet_size, get_memory_read_packet_size)
9469         (append_pending_thread_resumptions, remote_detach_1)
9470         (append_resumption, remote_resume_with_vcont)
9471         (add_current_inferior_and_thread, wait_ns, wait_as)
9472         (process_stop_reply, remote_notice_new_inferior)
9473         (process_initial_stop_replies, remote_add_thread)
9474         (btrace_sync_conf, remote_btrace_maybe_reopen)
9475         (remove_new_fork_children, kill_new_fork_children)
9476         (discard_pending_stop_replies, stop_reply_queue_length)
9477         (check_pending_events_prevent_wildcard_vcont)
9478         (discard_pending_stop_replies_in_queue, stop_reply)
9479         (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
9480         (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
9481         (remote_interrupt_as, remote_interrupt_ns)
9482         (remote_get_noisy_reply, remote_query_attached)
9483         (remote_add_inferior, remote_current_thread, get_current_thread)
9484         (set_thread, set_general_thread, set_continue_thread)
9485         (set_general_process, write_ptid)
9486         (remote_unpack_thread_info_response, remote_get_threadinfo)
9487         (parse_threadlist_response, remote_get_threadlist)
9488         (remote_threadlist_iterator, remote_get_threads_with_ql)
9489         (remote_get_threads_with_qxfer)
9490         (remote_get_threads_with_qthreadinfo, extended_remote_restart)
9491         (get_offsets, remote_check_symbols, remote_supported_packet)
9492         (remote_query_supported, remote_packet_size)
9493         (remote_serial_quit_handler, remote_detach_pid)
9494         (remote_vcont_probe, remote_resume_with_hc)
9495         (send_interrupt_sequence, interrupt_query)
9496         (remote_notif_get_pending_events, fetch_register_using_p)
9497         (send_g_packet, process_g_packet, fetch_registers_using_g)
9498         (store_register_using_P, store_registers_using_G)
9499         (set_remote_traceframe, check_binary_download)
9500         (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
9501         (remote_xfer_live_readonly_partial, remote_read_bytes)
9502         (remote_send_printf, remote_flash_write, readchar)
9503         (remote_serial_write, putpkt, putpkt_binary, skip_frame)
9504         (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
9505         (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
9506         (extended_remote_disable_randomization, extended_remote_run)
9507         (send_environment_packet, extended_remote_environment_support)
9508         (extended_remote_set_inferior_cwd, remote_write_qxfer)
9509         (remote_read_qxfer, push_stop_reply, vcont_r_supported)
9510         (packet_command): Now methods of ...
9511         (remote_target): ... this class.
9512         (m_remote_state) <remote_target>: New field.
9513         (struct remote_state) <stop_reply_queue,
9514         remote_async_inferior_event_token, wait_forever_enabled_p>: New
9515         fields.
9516         (remote_state::remote_state): Allocate stop_reply_queue.
9517         (remote_state): Delete global.
9518         (get_remote_state_raw): Delete.
9519         (remote_target::get_remote_state): Allocate m_remote_state on
9520         demand.
9521         (get_current_remote_target): New.
9522         (remote_ops, extended_remote_ops): Delete.
9523         (wait_forever_enabled_p, remote_async_inferior_event_token):
9524         Delete, moved to struct remote_state.
9525         (remote_target::close): Delete self.  Destruction bits split to
9526         ...
9527         (remote_target::~remote_target): ... this.
9528         (show_memory_packet_size): Adjust to use
9529         get_current_remote_target.
9530         (struct protocol_feature) <func>: Add remote_target parameter.
9531         All callers adjusted.
9532         (curr_quit_handler_target): New.
9533         (remote_serial_quit_handler): Reimplement.
9534         (remote_target::open_1): Adjust to use get_current_remote_target.
9535         Heap-allocate remote_target/extended_remote_target instances.
9536         (vcont_builder::vcont_builder): Add remote_target parameter, and
9537         save it in m_remote.  All callers adjusted.
9538         (vcont_builder::m_remote): New field.
9539         (vcont_builder::restart, vcont_builder::flush)
9540         (vcont_builder::push_action): Use it.
9541         (remote_target::commit_resume): Use it.
9542         (struct queue_iter_param) <remote>: New field.
9543         (remote_target::remove_new_fork_children): Fill in 'remote' field.
9544         (check_pending_event_prevents_wildcard_vcont_callback_data): New.
9545         (check_pending_event_prevents_wildcard_vcont_callback)
9546         (remote_target::check_pending_events_prevent_wildcard_vcont)
9547         (remote_target::discard_pending_stop_replies)
9548         (remote_target::discard_pending_stop_replies_in_queue)
9549         (remote_target::remote_notif_remove_queued_reply): Fill in
9550         'remote' field.
9551         (remote_notif_get_pending_events): New.
9552         (remote_target::readchar, remote_target::remote_serial_write):
9553         Save/restore curr_quit_handler_target.
9554         (putpkt): New.
9555         (kill_new_fork_children): Fill in 'remote' field.
9556         (packet_command): Use get_current_remote_target, defer to
9557         remote_target method of same name.
9558         (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
9559         parameter, and save it in m_remote.  All callers adjusted.
9560         (scoped_remote_fd::release): Use m_remote.
9561         (scoped_remote_fd::m_remote): New field.
9562         (remote_file_put, remote_file_get, remote_file_delete): Use
9563         get_current_remote_target, defer to remote_target method of same
9564         name.
9565         (remote_btrace_reset): Add remote_state paremeter.  Update all
9566         callers.
9567         (remote_async_inferior_event_handler). Pass down 'data'.
9568         (remote_new_objfile): Use get_current_remote_target.
9569         (remote_target::vcont_r_supported): New.
9570         (set_range_stepping): Use get_current_remote_target and
9571         remote_target::vcont_r_supported.
9572         (_initialize_remote): Don't allocate 'remote_state' and
9573         'stop_reply_queue' globals.
9574         * remote.h (struct remote_target): Forward declare.
9575         (getpkt, putpkt, remote_notif_get_pending_events): Add
9576         'remote_target' parameter.
9577
9578 2018-05-22  Pedro Alves  <palves@redhat.com>
9579
9580         * remote.c (vcont_builder): Now a class.  Make all data members
9581         private.
9582         (vcont_builder) <vcont_builder, restart, flush, push_action>:
9583         Declare methods.
9584         (vcont_builder_restart): Rename to ...
9585         (vcont_builder::restart): ... this.
9586         (vcont_builder_flush): Rename to ...
9587         (vcont_builder::flush): ... this.
9588         (vcont_builder_push_action): Rename to ...
9589         (vcont_builder::push_action): ... this.
9590         (remote_target::commit_resume): Adjust.
9591
9592 2018-05-22  Pedro Alves  <palves@redhat.com>
9593
9594         * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
9595         (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
9596         (get_fixed_memory_packet_size): New.
9597         (get_memory_packet_size): Use it.
9598         (set_memory_packet_size): Don't override the config size with
9599         DEFAULT_MAX_MEMORY_PACKET_SIZE.
9600         (show_memory_packet_size): Use get_fixed_memory_packet_size.
9601         Don't refer to get_memory_packet_size if not connected to a remote
9602         target.  Show "(default)" if configured size is 0.
9603
9604 2018-05-22  Pedro Alves  <palves@redhat.com>
9605
9606         * remote.c (remote_target::mourn_inferior): Move
9607         discard_pending_stop_replies call here from ...
9608         (_initialize_remote): ... here.
9609
9610 2018-05-22  Pedro Alves  <palves@redhat.com>
9611
9612         * remote.c (compare_section_command): Remove set_general_process
9613         call.
9614
9615 2018-05-22  Pedro Alves  <palves@redhat.com>
9616
9617         * remote.c (struct packet_reg, struct remote_arch_state):
9618         Move higher up in the file.
9619         (remote_state) <m_arch_states>: Store remote_arch_state values
9620         instead of remote_arch_state pointers.
9621         (remote_state::get_remote_arch_state): Adjust.
9622
9623 2018-05-22  Pedro Alves  <palves@redhat.com>
9624
9625         * remote.c: Include <unordered_map>.
9626         (remote_state): Now a class.
9627         (remote_state) <get_remote_arch_state>: Declare method.
9628         <get_remote_arch_state>: New field.
9629         (remote_arch_state) <remote_arch_state>: Declare ctor.
9630         <regs>: Now a unique_ptr.
9631         (remote_gdbarch_data_handle): Delete.
9632         (get_remote_arch_state): Delete.
9633         (remote_state::get_remote_arch_state): New.
9634         (get_remote_state): Adjust to call remote_state's
9635         get_remote_arch_state method.
9636         (init_remote_state): Delete, bits factored out to ...
9637         (remote_arch_state::remote_arch_state): ... this new method.
9638         (get_remote_packet_size, get_memory_packet_size)
9639         (process_g_packet, remote_target::fetch_registers)
9640         (remote_target::prepare_to_store, store_registers_using_G)
9641         (remote_target::store_registers, remote_target::get_trace_status):
9642         Adjust to call remote_state's method.
9643         (_initialize_remote): Remove reference to
9644         remote_gdbarch_data_handle.
9645
9646 2018-05-22  Pedro Alves  <palves@redhat.com>
9647
9648         * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
9649         pread>: New method declarations.
9650         (remote_target::open_1): Adjust.
9651         (readahead_cache_invalidate): Rename to ...
9652         (readahead_cache::invalidate): ... this, and adjust to be a class
9653         method.
9654         (readahead_cache_invalidate_fd): Rename to ...
9655         (readahead_cache::invalidate_fd): ... this, and adjust to be a
9656         class method.
9657         (remote_hostio_pwrite): Adjust.
9658         (remote_hostio_pread_from_cache): Rename to ...
9659         (readahead_cache::pread): ... this, and adjust to be a class
9660         method.
9661         (remote_hostio_close): Adjust.
9662
9663 2018-05-22  Pedro Alves  <palves@redhat.com>
9664
9665         * remote.c (remote_hostio_close_cleanup): Delete.
9666         (class scoped_remote_fd): New.
9667         (remote_file_put, remote_file_get): Use it.
9668
9669 2018-05-22  Pedro Alves  <palves@redhat.com>
9670
9671         (struct vCont_action_support): Use bool and initialize all fields.
9672         (struct readahead_cache): Initialize all fields.
9673         (remote_state): Use bool and initialize all fields.
9674         (remote_state::remote_state, remote_state::~remote_state): New.
9675         (new_remote_state): Delete.
9676         (_initialize_remote): Use new to allocate remote_state.
9677
9678 2018-05-22  Pedro Alves  <palves@redhat.com>
9679             張俊芝  <zjz@zjz.name>
9680
9681         PR gdb/22973
9682         * c-exp.y: Include "c-support.h".
9683         (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
9684         of tolower.  Use c_ident_is_alpha to scan names.
9685         * c-lang.c: Include "c-support.h".
9686         (convert_ucn, convert_octal, convert_hex, convert_escape): Use
9687         ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
9688         * c-support.h: New file, with bits factored out from ...
9689         * cp-name-parser.y: ... this file.
9690         Include "c-support.h".
9691         (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
9692         c-support.h and renamed.
9693         (symbol_end, yylex): Adjust.
9694
9695 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
9696
9697         * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
9698         parameter type to CORE_ADDR.
9699         * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
9700         parameter type in declaration to CORE_ADDR.
9701         * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
9702         target_auxv_search to get AT_HWCAP and use the result to get the
9703         target description.
9704         * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
9705         to CORE_ADDR. Remove the cast of the return value to unsigned
9706         long. Fix error predicate of target_auxv_search.
9707         (ppc_linux_nat_target::read_description): Change the type of the
9708         hwcap variable to CORE_ADDR.
9709
9710 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
9711
9712         * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
9713         if the size of fpscr is larger than 32 bits.
9714
9715 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
9716
9717         * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
9718         (ppc32_linux_vsxregmap): New global.
9719         (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
9720         regcache_supply_regset, and regcache_collect_regset.
9721         * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
9722         * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
9723         (fetch_vsx_register, store_vsx_register): Remove.
9724         (fetch_vsx_registers): Add regno parameter. Get regset using
9725         ppc_linux_vsxregset. Use regset to supply registers.
9726         (store_vsx_registers): Add regno parameter. Get regset using
9727         ppc_linux_vsxregset. Use regset to collect registers.
9728         (fetch_register): Call fetch_vsx_registers instead of
9729         fetch_vsx_register.
9730         (store_register): Call store_vsx_registers instead of
9731         store_vsx_register.
9732         (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
9733         new regno parameter.
9734         (store_ppc_registers): Call store_vsx_registers with -1 for the
9735         new regno parameter.
9736         * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
9737         (ppc_collect_vsxregset): Remove.
9738
9739 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
9740
9741         * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
9742         offset fields.
9743         * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
9744         for vector register offset fields.
9745         (ppc64_fbsd_reg_offsets): Likewise.
9746         * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
9747         to vector register offset fields.
9748         * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
9749         to vector register offset fields.
9750         * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
9751         vector register offset fields.
9752         * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
9753         initializers for vector register offset fields.
9754         (rs6000_aix64_reg_offsets): Likewise.
9755         * rs6000-tdep.c (ppc_vrreg_offset): Remove.
9756         (ppc_supply_vrregset): Remove.
9757         (ppc_collect_vrregset): Remove.
9758         * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
9759         (ppc_linux_vrregset) : New function.
9760         (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
9761         (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
9762         (ppc32_linux_vrregset): Remove.
9763         (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
9764         and use result instead of ppc32_linux_vrregset.
9765         (ppc32_linux_reg_offsets): Remove initializers for vector register
9766         offset fields.
9767         (ppc64_linux_reg_offsets): Likewise.
9768         * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
9769         * ppc-linux-nat.c: Include regset.h.
9770         (gdb_vrregset_t): Adjust comment to account for little-endian
9771         mode.
9772         (supply_vrregset, fill_vrregset): Remove.
9773         (fetch_altivec_register, store_altivec_register): Remove.
9774         (fetch_altivec_registers): Add regno parameter. Get regset using
9775         ppc_linux_vrregset. Use regset to supply registers.
9776         (store_altivec_registers): Add regno parameter. Get regset using
9777         ppc_linux_vrregset. Use regset to collect registers.
9778         (fetch_register): Call fetch_altivec_registers instead of
9779         fetch_altivec_register.
9780         (store_register): Call store_altivec_registers instead of
9781         store_altivec_register.
9782         (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
9783         the new regno parameter.
9784         (store_ppc_registers): Call store_altivec_registers with -1 for
9785         the new regno parameter.
9786
9787 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
9788
9789         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
9790         (PPC_LINUX_SIZEOF_VSXREGSET): Define.
9791         * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
9792         (gdb_vrregset_t): Change array type size to
9793         PPC_LINUX_SIZEOF_VRREGSET.
9794         (gdb_vsxregset_t): Change array type size to
9795         PPC_LINUX_SIZEOF_VSXREGSET.
9796         * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
9797         Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
9798         PPC_LINUX_SIZEOF_VSXREGSET.
9799
9800 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
9801
9802         * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
9803         * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
9804         nat/ppc-linux.c.
9805         (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
9806         ppc_linux_target_wordsize with tid.
9807         (ppc_linux_nat_target::read_description): Call ppc_linux_target
9808         wordsize with tid.
9809         * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
9810         (ppc64_64bit_inferior_p): Add static and inline specifiers.
9811         (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
9812         tid parameter. Remove static specifier.
9813         * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
9814         (ppc_linux_target_wordsize): New declaration.
9815
9816 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
9817
9818         * arch/ppc-linux-common.c: New file.
9819         * arch/ppc-linux-common.h: New file.
9820         * arch/ppc-linux-tdesc.h: New file.
9821         * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
9822         * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
9823         (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
9824         arch/ppc-linux-tdesc.h.
9825         * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
9826         arch/ppc-linux-tdesc.h.
9827         (ppc_linux_nat_target::read_description): Remove target
9828         description matching code. Fill a ppc_linux_features struct and
9829         call ppc_linux_match_description with it. Move comment about ISA
9830         2.05 to ppc-linux-common.c.
9831         * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
9832         arch/ppc-linux-tdesc.h.
9833         (ppc_linux_core_read_description): Remove target description
9834         matching code. Fill a ppc_linux_features struct and call
9835         ppc_linux_match_description with it.
9836         * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
9837         (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
9838         (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
9839         (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
9840         (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
9841         (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
9842         (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
9843         (tdesc_powerpc_e500l): Remove.
9844
9845 2018-05-22  Joel Brobecker  <brobecker@adacore.com>
9846
9847         * ada-lang.c (catch_assert_command): Pass empty string instead
9848         of NULL for excep_string argument.
9849
9850 2018-05-22  Maciej W. Rozycki  <macro@mips.com>
9851
9852         * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
9853         the width of the requested register exceeds the width of the
9854         `ptrace' data type.
9855
9856 2018-05-21  Tom Tromey  <tom@tromey.com>
9857
9858         * printcmd.c (output_command): Remove.
9859         (output_command_const): Rename to output_command.
9860         * valprint.h (output_command): Rename from output_command_const.
9861         * tracepoint.c (trace_dump_actions): Call output_command.
9862
9863 2018-05-21  Tom Tromey  <tom@tromey.com>
9864
9865         * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
9866         (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
9867         * ada-lang.h (create_ada_exception_catchpoint): Update.
9868         * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
9869         std::string.
9870         (create_excep_cond_exprs, ~ada_catchpoint)
9871         (should_stop_exception, print_one_exception)
9872         (print_mention_exception, print_recreate_exception): Update.
9873         (ada_get_next_arg): Remove.
9874         (catch_ada_exception_command_split): Use std::string.  Change type
9875         of "excep_string", "cond_string".
9876         (catch_ada_exception_command): Update.
9877         (create_ada_exception_catchpoint): Change type of excep_string.
9878         (ada_exception_sal): Remove excep_string parameter.
9879         (~ada_catchpoint): Remove.
9880
9881 2018-05-21  Tom Tromey  <tom@tromey.com>
9882
9883         * ada-lang.c (ada_collect_symbol_completion_matches): Remove
9884         cleanup.
9885
9886 2018-05-21  Tom Tromey  <tom@tromey.com>
9887
9888         * ada-lang.c (ada_exception_message_1, ada_exception_message):
9889         Return unique_xmalloc_ptr.
9890         (print_it_exception): Update.
9891
9892 2018-05-21  Tom Tromey  <tom@tromey.com>
9893
9894         * tracepoint.c (trace_dump_actions): Use std::string.
9895
9896 2018-05-21  Tom Tromey  <tom@tromey.com>
9897
9898         * symfile.c (reread_symbols): Use std::string for original_name.
9899
9900 2018-05-21  Tom Tromey  <tom@tromey.com>
9901
9902         * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
9903         (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN.  Default
9904         constructor.
9905
9906 2018-05-20  Simon Marchi  <simon.marchi@polymtl.ca>
9907
9908         * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
9909         instance to...
9910         (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
9911         * objfiles.c (get_objfile_bfd_data): Allocate
9912         objfile_per_bfd_storage with obstack_new when allocating on
9913         obstack.
9914
9915 2018-05-20  Simon Marchi  <simon.marchi@ericsson.com>
9916
9917         * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
9918         OBSTACK_ZALLOC.
9919         * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
9920         * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
9921         * mdebugread.c (mdebug_build_psymtabs): Likewise.
9922         (add_pending): Likewise.
9923         (parse_symbol): Likewise.
9924         (parse_partial_symbols): Likewise.
9925         (psymtab_to_symtab_1): Likewise.
9926         (new_psymtab): Likewise.
9927         (elfmdebug_build_psymtabs): Likewise.
9928         * minsyms.c (terminate_minimal_symbol_table): Likewise.
9929         * objfiles.c (get_objfile_bfd_data): Likewise.
9930         (objfile_register_static_link): Likewise.
9931         * psymtab.c (allocate_psymtab): Likewise.
9932         * stabsread.c (read_member_functions): Likewise.
9933         * xcoffread.c (xcoff_end_psymtab): Likewise.
9934
9935 2018-05-20  Simon Marchi  <simon.marchi@ericsson.com>
9936
9937         * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
9938         compiler supports std::is_trivially_constructible.
9939         * common/poison.h: Include obstack.h.
9940         (IsMallocable): Define to is_trivially_constructible if the
9941         compiler supports it, define to true_type otherwise.
9942         (xobnew): New.
9943         (XOBNEW): Redefine.
9944         (xobnewvec): New.
9945         (XOBNEWVEC): Redefine.
9946         * gdb_obstack.h (obstack_zalloc): New.
9947         (OBSTACK_ZALLOC): Redefine.
9948         (obstack_calloc): New.
9949         (OBSTACK_CALLOC): Redefine.
9950         (obstack_new): New.
9951         * gdbarch.sh: Include gdb_obstack in gdbarch.h.
9952         (gdbarch_obstack): New declaration in gdbarch.h, definition in
9953         gdbarch.c.
9954         (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
9955         obstack_calloc/obstack_zalloc.
9956         (gdbarch_obstack_zalloc): Remove.
9957         * target-descriptions.c (tdesc_data_init): Use obstack_new.
9958
9959 2018-05-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
9960
9961         * stack.c (backtrace_command_1): Remove useless variable int i.
9962
9963 2018-05-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
9964
9965         * stack.c (print_frame_info): Fix comment.
9966
9967 2018-05-18  Tom Tromey  <tom@tromey.com>
9968
9969         * dwarf2read.c (struct dwz_file): Add constructor, initializers.
9970         <dwz_bfd>: Now a gdb_bfd_ref_ptr.
9971         (~dwarf2_per_objfile): Update
9972         (dwarf2_get_dwz_file): Use new.
9973         * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
9974         unique_ptr.
9975
9976 2018-05-18  Tom Tromey  <tom@tromey.com>
9977
9978         * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
9979         unique_ptr.
9980         * dwarf2read.c (struct dwp_file): Add constructor and
9981         initializers.
9982         (open_and_init_dwp_file): Return a unique_ptr.
9983         (dwarf2_per_objfile, create_dwp_hash_table)
9984         (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
9985         (lookup_dwo_unit_in_dwp): Update.
9986         (open_and_init_dwp_file, get_dwp_file): Update.
9987
9988 2018-05-18  Tom Tromey  <tom@tromey.com>
9989
9990         * dwarf2read.c (dwarf2_per_objfile): Update.
9991         (struct mapped_index): Add initializers.
9992         (dwarf2_read_index): Use new.
9993         (dw2_symtab_iter_init): Update.
9994         * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
9995         unique_ptr.
9996
9997 2018-05-18  Simon Marchi  <simon.marchi@ericsson.com>
9998
9999         * dwarf2read.c (mapped_index) <total_size>: Remove.
10000
10001 2018-05-18  Simon Marchi  <simon.marchi@ericsson.com>
10002
10003         * unittests/format_pieces-selftests.c (test_format_specifier):
10004         Add ARI comments.
10005
10006 2018-05-18  Tom Tromey  <tom@tromey.com>
10007
10008         * c-typeprint.c (maybe_print_hole): New function.
10009         (c_print_type_struct_field_offset): Update.
10010         (c_type_print_base_struct_union): Call maybe_print_hole.
10011
10012 2018-05-17  Keith Seitz  <keiths@redhat.com>
10013
10014         * breakpoint.c (build_bpstat_chain): New function, moved from
10015         bpstat_stop_status.
10016         (bpstat_stop_status): Add optional parameter, `stop_chain'.
10017         If no stop chain is passed, call build_bpstat_chain to build it.
10018         * breakpoint.h (build_bpstat_chain): Declare.
10019         (bpstat_stop_status): Move documentation here from breakpoint.c.
10020         * infrun.c (handle_signal_stop): Before eliding inlined frames,
10021         build the stop chain and pass it to skip_inline_frames.
10022         Pass this stop chain to bpstat_stop_status.
10023         * inline-frame.c: Include breakpoint.h.
10024         (stopped_by_user_bp_inline_frame): New function.
10025         (skip_inline_frames): Add parameter `stop_chain'.
10026         Move documention to inline-frame.h.
10027         If non-NULL, use stopped_by_user_bp_inline_frame to determine
10028         whether the frame should be elided.
10029         * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
10030         Add moved documentation and update for new parameter.
10031
10032 2018-05-17  Simon Marchi  <simon.marchi@ericsson.com>
10033
10034         PR cli/14975
10035         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10036         unittests/format_pieces-selftests.c.
10037         * common/format.h (format_piece) <operator==>: New.
10038         (format_pieces) <operator[]>: Remove.
10039         * common/format.c (format_pieces::format_pieces): Handle \e.
10040         * unittests/format_pieces-selftests.c: New.
10041
10042 2018-05-17  Tom Tromey  <tom@tromey.com>
10043
10044         PR symtab/23010:
10045         * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
10046         (dw2_instantiate_symtab): Add skip_partial parameter.
10047         (dw2_find_last_source_symtab, dw2_map_expand_apply)
10048         (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
10049         (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
10050         (dw2_expand_symtabs_matching_one)
10051         (dw2_find_pc_sect_compunit_symtab)
10052         (dw2_debug_names_lookup_symbol)
10053         (dw2_debug_names_expand_symtabs_for_function): Update.
10054         (init_cutu_and_read_dies): Add skip_partial parameter.
10055         (process_psymtab_comp_unit, build_type_psymtabs_1)
10056         (process_skeletonless_type_unit, load_partial_comp_unit)
10057         (psymtab_to_symtab_1): Update.
10058         (load_full_comp_unit): Add skip_partial parameter.
10059         (process_imported_unit_die, dwarf2_read_addr_index)
10060         (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
10061         (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
10062         (read_signatured_type): Update.
10063
10064 2018-05-17  Simon Marchi  <simon.marchi@ericsson.com>
10065
10066         * value.c (release_value): Remove unused variable.
10067         (record_latest_value): Likewise.
10068         (access_value_history): Likewise.
10069         (preserve_values): Likewise.
10070
10071 2018-05-17  Tom Tromey  <tom@tromey.com>
10072
10073         * extension.h (struct ext_lang_type_printers) <py_type_printers>:
10074         Initialize.
10075
10076 2018-05-16  Maciej W. Rozycki  <macro@mips.com>
10077
10078         PR gdb/22286
10079         * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
10080         Also handle registers whose width is not a multiple of
10081         PTRACE_TYPE_RET.
10082         (linux_nat_trad_target::store_register): Likewise.
10083
10084 2018-05-16  Tom Tromey  <tom@tromey.com>
10085
10086         * gdbcore.h (core_bfd): Redefine.
10087         * corelow.c (core_target::close): Update.
10088         (core_target_open): Update.
10089         * progspace.h (struct program_space) <cbfd>: Now a
10090         gdb_bfd_ref_ptr.
10091
10092 2018-05-16  Tom Tromey  <tom@tromey.com>
10093
10094         PR cli/19551:
10095         * symfile-add-flags.h (enum symfile_add_flags)
10096         <SYMFILE_NOT_FILENAME>: New constant.
10097         * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME.  Get
10098         objfile name from BFD.
10099         (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
10100         * minidebug.c (find_separate_debug_file_in_section): Put
10101         ".gnu_debugdata" into BFD's file name.
10102
10103 2018-05-16  Simon Marchi  <simon.marchi@ericsson.com>
10104
10105         * regcache.c (regcache_read_ftype, regcache_write_ftype):
10106         Remove.
10107
10108 2018-05-15  Tamar Christina  <tamar.christina@arm.com>
10109
10110         PR binutils/21446
10111         * aarch64-tdep.c (aarch64_analyze_prologue,
10112         aarch64_software_single_step, aarch64_displaced_step_copy_insn):
10113         Indicate not interested in errors.
10114
10115 2018-05-15  Maciej W. Rozycki  <macro@mips.com>
10116
10117         * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
10118         Supply the MIPS_ZERO_REGNUM register.
10119
10120 2018-05-15  Maciej W. Rozycki  <macro@mips.com>
10121
10122         * mips-tdep.c (mask_address_var): Make variable static.
10123
10124 2018-05-14  Tom Tromey  <tom@tromey.com>
10125
10126         * dwarf2read.c (rust_union_quirks): Clear rust_unions.
10127
10128 2018-05-11  Andrew Burgess  <andrew.burgess@embecosm.com>
10129
10130         * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
10131         FXSAVE_ADDR for the mxcsr register.
10132
10133 2018-05-11  Max Filippov  <jcmvbkbc@gmail.com>
10134
10135         * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
10136
10137 2018-05-11  Pedro Alves  <palves@redhat.com>
10138
10139         * corelow.c (core_target) <core_target>: No longer inline.
10140         Initialize m_core_gdbarch, m_core_vec and build the section table
10141         here.
10142         <~core_target>: New.
10143         <core_gdbarch, get_core_register_section>: New methods.
10144         <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
10145         factored out from ...
10146         <core_data, core_vec, core_gdbarch>: ... these deleted globals.
10147         (core_ops): Delete.
10148         (sniff_core_bfd): Add gdbarch parameter.
10149         (core_close): Delete, merged into ...
10150         (core_target::close): ... here.  Delete self.
10151         (core_close_cleanup): Delete.
10152         (core_target_open): Allocate a core_target on the heap.  Use a
10153         unique_ptr instead of a cleanup.  Bits moved into the core_target
10154         ctor.  Adjust to use core_target methods instead of globals.
10155         (get_core_register_section): Rename to ...
10156         (core_target::get_core_register_section): ... this and adjust.
10157         (struct get_core_registers_cb_data): New.
10158         (get_core_registers_cb): Use it.  Use bool.
10159         (core_target::fetch_registers, core_target::files_info)
10160         (core_target::xfer_partial, core_target::read_description)
10161         (core_target::pid_to, core_target::thread_name): Adjust to
10162         reference class fields instead of globals.
10163         * target.h (struct target_ops_deleter, target_ops_up): New.
10164
10165 2018-05-11  Pedro Alves  <palves@redhat.com>
10166
10167         * corefile.c (core_file_command): Move to corelow.c.
10168         * corelow.c (the_core_target): Delete.
10169         (core_file_command): Moved from corefile.c.  Check exec_bfd
10170         instead of the_core_target.  Use target_detach instead of calling
10171         into the_core_target directly.
10172         (maybe_say_no_core_file_now): New.
10173         (core_target::detach): Use it.
10174         (_initialize_corelow): Remove references to the_core_target.
10175         * gdbcore.h (the_core_target): Delete.
10176
10177 2018-05-11  Tom Tromey  <tromey@redhat.com>
10178             Pedro Alves  <palves@redhat.com>
10179
10180         * corefile.c (core_bfd): Remove.
10181         * gdbcore.h (core_bfd): Now a macro.
10182         * progspace.h (struct program_space) <cbfd>: New field.
10183
10184 2018-05-11  Tom Tromey  <tom@tromey.com>
10185
10186         * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
10187         gdb::def_vector.
10188
10189 2018-05-10  Tom Tromey  <tom@tromey.com>
10190
10191         * configure: Rebuild.
10192         * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
10193
10194 2018-05-10  Joel Brobecker  <brobecker@adacore.com>
10195
10196         PR server/23158:
10197         * regformats/regdat.sh: Adjust script, following the addition
10198         of the new expedite_regs parameter to init_target_desc.
10199
10200 2018-05-10  Omair Javaid  <omair.javaid@linaro.org>
10201     
10202         PR gdb/23127
10203         * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
10204         set_gdbarch_significant_addr_bit.
10205         * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
10206         set_gdbarch_significant_addr_bit.
10207         * utils.c (address_significant): Update to sign extend addr.
10208
10209 2018-05-09  Max Filippov  <jcmvbkbc@gmail.com>
10210
10211         * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
10212         (xtensa_linux_init_abi): Limit tdep->num_regs by
10213         tdep->num_nopriv_regs.
10214         * xtensa-tdep.c (xtensa_derive_tdep): Calculate
10215         tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
10216         not initialized.
10217
10218 2018-05-08  Simon Marchi  <simon.marchi@ericsson.com>
10219
10220         * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
10221
10222 2018-05-08  Andrew Burgess  <andrew.burgess@embecosm.com>
10223
10224         * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
10225         (I387_MXCSR_INIT_VAL): New constant.
10226         * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
10227         buffer if it was supplied by the inferior.
10228         * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
10229         (i387_xsave_get_clear_bv): New function.
10230         (i387_supply_xsave): Only read x87 control registers from the
10231         xsave buffer if the feature is enabled, and the state will have
10232         been written, otherwise, provide a suitable default.
10233         (i387_collect_xsave): Pre-clear all registers in xsave buffer,
10234         including x87 control registers.  Update control registers if they
10235         have changed from the default value, and mark features as enabled
10236         as required.
10237         * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
10238
10239 2018-05-08  Ulrich Weigand  <uweigand@de.ibm.com>
10240
10241         * spu-tdep.c (info_spu_event_command): Fix output formatting.
10242
10243 2018-05-07  Tom Tromey  <tom@tromey.com>
10244
10245         * configure: Rebuild.
10246         * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
10247
10248 2018-05-07  Tom Tromey  <tom@tromey.com>
10249
10250         PR tdep/20362:
10251         * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
10252         bit.  Use correct value for VDIV.
10253
10254 2018-05-04  Tom Tromey  <tom@tromey.com>
10255
10256         * configure: Rebuild.
10257         * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
10258
10259 2018-05-04  Tom Tromey  <tom@tromey.com>
10260
10261         * linux-record.c (record_linux_system_call) <case
10262         RECORD_SYS_RECVFROM>: Add "break".
10263
10264 2018-05-04  Tom Tromey  <tom@tromey.com>
10265
10266         * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
10267         Add missing "break".
10268         * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
10269         Add missing "break".
10270
10271 2018-05-04  Tom Tromey  <tom@tromey.com>
10272
10273         * rs6000-tdep.c (ppc_process_record_op4)
10274         (ppc_process_record_op63): Add fall-through comment.
10275
10276 2018-05-04  Tom Tromey  <tom@tromey.com>
10277
10278         * i386-tdep.c (i386_process_record): Add fall-through comment.
10279
10280 2018-05-04  Tom Tromey  <tom@tromey.com>
10281
10282         * stabsread.c (define_symbol) <case 'p'>: Add fall-through
10283         comment.
10284
10285 2018-05-04  Tom Tromey  <tom@tromey.com>
10286
10287         * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
10288         * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
10289         * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
10290         comment.
10291         * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
10292         comment.
10293         * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
10294         comment.
10295
10296 2018-05-04  Tom Tromey  <tom@tromey.com>
10297
10298         * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
10299
10300 2018-05-04  Tom Tromey  <tom@tromey.com>
10301
10302         * s390-tdep.c (s390_process_record): Fix fall-through comments.
10303         * xcoffread.c (scan_xcoff_symtab): Move comment later.
10304         * symfile.c (section_is_mapped): Fix fall-through comment.
10305         * stabsread.c (define_symbol, read_member_functions): Fix
10306         fall-through comment.
10307         * s390-linux-tdep.c (s390_process_record): Fix fall-through
10308         comment.
10309         * remote.c (remote_wait_as): Fix fall-through comment.
10310         * p-exp.y (yylex): Fix fall-through comment.
10311         * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
10312         comment.
10313         * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
10314         * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
10315         * jv-exp.y (yylex): Fix fall-through comment.
10316         * go-exp.y (lex_one_token): Fix fall-through comment.
10317         * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
10318         fall-through comment.
10319         * f-exp.y (yylex): Fix fall-through comment.
10320         * dwarf2read.c (process_die): Fix fall-through comments.
10321         * dbxread.c (process_one_symbol): Fix fall-through comment.
10322         * d-exp.y (lex_one_token): Fix fall-through comment.
10323         * cp-name-parser.y (yylex): Fix fall-through comment.
10324         * coffread.c (coff_symtab_read): Fix fall-through comment.
10325         * c-exp.y (lex_one_token): Fix fall-through comment.
10326         * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
10327         comment.
10328         * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
10329         comment.
10330
10331 2018-05-04  Tom Tromey  <tom@tromey.com>
10332
10333         PR python/22730:
10334         * NEWS: Mention gdb.execute change.
10335         * gdbcmd.h (execute_control_command): Don't declare.
10336         * python/python.c (execute_gdb_command): Use read_command_lines_1,
10337         execute_control_commands, execute_control_commands_to_string.
10338         * cli/cli-script.h (execute_control_commands)
10339         (execute_control_commands_to_string): Declare.
10340         (execute_control_command): Add from_tty parameter.
10341         * cli/cli-script.c (execute_control_commands)
10342         (execute_control_commands_to_string): New functions.
10343         (execute_user_command): Use execute_control_commands.
10344         (execute_control_command_1): Add "from_tty" parameter.  Update.
10345         (execute_control_command): Likewise.
10346
10347 2018-05-04  Tom Tromey  <tom@tromey.com>
10348
10349         PR python/22731:
10350         * NEWS: Mention that breakpoint commands are writable.
10351         * python/py-breakpoint.c (bppy_set_commands): New function.
10352         (breakpoint_object_getset) <"commands">: Use it.
10353
10354 2018-05-04  Tom Tromey  <tom@tromey.com>
10355
10356         * tracepoint.c (actions_command): Update.
10357         * mi/mi-cmd-break.c (mi_command_line_array)
10358         (mi_command_line_array_cnt, mi_command_line_array_ptr)
10359         (mi_read_next_line): Remove.
10360         (mi_cmd_break_commands): Update.
10361         * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
10362         function_view.
10363         * cli/cli-script.c (get_command_line): Update.
10364         (process_next_line): Use function_view.  Constify.
10365         (recurse_read_control_structure, read_command_lines)
10366         (read_command_lines_1): Change argument types to function_view.
10367         (do_define_command, document_command): Update.
10368         * breakpoint.h (check_tracepoint_command): Don't declare.
10369         * breakpoint.c (check_tracepoint_command): Remove.
10370         (commands_command_1, create_tracepoint_from_upload): Update.
10371
10372 2018-05-04  Tom Tromey  <tom@tromey.com>
10373
10374         PR gdb/11750:
10375         * cli/cli-script.h (enum command_control_type) <define_control>:
10376         New constant.
10377         * cli/cli-script.c (multi_line_command_p): Handle define_control.
10378         (build_command_line, execute_control_command_1)
10379         (process_next_line): Likewise.
10380         (do_define_command): New function, extracted from define_command.
10381         (define_command): Use it.
10382
10383 2018-05-04  Tom Tromey  <tom@tromey.com>
10384
10385         * tracepoint.c (actions_command): Update.
10386         * cli/cli-script.h (read_command_lines): Update.
10387         * cli/cli-script.c (read_command_lines): Constify prompt_arg.
10388         (MAX_TMPBUF): Remove define.
10389         (define_command): Use string_printf.
10390         (document_command): Likewise.
10391         * breakpoint.c (commands_command_1): Update.
10392
10393 2018-05-04  Tom Tromey  <tom@tromey.com>
10394
10395         * top.c (execute_command): Update.
10396         * cli/cli-script.h (print_command_lines): Now varargs.
10397         * cli/cli-script.c (print_command_lines): Now varargs.
10398         (execute_control_command_1) <case while_control, case if_control>:
10399         Update.
10400
10401 2018-05-04  Tom Tromey  <tom@tromey.com>
10402
10403         * tracepoint.c (all_tracepoint_actions): Rename from
10404         all_tracepoint_actions_and_cleanup.  Change return type.
10405         (actions_command, encode_actions_1, encode_actions)
10406         (trace_dump_actions, tdump_command): Update.
10407         * remote.c (remote_download_command_source): Update.
10408         * python/python.c (gdbpy_eval_from_control_command)
10409         (python_command, python_interactive_command): Update.
10410         * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
10411         * guile/guile.c (guile_command)
10412         (gdbscm_eval_from_control_command, guile_command): Update.
10413         * compile/compile.c (compile_code_command)
10414         (compile_print_command, compile_to_object): Update.
10415         * cli/cli-script.h (struct command_lines_deleter): New.
10416         (counted_command_line): New typedef.
10417         (struct command_line): Add constructor, destructor.
10418         <body_list>: Remove.
10419         <body_list_0, body_list_1>: New members.
10420         (command_line_up): Remove typedef.
10421         (read_command_lines, read_command_lines_1, get_command_line):
10422         Update.
10423         (copy_command_lines): Don't declare.
10424         * cli/cli-script.c (build_command_line): Use "new".
10425         (get_command_line): Return counted_command_line.
10426         (print_command_lines, execute_user_command)
10427         (execute_control_command_1, while_command, if_command): Update.
10428         (realloc_body_list): Remove.
10429         (process_next_line, recurse_read_control_structure): Update.
10430         (read_command_lines, read_command_lines_1): Return counted_command_line.
10431         (free_command_lines): Use "delete".
10432         (copy_command_lines): Remove.
10433         (define_command, document_command, show_user_1): Update.
10434         * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
10435         a counted_command_line.
10436         * breakpoint.h (counted_command_line): Remove typedef.
10437         (breakpoint_set_commands): Update.
10438         * breakpoint.c (check_no_tracepoint_commands)
10439         (validate_commands_for_breakpoint): Update.
10440         (breakpoint_set_commands): Change commands to be a
10441         counted_command_line.
10442         (commands_command_1, update_dprintf_command_list)
10443         (create_tracepoint_from_upload): Update.
10444
10445 2018-05-04  Tom Tromey  <tom@tromey.com>
10446
10447         * cli/cli-decode.h (cmd_list_element): New constructor.
10448         (~cmd_list_element): New destructor.
10449         (struct cmd_list_element): Add initializers.
10450         * cli/cli-decode.c (do_add_cmd): Use "new".
10451         (delete_cmd): Use "delete".
10452
10453 2018-05-04  Jan Kratochvil  <jan.kratochvil@redhat.com>
10454             Pedro Alves <palves@redhat.com>
10455
10456         PR breakpoints/19806 and support for PR external/20207.
10457         * NEWS: Mention Aarch64 watchpoint improvements.
10458         * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
10459         watchpoints and PR external/20207 watchpoints.
10460         * nat/aarch64-linux-hw-point.c
10461         (kernel_supports_any_contiguous_range): New.
10462         (aarch64_watchpoint_offset): New.
10463         (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
10464         (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
10465         (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
10466         (aarch64_align_watchpoint): New parameters aligned_offset_p and
10467         next_addr_orig_p.  Support PR external/20207 watchpoints.
10468         (aarch64_downgrade_regs): New.
10469         (aarch64_dr_state_insert_one_point): New parameters offset and
10470         addr_orig.
10471         (aarch64_dr_state_remove_one_point): Likewise.
10472         (aarch64_handle_breakpoint): Update caller.
10473         (aarch64_handle_aligned_watchpoint): Likewise.
10474         (aarch64_handle_unaligned_watchpoint): Support addr_orig and
10475         aligned_offset.
10476         (aarch64_linux_set_debug_regs): Remove const from state.  Call
10477         aarch64_downgrade_regs.
10478         (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
10479         * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
10480         (DR_CONTROL_MASK): ... this.
10481         (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
10482         (unsigned int aarch64_watchpoint_offset): New prototype.
10483         (aarch64_linux_set_debug_regs): Remove const from state.
10484         * utils.c (align_up, align_down): Move to ...
10485         * common/common-utils.c (align_up, align_down): ... here.
10486         * utils.h (align_up, align_down): Move to ...
10487         * common/common-utils.h (align_up, align_down): ... here.
10488
10489 2018-05-04  Joel Brobecker  <brobecker@adacore.com>
10490
10491         * sparc-tdep.c (sparc_structure_return_p): Re-implement to
10492         match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
10493         (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
10494         Re-implement to match the ABI as summarized in GCC's
10495         gcc/config/sparc/sparc.c.  All callers updated.
10496         (sparc32_store_arguments): Remove assertion.
10497
10498 2018-05-04  Tom Tromey  <tom@tromey.com>
10499
10500         * printcmd.c: Don't include tui.h.
10501         (decode_format): Use skip_spaces.
10502
10503 2018-05-04  Tom Tromey  <tom@tromey.com>
10504
10505         PR gdb/22619:
10506         * printcmd.c (last_count): New global.
10507         (x_command): Use saved count when repeating.
10508
10509 2018-05-04  Tom Tromey  <tom@tromey.com>
10510
10511         * nto-procfs.c (do_closedir_cleanup): Remove.
10512         (procfs_pidlist): Use gdb_dir_up.
10513         * procfs.c (do_closedir_cleanup): Remove.
10514         (proc_update_threads): Use gdb_dir_up.
10515         * common/filestuff.h (struct gdb_dir_deleter): New.
10516         (gdb_dir_up): New typedef.
10517
10518 2018-05-04  Tom Tromey  <tom@tromey.com>
10519
10520         * ada-lang.c (print_mention_exception): Use std::string.
10521
10522 2018-05-04  Tom Tromey  <tom@tromey.com>
10523
10524         * ada-lang.c (create_excep_cond_exprs): Update.
10525         (ada_exception_catchpoint_cond_string): Use std::string.
10526
10527 2018-05-04  Tom Tromey  <tom@tromey.com>
10528
10529         * ada-lang.c (xget_renaming_scope): Return std::string.
10530         (old_renaming_is_invisible): Update.
10531
10532 2018-05-04  Tom Tromey  <tom@tromey.com>
10533
10534         * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
10535         (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
10536
10537 2018-05-04  Ulrich Weigand  <uweigand@de.ibm.com>
10538
10539         * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
10540
10541 2018-05-04  Tom Tromey  <tom@tromey.com>
10542
10543         * remote.c (remote_query_supported_append): Change type.
10544         (remote_check_symbols): Update.
10545
10546 2018-05-04  Paul Pluzhnikov  <ppluzhnikov@google.com>
10547
10548         PR gdb/11420
10549         * configure.ac: Prepend libpython.
10550         * python/python-config.py: Likewise.
10551         * configure: Regenerate.
10552
10553 2018-05-03  Simon Marchi  <simon.marchi@ericsson.com>
10554
10555         * Makefile.in (%.c: %.l): Use -t instead of --stdout.
10556
10557 2018-05-03  Pedro Alves  <palves@redhat.com>
10558
10559         * s390-linux-nat.c
10560         (s390_linux_nat_target::have_continuable_watchpoint): Mark with
10561         override.  Write 'true' instead of '1'.
10562         (s390_linux_nat_target::watchpoint_addr_within_range): Remove
10563         declaration.
10564
10565 2018-05-02  Pedro Alves  <palves@redhat.com>
10566
10567         * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
10568         add_inf_child_target.
10569         * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
10570         add_inf_child_target.
10571         * aix-thread.c (aix_thread_target_info): New.
10572         (aix_thread_target) <shortname, longname, doc>: Delete.
10573         <info>: New.
10574         * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
10575         add_inf_child_target.
10576         * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
10577         add_inf_child_target.
10578         * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
10579         add_inf_child_target.
10580         * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
10581         add_inf_child_target.
10582         * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
10583         add_inf_child_target.
10584         * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
10585         add_inf_child_target.
10586         * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
10587         add_inf_child_target.
10588         * arm-linux-nat.c (_initialize_arm_linux_nat): Use
10589         add_inf_child_target.
10590         * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
10591         add_inf_child_target.
10592         * bfd-target.c (target_bfd_target_info): New.
10593         (target_bfd) <shortname, longname, doc>: Delete.
10594         <info>: New.
10595         * bsd-kvm.c (bsd_kvm_target_info): New.
10596         (bsd_kvm_target) <shortname, longname, doc>: Delete.
10597         <info>: New.
10598         (bsd_kvm_target::open): Rename to ...
10599         (bsd_kvm_target_open): ... this.  Adjust.
10600         * bsd-uthread.c (bsd_uthread_target_info): New.
10601         (bsd_uthread_target) <shortname, longname, doc>: Delete.
10602         <info>: New.
10603         * corefile.c (core_file_command): Adjust.
10604         * corelow.c (core_target_info): New.
10605         (core_target) <shortname, longname, doc>: Delete.
10606         <info>: New.
10607         (core_target::open): Rename to ...
10608         (core_target_open): ... this.  Adjust.
10609         * ctf.c (ctf_target_info): New.
10610         (ctf_target) <shortname, longname, doc>: Delete.
10611         <info>: New.
10612         (ctf_target::open): Rename to ...
10613         (ctf_target_open): ... this.
10614         (_initialize_ctf): Adjust.
10615         * exec.c (exec_target_info): New.
10616         (exec_target) <shortname, longname, doc>: Delete.
10617         <info>: New.
10618         (exec_target::open): Rename to ...
10619         (exec_target_open): ... this.
10620         * gdbcore.h (core_target_open): Declare.
10621         * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
10622         * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
10623         add_inf_child_target.
10624         * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
10625         add_inf_child_target.
10626         * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
10627         add_inf_child_target.
10628         * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
10629         add_inf_child_target.
10630         * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
10631         add_inf_child_target.
10632         * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
10633         add_inf_child_target.
10634         * i386-linux-nat.c (_initialize_i386_linux_nat): Use
10635         add_inf_child_target.
10636         * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
10637         add_inf_child_target.
10638         * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
10639         add_inf_child_target.
10640         * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
10641         add_inf_child_target.
10642         * inf-child.c (inf_child_target_info): New.
10643         (inf_child_target::info): New.
10644         (inf_child_open_target): Remove 'target' parameter.  Use
10645         get_native_target instead.
10646         (inf_child_target::open): Delete.
10647         (add_inf_child_target): New.
10648         * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
10649         Delete.
10650         <info>: New.
10651         (add_inf_child_target): Declare.
10652         (inf_child_open_target): Declare.
10653         * linux-thread-db.c (thread_db_target_info): New.
10654         (thread_db_target) <shortname, longname, doc>: Delete.
10655         <info>: New.
10656         * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
10657         add_inf_child_target.
10658         * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
10659         add_inf_child_target.
10660         * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
10661         add_inf_child_target.
10662         * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
10663         add_inf_child_target.
10664         * make-target-delegates (print_class): Adjust.
10665         * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
10666         add_inf_child_target.
10667         * mips-linux-nat.c (_initialize_mips_linux_nat): Use
10668         add_inf_child_target.
10669         * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
10670         add_inf_child_target.
10671         * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
10672         add_inf_child_target.
10673         * nto-procfs.c (nto_native_target_info): New.
10674         (nto_procfs_target_native) <shortname, longname, doc>:
10675         Delete.
10676         <info>: New.
10677         (nto_procfs_target_info): New.
10678         (nto_procfs_target_procfs) <shortname, longname, doc>:
10679         Delete.
10680         <info>: New.
10681         (init_procfs_targets): Adjust.
10682         * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
10683         add_inf_child_target.
10684         * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
10685         add_inf_child_target.
10686         * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
10687         add_inf_child_target.
10688         * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
10689         add_inf_child_target.
10690         * ravenscar-thread.c (ravenscar_target_info): New.
10691         (ravenscar_thread_target) <shortname, longname, doc>:
10692         Delete.
10693         <info>: New.
10694         * record-btrace.c (record_btrace_target_info):
10695         (record_btrace_target) <shortname, longname, doc>: Delete.
10696         <info>: New.
10697         (record_btrace_target::open): Rename to ...
10698         (record_btrace_target_open): ... this.  Adjust.
10699         * record-full.c (record_longname, record_doc): New.
10700         (record_full_base_target) <shortname, longname, doc>: Delete.
10701         <info>: New.
10702         (record_full_target_info): New.
10703         (record_full_target): <shortname>: Delete.
10704         <info>: New.
10705         (record_full_core_open_1, record_full_open_1): Update comments.
10706         (record_full_base_target::open): Rename to ...
10707         (record_full_open): ... this.
10708         (cmd_record_full_restore): Update.
10709         (_initialize_record_full): Update.
10710         * remote-sim.c (remote_sim_target_info): New.
10711         (gdbsim_target) <shortname, longname, doc>: Delete.
10712         <info>: New.
10713         (gdbsim_target::open): Rename to ...
10714         (gdbsim_target_open): ... this.
10715         (_initialize_remote_sim): Adjust.
10716         * remote.c (remote_doc): New.
10717         (remote_target_info): New.
10718         (remote_target) <shortname, longname, doc>: Delete.
10719         <info>: New.
10720         (extended_remote_target_info): New.
10721         (extended_remote_target) <shortname, longname, doc>: Delete.
10722         <info>: New.
10723         (remote_target::open_1): Make static.  Adjust.
10724         * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
10725         * s390-linux-nat.c (_initialize_s390_nat): Use
10726         add_inf_child_target.
10727         * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
10728         add_inf_child_target.
10729         * sol-thread.c (thread_db_target_info): New.
10730         (sol_thread_target) <shortname, longname, doc>: Delete.
10731         <info>: New.
10732         * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
10733         add_inf_child_target.
10734         * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
10735         add_inf_child_target.
10736         * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
10737         add_inf_child_target.
10738         * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
10739         add_inf_child_target.
10740         * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
10741         add_inf_child_target.
10742         * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
10743         add_inf_child_target.
10744         * spu-linux-nat.c (_initialize_spu_nat): Use
10745         add_inf_child_target.
10746         * spu-multiarch.c (spu_multiarch_target_info): New.
10747         (spu_multiarch_target) <shortname, longname, doc>: Delete.
10748         <info>: New.
10749         * target-delegates.c: Regenerate.
10750         * target.c: Include <unordered_map>.
10751         (target_ops_p): Delete.
10752         (DEF_VEC_P(target_ops_p)): Delete.
10753         (target_factories): New.
10754         (test_target_info): New.
10755         (test_target_ops::info): New.
10756         (open_target): Adjust to use target_factories.
10757         (add_target_with_completer): Rename to ...
10758         (add_target): ... this.  Change prototype.  Register target_info
10759         and open callback in target_factories.  Register target_info in
10760         command context instead of target_ops.
10761         (add_target): Delete old implementation.
10762         (add_deprecated_target_alias): Change prototype.  Adjust.
10763         (the_native_target): New.
10764         (set_native_target, get_native_target): New.
10765         (find_default_run_target): Use the_native_target.
10766         (find_attach_target, find_run_target): Simplify.
10767         (target_ops::open): Delete.
10768         (dummy_target_info): New.
10769         (dummy_target::shortname, dummy_target::longname)
10770         (dummy_target::doc): Delete.
10771         (dummy_target::info): New.
10772         (debug_target::shortname, debug_target::longname)
10773         (debug_target::doc): Delete.
10774         (debug_target::info): New.
10775         * target.h (struct target_info): New.
10776         (target_ops::~target_ops): Add comment.
10777         (target_ops::info): New.
10778         (target_ops::shortname, target_ops::longname, target_ops::doc): No
10779         longer virtual.  Implement in terms of target_info.
10780         (set_native_target, get_native_target): Declare.
10781         (target_open_ftype): New.
10782         (add_target, add_target_with_completer)
10783         (add_deprecated_target_alias): Change prototype.
10784         (test_target) <shortname, longname, doc>: Delete.
10785         <info>: New.
10786         * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
10787         add_inf_child_target.
10788         * tracefile-tfile.c (tfile_target_info): New.
10789         (tfile_target) <shortname, longname, doc>: Delete.
10790         <info>: New.
10791         (tfile_target::open): Rename to ...
10792         (tfile_target_open): ... this.
10793         (_initialize_tracefile_tfile): Adjust.
10794         * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
10795         add_inf_child_target.
10796         * windows-nat.c (_initialize_windows_nat): Use
10797         add_inf_child_target.
10798         * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
10799         add_inf_child_target.
10800
10801 2018-05-02  Pedro Alves  <palves@redhat.com>
10802
10803         * linux-nat.h (linux_nat_target) <low_new_thread,
10804         low_delete_thread, low_new_fork, low_forget_process,
10805         low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
10806         New virtual methods.
10807         (linux_nat_set_new_thread, linux_nat_set_delete_thread)
10808         (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
10809         (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
10810         (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
10811         (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
10812         Delete.
10813         * linux-fork.c (delete_fork): Adjust to call low method.
10814         * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
10815         (linux_nat_new_fork, linux_nat_forget_process_hook)
10816         (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
10817         (linux_nat_status_is_event):
10818         (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
10819         (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
10820         to call low method.
10821         (sigtrap_is_event): Rename to ...
10822         (linux_nat_target::low_status_is_event): ... this.
10823         (linux_nat_set_status_is_event): Delete.
10824         (save_stop_reason, linux_nat_wait_1)
10825         (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
10826         low methods.
10827         (linux_nat_set_new_thread, linux_nat_set_delete_thread)
10828         (linux_nat_set_new_fork, linux_nat_set_forget_process)
10829         (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
10830         (linux_nat_set_prepare_to_resume): Delete.
10831         * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
10832         low virtual methods.
10833         * amd64-linux-nat.c: Likewise.
10834         * arm-linux-nat.c: Likewise.
10835         * i386-linux-nat.c: Likewise.
10836         * ia64-linux-nat.c: Likewise.
10837         * mips-linux-nat.c: Likewise.
10838         * ppc-linux-nat.c: Likewise.
10839         * s390-linux-nat.c: Likewise.
10840         * sparc64-linux-nat.c: Likewise.
10841         * x86-linux-nat.c: Likewise.
10842         * x86-linux-nat.h: Include "nat/x86-linux.h".
10843         (x86_linux_nat_target) <low_new_fork, low_forget_process,
10844         low_prepare_to_resume, low_new_thread, low_delete_thread>:
10845         Override methods.
10846
10847 2018-05-02  Pedro Alves  <palves@redhat.com>
10848
10849         * target.h (target_ops)
10850         <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
10851         stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
10852         stopped_by_watchpoint, have_continuable_watchpoint,
10853         stopped_data_address, watchpoint_addr_within_range,
10854         can_accel_watchpoint_condition, can_run, thread_alive,
10855         has_all_memory, has_memory, has_stack, has_registers,
10856         has_execution, can_async_p, is_async_p, supports_non_stop,
10857         always_non_stop_p, can_execute_reverse, supports_multi_process,
10858         supports_enable_disable_tracepoint,
10859         supports_disable_randomization, supports_string_tracing,
10860         supports_evaluation_of_breakpoint_conditions,
10861         can_run_breakpoint_commands, filesystem_is_local,
10862         can_download_tracepoint, get_trace_state_variable_value,
10863         set_trace_notes, get_tib_address, use_agent, can_use_agent,
10864         record_is_replaying, record_will_replay,
10865         augmented_libraries_svr4_read>: Adjust to return bool.
10866         * aarch64-linux-nat.c: All implementations adjusted.
10867         * aix-thread.c: All implementations adjusted.
10868         * arm-linux-nat.c: All implementations adjusted.
10869         * breakpoint.c: All implementations adjusted.
10870         * bsd-kvm.c: All implementations adjusted.
10871         * bsd-uthread.c: All implementations adjusted.
10872         * corelow.c: All implementations adjusted.
10873         * ctf.c: All implementations adjusted.
10874         * darwin-nat.c: All implementations adjusted.
10875         * darwin-nat.h: All implementations adjusted.
10876         * exec.c: All implementations adjusted.
10877         * fbsd-nat.c: All implementations adjusted.
10878         * fbsd-nat.h: All implementations adjusted.
10879         * gnu-nat.c: All implementations adjusted.
10880         * gnu-nat.h: All implementations adjusted.
10881         * go32-nat.c: All implementations adjusted.
10882         * ia64-linux-nat.c: All implementations adjusted.
10883         * inf-child.c: All implementations adjusted.
10884         * inf-child.h: All implementations adjusted.
10885         * inf-ptrace.c: All implementations adjusted.
10886         * inf-ptrace.h: All implementations adjusted.
10887         * linux-nat.c: All implementations adjusted.
10888         * linux-nat.h: All implementations adjusted.
10889         * mips-linux-nat.c: All implementations adjusted.
10890         * nto-procfs.c: All implementations adjusted.
10891         * ppc-linux-nat.c: All implementations adjusted.
10892         * procfs.c: All implementations adjusted.
10893         * ravenscar-thread.c: All implementations adjusted.
10894         * record-btrace.c: All implementations adjusted.
10895         * record-full.c: All implementations adjusted.
10896         * remote-sim.c: All implementations adjusted.
10897         * remote.c: All implementations adjusted.
10898         * s390-linux-nat.c: All implementations adjusted.
10899         * sol-thread.c: All implementations adjusted.
10900         * spu-multiarch.c: All implementations adjusted.
10901         * target-delegates.c: All implementations adjusted.
10902         * target.c: All implementations adjusted.
10903         * target.h: All implementations adjusted.
10904         * tracefile-tfile.c: All implementations adjusted.
10905         * tracefile.c: All implementations adjusted.
10906         * tracefile.h: All implementations adjusted.
10907         * windows-nat.c: All implementations adjusted.
10908         * x86-linux-nat.h: All implementations adjusted.
10909         * x86-nat.h: All implementations adjusted.
10910
10911 2018-05-02  Pedro Alves  <palves@redhat.com>
10912
10913         * make-target-delegates (scan_target_h): Don't trim lines here.
10914         Replace sequences of tabs and/or whitespace with a single
10915         whitespace.
10916         (top level, parsing methods): Trim each line before processing it
10917         here.
10918
10919 2018-05-02  Pedro Alves  <palves@redhat.com>
10920             John Baldwin  <jhb@freebsd.org>
10921
10922         * target.h (enum strata) <debug_stratum>: New.
10923         (struct target_ops) <all delegation methods>: Replace by C++
10924         virtual methods, and drop "to_" prefix.  All references updated
10925         throughout.
10926         <to_shortname, to_longname, to_doc, to_data,
10927         to_have_steppable_watchpoint, to_have_continuable_watchpoint,
10928         to_has_thread_control, to_attach_no_wait>: Delete, replaced by
10929         virtual methods.  All references updated throughout.
10930         <can_attach, supports_terminal_ours, can_create_inferior,
10931         get_thread_control_capabilities, attach_no_wait>: New
10932         virtual methods.
10933         <insert_breakpoint, remove_breakpoint>: Now
10934         TARGET_DEFAULT_NORETURN methods.
10935         <info_proc>: Now returns bool.
10936         <to_magic>: Delete.
10937         (OPS_MAGIC): Delete.
10938         (current_target): Delete.  All references replaced by references
10939         to ...
10940         (target_stack): ... this.  New.
10941         (target_shortname, target_longname): Adjust.
10942         (target_can_run): Now a function declaration.
10943         (default_child_has_all_memory, default_child_has_memory)
10944         (default_child_has_stack, default_child_has_registers)
10945         (default_child_has_execution): Remove target_ops parameter.
10946         (complete_target_initialization): Delete.
10947         (memory_breakpoint_target): New template class.
10948         (test_target_ops): Refactor as a C++ class with virtual methods.
10949         * make-target-delegates (NAME_PART): Tighten.
10950         (POINTER_PART, CP_SYMBOL): New.
10951         (SIMPLE_RETURN_PART): Reimplement.
10952         (VEC_RETURN_PART): Expect less.
10953         (RETURN_PART, VIRTUAL_PART): New.
10954         (METHOD): Adjust to C++ virtual methods.
10955         (scan_target_h): Remove reference to C99.
10956         (dname): Output "target_ops::" prefix.
10957         (write_function_header): Adjust to output a C++ class method.
10958         (write_declaration): New.
10959         (write_delegator): Adjust to output a C++ class method.
10960         (tdname): Output "dummy_target::" prefix.
10961         (write_tdefault, write_debugmethod): Adjust to output a C++ class
10962         method.
10963         (tdefault_names, debug_names): Delete.
10964         (return_types, tdefaults, styles, argtypes_array): New.
10965         (top level): All methods are delegators.
10966         (print_class): New.
10967         (top level): Print dummy_target and debug_target classes.
10968         * target-delegates.c: Regenerate.
10969         * target-debug.h (target_debug_print_enum_info_proc_what)
10970         (target_debug_print_thread_control_capabilities)
10971         (target_debug_print_thread_info_p): New.
10972         * target.c (dummy_target): Delete.
10973         (the_dummy_target, the_debug_target): New.
10974         (target_stack): Now extern.
10975         (set_targetdebug): Push/unpush debug target.
10976         (default_child_has_all_memory, default_child_has_memory)
10977         (default_child_has_stack, default_child_has_registers)
10978         (default_child_has_execution): Remove target_ops parameter.
10979         (complete_target_initialization): Delete.
10980         (add_target_with_completer): No longer call
10981         complete_target_initialization.
10982         (target_supports_terminal_ours): Use regular delegation.
10983         (update_current_target): Delete.
10984         (push_target): No longer check magic number.  Don't call
10985         update_current_target.
10986         (unpush_target): Don't call update_current_target.
10987         (target_is_pushed): No longer check magic number.
10988         (target_require_runnable): Skip for all stratums over
10989         process_stratum.
10990         (target_ops::info_proc): New.
10991         (target_info_proc): Use find_target_at and
10992         find_default_run_target.
10993         (target_supports_disable_randomization): Use regular delegation.
10994         (target_get_osdata): Use find_target_at.
10995         (target_ops::open, target_ops::close, target_ops::can_attach)
10996         (target_ops::attach, target_ops::can_create_inferior)
10997         (target_ops::create_inferior, target_ops::can_run)
10998         (target_can_run): New.
10999         (default_fileio_target): Use regular delegation.
11000         (target_ops::fileio_open, target_ops::fileio_pwrite)
11001         (target_ops::fileio_pread, target_ops::fileio_fstat)
11002         (target_ops::fileio_close, target_ops::fileio_unlink)
11003         (target_ops::fileio_readlink): New.
11004         (target_fileio_open_1, target_fileio_unlink)
11005         (target_fileio_readlink): Always call the target method.  Handle
11006         FILEIO_ENOSYS.
11007         (return_zero, return_zero_has_execution): Delete.
11008         (init_dummy_target): Delete.
11009         (dummy_target::dummy_target, dummy_target::shortname)
11010         (dummy_target::longname, dummy_target::doc)
11011         (debug_target::debug_target, debug_target::shortname)
11012         (debug_target::longname, debug_target::doc): New.
11013         (target_supports_delete_record): Use regular delegation.
11014         (setup_target_debug): Delete.
11015         (maintenance_print_target_stack): Skip debug_stratum.
11016         (initialize_targets): Instantiate the_dummy_target and
11017         the_debug_target.
11018         * auxv.c (target_auxv_parse): Remove 'ops' parameter.  Adjust to
11019         use target_stack.
11020         (target_auxv_search, fprint_target_auxv): Adjust.
11021         (info_auxv_command): Adjust to use target_stack.
11022         * auxv.h (target_auxv_parse): Remove 'ops' parameter.
11023         * exceptions.c (print_flush): Handle a NULL target_stack.
11024         * regcache.c (target_ops_no_register): Refactor as class with
11025         virtual methods.
11026
11027         * exec.c (exec_target): New class.
11028         (exec_ops): Now an exec_target.
11029         (exec_open, exec_close_1, exec_get_section_table)
11030         (exec_xfer_partial, exec_files_info, exec_has_memory)
11031         (exec_make_note_section): Refactor as exec_target methods.
11032         (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
11033         Delete.
11034         (exec_target::find_memory_regions): New.
11035         (_initialize_exec): Don't call init_exec_ops.
11036         * gdbcore.h (exec_file_clear): Delete.
11037
11038         * corefile.c (core_target): Delete.
11039         (core_file_command): Adjust.
11040         * corelow.c (core_target): New class.
11041         (the_core_target): New.
11042         (core_close): Remove target_ops parameter.
11043         (core_close_cleanup): Adjust.
11044         (core_target::close): New.
11045         (core_open, core_detach, get_core_registers, core_files_info)
11046         (core_xfer_partial, core_thread_alive, core_read_description)
11047         (core_pid_to_str, core_thread_name, core_has_memory)
11048         (core_has_stack, core_has_registers, core_info_proc): Rework as
11049         core_target methods.
11050         (ignore, core_remove_breakpoint, init_core_ops): Delete.
11051         (_initialize_corelow): Initialize the_core_target.
11052         * gdbcore.h (core_target): Delete.
11053         (the_core_target): New.
11054
11055         * ctf.c: (ctf_target): New class.
11056         (ctf_ops): Now a ctf_target.
11057         (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
11058         (ctf_xfer_partial, ctf_get_trace_state_variable_value)
11059         (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
11060         methods.
11061         (init_ctf_ops): Delete.
11062         (_initialize_ctf): Don't call it.
11063         * tracefile-tfile.c (tfile_target): New class.
11064         (tfile_ops): Now a tfile_target.
11065         (tfile_open, tfile_close, tfile_files_info)
11066         (tfile_get_tracepoint_status, tfile_trace_find)
11067         (tfile_fetch_registers, tfile_xfer_partial)
11068         (tfile_get_trace_state_variable_value, tfile_traceframe_info):
11069         Refactor as tfile_target methods.
11070         (tfile_xfer_partial_features): Remove target_ops parameter.
11071         (init_tfile_ops): Delete.
11072         (_initialize_tracefile_tfile): Don't call it.
11073         * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
11074         (tracefile_has_stack, tracefile_has_registers)
11075         (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
11076         tracefile_target methods.
11077         (init_tracefile_ops): Delete.
11078         (tracefile_target::tracefile_target): New.
11079         * tracefile.h: Include "target.h".
11080         (tracefile_target): New class.
11081         (init_tracefile_ops): Delete.
11082
11083         * spu-multiarch.c (spu_multiarch_target): New class.
11084         (spu_ops): Now a spu_multiarch_target.
11085         (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
11086         (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
11087         (spu_search_memory, spu_mourn_inferior): Refactor as
11088         spu_multiarch_target methods.
11089         (init_spu_ops): Delete.
11090         (_initialize_spu_multiarch): Remove references to init_spu_ops,
11091         complete_target_initialization.
11092
11093         * ravenscar-thread.c (ravenscar_thread_target): New class.
11094         (ravenscar_ops): Now a ravenscar_thread_target.
11095         (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
11096         (ravenscar_thread_alive, ravenscar_pid_to_str)
11097         (ravenscar_fetch_registers, ravenscar_store_registers)
11098         (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
11099         (ravenscar_stopped_by_hw_breakpoint)
11100         (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
11101         (ravenscar_mourn_inferior, ravenscar_core_of_thread)
11102         (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
11103         methods.
11104         (init_ravenscar_thread_ops): Delete.
11105         (_initialize_ravenscar): Remove references to
11106         init_ravenscar_thread_ops and complete_target_initialization.
11107
11108         * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
11109         (bsd_uthread_target): New class.
11110         (bsd_uthread_ops): Now a bsd_uthread_target.
11111         (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
11112         (bsd_uthread_close, bsd_uthread_mourn_inferior)
11113         (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
11114         (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
11115         (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
11116         (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
11117         (bsd_uthread_target): Delete function.
11118         (_initialize_bsd_uthread): Remove reference to
11119         complete_target_initialization.
11120
11121         * bfd-target.c (target_bfd_data): Delete.  Fields folded into ...
11122         (target_bfd): ... this new class.
11123         (target_bfd_xfer_partial, target_bfd_get_section_table)
11124         (target_bfd_close): Refactor as target_bfd methods.
11125         (target_bfd::~target_bfd): New.
11126         (target_bfd_reopen): Adjust.
11127         (target_bfd::close): New.
11128
11129         * record-btrace.c (record_btrace_target): New class.
11130         (record_btrace_ops): Now a record_btrace_target.
11131         (record_btrace_open, record_btrace_stop_recording)
11132         (record_btrace_disconnect, record_btrace_close)
11133         (record_btrace_async, record_btrace_info)
11134         (record_btrace_insn_history, record_btrace_insn_history_range)
11135         (record_btrace_insn_history_from, record_btrace_call_history)
11136         (record_btrace_call_history_range)
11137         (record_btrace_call_history_from, record_btrace_record_method)
11138         (record_btrace_is_replaying, record_btrace_will_replay)
11139         (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
11140         (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
11141         (record_btrace_store_registers, record_btrace_prepare_to_store)
11142         (record_btrace_to_get_unwinder)
11143         (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
11144         (record_btrace_commit_resume, record_btrace_wait)
11145         (record_btrace_stop, record_btrace_can_execute_reverse)
11146         (record_btrace_stopped_by_sw_breakpoint)
11147         (record_btrace_supports_stopped_by_sw_breakpoint)
11148         (record_btrace_stopped_by_hw_breakpoint)
11149         (record_btrace_supports_stopped_by_hw_breakpoint)
11150         (record_btrace_update_thread_list, record_btrace_thread_alive)
11151         (record_btrace_goto_begin, record_btrace_goto_end)
11152         (record_btrace_goto, record_btrace_stop_replaying_all)
11153         (record_btrace_execution_direction)
11154         (record_btrace_prepare_to_generate_core)
11155         (record_btrace_done_generating_core): Refactor as
11156         record_btrace_target methods.
11157         (init_record_btrace_ops): Delete.
11158         (_initialize_record_btrace): Remove reference to
11159         init_record_btrace_ops.
11160         * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
11161         the execution_direction global.
11162         (record_full_base_target, record_full_target)
11163         (record_full_core_target): New classes.
11164         (record_full_ops): Now a record_full_target.
11165         (record_full_core_ops): Now a record_full_core_target.
11166         (record_full_target::detach, record_full_target::disconnect)
11167         (record_full_core_target::disconnect)
11168         (record_full_target::mourn_inferior, record_full_target::kill):
11169         New.
11170         (record_full_open, record_full_close, record_full_async): Refactor
11171         as methods of the record_full_base_target class.
11172         (record_full_resume, record_full_commit_resume): Refactor
11173         as methods of the record_full_target class.
11174         (record_full_wait, record_full_stopped_by_watchpoint)
11175         (record_full_stopped_data_address)
11176         (record_full_stopped_by_sw_breakpoint)
11177         (record_full_supports_stopped_by_sw_breakpoint)
11178         (record_full_stopped_by_hw_breakpoint)
11179         (record_full_supports_stopped_by_hw_breakpoint): Refactor as
11180         methods of the record_full_base_target class.
11181         (record_full_store_registers, record_full_xfer_partial)
11182         (record_full_insert_breakpoint, record_full_remove_breakpoint):
11183         Refactor as methods of the record_full_target class.
11184         (record_full_can_execute_reverse, record_full_get_bookmark)
11185         (record_full_goto_bookmark, record_full_execution_direction)
11186         (record_full_record_method, record_full_info, record_full_delete)
11187         (record_full_is_replaying, record_full_will_replay)
11188         (record_full_goto_begin, record_full_goto_end, record_full_goto)
11189         (record_full_stop_replaying): Refactor as methods of the
11190         record_full_base_target class.
11191         (record_full_core_resume, record_full_core_kill)
11192         (record_full_core_fetch_registers)
11193         (record_full_core_prepare_to_store)
11194         (record_full_core_store_registers, record_full_core_xfer_partial)
11195         (record_full_core_insert_breakpoint)
11196         (record_full_core_remove_breakpoint)
11197         (record_full_core_has_execution): Refactor
11198         as methods of the record_full_core_target class.
11199         (record_full_base_target::supports_delete_record): New.
11200         (init_record_full_ops): Delete.
11201         (init_record_full_core_ops): Delete.
11202         (record_full_save): Refactor as method of the
11203         record_full_base_target class.
11204         (_initialize_record_full): Remove references to
11205         init_record_full_ops and init_record_full_core_ops.
11206
11207         * remote.c (remote_target, extended_remote_target): New classes.
11208         (remote_ops): Now a remote_target.
11209         (extended_remote_ops): Now an extended_remote_target.
11210         (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
11211         (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
11212         (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
11213         (remote_pass_signals, remote_set_syscall_catchpoint)
11214         (remote_program_signals, )
11215         (remote_thread_always_alive): Remove target_ops parameter.
11216         (remote_thread_alive, remote_thread_name)
11217         (remote_update_thread_list, remote_threads_extra_info)
11218         (remote_static_tracepoint_marker_at)
11219         (remote_static_tracepoint_markers_by_strid)
11220         (remote_get_ada_task_ptid, remote_close, remote_start_remote)
11221         (remote_open): Refactor as methods of remote_target.
11222         (extended_remote_open, extended_remote_detach)
11223         (extended_remote_attach, extended_remote_post_attach):
11224         (extended_remote_supports_disable_randomization)
11225         (extended_remote_create_inferior): : Refactor as method of
11226         extended_remote_target.
11227         (remote_set_permissions, remote_open_1, remote_detach)
11228         (remote_follow_fork, remote_follow_exec, remote_disconnect)
11229         (remote_resume, remote_commit_resume, remote_stop)
11230         (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
11231         (remote_terminal_ours, remote_wait, remote_fetch_registers)
11232         (remote_prepare_to_store, remote_store_registers)
11233         (remote_flash_erase, remote_flash_done, remote_files_info)
11234         (remote_kill, remote_mourn, remote_insert_breakpoint)
11235         (remote_remove_breakpoint, remote_insert_watchpoint)
11236         (remote_watchpoint_addr_within_range)
11237         (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
11238         (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
11239         (remote_supports_stopped_by_sw_breakpoint)
11240         (remote_stopped_by_hw_breakpoint)
11241         (remote_supports_stopped_by_hw_breakpoint)
11242         (remote_stopped_by_watchpoint, remote_stopped_data_address)
11243         (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
11244         (remote_verify_memory): Refactor as methods of remote_target.
11245         (remote_write_qxfer, remote_read_qxfer): Remove target_ops
11246         parameter.
11247         (remote_xfer_partial, remote_get_memory_xfer_limit)
11248         (remote_search_memory, remote_rcmd, remote_memory_map)
11249         (remote_pid_to_str, remote_get_thread_local_address)
11250         (remote_get_tib_address, remote_read_description): Refactor as
11251         methods of remote_target.
11252         (remote_target::fileio_open, remote_target::fileio_pwrite)
11253         (remote_target::fileio_pread, remote_target::fileio_close): New.
11254         (remote_hostio_readlink, remote_hostio_fstat)
11255         (remote_filesystem_is_local, remote_can_execute_reverse)
11256         (remote_supports_non_stop, remote_supports_disable_randomization)
11257         (remote_supports_multi_process, remote_supports_cond_breakpoints)
11258         (remote_supports_enable_disable_tracepoint)
11259         (remote_supports_string_tracing)
11260         (remote_can_run_breakpoint_commands, remote_trace_init)
11261         (remote_download_tracepoint, remote_can_download_tracepoint)
11262         (remote_download_trace_state_variable, remote_enable_tracepoint)
11263         (remote_disable_tracepoint, remote_trace_set_readonly_regions)
11264         (remote_trace_start, remote_get_trace_status)
11265         (remote_get_tracepoint_status, remote_trace_stop)
11266         (remote_trace_find, remote_get_trace_state_variable_value)
11267         (remote_save_trace_data, remote_get_raw_trace_data)
11268         (remote_set_disconnected_tracing, remote_core_of_thread)
11269         (remote_set_circular_trace_buffer, remote_traceframe_info)
11270         (remote_get_min_fast_tracepoint_insn_len)
11271         (remote_set_trace_buffer_size, remote_set_trace_notes)
11272         (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
11273         (remote_disable_btrace, remote_teardown_btrace)
11274         (remote_read_btrace, remote_btrace_conf)
11275         (remote_augmented_libraries_svr4_read, remote_load)
11276         (remote_pid_to_exec_file, remote_can_do_single_step)
11277         (remote_execution_direction, remote_thread_handle_to_thread_info):
11278         Refactor as methods of remote_target.
11279         (init_remote_ops, init_extended_remote_ops): Delete.
11280         (remote_can_async_p, remote_is_async_p, remote_async)
11281         (remote_thread_events, remote_upload_tracepoints)
11282         (remote_upload_trace_state_variables): Refactor as methods of
11283         remote_target.
11284         (_initialize_remote): Remove references to init_remote_ops and
11285         init_extended_remote_ops.
11286
11287         * remote-sim.c (gdbsim_target): New class.
11288         (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
11289         (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
11290         (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
11291         (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
11292         (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
11293         (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
11294         Refactor as methods of gdbsim_target.
11295         (gdbsim_ops): Now a gdbsim_target.
11296         (init_gdbsim_ops): Delete.
11297         (gdbsim_cntrl_c): Adjust.
11298         (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
11299
11300         * amd64-linux-nat.c (amd64_linux_nat_target): New class.
11301         (the_amd64_linux_nat_target): New.
11302         (amd64_linux_fetch_inferior_registers)
11303         (amd64_linux_store_inferior_registers): Refactor as methods of
11304         amd64_linux_nat_target.
11305         (_initialize_amd64_linux_nat): Adjust.  Set linux_target.
11306         * i386-linux-nat.c: Don't include "linux-nat.h".
11307         (i386_linux_nat_target): New class.
11308         (the_i386_linux_nat_target): New.
11309         (i386_linux_fetch_inferior_registers)
11310         (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
11311         as methods of i386_linux_nat_target.
11312         (_initialize_i386_linux_nat): Adjust.  Set linux_target.
11313         * inf-child.c (inf_child_ops): Delete.
11314         (inf_child_fetch_inferior_registers)
11315         (inf_child_store_inferior_registers): Delete.
11316         (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
11317         methods of inf_child_target.
11318         (inf_child_target::supports_terminal_ours)
11319         (inf_child_target::terminal_init)
11320         (inf_child_target::terminal_inferior)
11321         (inf_child_target::terminal_ours_for_output)
11322         (inf_child_target::terminal_ours, inf_child_target::interrupt)
11323         (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
11324         New.
11325         (inf_child_open, inf_child_disconnect, inf_child_close)
11326         (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
11327         (inf_child_post_startup_inferior, inf_child_can_run)
11328         (inf_child_pid_to_exec_file): Refactor as methods of
11329         inf_child_target.
11330         (inf_child_follow_fork): Delete.
11331         (inf_child_target::can_create_inferior)
11332         (inf_child_target::can_attach): New.
11333         (inf_child_target::has_all_memory, inf_child_target::has_memory)
11334         (inf_child_target::has_stack, inf_child_target::has_registers)
11335         (inf_child_target::has_execution): New.
11336         (inf_child_fileio_open, inf_child_fileio_pwrite)
11337         (inf_child_fileio_pread, inf_child_fileio_fstat)
11338         (inf_child_fileio_close, inf_child_fileio_unlink)
11339         (inf_child_fileio_readlink, inf_child_use_agent)
11340         (inf_child_can_use_agent): Refactor as methods of
11341         inf_child_target.
11342         (return_zero, inf_child_target): Delete.
11343         (inf_child_target::inf_child_target): New.
11344         * inf-child.h: Include "target.h".
11345         (inf_child_target): Delete function prototype.
11346         (inf_child_target): New class.
11347         (inf_child_open_target, inf_child_mourn_inferior)
11348         (inf_child_maybe_unpush_target): Delete.
11349         * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
11350         (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
11351         (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
11352         (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
11353         (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
11354         (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
11355         (inf_ptrace_wait, inf_ptrace_xfer_partial)
11356         (inf_ptrace_thread_alive, inf_ptrace_files_info)
11357         (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
11358         methods of inf_ptrace_target.
11359         (inf_ptrace_target): Delete function.
11360         * inf-ptrace.h: Include "inf-child.h".
11361         (inf_ptrace_target): Delete function declaration.
11362         (inf_ptrace_target): New class.
11363         (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
11364         * linux-nat.c (linux_target): New.
11365         (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
11366         (linux_nat_target::~linux_nat_target): New.
11367         (linux_child_post_attach, linux_child_post_startup_inferior)
11368         (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
11369         (linux_child_remove_fork_catchpoint)
11370         (linux_child_insert_vfork_catchpoint)
11371         (linux_child_remove_vfork_catchpoint)
11372         (linux_child_insert_exec_catchpoint)
11373         (linux_child_remove_exec_catchpoint)
11374         (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
11375         (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
11376         (linux_nat_resume, linux_nat_stopped_by_watchpoint)
11377         (linux_nat_stopped_data_address)
11378         (linux_nat_stopped_by_sw_breakpoint)
11379         (linux_nat_supports_stopped_by_sw_breakpoint)
11380         (linux_nat_stopped_by_hw_breakpoint)
11381         (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
11382         (linux_nat_kill, linux_nat_mourn_inferior)
11383         (linux_nat_xfer_partial, linux_nat_thread_alive)
11384         (linux_nat_update_thread_list, linux_nat_pid_to_str)
11385         (linux_nat_thread_name, linux_child_pid_to_exec_file)
11386         (linux_child_static_tracepoint_markers_by_strid)
11387         (linux_nat_is_async_p, linux_nat_can_async_p)
11388         (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
11389         (linux_nat_supports_multi_process)
11390         (linux_nat_supports_disable_randomization, linux_nat_async)
11391         (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
11392         (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
11393         (linux_nat_fileio_open, linux_nat_fileio_readlink)
11394         (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
11395         methods of linux_nat_target.
11396         (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
11397         (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
11398         parameter.
11399         (check_stopped_by_watchpoint): Adjust.
11400         (linux_xfer_partial): Delete.
11401         (linux_target_install_ops, linux_target, linux_nat_add_target):
11402         Delete.
11403         (linux_nat_target::linux_nat_target): New.
11404         * linux-nat.h: Include "inf-ptrace.h".
11405         (linux_nat_target): New.
11406         (linux_target, linux_target_install_ops, linux_nat_add_target):
11407         Delete function declarations.
11408         (linux_target): Declare global.
11409         * linux-thread-db.c (thread_db_target): New.
11410         (thread_db_target::thread_db_target): New.
11411         (thread_db_ops): Delete.
11412         (the_thread_db_target): New.
11413         (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
11414         (thread_db_update_thread_list, thread_db_pid_to_str)
11415         (thread_db_extra_thread_info)
11416         (thread_db_thread_handle_to_thread_info)
11417         (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
11418         (thread_db_resume): Refactor as methods of thread_db_target.
11419         (init_thread_db_ops): Delete.
11420         (_initialize_thread_db): Remove reference to init_thread_db_ops.
11421         * x86-linux-nat.c: Don't include "linux-nat.h".
11422         (super_post_startup_inferior): Delete.
11423         (x86_linux_nat_target::~x86_linux_nat_target): New.
11424         (x86_linux_child_post_startup_inferior)
11425         (x86_linux_read_description, x86_linux_enable_btrace)
11426         (x86_linux_disable_btrace, x86_linux_teardown_btrace)
11427         (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
11428         methods of x86_linux_nat_target.
11429         (x86_linux_create_target): Delete.  Bits folded ...
11430         (x86_linux_add_target): ... here.  Now takes a linux_nat_target
11431         pointer.
11432         * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
11433         (x86_linux_nat_target): New class.
11434         (x86_linux_create_target): Delete.
11435         (x86_linux_add_target): Now takes a linux_nat_target pointer.
11436         * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
11437         (x86_region_ok_for_watchpoint, x86_stopped_data_address)
11438         (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
11439         (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
11440         (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
11441         make extern.
11442         (x86_use_watchpoints): Delete.
11443         * x86-nat.h: Include "breakpoint.h" and "target.h".
11444         (x86_use_watchpoints): Delete.
11445         (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
11446         (x86_stopped_by_watchpoint, x86_stopped_data_address)
11447         (x86_insert_watchpoint, x86_remove_watchpoint)
11448         (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
11449         (x86_stopped_by_hw_breakpoint): New declarations.
11450         (x86_nat_target): New template class.
11451
11452         * ppc-linux-nat.c (ppc_linux_nat_target): New class.
11453         (the_ppc_linux_nat_target): New.
11454         (ppc_linux_fetch_inferior_registers)
11455         (ppc_linux_can_use_hw_breakpoint)
11456         (ppc_linux_region_ok_for_hw_watchpoint)
11457         (ppc_linux_ranged_break_num_registers)
11458         (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
11459         (ppc_linux_insert_mask_watchpoint)
11460         (ppc_linux_remove_mask_watchpoint)
11461         (ppc_linux_can_accel_watchpoint_condition)
11462         (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
11463         (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
11464         (ppc_linux_watchpoint_addr_within_range)
11465         (ppc_linux_masked_watch_num_registers)
11466         (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
11467         (ppc_linux_read_description): Refactor as methods of
11468         ppc_linux_nat_target.
11469         (_initialize_ppc_linux_nat): Adjust.  Set linux_target.
11470
11471         * procfs.c (procfs_xfer_partial): Delete forward declaration.
11472         (procfs_target): New class.
11473         (the_procfs_target): New.
11474         (procfs_target): Delete function.
11475         (procfs_auxv_parse, procfs_attach, procfs_detach)
11476         (procfs_fetch_registers, procfs_store_registers, procfs_wait)
11477         (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
11478         (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
11479         (procfs_create_inferior, procfs_update_thread_list)
11480         (procfs_thread_alive, procfs_pid_to_str)
11481         (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
11482         (procfs_stopped_data_address, procfs_insert_watchpoint)
11483         (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
11484         (proc_find_memory_regions, procfs_info_proc)
11485         (procfs_make_note_section): Refactor as methods of procfs_target.
11486         (_initialize_procfs): Adjust.
11487         * sol-thread.c (sol_thread_target): New class.
11488         (sol_thread_ops): Now a sol_thread_target.
11489         (sol_thread_detach, sol_thread_resume, sol_thread_wait)
11490         (sol_thread_fetch_registers, sol_thread_store_registers)
11491         (sol_thread_xfer_partial, sol_thread_mourn_inferior)
11492         (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
11493         (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
11494         (init_sol_thread_ops): Delete.
11495         (_initialize_sol_thread): Adjust.  Remove references to
11496         init_sol_thread_ops and complete_target_initialization.
11497
11498         * windows-nat.c (windows_nat_target): New class.
11499         (windows_fetch_inferior_registers)
11500         (windows_store_inferior_registers, windows_resume, windows_wait)
11501         (windows_attach, windows_detach, windows_pid_to_exec_file)
11502         (windows_files_info, windows_create_inferior)
11503         (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
11504         (windows_close, windows_pid_to_str, windows_xfer_partial)
11505         (windows_get_tib_address, windows_get_ada_task_ptid)
11506         (windows_thread_name, windows_thread_alive): Refactor as
11507         windows_nat_target methods.
11508         (do_initial_windows_stuff): Adjust.
11509         (windows_target): Delete function.
11510         (_initialize_windows_nat): Adjust.
11511
11512         * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
11513         (darwin_mourn_inferior, darwin_kill_inferior)
11514         (darwin_create_inferior, darwin_attach, darwin_detach)
11515         (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
11516         (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
11517         (darwin_supports_multi_process): Refactor as darwin_nat_target
11518         methods.
11519         (darwin_resume_to, darwin_files_info): Delete.
11520         (_initialize_darwin_inferior): Rename to ...
11521         (_initialize_darwin_nat): ... this.  Adjust to C++ification.
11522         * darwin-nat.h: Include "inf-child.h".
11523         (darwin_nat_target): New class.
11524         (darwin_complete_target): Delete.
11525         * i386-darwin-nat.c (i386_darwin_nat_target): New class.
11526         (darwin_target): New.
11527         (i386_darwin_fetch_inferior_registers)
11528         (i386_darwin_store_inferior_registers): Refactor as methods of
11529         darwin_nat_target.
11530         (darwin_complete_target): Delete, with ...
11531         (_initialize_i386_darwin_nat): ... bits factored out here.
11532
11533         * alpha-linux-nat.c (alpha_linux_nat_target): New class.
11534         (the_alpha_linux_nat_target): New.
11535         (alpha_linux_register_u_offset): Refactor as
11536         alpha_linux_nat_target method.
11537         (_initialize_alpha_linux_nat): Adjust.
11538         * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
11539         (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
11540         (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
11541         methods of linux_nat_trad_target.
11542         (linux_trad_target): Delete.
11543         * linux-nat-trad.h (linux_trad_target): Delete function.
11544         (linux_nat_trad_target): New class.
11545         * mips-linux-nat.c (mips_linux_nat_target): New class.
11546         (super_fetch_registers, super_store_registers, super_close):
11547         Delete.
11548         (the_mips_linux_nat_target): New.
11549         (mips64_linux_regsets_fetch_registers)
11550         (mips64_linux_regsets_store_registers)
11551         (mips64_linux_fetch_registers, mips64_linux_store_registers)
11552         (mips_linux_register_u_offset, mips_linux_read_description)
11553         (mips_linux_can_use_hw_breakpoint)
11554         (mips_linux_stopped_by_watchpoint)
11555         (mips_linux_stopped_data_address)
11556         (mips_linux_region_ok_for_hw_watchpoint)
11557         (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
11558         (mips_linux_close): Refactor as methods of mips_linux_nat.
11559         (_initialize_mips_linux_nat): Adjust to C++ification.
11560
11561         * aix-thread.c (aix_thread_target): New class.
11562         (aix_thread_ops): Now an aix_thread_target.
11563         (aix_thread_detach, aix_thread_resume, aix_thread_wait)
11564         (aix_thread_fetch_registers, aix_thread_store_registers)
11565         (aix_thread_xfer_partial, aix_thread_mourn_inferior)
11566         (aix_thread_thread_alive, aix_thread_pid_to_str)
11567         (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
11568         Refactor as methods of aix_thread_target.
11569         (init_aix_thread_ops): Delete.
11570         (_initialize_aix_thread): Remove references to init_aix_thread_ops
11571         and complete_target_initialization.
11572         * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
11573         (rs6000_nat_target): New class.
11574         (the_rs6000_nat_target): New.
11575         (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
11576         (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
11577         (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
11578         (super_create_inferior): Delete.
11579         (_initialize_rs6000_nat): Adjust to C++ification.
11580
11581         * arm-linux-nat.c (arm_linux_nat_target): New class.
11582         (the_arm_linux_nat_target): New.
11583         (arm_linux_fetch_inferior_registers)
11584         (arm_linux_store_inferior_registers, arm_linux_read_description)
11585         (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
11586         (arm_linux_remove_hw_breakpoint)
11587         (arm_linux_region_ok_for_hw_watchpoint)
11588         (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
11589         (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
11590         (arm_linux_watchpoint_addr_within_range): Refactor as methods of
11591         arm_linux_nat_target.
11592         (_initialize_arm_linux_nat): Adjust to C++ification.
11593
11594         * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
11595         (the_aarch64_linux_nat_target): New.
11596         (aarch64_linux_fetch_inferior_registers)
11597         (aarch64_linux_store_inferior_registers)
11598         (aarch64_linux_child_post_startup_inferior)
11599         (aarch64_linux_read_description)
11600         (aarch64_linux_can_use_hw_breakpoint)
11601         (aarch64_linux_insert_hw_breakpoint)
11602         (aarch64_linux_remove_hw_breakpoint)
11603         (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
11604         (aarch64_linux_region_ok_for_hw_watchpoint)
11605         (aarch64_linux_stopped_data_address)
11606         (aarch64_linux_stopped_by_watchpoint)
11607         (aarch64_linux_watchpoint_addr_within_range)
11608         (aarch64_linux_can_do_single_step): Refactor as methods of
11609         aarch64_linux_nat_target.
11610         (super_post_startup_inferior): Delete.
11611         (_initialize_aarch64_linux_nat): Adjust to C++ification.
11612
11613         * hppa-linux-nat.c (hppa_linux_nat_target): New class.
11614         (the_hppa_linux_nat_target): New.
11615         (hppa_linux_fetch_inferior_registers)
11616         (hppa_linux_store_inferior_registers): Refactor as methods of
11617         hppa_linux_nat_target.
11618         (_initialize_hppa_linux_nat): Adjust to C++ification.
11619
11620         * ia64-linux-nat.c (ia64_linux_nat_target): New class.
11621         (the_ia64_linux_nat_target): New.
11622         (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
11623         (ia64_linux_stopped_data_address)
11624         (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
11625         (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
11626         ia64_linux_nat_target methods.
11627         (super_xfer_partial): Delete.
11628         (_initialize_ia64_linux_nat): Adjust to C++ification.
11629
11630         * m32r-linux-nat.c (m32r_linux_nat_target): New class.
11631         (the_m32r_linux_nat_target): New.
11632         (m32r_linux_fetch_inferior_registers)
11633         (m32r_linux_store_inferior_registers): Refactor as
11634         m32r_linux_nat_target methods.
11635         (_initialize_m32r_linux_nat): Adjust to C++ification.
11636
11637         * m68k-linux-nat.c (m68k_linux_nat_target): New class.
11638         (the_m68k_linux_nat_target): New.
11639         (m68k_linux_fetch_inferior_registers)
11640         (m68k_linux_store_inferior_registers): Refactor as
11641         m68k_linux_nat_target methods.
11642         (_initialize_m68k_linux_nat): Adjust to C++ification.
11643
11644         * s390-linux-nat.c (s390_linux_nat_target): New class.
11645         (the_s390_linux_nat_target): New.
11646         (s390_linux_fetch_inferior_registers)
11647         (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
11648         (s390_insert_watchpoint, s390_remove_watchpoint)
11649         (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
11650         (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
11651         (s390_auxv_parse, s390_read_description): Refactor as methods of
11652         s390_linux_nat_target.
11653         (_initialize_s390_nat): Adjust to C++ification.
11654
11655         * sparc-linux-nat.c (sparc_linux_nat_target): New class.
11656         (the_sparc_linux_nat_target): New.
11657         (_initialize_sparc_linux_nat): Adjust to C++ification.
11658         * sparc-nat.c (sparc_fetch_inferior_registers)
11659         (sparc_store_inferior_registers): Remove target_ops parameter.
11660         * sparc-nat.h (sparc_fetch_inferior_registers)
11661         (sparc_store_inferior_registers): Remove target_ops parameter.
11662         * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
11663         (the_sparc64_linux_nat_target): New.
11664         (_initialize_sparc64_linux_nat): Adjust to C++ification.
11665
11666         * spu-linux-nat.c (spu_linux_nat_target): New class.
11667         (the_spu_linux_nat_target): New.
11668         (spu_child_post_startup_inferior, spu_child_post_attach)
11669         (spu_child_wait, spu_fetch_inferior_registers)
11670         (spu_store_inferior_registers, spu_xfer_partial)
11671         (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
11672         methods.
11673         (_initialize_spu_nat): Adjust to C++ification.
11674
11675         * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
11676         (the_tilegx_linux_nat_target): New.
11677         (fetch_inferior_registers, store_inferior_registers):
11678         Refactor as methods.
11679         (_initialize_tile_linux_nat): Adjust to C++ification.
11680
11681         * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
11682         (the_xtensa_linux_nat_target): New.
11683         (xtensa_linux_fetch_inferior_registers)
11684         (xtensa_linux_store_inferior_registers): Refactor as
11685         xtensa_linux_nat_target methods.
11686         (_initialize_xtensa_linux_nat): Adjust to C++ification.
11687
11688         * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
11689         (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
11690         (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
11691         (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
11692         (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
11693         (fbsd_stopped_by_sw_breakpoint)
11694         (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
11695         (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
11696         (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
11697         (fbsd_post_startup_inferior, fbsd_post_attach)
11698         (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
11699         (fbsd_set_syscall_catchpoint)
11700         (super_xfer_partial, super_resume, super_wait)
11701         (fbsd_supports_stopped_by_hw_breakpoint): Delete.
11702         (fbsd_handle_debug_trap): Remove target_ops parameter.
11703         (fbsd_nat_add_target): Delete.
11704         * fbsd-nat.h: Include "inf-ptrace.h".
11705         (fbsd_nat_add_target): Delete.
11706         (USE_SIGTRAP_SIGINFO): Define.
11707         (fbsd_nat_target): New class.
11708
11709         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
11710         (amd64bsd_store_inferior_registers): Remove target_ops parameter.
11711         (amd64bsd_target): Delete.
11712         * amd64-bsd-nat.h: New file.
11713         * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
11714         "x86-bsd-nat.h".
11715         (amd64_fbsd_nat_target): New class.
11716         (the_amd64_fbsd_nat_target): New.
11717         (amd64fbsd_read_description): Refactor as method of
11718         amd64_fbsd_nat_target.
11719         (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
11720         (_initialize_amd64fbsd_nat): Adjust to C++ification.
11721         * amd64-nat.h (amd64bsd_target): Delete function declaration.
11722         * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
11723         (i386bsd_store_inferior_registers): Remove target_ops parameter.
11724         (i386bsd_target): Delete.
11725         * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
11726         (i386bsd_fetch_inferior_registers)
11727         (i386bsd_store_inferior_registers): Declare.
11728         (i386_bsd_nat_target): New class.
11729         * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
11730         (the_i386_fbsd_nat_target): New.
11731         (i386fbsd_resume, i386fbsd_read_description): Refactor as
11732         i386_fbsd_nat_target methods.
11733         (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
11734         (_initialize_i386fbsd_nat): Adjust to C++ification.
11735         * x86-bsd-nat.c (super_mourn_inferior): Delete.
11736         (x86bsd_mourn_inferior, x86bsd_target): Delete.
11737         (_initialize_x86_bsd_nat): Adjust to C++ification.
11738         * x86-bsd-nat.h: Include "x86-nat.h".
11739         (x86bsd_target): Delete declaration.
11740         (x86bsd_nat_target): New class.
11741
11742         * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
11743         (the_aarch64_fbsd_nat_target): New.
11744         (aarch64_fbsd_fetch_inferior_registers)
11745         (aarch64_fbsd_store_inferior_registers): Refactor as methods of
11746         aarch64_fbsd_nat_target.
11747         (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
11748         * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
11749         (the_alpha_bsd_nat_target): New.
11750         (alphabsd_fetch_inferior_registers)
11751         (alphabsd_store_inferior_registers): Refactor as
11752         alpha_bsd_nat_target methods.
11753         (_initialize_alphabsd_nat): Refactor as methods of
11754         alpha_bsd_nat_target.
11755         * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
11756         (the_amd64_nbsd_nat_target): New.
11757         (_initialize_amd64nbsd_nat): Adjust to C++ification.
11758         * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
11759         (the_amd64_obsd_nat_target): New.
11760         (_initialize_amd64obsd_nat): Adjust to C++ification.
11761         * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
11762         (the_arm_fbsd_nat_target): New.
11763         (arm_fbsd_fetch_inferior_registers)
11764         (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
11765         (_initialize_arm_fbsd_nat): Refactor as methods of
11766         arm_fbsd_nat_target.
11767         (_initialize_arm_fbsd_nat): Adjust to C++ification.
11768         * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
11769         (the_arm_netbsd_nat_target): New.
11770         (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
11771         arm_netbsd_nat_target.
11772         (_initialize_arm_netbsd_nat): Adjust to C++ification.
11773         * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
11774         (the_hppa_nbsd_nat_target): New.
11775         (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
11776         hppa_nbsd_nat_target methods.
11777         (_initialize_hppanbsd_nat): Adjust to C++ification.
11778         * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
11779         (the_hppa_obsd_nat_target): New.
11780         (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
11781         methods of hppa_obsd_nat_target.
11782         (_initialize_hppaobsd_nat): Adjust to C++ification.  Use
11783         add_target.
11784         * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
11785         (_initialize_i386nbsd_nat): Adjust to C++ification.  Use
11786         add_target.
11787         * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
11788         (_initialize_i386obsd_nat): Use add_target.
11789         * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
11790         (the_m68k_bsd_nat_target): New.
11791         (m68kbsd_fetch_inferior_registers)
11792         (m68kbsd_store_inferior_registers): Refactor as methods of
11793         m68k_bsd_nat_target.
11794         (_initialize_m68kbsd_nat): Adjust to C++ification.
11795         * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
11796         (the_mips_fbsd_nat_target): New.
11797         (mips_fbsd_fetch_inferior_registers)
11798         (mips_fbsd_store_inferior_registers): Refactor as methods of
11799         mips_fbsd_nat_target.
11800         (_initialize_mips_fbsd_nat): Adjust to C++ification.  Use
11801         add_target.
11802         * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
11803         (the_mips_nbsd_nat_target): New.
11804         (mipsnbsd_fetch_inferior_registers)
11805         (mipsnbsd_store_inferior_registers): Refactor as methods of
11806         mips_nbsd_nat_target.
11807         (_initialize_mipsnbsd_nat): Adjust to C++ification.
11808         * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
11809         (the_mips64_obsd_nat_target): New.
11810         (mips64obsd_fetch_inferior_registers)
11811         (mips64obsd_store_inferior_registers): Refactor as methods of
11812         mips64_obsd_nat_target.
11813         (_initialize_mips64obsd_nat): Adjust to C++ification.  Use
11814         add_target.
11815         * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
11816         nbsd_nat_target.
11817         * nbsd-nat.h: Include "inf-ptrace.h".
11818         (nbsd_nat_target): New class.
11819         * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
11820         (obsd_wait): Refactor as methods of obsd_nat_target.
11821         (obsd_add_target): Delete.
11822         * obsd-nat.h: Include "inf-ptrace.h".
11823         (obsd_nat_target): New class.
11824         * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
11825         (the_ppc_fbsd_nat_target): New.
11826         (ppcfbsd_fetch_inferior_registers)
11827         (ppcfbsd_store_inferior_registers): Refactor as methods of
11828         ppc_fbsd_nat_target.
11829         (_initialize_ppcfbsd_nat): Adjust to C++ification.  Use
11830         add_target.
11831         * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
11832         (the_ppc_nbsd_nat_target): New.
11833         (ppcnbsd_fetch_inferior_registers)
11834         (ppcnbsd_store_inferior_registers): Refactor as methods of
11835         ppc_nbsd_nat_target.
11836         (_initialize_ppcnbsd_nat): Adjust to C++ification.
11837         * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
11838         (the_ppc_obsd_nat_target): New.
11839         (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
11840         methods of ppc_obsd_nat_target.
11841         (_initialize_ppcobsd_nat): Adjust to C++ification.  Use
11842         add_target.
11843         * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
11844         (the_sh_nbsd_nat_target): New.
11845         (shnbsd_fetch_inferior_registers)
11846         (shnbsd_store_inferior_registers): Refactor as methods of
11847         sh_nbsd_nat_target.
11848         (_initialize_shnbsd_nat): Adjust to C++ification.
11849         * sparc-nat.c (sparc_xfer_wcookie): Make extern.
11850         (inf_ptrace_xfer_partial): Delete.
11851         (sparc_xfer_partial, sparc_target): Delete.
11852         * sparc-nat.h (sparc_fetch_inferior_registers)
11853         (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
11854         (sparc_target): Delete function declaration.
11855         (sparc_target): New template class.
11856         * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
11857         (_initialize_sparcnbsd_nat): Adjust to C++ification.
11858         * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
11859         (_initialize_sparc64fbsd_nat): Adjust to C++ification.  Use
11860         add_target.
11861         * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
11862         (_initialize_sparc64nbsd_nat): Adjust to C++ification.
11863         * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
11864         (_initialize_sparc64obsd_nat): Adjust to C++ification.  Use
11865         add_target.
11866         * vax-bsd-nat.c (vax_bsd_nat_target): New class.
11867         (the_vax_bsd_nat_target): New.
11868         (vaxbsd_fetch_inferior_registers)
11869         (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
11870         methods.
11871         (_initialize_vaxbsd_nat): Adjust to C++ification.
11872
11873         * bsd-kvm.c (bsd_kvm_target): New class.
11874         (bsd_kvm_ops): Now a bsd_kvm_target.
11875         (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
11876         (bsd_kvm_files_info, bsd_kvm_fetch_registers)
11877         (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
11878         bsd_kvm_target.
11879         (bsd_kvm_return_one): Delete.
11880         (bsd_kvm_add_target): Adjust to C++ification.
11881
11882         * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
11883         (nto_procfs_target_procfs): New classes.
11884         (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
11885         (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
11886         (procfs_post_attach, procfs_wait, procfs_fetch_registers)
11887         (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
11888         (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
11889         (procfs_remove_hw_breakpoint, procfs_resume)
11890         (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
11891         (procfs_kill_inferior, procfs_store_registers)
11892         (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
11893         as methods of nto_procfs_target.
11894         (nto_procfs_ops): Now an nto_procfs_target_procfs.
11895         (nto_native_ops): Delete.
11896         (procfs_open, procfs_native_open): Delete.
11897         (nto_native_ops): Now an nto_procfs_target_native.
11898         (init_procfs_targets): Adjust to C++ification.
11899         (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
11900         (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
11901         Refactor as methods of nto_procfs_target.
11902
11903         * go32-nat.c (go32_nat_target): New class.
11904         (the_go32_nat_target): New.
11905         (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
11906         (go32_store_registers, go32_xfer_partial, go32_files_info)
11907         (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
11908         (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
11909         (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
11910         (go32_pid_to_str): Refactor as methods of go32_nat_target.
11911         (go32_target): Delete.
11912         (_initialize_go32_nat): Adjust to C++ification.
11913
11914         * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
11915         (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
11916         (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
11917         (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
11918         gnu_nat_target.
11919         (gnu_target): Delete.
11920         * gnu-nat.h (gnu_target): Delete.
11921         (gnu_nat_target): New class.
11922         * i386-gnu-nat.c (gnu_base_target): New.
11923         (i386_gnu_nat_target): New class.
11924         (the_i386_gnu_nat_target): New.
11925         (_initialize_i386gnu_nat): Adjust to C++ification.
11926
11927 2018-05-02  Pedro Alves  <palves@redhat.com>
11928
11929         * bfd-target.c (target_bfd_xclose): Rename to ...
11930         (target_bfd_close): ... this.
11931         (target_bfd_reopen): Adjust.
11932         * target.c (target_close): Remove references to to_xclose.
11933         * target.h (target_ops::to_xclose): Delete.
11934         (target_ops::to_close): Update comments.
11935
11936 2018-05-02  Pedro Alves  <palves@redhat.com>
11937
11938         * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
11939         "linux-nat.h".
11940         * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
11941         * inf-ptrace.c (inf_ptrace_register_u_offset)
11942         (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
11943         (inf_ptrace_store_register, inf_ptrace_store_registers)
11944         (inf_ptrace_trad_target): Move to ...
11945         * linux-nat-trad.c: ... this new file.
11946         * linux-nat-trad.h: New file.
11947         * linux-nat.c (linux_target_install_ops): Make extern.
11948         (linux_trad_target): Delete.
11949         * linux-nat.h (linux_trad_target): Delete declaration.
11950         (linux_target_install_ops): Declare.
11951         * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
11952         "linux-nat.h".
11953
11954 2018-05-02  Pedro Alves  <palves@redhat.com>
11955
11956         * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
11957         procfs_target/add_target here.
11958         * procfs.c (procfs_target): Make static.
11959         (_initialize_procfs): Call add_target here.
11960         * procfs.h (struct target_ops): Remove forward declaration.
11961         (procfs_target): Remove declaration.
11962         * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
11963
11964 2018-05-02  Pedro Alves  <palves@redhat.com>
11965
11966         * procfs.c (procfs_stopped_by_watchpoint)
11967         (procfs_insert_watchpoint, procfs_remove_watchpoint)
11968         (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
11969         Forward declare.
11970         (procfs_use_watchpoints): Delete, move contents...
11971         (procfs_target): ... here.
11972         * procfs.h (procfs_use_watchpoints): Delete declaration.
11973         * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
11974         procfs_use_watchpoints.
11975         * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
11976         procfs_use_watchpoints.
11977
11978 2018-05-02  Tom Tromey  <tom@tromey.com>
11979
11980         PR python/20084:
11981         * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
11982         and var_zuinteger_unlimited.
11983         * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
11984         and PARAM_ZUINTEGER_UNLIMITED.
11985         (set_parameter_value): Handle var_zuinteger and
11986         var_zuinteger_unlimited.
11987         (add_setshow_generic): Likewise.
11988         (parmpy_init): Likewise.
11989
11990 2018-04-28  Dan Robertson  <danlrobertson89@gmail.com>
11991
11992         PR rust/23124
11993         * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
11994         pointer is not null before dereferencing it.
11995
11996 2018-04-30  Tom Tromey  <tom@tromey.com>
11997
11998         * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
11999         is_mi_like_p.
12000
12001 2018-04-30  Tom Tromey  <tom@tromey.com>
12002
12003         * breakpoint.c (mention): Remove use of is_mi_like_p.
12004         (print_mention_ranged_breakpoint): Likewise.
12005         * break-catch-throw.c (print_it_exception_catchpoint): Remove use
12006         of is_mi_like_p.
12007
12008 2018-04-30  Tom Tromey  <tom@tromey.com>
12009
12010         * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
12011
12012 2018-04-30  Tom Tromey  <tom@tromey.com>
12013
12014         * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
12015         (info_spu_event_command): Remove some uses of is_mi_like_p.
12016
12017 2018-04-30  Tom Tromey  <tom@tromey.com>
12018
12019         * python/py-framefilter.c (py_print_single_arg)
12020         (enumerate_locals, py_print_args, py_print_frame): Remove some
12021         uses of is_mi_like_p.
12022
12023 2018-04-30  Tom Tromey  <tom@tromey.com>
12024
12025         * ui-out.c: Update.
12026         * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
12027         * ui-out.h (ui_out::is_mi_like_p): Now const.
12028         (ui_out::do_is_mi_like_p): Now const.
12029         * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
12030
12031 2018-04-30  Tom Tromey  <tom@tromey.com>
12032
12033         * varobj.c (varobj_set_visualizer): Use new_reference.
12034         * python/python.c (gdbpy_decode_line): Use new_reference.
12035         * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
12036         new_reference.
12037
12038 2018-04-30  Tom Tromey  <tom@tromey.com>
12039
12040         * varobj.c (install_new_value): Use new_reference.
12041         * value.h (value_incref): Return void.  Swap intro comment with
12042         value_decref.
12043         * value.c (set_value_parent): Use new_reference.
12044         (value_incref): Return void.  Update intro comment.
12045         (release_value): Use new_reference.
12046         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
12047
12048 2018-04-30  Tom Tromey  <tom@tromey.com>
12049
12050         * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
12051         * gdb_bfd.h (new_bfd_ref): Remove.
12052         (gdb_bfd_open): Update comment.
12053         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
12054         (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
12055         (gdb_bfd_fdopenr): Use new_reference.
12056         * exec.c (exec_file_attach): Use new_reference.
12057
12058 2018-04-30  Tom Tromey  <tom@tromey.com>
12059
12060         * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
12061         method.
12062
12063 2018-04-30  Tom Tromey  <tom@tromey.com>
12064
12065         * jit.c (jit_read_code_entry): Use type_align.
12066         * i386-tdep.c (i386_gdbarch_init): Don't call
12067         set_gdbarch_long_long_align_bit.
12068         * gdbarch.sh: Remove long_long_align_bit.
12069         * gdbarch.c, gdbarch.h: Rebuild.
12070         * arc-tdep.c (arc_type_align): New function.
12071         (arc_gdbarch_init): Use arc_type_align.  Don't call
12072         set_gdbarch_long_long_align_bit.
12073
12074 2018-04-30  Tom Tromey  <tom@tromey.com>
12075
12076         * rust-lang.c (rust_type_alignment): Remove.
12077         (rust_composite_type): Use type_align.
12078
12079 2018-04-30  Tom Tromey  <tom@tromey.com>
12080
12081         * NEWS: Mention Type.align.
12082         * python/py-type.c (typy_get_alignof): New function.
12083         (type_object_getset): Add "alignof".
12084
12085 2018-04-30  Tom Tromey  <tom@tromey.com>
12086
12087         PR exp/17095:
12088         * NEWS: Update.
12089         * std-operator.def (UNOP_ALIGNOF): New operator.
12090         * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
12091         New.
12092         * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
12093         * c-lang.c (c_op_print_tab): Add alignof.
12094         * c-exp.y (ALIGNOF): New token.
12095         (exp): Add "ALIGNOF" production.
12096         (ident_tokens): Add _Alignof and alignof.
12097
12098 2018-04-30  Tom Tromey  <tom@tromey.com>
12099
12100         * i386-tdep.c (i386_type_align): New function.
12101         (i386_gdbarch_init): Update.
12102         * gdbarch.sh (type_align): New method.
12103         * gdbarch.c, gdbarch.h: Rebuild.
12104         * arch-utils.h (default_type_align): Declare.
12105         * arch-utils.c (default_type_align): New function.
12106         * gdbtypes.h (TYPE_ALIGN_BITS): New define.
12107         (struct type) <align_log2>: New field.
12108         <instance_flags>: Now a bitfield.
12109         (TYPE_RAW_ALIGN): New macro.
12110         (type_align, type_raw_align, set_type_align): Declare.
12111         * gdbtypes.c (type_align, type_raw_align, set_type_align): New
12112         functions.
12113         * dwarf2read.c (quirk_rust_enum): Set type alignment.
12114         (get_alignment, maybe_set_alignment): New functions.
12115         (read_structure_type, read_enumeration_type, read_array_type)
12116         (read_set_type, read_tag_pointer_type, read_tag_reference_type)
12117         (read_subrange_type, read_base_type): Set type alignment.
12118
12119 2018-04-30  Simon Marchi  <simon.marchi@ericsson.com>
12120
12121         * dwarf2read.c (read_index_from_section): Use bool.
12122
12123 2018-04-29  Fabian Groffen  <grobian@gentoo.org>
12124
12125         PR gdb/22950
12126         * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
12127         with #ifdef.
12128
12129 2018-04-29  John Reiser  <jreiser@BitWagon.com>
12130
12131         PR build/22873
12132         * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
12133         last step, and do it atomically.
12134
12135 2018-04-27  Alexandre Oliva  <aoliva@redhat.com>
12136
12137         * compile/compile-c-types.c (convert_int, convert_float):
12138         Update for C FE v1.
12139
12140 2018-04-27  Tom Tromey  <tom@tromey.com>
12141
12142         PR rust/22545:
12143         * rust-lang.c (rust_inclusive_range_type_p): New function.
12144         (rust_range): Handle inclusive ranges.
12145         (rust_compute_range): Likewise.
12146         * rust-exp.y (struct rust_op) <inclusive>: New field.
12147         (DOTDOTEQ): New constant.
12148         (range_expr): Add "..=" productions.
12149         (operator_tokens): Add "..=" token.
12150         (ast_range): Add "inclusive" parameter.
12151         (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
12152         ranges.
12153         * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
12154         bounds values.
12155         * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
12156         LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
12157         Update comments.
12158         * expprint.c (print_subexp_standard): Handle new bounds values.
12159         (dump_subexp_body_standard): Likewise.
12160
12161 2018-04-27  Tom Tromey  <tom@tromey.com>
12162
12163         * configure: Rebuild.
12164         * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
12165         * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
12166         "OVERRIDE".
12167         (class symbol_needs_eval_context): Likewise.
12168         * dwarf2read.c (mock_mapped_index::symbol_name_count)
12169         (mock_mapped_index::symbol_name_at): Use "override".  Remove
12170         "virtual".
12171         * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
12172         "override".
12173         (class dwarf_expr_executor): Use "override", not "OVERRIDE".
12174         * aarch64-tdep.c (instruction_reader::read): Use "override".
12175         (instruction_reader_test::read): Likewise.
12176         * arm-tdep.c (instruction_reader::read): Use "override".
12177         (instruction_reader_thumb::read): Likewise.
12178
12179 2018-04-26  Andrzej Kaczmarek  <andrzej.kaczmarek@codecoup.pl>
12180
12181         PR remote/9665
12182         * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
12183         instead of remote_send.
12184         (remote_send): Remove.
12185
12186 2018-04-26  Pedro Alves  <palves@redhat.com>
12187
12188         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
12189         find_function_start_sal instead of find_pc_line.
12190
12191 2018-04-26  Pedro Alves  <palves@redhat.com>
12192
12193         * breakpoint.c (set_breakpoint_location_function): Handle
12194         mst_data_gnu_ifunc.
12195         * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
12196         * elfread.c (elf_symtab_read): Give data symbols with
12197         BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
12198         (elf_rel_plt_read): Update comment.
12199         * linespec.c (convert_linespec_to_sals): Handle
12200         mst_data_gnu_ifunc.
12201         (minsym_found): Handle mst_data_gnu_ifunc.
12202         * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
12203         (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
12204         * parse.c (find_minsym_type_and_address): Handle
12205         mst_data_gnu_ifunc.
12206         * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
12207         * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
12208         * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
12209         comment.
12210         <mst_data_gnu_ifunc>: New enumerator.
12211
12212 2018-04-26  Pedro Alves  <palves@redhat.com>
12213
12214         * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
12215         (lookup_minimal_symbol_by_pc_section): ... this.  Replace
12216         'want_trampoline' parameter by a lookup_msym_prefer parameter.
12217         Handle it.
12218         (lookup_minimal_symbol_by_pc_section): Delete old implementation.
12219         (lookup_minimal_symbol_by_pc): Adjust.
12220         (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
12221         (lookup_solib_trampoline_symbol_by_pc): Adjust.
12222         * minsyms.h (lookup_msym_prefer): New enum.
12223         (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
12224         parameter by a lookup_msym_prefer parameter.
12225
12226 2018-04-26  Pedro Alves  <palves@redhat.com>
12227
12228         * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
12229         ends in "@plt" instead of looking at the symbol's section.
12230
12231 2018-04-26  Pedro Alves  <palves@redhat.com>
12232
12233         * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete.  Remove
12234         all references.
12235         (find_pc_partial_function_gnu_ifunc): Rename to ...
12236         (find_pc_partial_function): ... this, and remove references to
12237         'is_gnu_ifunc_p'.
12238         (find_pc_partial_function): Delete old implementation.
12239         * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
12240
12241 2018-04-26  Pedro Alves  <palves@redhat.com>
12242
12243         * linespec.c (struct bound_minimal_symbol_search_key): New.
12244         (convert_linespec_to_sals): Sort minimal symbols earlier.  Don't
12245         skip first line if we found a GNU ifunc minimal symbol by name.
12246         (compare_msymbols): Change parameters to work with a destructured
12247         lhs minsym.
12248         (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
12249         functions.
12250
12251 2018-04-26  Pedro Alves  <palves@redhat.com>
12252
12253         * breakpoint.c (set_breakpoint_location_function): Don't resolve
12254         ifunc targets here.  Instead, if we have an ifunc minsym, use its
12255         address/name.
12256         (add_location_to_breakpoint): Store the minsym and the objfile in
12257         the breakpoint location.
12258         * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
12259         * linespec.c (minsym_found): Resolve GNU ifunc targets here.
12260         Record the minsym in the sal.
12261         * symtab.h (symtab_and_line) <msymbol>: New field.
12262
12263 2018-04-26  Pedro Alves  <palves@redhat.com>
12264
12265         * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
12266         unless we actually resolved the ifunc.
12267
12268 2018-04-26  Pedro Alves  <palves@redhat.com>
12269
12270         * c-exp.y (variable production): Prefer ifunc minsyms over
12271         regular function symbols.
12272         * symtab.c (find_gnu_ifunc): New function.
12273         * minsyms.h (lookup_msym_prefer): New enum.
12274         (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
12275         parameter by a lookup_msym_prefer parameter.
12276         * symtab.h (find_gnu_ifunc): New declaration.
12277
12278 2018-04-26  Pedro Alves  <palves@redhat.com>
12279
12280         * blockframe.c (find_gnu_ifunc_target_type): New function.
12281         (find_function_type): New.
12282         * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
12283         return a value with a memory address.
12284         (eval_call): For calls to GNU ifunc functions, try to find the
12285         type of the target function from the type that the resolver
12286         returns.
12287         * gdbtypes.c (objfile_type): Don't install a return type for ifunc
12288         symbols.
12289         * infcall.c (find_function_return_type): Delete.
12290         (find_function_addr): Add 'function_type' parameter.  For calls to
12291         GNU ifunc functions, try to find the type of the target function
12292         from the type that the resolver returns, and return it via
12293         FUNCTION_TYPE.
12294         (call_function_by_hand_dummy): Adjust to use the function type
12295         returned by find_function_addr.
12296         (find_function_addr): Add 'function_type' parameter and move
12297         description here.
12298         * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
12299         declarations.
12300
12301 2018-04-26  Pedro Alves  <palves@redhat.com>
12302
12303         * c-exp.y (variable production): Skip finding an alias for ifunc
12304         symbols.
12305
12306 2018-04-26  Pedro Alves  <palves@redhat.com>
12307
12308         * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
12309
12310 2018-04-25  Pedro Alves  <palves@redhat.com>
12311
12312         * infcmd.c (kill_command): Print the pid as string, not the whole
12313         thread's ptid.  Add comment.  s/has been killed/killed/ in output
12314         message.
12315         * remote.c (remote_detach_1): Print the pid as string, not the
12316         whole thread's ptid.
12317
12318 2018-04-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
12319             Sergio Durigan Junior  <sergiodj@redhat.com>
12320             Pedro Alves  <palves@redhat.com>
12321
12322         * infcmd.c (kill_command): Print message when inferior has
12323         been killed.
12324         * inferior.c (print_inferior_events): Remove 'static'.  Set as
12325         '1'.
12326         (add_inferior): Improve message printed when
12327         'print_inferior_events' is on.
12328         (exit_inferior): Remove message printed when
12329         'print_inferior_events' is on.
12330         (detach_inferior): Improve message printed when
12331         'print_inferior_events' is on.
12332         (initialize_inferiors): Use 'add_inferior_silent' to set
12333         'current_inferior_'.
12334         * inferior.h (print_inferior_events): Declare here as
12335         'extern'.
12336         * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
12337         '[Detaching...]' messages when 'print_inferior_events' is on.
12338         Use 'add_thread_silent' instead of 'add_thread'.  Add '[' and ']'
12339         as prefix/suffix for messages.  Remove periods.  Fix erroneous
12340         'Detaching after fork from child...', replace it by '... from
12341         parent...'.
12342         (handle_vfork_child_exec_or_exit): Add '[' and ']' as
12343         prefix/suffix when printing 'Detaching...' messages.  Print
12344         them when 'print_inferior_events' is on.
12345         * remote.c (remote_detach_1): Print message when detaching
12346         from inferior and '!is_fork_parent'.
12347
12348 2018-04-24  Tom Tromey  <tom@tromey.com>
12349
12350         * cli-out.h: Reindent.
12351
12352 2018-04-24  Tom Tromey  <tom@tromey.com>
12353
12354         * cli-out.c (cli_ui_out::out_field_fmt): Remove.
12355         (cli_ui_out::do_field_string): Use fputs_filtered.
12356         * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
12357
12358 2018-04-23  Tom Tromey  <tom@tromey.com>
12359
12360         * guile/scm-frame.c (gdbscm_frame_read_var): Use
12361         gdb::unique_xmalloc_ptr.
12362
12363 2018-04-23  Tom Tromey  <tom@tromey.com>
12364
12365         * configure: Rebuild.
12366
12367 2018-04-22  Rajendra SY  <rajendra.sy@gmail.com>
12368
12369         PR gdb/23095
12370         * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
12371         prepare_for_testing.  Set normal_bp to r_debug_state if target
12372         is bsd.
12373
12374 2018-04-21  Pedro Alves  <palves@redhat.com>
12375             Rajendra SY  <rajendra.sy@gmail.com>
12376
12377         * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
12378         * remote.c (extended_remote_attach): In all-stop mode, mark the
12379         thread as executing.
12380
12381 2018-04-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
12382
12383         * thread.c (thread_apply_all_command): Fix comment.
12384         (thread_command): Fix comment.
12385
12386 2018-04-10  Alan Hayward  <alan.hayward@arm.com>
12387
12388         * common/tdesc.h (tdesc_create_feature): Remove xml filename
12389         parameter.
12390         * features/aarch64-core.c (create_feature_aarch64_core):
12391         Regenerate.
12392         * features/aarch64-fpu.c (create_feature_aarch64_fpu):
12393         Likewise.
12394         * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
12395         Likewise.
12396         * features/i386/32bit-avx512.c
12397         (create_feature_i386_32bit_avx512): Likewise.
12398         * features/i386/32bit-core.c (create_feature_i386_32bit_core):
12399         Likewise.
12400         * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
12401         Likewise.
12402         * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
12403         Likewise.
12404         * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
12405         Likewise.
12406         * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
12407         Likewise.
12408         * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
12409         Likewise.
12410         * features/i386/64bit-avx512.c
12411         (create_feature_i386_64bit_avx512): Likewise.
12412         * features/i386/64bit-core.c (create_feature_i386_64bit_core):
12413         Likewise.
12414         * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
12415         Likewise.
12416         * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
12417         Likewise.
12418         * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
12419         Likewise.
12420         * features/i386/64bit-segments.c
12421         (create_feature_i386_64bit_segments): Likewise.
12422         * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
12423         Likewise.
12424         * features/i386/x32-core.c
12425         (create_feature_i386_x32_core): Likewise.
12426         * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
12427         * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
12428         * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
12429         * target-descriptions.c: In generated code, don't pass xml
12430         filename.
12431
12432 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
12433
12434         * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
12435         (print_xml_feature::visit_post): Likewise.
12436         (print_xml_feature::visit): Likewise.
12437         * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
12438         (print_xml_feature): Add new class.
12439         * regformats/regdat.sh: Null xmltarget on feature targets.
12440         * target-descriptions.c (struct target_desc): Add xmltarget.
12441         (maintenance_check_tdesc_xml_convert): Add unittest function.
12442         (tdesc_get_features_xml): Add function to get xml.
12443         (maintenance_check_xml_descriptions): Test xml generation.
12444         * xml-tdesc.c (string_read_description_xml): Add function.
12445         * xml-tdesc.h (string_read_description_xml): Add declaration.
12446
12447 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
12448
12449         * features/Makefile: Add feature marker to targets with new style
12450         target descriptions.
12451         * regformats/aarch64.dat: Regenerate.
12452         * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
12453         * regformats/i386/amd64-avx-linux.dat: Likewise.
12454         * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
12455         * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
12456         * regformats/i386/amd64-linux.dat: Likewise.
12457         * regformats/i386/amd64-mpx-linux.dat: Likewise.
12458         * regformats/i386/amd64.dat: Likewise.
12459         * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
12460         * regformats/i386/i386-avx-linux.dat: Likewise.
12461         * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
12462         * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
12463         * regformats/i386/i386-linux.dat: Likewise.
12464         * regformats/i386/i386-mmx-linux.dat: Likewise.
12465         * regformats/i386/i386-mpx-linux.dat: Likewise.
12466         * regformats/i386/i386.dat: Likewise.
12467         * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
12468         * regformats/i386/x32-avx-linux.dat: Likewise.
12469         * regformats/i386/x32-linux.dat: Likewise.
12470         * regformats/tic6x-c62x-linux.dat: Likewise.
12471         * regformats/tic6x-c64x-linux.dat: Likewise.
12472         * regformats/tic6x-c64xp-linux.dat: Likewise.
12473         * regformats/regdat.sh: Parse feature marker.
12474
12475 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
12476
12477         * common/tdesc.h (tdesc_architecture_name): Add new declaration.
12478         (tdesc_osabi_name): Likewise.
12479         * target-descriptions.c (tdesc_architecture_name): Add new
12480         function.
12481         (tdesc_osabi_name): Likewise.
12482
12483 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
12484
12485         * common/tdesc.c (tdesc_predefined_type): Move to here.
12486         (tdesc_named_type): Likewise.
12487         (tdesc_create_vector): Likewise.
12488         (tdesc_create_struct): Likewise.
12489         (tdesc_set_struct_size): Likewise.
12490         (tdesc_create_union): Likewise.
12491         (tdesc_create_flags): Likewise.
12492         (tdesc_create_enum): Likewise.
12493         (tdesc_add_field): Likewise.
12494         (tdesc_add_typed_bitfield): Likewise.
12495         (tdesc_add_bitfield): Likewise.
12496         (tdesc_add_flag): Likewise.
12497         (tdesc_add_enum_value): Likewise.
12498         * common/tdesc.h (struct tdesc_type_builtin): Likewise.
12499         (struct tdesc_type_vector): Likewise.
12500         (struct tdesc_type_field): Likewise.
12501         (struct tdesc_type_with_fields): Likewise.
12502         (tdesc_create_enum): Add declaration.
12503         (tdesc_add_typed_bitfield): Likewise.
12504         (tdesc_add_enum_value): Likewise.
12505         * target-descriptions.c (tdesc_type_field): Move from here.
12506         (tdesc_type_builtin): Likewise.
12507         (tdesc_type_vector): Likewise.
12508         (tdesc_type_with_fields): Likewise.
12509         (tdesc_predefined_types): Likewise.
12510         (tdesc_named_type): Likewise.
12511         (tdesc_create_vector): Likewise.
12512         (tdesc_create_struct): Likewise.
12513         (tdesc_set_struct_size): Likewise.
12514         (tdesc_create_union): Likewise.
12515         (tdesc_create_flags): Likewise.
12516         (tdesc_create_enum): Likewise.
12517         (tdesc_add_field): Likewise.
12518         (tdesc_add_typed_bitfield): Likewise.
12519         (tdesc_add_bitfield): Likewise.
12520         (tdesc_add_flag): Likewise.
12521         (tdesc_add_enum_value): Likewise.
12522         * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
12523         (tdesc_add_typed_bitfield): Likewise.
12524         (tdesc_add_enum_value): Likewise.
12525
12526 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
12527
12528         * common/tdesc.c (tdesc_feature::accept): Move to here.
12529         (tdesc_feature::operator==): Likewise.
12530         (tdesc_create_reg): Likewise.
12531         * common/tdesc.h (tdesc_type_kind): Likewise.
12532         (struct tdesc_type): Likewise.
12533         (struct tdesc_feature): Likewise.
12534         * regformats/regdat.sh: Create a feature.
12535         * target-descriptions.c (tdesc_type_kind): Move from here.
12536         (tdesc_type): Likewise.
12537         (tdesc_type_up): Likewise.
12538         (tdesc_feature): Likewise.
12539         (tdesc_create_reg): Likewise.
12540
12541 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
12542
12543         * Makefile.in: Add arch/tdesc.c
12544         * common/tdesc.c: New file.
12545         * common/tdesc.h (tdesc_element_visitor): Move to here.
12546         (tdesc_element): Likewise.
12547         (tdesc_reg): Likewise.
12548         (tdesc_reg_up): Likewise.
12549         * regformats/regdef.h (reg): Add offset to constructors.
12550         * target-descriptions.c (tdesc_element_visitor): Move from here.
12551         (tdesc_element): Likewise.
12552         (tdesc_reg): Likewise.
12553         (tdesc_reg_up): Likewise.
12554
12555 2018-04-17  Tom Tromey  <tom@tromey.com>
12556
12557         * dwarf2read.c (quirk_rust_enum): Conditionally drop the
12558         discriminant field.
12559
12560 2018-04-17  Tom Tromey  <tom@tromey.com>
12561
12562         * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
12563
12564 2018-04-17  Andreas Arnez  <arnez@linux.vnet.ibm.com>
12565
12566         * symtab.c (print_symbol_info): Skip printing filename and line
12567         number when `last' is NULL.
12568         (symtab_symbol_info): Use empty string instead of NULL for first
12569         invocation of print_symbol_info.
12570         (rbreak_command): Pass NULL to `last' parameter of
12571         print_symbol_info.
12572
12573 2018-04-16  Simon Marchi  <simon.marchi@ericsson.com>
12574
12575         * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
12576         instead of nullptr.
12577
12578 2018-04-16  Pedro Alves  <palves@redhat.com>
12579
12580         * MAINTAINERS (sh): Remove.
12581         * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
12582         (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
12583         (ALLDEPFILES): Remove sh64-tdep.c.
12584         * NEWS: Mentions that support for SH-5/SH64 is removed.
12585         * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
12586         (sh*-*-openbsd*): Ditto.
12587         (sh64-*-elf*): Remove.
12588         (sh*): Remove.
12589         * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
12590         * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
12591         * sh-tdep.c: No longer include "sh64-tdep.h".
12592         (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
12593         * sh64-tdep.c, sh64-tdep.h: Remove files.
12594
12595 2018-04-16  Pedro Alves  <palves@redhat.com>
12596
12597         * MAINTAINERS: Remove m88k.
12598         * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
12599         (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
12600         (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
12601         * NEWS: Mention that support for m88k was removed.
12602         * configure.host (m88*-*-*): Remove support.
12603         * configure.nat (m88k-*-*): Remove support.
12604         * configure.tgt (m88*-*-openbsd*): Remove.
12605         * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
12606
12607 2018-04-15  Simon Marchi  <simon.marchi@polymtl.ca>
12608
12609         * configure.tgt (x86_tobjs): New variable.
12610         (amd64_tobjs, i386_tobjs): Use it.
12611
12612 2018-04-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
12613
12614         * symtab.c (print_symbol_info): Precede the symbol definition by
12615         the line number when available.
12616         * NEWS: Advertise this enhancement.
12617
12618 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
12619
12620         * NEWS (New options): announce set/show record btrace cpu.
12621         * btrace.c: Include record-btrace.h.
12622         (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
12623         the vendor is unknown.
12624         (btrace_compute_ftrace_1): Add cpu parameter.  Update callers.
12625         Maybe overwrite the btrace configuration's cpu.
12626         (btrace_compute_ftrace): Add cpu parameter.  Update callers.
12627         (btrace_fetch): Add cpu parameter.  Update callers.
12628         (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
12629         Maybe overwrite the btrace configuration's cpu.  Skip enabling
12630         errata workarounds if the vendor is unknown.
12631         * python/py-record-btrace.c: Include record-btrace.h.
12632         (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
12633         (recpy_bt_function_call_history): Call record_btrace_get_cpu.
12634         * record-btrace.c (record_btrace_cpu_state_kind): New.
12635         (record_btrace_cpu): New.
12636         (set_record_btrace_cpu_cmdlist): New.
12637         (record_btrace_get_cpu): New.
12638         (require_btrace_thread, record_btrace_info)
12639         (record_btrace_resume_thread): Call record_btrace_get_cpu.
12640         (cmd_set_record_btrace_cpu_none): New.
12641         (cmd_set_record_btrace_cpu_auto): New.
12642         (cmd_set_record_btrace_cpu): New.
12643         (cmd_show_record_btrace_cpu): New.
12644         (_initialize_record_btrace): Initialize set/show record btrace cpu
12645         commands.
12646         * record-btrace.h (record_btrace_get_cpu): New.
12647
12648 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
12649
12650         * record.c (set_record_command): Fix typo in message.
12651
12652 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
12653
12654         * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
12655
12656 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
12657
12658         * infrun.c (process_event_stop_test): Call
12659         gdbarch_in_indirect_branch_thunk.
12660         * gdbarch.sh (in_indirect_branch_thunk): New.
12661         * gdbarch.c: Regenerated.
12662         * gdbarch.h: Regenerated.
12663         * x86-tdep.h: New.
12664         * x86-tdep.c: New.
12665         * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
12666         (HFILES_NO_SRCDIR): Add x86-tdep.h.
12667         (ALLDEPFILES): Add x86-tdep.c.
12668         * arch-utils.h (default_in_indirect_branch_thunk): New.
12669         * arch-utils.c (default_in_indirect_branch_thunk): New.
12670         * i386-tdep: Include x86-tdep.h.
12671         (i386_in_indirect_branch_thunk): New.
12672         (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
12673         function.
12674         * amd64-tdep: Include x86-tdep.h.
12675         (amd64_in_indirect_branch_thunk): New.
12676         (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
12677
12678 2018-04-12  Jan Kratochvil  <jan.kratochvil@redhat.com>
12679
12680         PR gdb/23053
12681         * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
12682         (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
12683         (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
12684         regression.
12685
12686 2018-04-12  Tom Tromey  <tom@tromey.com>
12687
12688         * rust-lang.c (rust_print_struct_def): Remove univariant code.
12689         (rust_evaluate_subexp): Likewise.
12690
12691 2018-04-12  Pedro Alves  <palves@redhat.com>
12692
12693         * procfs.c (procfs_detach): Make forward declaration's prototype
12694         match definition's protototype.
12695         (proc_get_LDT_entry): Remove stale do_cleanups call.
12696
12697 2018-04-12  Pedro Alves  <palves@redhat.com>
12698
12699         * target.h (target_ops::to_has_exited): Delete.
12700         (target_has_exited): Delete.
12701         * target-delegates.c: Regenerate.
12702
12703 2018-04-11  Pedro Alves  <palves@redhat.com>
12704
12705         * target.c (fileio_fh_t::t): Add comment.
12706         (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
12707         (target_fileio_close): Handle a NULL target.
12708         (invalidate_fileio_fh): New.
12709         (target_close): Call it.
12710         * remote.c (remote_hostio_send_command): No longer check whether
12711         remote_desc is open.
12712
12713 2018-04-11  Pedro Alves  <palves@redhat.com>
12714
12715         * target.c (fileio_fh_t): Make it a named struct instead of a
12716         typedef.
12717         (fileio_fh_t::is_closed): New method.
12718         (DEF_VEC_O (fileio_fh_t)): Remove.
12719         (fileio_fhandles): Now a std::vector.
12720         (is_closed_fileio_fh): Delete.
12721         (acquire_fileio_fd): Adjust.  Rename parameters.
12722         (release_fileio_fd): Adjust.
12723         (fileio_fd_to_fh): Reimplement as a function instead of a macro.
12724         (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
12725         (target_fileio_close): Adjust.
12726
12727 2018-04-10  Simon Marchi  <simon.marchi@ericsson.com>
12728
12729         * auto-load.c (auto_load_safe_path_vec_update): Iterate by
12730         index.
12731
12732 2018-04-10  Pedro Alves  <palves@redhat.com>
12733
12734         * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
12735         (scoped_finish_thread_state): New class.
12736         * infcmd.c (run_command_1): Use it instead of finish_thread_state
12737         cleanup.
12738         * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
12739         (fetch_inferior_event, normal_stop): Likewise.
12740         * thread.c (finish_thread_state_cleanup): Delete.
12741
12742 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
12743             Pedro Alves  <palves@redhat.com>
12744
12745         * value.c: Include "selftest.h" and "common/array-view.h".
12746         (struct range) <operator ==>: New.
12747         (test_ranges_contain): New.
12748         (check_ranges_vector): New.
12749         (test_insert_into_bit_range_vector): New.
12750         (_initialize_values): Register selftests.
12751         * common/array-view.h (operator==, operator!=): New.
12752
12753 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
12754
12755         * common/gdb_vecs.h (unordered_remove): Add overload that takes
12756         an iterator.
12757         * inline-frame.c: Include <algorithm>.
12758         (struct inline_state): Add constructor.
12759         (inline_state_s): Remove.
12760         (DEF_VEC_O(inline_state_s)): Remove.
12761         (inline_states): Change type to std::vector.
12762         (find_inline_frame_state): Adjust to std::vector.
12763         (allocate_inline_frame_state): Remove.
12764         (clear_inline_frame_state): Adjust to std::vector.
12765         (skip_inline_frames): Adjust to std::vector.
12766
12767 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
12768
12769         * tracepoint.h (struct trace_state_variable): Add constructor.
12770         <name>: Change type to std::string.
12771         * tracepoint.c (tsv_s): Remove.
12772         (DEF_VEC_O(tsv_s)): Remove.
12773         (tvariables): Change to std::vector.
12774         (create_trace_state_variable): Adjust to std::vector.
12775         (find_trace_state_variable): Likewise.
12776         (find_trace_state_variable_by_number): Likewise.
12777         (delete_trace_state_variable): Likewise.
12778         (trace_variable_command): Adjust to std::string.
12779         (delete_trace_variable_command): Likewise.
12780         (tvariables_info_1): Adjust to std::vector.
12781         (save_trace_state_variables): Likewise.
12782         (start_tracing): Likewise.
12783         (merge_uploaded_trace_state_variables): Adjust to std::vector
12784         and std::string.
12785         * target.h (struct target_ops)
12786         <to_download_trace_state_variable>: Pass reference to
12787         trace_state_variable.
12788         * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
12789         * target-delegates.c: Re-generate.
12790         * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
12791         (mi_tsv_deleted): Likewise.
12792         * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
12793         * remote.c (remote_download_trace_state_variable): Change
12794         pointer to reference and adjust.
12795         * make-target-delegates (parse_argtypes): Handle references.
12796         (write_function_header): Likewise.
12797         (munge_type): Likewise.
12798
12799 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
12800
12801         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12802         string_view-selftests.c.
12803         * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
12804         testsuite.
12805         * unittests/basic_string_view/cons/char/1.cc: Likewise.
12806         * unittests/basic_string_view/cons/char/2.cc: Likewise.
12807         * unittests/basic_string_view/cons/char/3.cc: Likewise.
12808         * unittests/basic_string_view/element_access/char/1.cc:
12809         Likewise.
12810         * unittests/basic_string_view/element_access/char/empty.cc:
12811         Likewise.
12812         * unittests/basic_string_view/element_access/char/front_back.cc:
12813         Likewise.
12814         * unittests/basic_string_view/inserters/char/2.cc: Likewise.
12815         * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
12816         Likewise.
12817         * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
12818         Likewise.
12819         * unittests/basic_string_view/modifiers/swap/char/1.cc:
12820         Likewise.
12821         * unittests/basic_string_view/operations/compare/char/1.cc:
12822         Likewise.
12823         * unittests/basic_string_view/operations/compare/char/13650.cc:
12824         Likewise.
12825         * unittests/basic_string_view/operations/copy/char/1.cc:
12826         Likewise.
12827         * unittests/basic_string_view/operations/data/char/1.cc:
12828         Likewise.
12829         * unittests/basic_string_view/operations/find/char/1.cc:
12830         Likewise.
12831         * unittests/basic_string_view/operations/find/char/2.cc:
12832         Likewise.
12833         * unittests/basic_string_view/operations/find/char/3.cc:
12834         Likewise.
12835         * unittests/basic_string_view/operations/find/char/4.cc:
12836         Likewise.
12837         * unittests/basic_string_view/operations/rfind/char/1.cc:
12838         Likewise.
12839         * unittests/basic_string_view/operations/rfind/char/2.cc:
12840         Likewise.
12841         * unittests/basic_string_view/operations/rfind/char/3.cc:
12842         Likewise.
12843         * unittests/basic_string_view/operations/substr/char/1.cc:
12844         Likewise.
12845         * unittests/basic_string_view/operators/char/2.cc: Likewise.
12846         * unittests/string_view-selftests.c: New file.
12847
12848 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
12849
12850         * unittests/basic_string_view/capacity/1.cc: New file.
12851         * unittests/basic_string_view/capacity/empty_neg.cc: New file.
12852         * unittests/basic_string_view/cons/char/1.cc: New file.
12853         * unittests/basic_string_view/cons/char/2.cc: New file.
12854         * unittests/basic_string_view/cons/char/3.cc: New file.
12855         * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
12856         * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
12857         * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
12858         * unittests/basic_string_view/element_access/char/1.cc: New file.
12859         * unittests/basic_string_view/element_access/char/2.cc: New file.
12860         * unittests/basic_string_view/element_access/char/empty.cc: New file.
12861         * unittests/basic_string_view/element_access/char/front_back.cc: New file.
12862         * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
12863         * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
12864         * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
12865         * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
12866         * unittests/basic_string_view/include.cc: New file.
12867         * unittests/basic_string_view/inserters/char/1.cc: New file.
12868         * unittests/basic_string_view/inserters/char/2.cc: New file.
12869         * unittests/basic_string_view/inserters/char/3.cc: New file.
12870         * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
12871         * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
12872         * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
12873         * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
12874         * unittests/basic_string_view/literals/types.cc: New file.
12875         * unittests/basic_string_view/literals/values.cc: New file.
12876         * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
12877         * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
12878         * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
12879         * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
12880         * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
12881         * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
12882         * unittests/basic_string_view/operations/compare/char/1.cc: New file.
12883         * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
12884         * unittests/basic_string_view/operations/compare/char/2.cc: New file.
12885         * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
12886         * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
12887         * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
12888         * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
12889         * unittests/basic_string_view/operations/copy/char/1.cc: New file.
12890         * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
12891         * unittests/basic_string_view/operations/data/char/1.cc: New file.
12892         * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
12893         * unittests/basic_string_view/operations/find/char/1.cc: New file.
12894         * unittests/basic_string_view/operations/find/char/2.cc: New file.
12895         * unittests/basic_string_view/operations/find/char/3.cc: New file.
12896         * unittests/basic_string_view/operations/find/char/4.cc: New file.
12897         * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
12898         * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
12899         * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
12900         * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
12901         * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
12902         * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
12903         * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
12904         * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
12905         * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
12906         * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
12907         * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
12908         * unittests/basic_string_view/operations/substr/char/1.cc: New file.
12909         * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
12910         * unittests/basic_string_view/operators/char/2.cc: New file.
12911         * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
12912         * unittests/basic_string_view/range_access/char/1.cc: New file.
12913         * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
12914         * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
12915         * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
12916         * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
12917         * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
12918         * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
12919         * unittests/basic_string_view/requirements/typedefs.cc: New file.
12920         * unittests/basic_string_view/typedefs.cc: New file.
12921         * unittests/basic_string_view/types/1.cc: New file.
12922
12923 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
12924
12925         * common/gdb_string_view.h: Remove libstdc++ implementation
12926         details, adjust to gdb reality.
12927         * common/gdb_string_view.tcc: Likewise.
12928         * cli/cli-script.c (struct string_view): Remove.
12929         (user_args) <m_args>: Change element type to gdb::string_view.
12930         (user_args::insert_args): Adjust.
12931
12932 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
12933
12934         * common/gdb_string_view.h: New file.
12935         * common/gdb_string_view.tcc: New file.
12936
12937 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
12938
12939         * ax_cxx_compile_stdcxx.m4: Sync with upstream.
12940         * configure: Re-generate.
12941
12942 2018-04-09  Pedro Alves  <palves@redhat.com>
12943
12944         * gdbarch.sh: Include "observable.h" instead of "observer.h".
12945         (set_target_gdbarch): Call
12946         gdb::observers::architecture_changed.notify instead of
12947         observer_notify_architecture_changed.
12948
12949 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
12950
12951         * tracepoint.c (struct current_traceframe_cleanup): Remove.
12952         (do_restore_current_traceframe_cleanup): Remove.
12953         (restore_current_traceframe_cleanup_dtor): Remove.
12954         (make_cleanup_restore_current_traceframe): Remove.
12955         (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
12956         New.
12957         * tracepoint.h (struct scoped_restore_current_traceframe): New.
12958         * infrun.c (fetch_inferior_event): Use
12959         scoped_restore_current_traceframe.
12960
12961 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
12962
12963         * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
12964         Remove.
12965         <n_allocated_type_units>: Remove.
12966         <all_type_units>: Change to std::vector.
12967         * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
12968         to std::vector change.
12969         (dwarf2_per_objfile::get_cutu): Likewise.
12970         (dwarf2_per_objfile::get_tu): Likewise.
12971         (create_signatured_type_table_from_index): Likewise.
12972         (create_signatured_type_table_from_debug_names): Likewise.
12973         (dw2_symtab_iter_next): Likewise.
12974         (dw2_print_stats): Likewise.
12975         (dw2_expand_all_symtabs): Likewise.
12976         (dw2_expand_marked_cus): Likewise.
12977         (dw2_debug_names_iterator::next): Likewise.
12978         (dwarf2_initialize_objfile): Likewise.
12979         (add_signatured_type_cu_to_table): Likewise.
12980         (create_all_type_units): Likewise.
12981         (add_type_unit): Likewise.
12982         (struct tu_abbrev_offset): Add constructor.
12983         (build_type_psymtabs_1): Adjust to std::vector change.
12984         (print_tu_stats): Likewise.
12985         * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
12986         (write_debug_names): Likewise.
12987
12988 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
12989
12990         * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
12991         Make an std::vector.
12992         <n_comp_units>: Remove.
12993         * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
12994         to std::vector change.
12995         (dwarf2_per_objfile::get_cutu): Likewise.
12996         (dwarf2_per_objfile::get_cu): Likewise.
12997         (create_cus_from_index): Likewise.
12998         (create_addrmap_from_index): Likewise.
12999         (create_addrmap_from_aranges): Likewise.
13000         (dwarf2_read_index): Likewise.
13001         (dw2_find_last_source_symtab): Likewise.
13002         (dw2_map_symtabs_matching_filename): Likewise.
13003         (dw2_symtab_iter_next): Likewise.
13004         (dw2_print_stats): Likewise.
13005         (dw2_expand_all_symtabs): Likewise.
13006         (dw2_expand_symtabs_with_fullname): Likewise.
13007         (dw2_expand_marked_cus): Likewise.
13008         (dw2_map_symbol_filenames): Likewise.
13009         (create_cus_from_debug_names): Likewise.
13010         (dwarf2_read_debug_names): Likewise.
13011         (dw2_debug_names_iterator::next): Likewise.
13012         (dwarf2_initialize_objfile): Likewise.
13013         (set_partial_user): Likewise.
13014         (dwarf2_build_psymtabs_hard): Likewise.
13015         (read_comp_units_from_section): Remove arguments, adjust to
13016         std::vector change.
13017         (create_all_comp_units): Adjust to std::vector and
13018         read_comp_units_from_section changes.
13019         (dwarf2_find_containing_comp_unit): Adjust to std::vector
13020         change.
13021         * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
13022         (psyms_seen_size): Likewise.
13023         (write_gdbindex): Likewise.
13024         (write_debug_names): Likewise.
13025
13026 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
13027
13028         * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
13029         with dwarf2_per_objfile.
13030         (create_cus_from_index): Likewise.
13031         (create_signatured_type_table_from_index): Likewise.
13032         (dwarf2_read_index): Likewise.
13033         (dwarf2_initialize_objfile): Likewise.
13034         (dwarf2_fetch_die_loc_sect_off):  Get dwarf2_per_objfile from
13035         per_cu rather than get_dwarf2_per_objfile.
13036
13037 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
13038
13039         * dwarf2read.h (struct signatured_type): Forward declare.
13040         (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
13041         New methods.
13042         * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
13043         (dw2_get_cutu): ...this.
13044         (dwarf2_per_objfile::get_cu): Rename from...
13045         (dw2_get_cu): ...this.
13046         (dwarf2_per_objfile::get_tu): New.
13047         (create_addrmap_from_index): Adjust.
13048         (create_addrmap_from_aranges): Adjust.
13049         (dw2_find_last_source_symtab): Adjust.
13050         (dw2_map_symtabs_matching_filename): Adjust.
13051         (dw2_symtab_iter_next): Adjust.
13052         (dw2_print_stats): Adjust.
13053         (dw2_expand_all_symtabs): Adjust.
13054         (dw2_expand_symtabs_with_fullname): Adjust.
13055         (dw2_expand_marked_cus): Adjust.
13056         (dw_expand_symtabs_matching_file_matcher): Adjust.
13057         (dw2_map_symbol_filenames): Adjust.
13058         (dw2_debug_names_iterator::next): Adjust.
13059         (dwarf2_initialize_objfile): Adjust.
13060         (set_partial_user): Adjust.
13061         (dwarf2_build_psymtabs_hard): Adjust.
13062
13063 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
13064
13065         * dwarf2read.c (create_signatured_type_table_from_debug_names):
13066         Remove unused variables.
13067         (dw2_map_symtabs_matching_filename): Likewise.
13068         (dwarf2_record_block_ranges): Likewise.
13069         (dwarf2_read_addr_index): Likewise.
13070         (follow_die_offset): Likewise.
13071
13072 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
13073
13074         * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
13075         to symbol_file_add_main.
13076
13077 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
13078
13079         PR mi/22299
13080         * mi/mi-console.c (do_fputc_async_safe): New.
13081         (mi_console_file::write_async_safe): New.
13082         (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
13083         * mi/mi-console.h (class mi_console_file) <write_async_safe>:
13084         New.
13085         * ui-file.c (ui_file::putstrn): Adjust call to
13086         fputstrn_unfiltered.
13087         * utils.c (printchar): Replace do_fputs and do_fprintf
13088         parameters by do_fputc.
13089         (fputstr_filtered): Adjust call to printchar.
13090         (fputstr_unfiltered): Likewise.
13091         (fputstrn_filtered): Likewise.
13092         (fputstrn_unfiltered): Add do_fputc parameter, pass to
13093         printchar.
13094         * utils.h (do_fputc_ftype): New typedef.
13095         (fputstrn_unfiltered): Add do_fputc parameter.
13096
13097 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
13098
13099         * regformats/i386/i386-avx.dat: Remove.
13100
13101 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
13102
13103         PR gdb/22979
13104         * amd64-tdep.c (amd64_none_init_abi): New function.
13105         (amd64_x32_none_init_abi): New function.
13106         (_initialize_amd64_tdep): Register handlers for x86-64 and
13107         x64_32 with GDB_OSABI_NONE.
13108         * osabi.c (gdbarch_init_osabi): Allow running handlers for the
13109         GDB_OSABI_NONE osabi.
13110
13111 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
13112
13113         PR gdb/22980
13114         * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
13115         GDB_OSABI_NONE.
13116         * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
13117         * osabi.c (gdb_osabi_names): Add "unknown" entry.
13118
13119 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
13120
13121         * common/byte-vector.h (char_vector): New type.
13122         * target.h (target_read_alloc): Return
13123         gdb::optional<byte_vector>.
13124         (target_read_stralloc): Return gdb::optional<char_vector>.
13125         (target_get_osdata): Return gdb::optional<char_vector>.
13126         * target.c (target_read_alloc_1): Templatize.  Replacement
13127         manual memory management with vector.
13128         (target_read_alloc): Change return type, adjust.
13129         (target_read_stralloc): Change return type, adjust.
13130         (target_get_osdata): Change return type, adjust.
13131         * auxv.c (struct auxv_info) <length>: Remove.
13132         <data>: Change type to gdb::optional<byte_vector>.
13133         (auxv_inferior_data_cleanup): Free auxv_info with delete.
13134         (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
13135         (target_auxv_search): Adjust.
13136         (fprint_target_auxv): Adjust.
13137         * avr-tdep.c (avr_io_reg_read_command): Adjust.
13138         * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
13139         (linux_make_corefile_notes): Adjust.
13140         * osdata.c (get_osdata): Adjust.
13141         * remote.c (remote_get_threads_with_qxfer): Adjust.
13142         (remote_memory_map): Adjust.
13143         (remote_traceframe_info): Adjust.
13144         (btrace_read_config): Adjust.
13145         (remote_read_btrace): Adjust.
13146         (remote_pid_to_exec_file): Adjust.
13147         * solib-aix.c (solib_aix_get_library_list): Adjust.
13148         * solib-dsbt.c (decode_loadmap): Don't free buf.
13149         (dsbt_get_initial_loadmaps): Adjust.
13150         * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
13151         * solib-target.c (solib_target_current_sos): Adjust.
13152         * tracepoint.c (sdata_make_value): Adjust.
13153         * xml-support.c (xinclude_start_include): Adjust.
13154         (xml_fetch_content_from_file): Adjust.
13155         * xml-support.h (xml_fetch_another): Change return type.
13156         (xml_fetch_content_from_file): Change return type.
13157         * xml-syscall.c (xml_init_syscalls_info): Adjust.
13158         * xml-tdesc.c (file_read_description_xml): Adjust.
13159         (fetch_available_features_from_target): Change return type.
13160         (target_fetch_description_xml): Adjust.
13161         (target_read_description_xml): Adjust.
13162
13163 2018-04-06  Tom Tromey  <tom@tromey.com>
13164
13165         * value.c (~value): Update.
13166         (struct value) <contents>: Now unique_xmalloc_ptr.
13167         (value_contents_bits_eq, allocate_value_contents)
13168         (value_contents_raw, value_contents_all_raw)
13169         (value_contents_for_printing, value_contents_for_printing_const)
13170         (set_value_enclosing_type): Update.
13171
13172 2018-04-06  Tom Tromey  <tom@tromey.com>
13173
13174         * value.c (range_s): Remove typedef, VEC.
13175         (struct range): Add operator<.
13176         (range_lessthan): Remove.
13177         (ranges_contain): Change type.
13178         (~value): Update.
13179         (struct value) <unavailable, optimized_out>: Now std::vector.
13180         (value_entirely_available)
13181         (value_entirely_covered_by_range_vector)
13182         (value_entirely_unavailable, value_entirely_optimized_out):
13183         Update.
13184         (insert_into_bit_range_vector): Change argument type.
13185         (find_first_range_overlap): Likewise.
13186         (struct ranges_and_idx, value_contents_bits_eq)
13187         (require_not_optimized_out, require_available): Update.
13188         (ranges_copy_adjusted): Change argument types.
13189         (value_optimized_out, value_copy, value_fetch_lazy): Update.
13190
13191 2018-04-06  Tom Tromey  <tom@tromey.com>
13192
13193         * value.c (~value): Update.
13194         (struct value) <parent>: Now a value_ref_ptr.
13195         (value_parent, set_value_parent, value_address, value_copy):
13196         Update.
13197
13198 2018-04-06  Tom Tromey  <tom@tromey.com>
13199
13200         * value.c (struct value): Add constructor, destructor, and member
13201         initializers.
13202         (allocate_value_lazy, value_decref): Update.
13203
13204 2018-04-06  Tom Tromey  <tom@tromey.com>
13205
13206         * value.c (struct value) <released, next>: Remove.
13207         (all_values): Now a std::vector.
13208         (allocate_value_lazy): Update.
13209         (value_next): Remove.
13210         (value_mark, value_free_to_mark, release_value)
13211         (value_release_to_mark): Update.
13212
13213 2018-04-06  Tom Tromey  <tom@tromey.com>
13214
13215         * value.h (fetch_subexp_value, value_release_to_mark): Update.
13216         (free_value_chain): Remove.
13217         * value.c (free_value_chain): Remove.
13218         (value_release_to_mark): Return a std::vector.
13219         * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
13220         std::vector.
13221         (check_condition): Update.
13222         * eval.c (fetch_subexp_value): Change "val_chain" to a
13223         std::vector.
13224         * breakpoint.c (update_watchpoint): Update.
13225         (can_use_hardware_watchpoint): Change "vals" to a std::vector.
13226
13227 2018-04-06  Tom Tromey  <tom@tromey.com>
13228
13229         * value.h (free_all_values): Remove.
13230         * value.c (free_all_values): Remove.
13231
13232 2018-04-06  Tom Tromey  <tom@tromey.com>
13233
13234         * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
13235         (value_history_chain, value_history_count): Remove.
13236         (value_history): New global.
13237         (record_latest_value, access_value_history, show_values)
13238         (preserve_values): Update.
13239
13240 2018-04-06  Tom Tromey  <tom@tromey.com>
13241
13242         * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
13243         * varobj.c (varobj_set_display_format, varobj_set_value)
13244         (install_default_visualizer, construct_visualizer)
13245         (install_new_value, ~varobj, varobj_get_value_type)
13246         (my_value_of_variable, varobj_editable_p): Update.
13247         * c-varobj.c (c_describe_child, c_value_of_variable)
13248         (cplus_number_of_children, cplus_describe_child): Update.
13249         * ada-varobj.c (ada_number_of_children, ada_name_of_child)
13250         (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
13251         (ada_value_of_variable, ada_value_is_changeable_p): Update.
13252
13253 2018-04-06  Tom Tromey  <tom@tromey.com>
13254
13255         * printcmd.c (last_examine_address): Change type to
13256         value_ref_ptr.
13257         (do_examine, x_command): Update.
13258
13259 2018-04-06  Tom Tromey  <tom@tromey.com>
13260
13261         * value.c (release_value): Update.
13262         * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
13263         (struct bpstats) <val>: Now a value_ref_ptr.
13264         * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
13265         (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
13266         (~watchpoint, print_it_watchpoint, watch_command_1)
13267         (invalidate_bp_value_on_memory_change): Update.
13268
13269 2018-04-06  Tom Tromey  <tom@tromey.com>
13270
13271         * varobj.c (varobj_clear_saved_item)
13272         (update_dynamic_varobj_children, install_new_value, ~varobj):
13273         Update.
13274         * value.h (value_incref): Move declaration earlier.
13275         (value_decref): Rename from value_free.
13276         (struct value_ref_policy): New.
13277         (value_ref_ptr): New typedef.
13278         (struct value_deleter): Remove.
13279         (gdb_value_up): Remove typedef.
13280         (release_value): Change return type.
13281         (release_value_or_incref): Remove.
13282         * value.c (set_value_parent): Update.
13283         (value_incref): Change return type.
13284         (value_decref): Rename from value_free.
13285         (value_free_to_mark, free_all_values, free_value_chain): Update.
13286         (release_value): Return value_ref_ptr.
13287         (release_value_or_incref): Remove.
13288         (record_latest_value, set_internalvar, clear_internalvar):
13289         Update.
13290         * stack.c (info_frame_command): Don't call value_free.
13291         * python/py-value.c (valpy_dealloc, valpy_new)
13292         (value_to_value_object): Update.
13293         * printcmd.c (do_examine): Update.
13294         * opencl-lang.c (lval_func_free_closure): Update.
13295         * mi/mi-main.c (register_changed_p): Don't call value_free.
13296         * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
13297         * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
13298         * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
13299         value_free.
13300         * guile/scm-value.c (vlscm_free_value_smob)
13301         (vlscm_scm_from_value): Update.
13302         * frame.c (frame_register_unwind, frame_unwind_register_signed)
13303         (frame_unwind_register_unsigned, get_frame_register_bytes)
13304         (put_frame_register_bytes): Don't call value_free.
13305         * findvar.c (address_from_register): Don't call value_free.
13306         * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
13307         * dwarf2loc.c (entry_data_value_free_closure)
13308         (value_of_dwarf_reg_entry, free_pieced_value_closure)
13309         (dwarf2_evaluate_loc_desc_full): Update.
13310         * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
13311         (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
13312         (~watchpoint, watch_command_1)
13313         (invalidate_bp_value_on_memory_change): Update.
13314         * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
13315
13316 2018-04-06  Simon Marchi  <simon.marchi@polymtl.ca>
13317
13318         PR gdb/23022
13319         * warning.m4: Add -Wno-error=deprecated-register.
13320         * configure: Re-generate.
13321
13322 2018-04-05  Tom Tromey  <tom@tromey.com>
13323
13324         * linespec.h: Remove include of "vec.h".
13325
13326 2018-04-05  Tom Tromey  <tom@tromey.com>
13327
13328         * linespec.c (typep): Remove typedef.
13329         (find_methods, find_superclass_methods): Take a std::vector.
13330         (find_method): Use std::vector.
13331
13332 2018-04-05  Tom Tromey  <tom@tromey.com>
13333
13334         * utils.c (compare_strings): Remove.
13335         * utils.h (compare_strings): Remove.
13336         * objc-lang.h (find_imps): Update.
13337         * objc-lang.c (find_methods): Take a std::vector.
13338         (uniquify_strings, find_imps): Likewise.
13339         * linespec.c (find_methods): Take a std::vector.
13340         (decode_objc): Use std::vector.
13341         (add_all_symbol_names_from_pspace, find_superclass_methods): Take
13342         a std::vector.
13343         (find_method, find_function_symbols): Use std::vector.
13344
13345 2018-04-05  Tom Tromey  <tom@tromey.com>
13346
13347         * completer.c (completion_tracker::completion_tracker): Remove
13348         cast.
13349         (completion_tracker::discard_completions): Likewise.
13350         * breakpoint.c (ambiguous_names_p): Remove cast.
13351         * ada-lang.c (_initialize_ada_language): Remove cast.
13352         * utils.h (streq): Update.
13353         (streq_hash): Add new declaration.
13354         * utils.c (streq): Return bool.
13355         (streq_hash): New function.
13356
13357 2018-04-05  Tom Tromey  <tom@tromey.com>
13358
13359         * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
13360         Remove a string copy.
13361
13362 2018-04-05  Tom Tromey  <tom@tromey.com>
13363
13364         * linespec.c (filter_results): Use std::vector.
13365         (decode_line_2, decode_line_full): Update.
13366
13367 2018-04-05  Tom Tromey  <tom@tromey.com>
13368
13369         * linespec.c (canonical_to_fullform): Return std::string.
13370         (filter_results): Update.
13371         (struct decode_line_2_item): Add constructor.
13372         <fullform, displayform>: Now std::string.
13373         (decode_line_2_compare_items): Now a std::sort comparator.
13374         (decode_line_2): Update.
13375
13376 2018-04-05  Tom Tromey  <tom@tromey.com>
13377
13378         * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
13379         (unexpected_linespec_error): Update.
13380         (linespec_parse_basic, parse_linespec): Update.
13381
13382 2018-04-05  Tom Tromey  <tom@tromey.com>
13383
13384         * linespec.c (linespec_parse_basic): Reindent.
13385
13386 2018-04-05  Tom Tromey  <tom@tromey.com>
13387
13388         * minsyms.h (iterate_over_minimal_symbols): Update.
13389         * minsyms.c (iterate_over_minimal_symbols): Take a
13390         gdb::function_view.
13391         * linespec.c (struct collect_minsyms): Remove.
13392         (compare_msyms): Now a std::sort comparator.
13393         (add_minsym): Add parameters.
13394         (search_minsyms_for_name): Update.  Use std::vector.
13395
13396 2018-04-03  Tom Tromey  <tom@tromey.com>
13397
13398         * mipsread.c (read_alphacoff_dynamic_symtab): Use
13399         gdb::byte_vector.
13400
13401 2018-04-02  Weimin Pan  <weimin.pan@oracle.com>
13402
13403         * MAINTAINERS (Write After Approval): Add Weimin Pan.
13404
13405 2018-04-02  Weimin Pan  <weimin.pan@oracle.com>
13406
13407         PR gdb/16959
13408         * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when 
13409         printing static type.
13410
13411 2018-04-01  Tom Tromey  <tom@tromey.com>
13412
13413         * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
13414         (rs6000_xfer_shared_libraries): Update.
13415
13416 2018-04-01  Simon Marchi  <simon.marchi@polymtl.ca>
13417
13418         * common/gdb_vecs.h (char_ptr): Remove.
13419         * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
13420
13421 2018-03-30  Simon Marchi  <simon.marchi@polymtl.ca>
13422
13423         * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
13424         with std::vector.
13425         * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
13426
13427 2018-03-30  Simon Marchi  <simon.marchi@polymtl.ca>
13428
13429         * tracepoint.h (struct uploaded_tp): Initialize fields.
13430         <actions, step_actions, cmd_strings>: Change type to
13431         std::vector<char *>.
13432         * tracepoint.c (get_uploaded_tp): Allocate with new.
13433         (free_uploaded_tps): Free with delete.
13434         (parse_tracepoint_definition): Adjust to std::vector change.
13435         * breakpoint.c (read_uploaded_action): Likewise.
13436         (create_tracepoint_from_upload): Likewise.
13437         * ctf.c (ctf_write_uploaded_tp): Likewise.
13438         (SET_ARRAY_FIELD): Likewise.
13439         * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
13440
13441 2018-03-30  Tom Tromey  <tom@tromey.com>
13442
13443         * solib-svr4.c (lm_info_read): Use gdb::byte_vector.  Return
13444         std::unique_ptr.
13445         (svr4_keep_data_in_core): Update.
13446         (svr4_read_so_list): Update.
13447
13448 2018-03-30  Tom Tromey  <tom@tromey.com>
13449
13450         * windows-nat.c (handle_output_debug_string, handle_exception):
13451         Update.
13452         * target.h (target_read_string): Update.
13453         * target.c (target_read_string): Change "string" to
13454         unique_xmalloc_ptr.
13455         * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
13456         Update.
13457         * solib-frv.c (frv_current_sos): Update.
13458         * solib-dsbt.c (dsbt_current_sos): Update.
13459         * solib-darwin.c (darwin_current_sos): Update.
13460         * linux-thread-db.c (inferior_has_bug): Update.
13461         * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
13462         Update.  Remove alloca.
13463         * ada-lang.c (ada_main_name): Update.
13464
13465 2018-03-30  Tom Tromey  <tom@tromey.com>
13466
13467         * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
13468         (struct dwo_file_deleter): New.
13469         (dwo_file_up): New typedef.
13470         (open_and_init_dwo_file): Use dwo_file_up.
13471         (free_dwo_file_cleanup): Remove.
13472
13473 2018-03-30  Tom Tromey  <tom@tromey.com>
13474
13475         * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
13476         (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
13477
13478 2018-03-30  Tom Tromey  <tom@tromey.com>
13479
13480         * dwarf2read.c (class free_cached_comp_units): New class.
13481         (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
13482         (free_cached_comp_units): Remove function.
13483
13484 2018-03-30  Tom Tromey  <tom@tromey.com>
13485
13486         * utils.h (make_cleanup_unpush_target): Remove.
13487         * inf-ptrace.c (struct target_unpusher): New.
13488         (target_unpush_up) New typedef.
13489         (inf_ptrace_create_inferior, inf_ptrace_attach): Use
13490         target_unpush_up.
13491         * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
13492
13493 2018-03-27  Tom Tromey  <tom@tromey.com>
13494
13495         * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
13496
13497 2018-03-27  Pedro Alves  <palves@redhat.com>
13498             Tom Tromey  <tom@tromey.com>
13499
13500         * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
13501         destructor.  Now a class.
13502         (gdb_readline_wrapper_cleanup): Remove function.
13503         (gdb_readline_wrapper): Remove cleanups.
13504
13505 2018-03-27  Tom Tromey  <tom@tromey.com>
13506
13507         * typeprint.h (struct type_print_options) <local_typedefs,
13508         global_typedefs>: Remove "struct" keyword.
13509         (class typedef_hash_table): New class.
13510         (recursively_update_typedef_hash, add_template_parameters)
13511         (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
13512         (find_typedef_in_hash): Don't declare.
13513         * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
13514         (typedef_hash_table::recursively_update): Rename from
13515         recursively_update_typedef_hash.  Now a member.
13516         (typedef_hash_table::add_template_parameters): Rename from
13517         add_template_parameters.  Now a member.
13518         (typedef_hash_table::typedef_hash_table): Now a constructor;
13519         rename from create_typedef_hash.
13520         (typedef_hash_table::~typedef_hash_table): Now a destructor;
13521         rename from free_typedef_hash.
13522         (do_free_typedef_hash, make_cleanup_free_typedef_hash)
13523         (do_free_global_table): Remove.
13524         (typedef_hash_table::typedef_hash_table): New constructor; renamed
13525         from copy_type_recursive.
13526         (create_global_typedef_table): Remove.
13527         (typedef_hash_table::find_global_typedef): Now a member of
13528         typedef_hash_table.
13529         (typedef_hash_table::find_typedef): Rename from
13530         find_typedef_in_hash; now a member.
13531         (whatis_exp): Update.
13532         * extension.h (struct ext_lang_type_printers): Add constructor and
13533         destructor.
13534         (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
13535         declare.
13536         * extension.c (ext_lang_type_printers::ext_lang_type_printers):
13537         Now a constructor; rename from start_ext_lang_type_printers.
13538         (ext_lang_type_printers): Now a destructor; rename from
13539         free_ext_lang_type_printers.
13540         * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
13541         Update.
13542         (c_type_print_base_struct_union): Update.  Remove cleanups.
13543
13544 2018-03-27  Tom Tromey  <tom@tromey.com>
13545
13546         * dwarf-index-write.c: Include <cmath>.
13547
13548 2018-03-27  Joel Brobecker  <brobecker@adacore.com>
13549
13550         * NEWS: Add entry describing new "set|show varsize-limit" command.
13551         * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
13552         command.
13553         * printcmd.c (_initialize_printcmd): Add "set var" alias of
13554         "set variable".
13555
13556 2018-03-27  Simon Marchi  <simon.marchi@ericsson.com>
13557
13558         * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
13559         dwarf-index-write.c
13560         (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
13561         * dwarf-index-common.c: New file.
13562         * dwarf-index-common.h: New file.
13563         * dwarf-index-write.c: New file.
13564         * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
13565         (struct dwarf2_section_info): Move from here.
13566         (dwarf2_section_info_def): Likewise.
13567         (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
13568         (offset_type): Likewise.
13569         (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
13570         (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
13571         (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
13572         (byte_swap): Likewise.
13573         (MAYBE_SWAP): Likewise.
13574         (dwarf2_per_cu_ptr): Likewise.
13575         (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
13576         (struct tu_stats): Likewise.
13577         (struct dwarf2_per_objfile): Likewise.
13578         (struct dwarf2_per_cu_data): Likewise.
13579         (struct signatured_type): Likewise.
13580         (sig_type_ptr): Likewise.
13581         (DEF_VEC_P (sig_type_ptr)): Likewise.
13582         (INDEX4_SUFFIX): Likewise.
13583         (INDEX5_SUFFIX): Likewise.
13584         (DEBUG_STR_SUFFIX): Likewise.
13585         (dwarf2_read_section): Make non-static.
13586         (mapped_index_string_hash): Move from here.
13587         (dwarf5_djb_hash): Likewise.
13588         (file_write): Likewise.
13589         (class data_buf): Likewise.
13590         (struct symtab_index_entry): Likewise.
13591         (struct mapped_symtab): Likewise.
13592         (find_slot): Likewise.
13593         (hash_expand): Likewise.
13594         (add_index_entry): Likewise.
13595         (uniquify_cu_indices): Likewise.
13596         (class c_str_view): Likewise.
13597         (class c_str_view_hasher): Likewise.
13598         (class vector_hasher): Likewise.
13599         (write_hash_table): Likewise.
13600         (psym_index_map): Likewise.
13601         (struct addrmap_index_data): Likewise.
13602         (add_address_entry): Likewise.
13603         (add_address_entry_worker): Likewise.
13604         (write_address_map): Likewise.
13605         (symbol_kind): Likewise.
13606         (write_psymbols): Likewise.
13607         (struct signatured_type_index_data): Likewise.
13608         (write_one_signatured_type): Likewise.
13609         (recursively_count_psymbols): Likewise.
13610         (recursively_write_psymbols): Likewise.
13611         (class debug_names): Likewise.
13612         (check_dwarf64_offsets): Likewise.
13613         (psyms_seen_size): Likewise.
13614         (write_gdbindex): Likewise.
13615         (write_debug_names): Likewise.
13616         (assert_file_size): Likewise.
13617         (write_psymtabs_to_index): Likewise.
13618         (save_gdb_index_command): Likewise.
13619         (_initialize_dwarf2_read): Don't register the "save gdb-index"
13620         command.
13621         * dwarf2read.h: New file.
13622
13623 2018-03-27  Joel Brobecker  <brobecker@adacore.com>
13624
13625         PR gdb/22670
13626         * dwarf2read.c (dwarf2_physname): Do not return the demangled
13627         symbol name if the CU's language stores symbol names in linkage
13628         format.
13629         * language.h (struct language_defn)
13630         <la_store_sym_names_in_linkage_form_p>: New field.  Adjust
13631         all instances of this struct.
13632
13633 2018-03-26  Tom Tromey  <tom@tromey.com>
13634
13635         * stack.c (backtrace_command_1): Remove verbose code.
13636
13637 2018-03-26  Tom Tromey  <tom@tromey.com>
13638
13639         * python/py-framefilter.c (py_print_type): Don't catch
13640         exceptions.  Return void.
13641         (py_print_value): Likewise.
13642         (py_print_single_arg): Likewise.
13643         (enumerate_args): Don't catch exceptions.
13644         (py_print_args): Likewise.
13645         (py_print_frame): Likewise.
13646         (gdbpy_apply_frame_filter): Catch exceptions here.
13647
13648 2018-03-26  Tom Tromey  <tom@tromey.com>
13649
13650         * stack.c (_initialize_stack): Remove trailing newlines from help
13651         text.  Add "Usage" line to "backtrace" help.
13652
13653 2018-03-26  Tom Tromey  <tom@tromey.com>
13654
13655         PR python/16486:
13656         * python/py-framefilter.c (py_print_args): Call wrap_hint.
13657
13658 2018-03-26  Tom Tromey  <tom@tromey.com>
13659
13660         * python/py-framefilter.c (py_print_single_arg): Return
13661         EXT_LANG_BT_ERROR from catch.
13662
13663 2018-03-26  Tom Tromey  <tom@tromey.com>
13664
13665         PR backtrace/15584:
13666         * stack.c (backtrace_command_1): Move some code into no-filters
13667         "if".
13668
13669 2018-03-26  Tom Tromey  <tom@tromey.com>
13670
13671         * python/py-framefilter.c (throw_quit_or_print_exception): New
13672         function.
13673         (gdbpy_apply_frame_filter): Use it.
13674
13675 2018-03-26  Tom Tromey  <tom@tromey.com>
13676
13677         PR cli/17716:
13678         * python/py-framefilter.c (py_print_type, py_print_value)
13679         (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
13680         RETURN_MASK_ERROR.
13681
13682 2018-03-26  Tom Tromey  <tom@tromey.com>
13683
13684         * python/py-framefilter.c (enumerate_args): Use
13685         gdb::unique_xmalloc_ptr.
13686
13687 2018-03-26  Tom Tromey  <tom@tromey.com>
13688
13689         * python/py-framefilter.c (py_print_frame): Return
13690         EXT_LANG_BT_OK.
13691         (gdbpy_apply_frame_filter): Update comment.
13692         * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
13693         Remove.
13694         <EXT_LANG_BT_NO_FILTERS>: Change value.
13695
13696 2018-03-26  Tom Tromey  <tom@tromey.com>
13697
13698         PR backtrace/15582:
13699         * stack.c (backtrace_command): Parse "hide" argument.
13700         * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
13701         * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
13702         constant.
13703
13704 2018-03-26  Tom Tromey  <tom@tromey.com>
13705
13706         * stack.c (backtrace_command_1): Remove "show_locals" parameter,
13707         add "flags".
13708         (backtrace_command): Remove "fulltrace", add "flags".
13709
13710 2018-03-26  Tom Tromey  <tom@tromey.com>
13711
13712         * stack.c (backtrace_command): Rewrite command line parsing.
13713
13714 2018-03-26  Simon Marchi  <simon.marchi@ericsson.com>
13715
13716         * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
13717
13718 2018-03-26  Simon Marchi  <simon.marchi@ericsson.com>
13719
13720         * filename-seen-cache.h: Add include guard.
13721
13722 2018-03-26  Keith Seitz  <keiths@redhat.com>
13723
13724         * symfile.c (place_section): Remove "struct" from section_addr_info
13725         in comment.
13726         * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
13727         "struct" keyword from section_addr_info.
13728
13729 2018-03-26  Alan Hayward  <alan.hayward@arm.com>
13730
13731         * regformats/regdef.h (reg): Add constructors.
13732
13733 2018-03-25  Pedro Alves  <palves@redhat.com>
13734
13735         * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
13736         if then/else bodies in var_func_name extraction.
13737
13738 2018-03-23  Weimin Pan  <weimin.pan@oracle.com>
13739
13740         * minsyms.c (lookup_minimal_symbol_and_objfile): Use
13741         lookup_minimal_symbol() to find symbol entry.
13742         * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
13743
13744 2018-03-23  Keith Seitz  <keiths@redhat.com>
13745
13746         PR c++/22968
13747         * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
13748         nested type definitions for C++, too.
13749
13750 2018-03-23  Tom Tromey  <tom@tromey.com>
13751
13752         * machoread.c (struct oso_el): Add a constructor.  Don't define as
13753         a typedef.
13754         (macho_register_oso): Remove.
13755         (macho_symtab_read): Take a std::vector.
13756         (oso_el_compare_name): Now a std::sort comparator.
13757         (macho_symfile_read_all_oso): Take a std::vector.
13758         (macho_symfile_read): Use std::vector.  Remove cleanups.
13759
13760 2018-03-22  Tom Tromey  <tom@tromey.com>
13761
13762         * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
13763         (record_full_goto_bookmark): Use std::string.
13764
13765 2018-03-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
13766
13767         PR tdep/18295
13768         * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
13769         a single mask.
13770
13771 2018-03-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
13772
13773         * rs6000-tdep.c (store_insn_p): New function.
13774         (skip_prologue): New variable alloca_reg_offset. Set lr_reg
13775         and cr_reg to their unshifted values. Use store_insn_p to
13776         match LR saves using either R1 or fdata->alloca_reg. Use
13777         store_insn_p to match CR saves. Set alloca_reg_offset
13778         when alloca_reg and framep are set. Remove lr_reg shift
13779         when assigning to fdata->lr_register.
13780
13781 2018-03-22  Andreas Arnez  <arnez@linux.vnet.ibm.com>
13782
13783         * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
13784         command line args instead of emitting a warning.
13785
13786 2018-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
13787
13788         * tracepoint.h (struct static_tracepoint_marker): Initialize
13789         fields, define default constructor, move constructor and move
13790         assignment, disable the rest.
13791         <str_id, extra>: Make std::string.
13792         (release_static_tracepoint_marker): Remove.
13793         (free_current_marker): Remove.
13794         * tracepoint.c (free_current_marker): Remove.
13795         (parse_static_tracepoint_marker_definition): Adjust to
13796         std::string, use new hex2str overload.
13797         (release_static_tracepoint_marker): Remove.
13798         (print_one_static_tracepoint_marker): Get marker by reference
13799         and adjust to std::string.
13800         (info_static_tracepoint_markers_command): Adjust to std::vector
13801         changes
13802         * target.h (static_tracepoint_marker_p): Remove typedef.
13803         (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
13804         (struct target_ops) <to_static_tracepoint_marker_at>: Return
13805         bool.
13806         <to_static_tracepoint_markers_by_strid>: Return std::vector.
13807         * target-debug.h
13808         (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
13809         (target_debug_print_std_vector_static_tracepoint_marker): New.
13810         (target_debug_print_struct_static_tracepoint_marker_p): Rename
13811         to...
13812         (target_debug_print_static_tracepoint_marker_p): ... this.
13813         * target-delegates.c: Re-generate.
13814         * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
13815         Make std::string.
13816         * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
13817         (decode_static_tracepoint_spec): Adjust to std::vector.
13818         (tracepoint_print_one_detail): Adjust to std::string.
13819         (strace_marker_decode_location): Adjust to std::string.
13820         (update_static_tracepoint): Adjust to std::string, remove call
13821         to release_static_tracepoint_marker.
13822         * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
13823         Adjust to std::vector.
13824         * remote.c (remote_static_tracepoint_marker_at): Return bool.
13825         (remote_static_tracepoint_markers_by_strid): Adjust to
13826         std::vector.
13827         * common/rsp-low.h (hex2str): New overload with explicit count
13828         of bytes.
13829         * common/rsp-low.c (hex2str): New overload with explicit count
13830         of bytes.
13831         * unittests/rsp-low-selftests.c (test_hex2str): New function.
13832         (_initialize_rsp_low_selftests): Add test_hex2str test.
13833         * unittests/tracepoint-selftests.c
13834         (test_parse_static_tracepoint_marker_definition): Adjust to
13835         std::string.
13836
13837 2018-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
13838
13839         * tracepoint.c (parse_static_tracepoint_marker_definition):
13840         Consider case where the definition is followed by more
13841         definitions.
13842         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
13843         tracepoint-selftests.c.
13844         * unittests/tracepoint-selftests.c: New.
13845
13846 2018-03-21  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
13847
13848         * MAINTAINERS (Write After Approval): Add Pedro Franco de
13849         Carvalho.
13850
13851 2018-03-20  Stephen Roberts  <stephen.roberts@arm.com>
13852
13853         * symtab.c (find_pc_sect_line): fixed indentation.
13854
13855 2018-03-20  Stephen Roberts  <stephen.roberts@arm.com>
13856
13857         * symtab.c (find_pc_sect_line): now uses binary search.
13858
13859 2018-03-19  Tom Tromey  <tom@tromey.com>
13860
13861         * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
13862         "IDENT" production.
13863
13864 2018-03-19  Pedro Alves  <palves@redhat.com>
13865             Tom Tromey  <tom@tromey.com>
13866
13867         * unittests/observable-selftests.c: New file.
13868         * common/observable.h: New file.
13869         * observable.h: New file.
13870         * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
13871         arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
13872         breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
13873         corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
13874         extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
13875         infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
13876         linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
13877         mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
13878         ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
13879         python/py-breakpoint.c, python/py-finishbreakpoint.c,
13880         python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
13881         record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
13882         riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
13883         spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
13884         symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
13885         tui/tui-interp.c, valops.c: Update all users.
13886         * tui/tui-hooks.c (tui_bp_created_observer)
13887         (tui_bp_deleted_observer, tui_bp_modified_observer)
13888         (tui_inferior_exit_observer, tui_before_prompt_observer)
13889         (tui_normal_stop_observer, tui_register_changed_observer):
13890         Remove.
13891         (tui_observers_token): New global.
13892         (attach_or_detach, tui_attach_detach_observers): New functions.
13893         (tui_install_hooks, tui_remove_hooks): Use
13894         tui_attach_detach_observers.
13895         * record-btrace.c (record_btrace_thread_observer): Remove.
13896         (record_btrace_thread_observer_token): New global.
13897         * observer.sh: Remove.
13898         * observer.c: Rename to observable.c.
13899         * observable.c (namespace gdb_observers): Define new objects.
13900         (observer_debug): Move into gdb_observers namespace.
13901         (struct observer, struct observer_list, xalloc_observer_list_node)
13902         (xfree_observer_list_node, generic_observer_attach)
13903         (generic_observer_detach, generic_observer_notify): Remove.
13904         (_initialize_observer): Update.
13905         Don't include observer.inc.
13906         * Makefile.in (generated_files): Remove observer.h, observer.inc.
13907         (clean mostlyclean): Likewise.
13908         (observer.h, observer.inc): Remove targets.
13909         (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
13910         (COMMON_SFILES): Use observable.c, not observer.c.
13911         * .gitignore: Remove observer.h.
13912
13913 2018-03-18  Tom Tromey  <tom@tromey.com>
13914
13915         * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
13916         gdb::def_vector.
13917         (bfd_lookup_symbol_from_dyn_symtab): Likewise.
13918
13919 2018-03-17  Tom Tromey  <tom@tromey.com>
13920
13921         * auto-load.c (auto_load_objfile_script_1): Use std::string.
13922
13923 2018-03-17  Tom Tromey  <tom@tromey.com>
13924
13925         * target.c (class scoped_target_fd): New.
13926         (target_fileio_close_cleanup): Remove.
13927         (target_fileio_read_alloc_1): Use scoped_target_fd.
13928
13929 2018-03-16  Simon Marchi  <simon.marchi@polymtl.ca>
13930
13931         * silent-rules.mk: New.
13932         * Makefile.in: Include silent-rules.mk
13933         (srcdir, VPATH, top_srcdir): Move up.
13934         (COMPILE): Add ECHO_CXX.
13935         (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
13936         (init.c): Add ECHO_INIT_C.
13937         (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
13938         (version.c): Add ECHO_GEN.
13939         (printcmd.o): Add ECHO_CXX.
13940         (target-float.o): Add ECHO_CXX.
13941         (ada-exp.o): Add ECHO_CXX.
13942         (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
13943         (insight$(EXEEXT)): Add ECHO_CXXLD.
13944         * gnulib/configure.ac: Add AM_SILENT_RULES.
13945         * gnulib/aclocal.m4: Re-generate.
13946         * gnulib/configure: Re-generate.
13947         * gnulib/import/Makefile.in: Re-generate.
13948
13949 2018-03-16  Tom Tromey  <tom@tromey.com>
13950
13951         * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
13952         * utils.h (make_cleanup_free_section_addr_info): Don't declare.
13953         * utils.c (do_free_section_addr_info)
13954         (make_cleanup_free_section_addr_info): Remove.
13955         * symfile.h (struct other_sections): Add constructor.
13956         (struct section_addr_info): Remove.
13957         (section_addr_info): New typedef.
13958         (struct sym_fns) <sym_offsets>: Change type of parameter.
13959         (build_section_addr_info_from_objfile)
13960         (relative_addr_info_to_section_offsets, addr_info_make_relative)
13961         (default_symfile_offsets, symbol_file_add)
13962         (symbol_file_add_from_bfd)
13963         (build_section_addr_info_from_section_table): Update.
13964         (alloc_section_addr_info, free_section_addr_info): Don't declare.
13965         * symfile.c (alloc_section_addr_info): Remove.
13966         (build_section_addr_info_from_section_table): Change return type.
13967         Update.
13968         (build_section_addr_info_from_bfd)
13969         (build_section_addr_info_from_objfile): Likewise.
13970         (free_section_addr_info): Remove.
13971         (relative_addr_info_to_section_offsets): Change type of "addrs".
13972         (addrs_section_compar): Now a std::sort comparator.
13973         (addrs_section_sort): Change return type.
13974         (addr_info_make_relative): Change type of "addrs".  Update.
13975         (default_symfile_offsets, syms_from_objfile_1)
13976         (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
13977         (symbol_file_add_separate): Update.
13978         (symbol_file_add): Change type of "addrs".  Update.
13979         (add_symbol_file_command): Update.  Remove cleanups.
13980         * symfile-mem.c (symbol_file_add_from_memory): Update.  Remove
13981         cleanups.
13982         * symfile-debug.c (debug_sym_offsets): Change type of "info".
13983         * solib.c (solib_read_symbols): Update.
13984         * objfiles.c (objfile_relocate): Update.  Remove cleanups.
13985         * machoread.c (macho_symfile_offsets): Update.
13986         * jit.c (jit_bfd_try_read_symtab): Update.
13987
13988 2018-03-15  Simon Marchi  <simon.marchi@polymtl.ca>
13989
13990         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
13991         unittests/utils-selftests.c.
13992         * unittests/utils-selftests.c: New file.
13993
13994 2018-03-14  Tom Tromey  <tom@tromey.com>
13995
13996         PR cli/14977:
13997         * printcmd.c (printf_c_string, printf_wide_c_string): Special case
13998         for NULL.
13999
14000 2018-03-14  Tom Tromey  <tom@tromey.com>
14001
14002         PR cli/19918:
14003         * printcmd.c (printf_pointer): Allow "-" in format.
14004
14005 2018-03-14  Tom Tromey  <tom@tromey.com>
14006
14007         * printcmd.c (_initialize_printcmd): Add usage to printf.
14008
14009 2018-03-14  Yao Qi  <qiyao@sourceware.org>
14010
14011         * MAINTAINERS: Update my email address.
14012
14013 2018-03-13  Tom Tromey  <tom@tromey.com>
14014
14015         * machoread.c (macho_check_dsym): Change filenamep to a
14016         std::string*.
14017         (macho_symfile_read): Update.
14018         * symfile.c (load_command): Use std::string.
14019
14020 2018-03-12  Andrew Burgess  <andrew.burgess@embecosm.com>
14021
14022         * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
14023         to error message string.
14024         (riscv_register_name): Use xsnprintf instead of sprintf.
14025         (riscv_insn::fetch_instruction): Use gdb_assert instead of
14026         internal_error.
14027         (riscv_print_arg_location): Use gdb_assert_not_reached instead of
14028         error.
14029         (riscv_push_dummy_call): Likewise.
14030
14031 2018-03-12  Tom Tromey  <tom@tromey.com>
14032
14033         * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
14034         Use gdb::byte_vector.
14035         * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
14036
14037 2018-03-12  Yao Qi  <yao.qi@linaro.org>
14038
14039         * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
14040         parameter type to readable_regcache.
14041         * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
14042         the declaration.
14043
14044 2018-03-11  Tom Tromey  <tom@tromey.com>
14045
14046         * dwarf2read.c (struct nextfield): Add initializers.
14047         (struct nextfnfield): Remove.
14048         (struct fnfieldlist): Add initializers.  Remove "length" and
14049         "head", use std::vector.
14050         (struct decl_field_list): Remove.
14051         (struct field_info): Add initializers.
14052         <fields, baseclasses>: Now std::vector.
14053         <nbaseclasses, nfnfields, typedef_field_list_count,
14054         nested_types_list_count>: Remove.
14055         (dwarf2_add_field, dwarf2_add_type_defn)
14056         (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
14057         (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
14058         (process_structure_scope): Update.
14059
14060 2018-03-11  Tom Tromey  <tom@tromey.com>
14061
14062         * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
14063         for use by std::sort.
14064         (build_type_psymtabs_1): Use std::vector.
14065
14066 2018-03-09  Eli Zaretskii  <eliz@gnu.org>
14067
14068         * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
14069         and LIBMPFR in the printed configuration.
14070
14071 2018-03-08  Tom Tromey  <tom@tromey.com>
14072
14073         * source.c (get_filename_and_charpos): Use scoped_fd.
14074         * nto-procfs.c (procfs_open_1): Use scoped_fd.
14075         (procfs_pidlist): Likewise.
14076         * procfs.c (proc_get_LDT_entry): Use scoped_fd.
14077         (iterate_over_mappings): Likewise.
14078
14079 2018-03-08  Tom Tromey  <tom@tromey.com>
14080
14081         * infcall.c (struct call_return_meta_info)
14082         <stack_temporaries_enabled>: Remove.
14083         (get_call_return_value, call_function_by_hand_dummy): Update.
14084         * thread.c (disable_thread_stack_temporaries): Remove.
14085         (enable_thread_stack_temporaries): Remove.
14086         (thread_stack_temporaries_enabled_p): Return bool.
14087         (push_thread_stack_temporary, value_in_thread_stack_temporaries)
14088         (get_last_thread_stack_temporary): Update.
14089         * eval.c (evaluate_subexp): Update.
14090         * gdbthread.h (class enable_thread_stack_temporaries): Now a
14091         class, not a function.
14092         (value_ptr, value_vec): Remove typedefs.
14093         (class thread_info) <stack_temporaries_enabled>: Now bool.
14094         <stack_temporaries>: Now a std::vector.
14095         (thread_stack_temporaries_enabled_p)
14096         (value_in_thread_stack_temporaries): Return bool.
14097
14098 2018-03-08  Simon Marchi  <simon.marchi@ericsson.com>
14099
14100         * remote.c (putpkt_binary): Fix omitted bytes reporting.
14101         (getpkt_or_notif_sane_1): Likewise.
14102
14103 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
14104
14105         * build-id.c (build_id_to_debug_bfd): Use std::string.
14106
14107 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
14108
14109         * build-id.c (find_separate_debug_file_by_buildid): Return
14110         std::string.
14111         * build-id.h (find_separate_debug_file_by_buildid): Return
14112         std::string.
14113         * coffread.c (coff_symfile_read): Adjust to std::string.
14114         * elfread.c (elf_symfile_read): Adjust to std::string.
14115         * symfile.c (separate_debug_file_exists): Change parameter to
14116         std::string.
14117         (find_separate_debug_file): Return std::string.
14118         (find_separate_debug_file_by_debuglink): Return std::string.
14119         * symfile.h (find_separate_debug_file_by_debuglink): Return
14120         std::string.
14121
14122 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
14123
14124         * common/xml-utils.c (xml_escape_text): Move code to...
14125         (xml_escape_text_append): ... this new function.
14126         * common/xml-utils.h (xml_escape_text_append): New declaration.
14127         * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
14128         New function.
14129         (_initialize_xml_utils): register test_xml_escape_text_append as
14130         a selftest.
14131
14132 2018-03-07  Alan Hayward  <alan.hayward@arm.com>
14133
14134         * defs.h: Remove MAX_REGISTER_SIZE.
14135         * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
14136         asserts.
14137         * python/py-unwind.c (pyuw_sniffer): Likewise.
14138
14139 2018-03-07  Tom Tromey  <tom@tromey.com>
14140
14141         * linux-tdep.c (linux_info_proc): Update.
14142         * target.h (struct target_ops) <to_fileio_readlink>: Return
14143         optional<string>.
14144         (target_fileio_readlink): Return optional<string>.
14145         * remote.c (remote_hostio_readlink): Return optional<string>.
14146         * inf-child.c (inf_child_fileio_readlink): Return
14147         optional<string>.
14148         * target.c (target_fileio_readlink): Return optional<string>.
14149
14150 2018-03-07  Andrew Burgess  <andrew.burgess@embecosm.com>
14151
14152         * regcache.c (cooked_read_test): Add riscv to the list of
14153         architectures that have a save_reggroup.
14154
14155 2018-03-07  Andreas Arnez  <arnez@linux.vnet.ibm.com>
14156
14157         * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
14158         value is not a dynamic class object.
14159
14160 2018-03-06  Tom Tromey  <tom@tromey.com>
14161
14162         * rust-exp.y: Formatting fixes.
14163
14164 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
14165
14166         * riscv-tdep.c (riscv_register_name): Remove target description
14167         support.
14168         (riscv_gdbarch_init): Remove target description check.
14169
14170 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
14171
14172         * riscv-tdep.c: Remove 'Contributed by ...' lines from header
14173         comment.
14174         * riscv-tdep.h: Likewise.
14175
14176 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
14177
14178         * riscv-tdep.c (riscv_pseudo_register_read): Delete.
14179         (riscv_pseudo_register_write): Delete.
14180         (riscv_gdbarch_init): Remove all use of pseudo registers.
14181
14182 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
14183
14184         * record-btrace.c (btrace_print_lines): Replace cleanup
14185         parameter with RAII equivalents.
14186         (btrace_insn_history): Replace cleanup with RAII equivalents.
14187         * ui-out.h (make_cleanup_ui_out_list_begin_end,
14188         make_cleanup_ui_out_tuple_begin_end): Remove.
14189         * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
14190         make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
14191         make_cleanup_ui_out_list_begin_end): Remove.
14192
14193 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
14194
14195         * record-btrace.c (record_btrace_maybe_mark_async_event): Change
14196         parameter types to std::vector.  Use bool.
14197         (record_btrace_wait): Replace VEC(tp_t) with
14198         std::vector<thread_info *>.
14199         * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
14200
14201 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
14202
14203         * record-btrace.c (record_btrace_disable_callback): Remove.
14204         (struct scoped_btrace_disable): New.
14205         (record_btrace_open): Use scoped_btrace_disable.
14206
14207 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
14208
14209         * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
14210         reading values from registers.
14211
14212 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
14213
14214         * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
14215         where appropriate.
14216
14217 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
14218
14219         * riscv-tdep.c (riscv_print_arg_location): Add header comment,
14220         change parameter type.  Use GDB's print functions, and use
14221         core_addr_to_string where appropriate.
14222         (riscv_push_dummy_call): Use core_addr_to_string where
14223         appropriate, update call to riscv_print_arg_location, and reindent
14224         a few lines.
14225         (riscv_return_value): Update call to riscv_print_arg_location.
14226
14227 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
14228             Tim Newsome <tim@sifive.com>
14229             Albert Ou <a0u@eecs.berkeley.edu>
14230             Darius Rad <darius@bluespec.com>
14231
14232         * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
14233         (HFILES_NO_SRCDIR): Add riscv-tdep.h.
14234         (ALLDEPFILES): Add riscv-tdep.c
14235         * configure.tgt: Add riscv support.
14236         * riscv-tdep.c: New file.
14237         * riscv-tdep.h: New file.
14238         * NEWS: Mention new target.
14239         * MAINTAINERS: Add entry for riscv.
14240
14241 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
14242
14243         * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
14244         fields within aggregates.
14245
14246 2018-03-04  Simon Marchi  <simon.marchi@polymtl.ca>
14247
14248         * record-btrace.c (btrace_print_lines): Change type of flags to
14249         gdb_disassembly_flags.
14250
14251 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
14252
14253         * fbsd-nat.c: Include "inf-ptrace.h".
14254         (USE_SIGTRAP_SIGINFO): Conditionally define.
14255         [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
14256         (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
14257         [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
14258         function.
14259         [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
14260         Likewise.
14261         [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
14262         Likewise.
14263         (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
14264         "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
14265         "supports_stopped_by_hw_breakpoint" target methods.
14266
14267 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
14268
14269         * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
14270         * fbsd-nat.c (debug_fbsd_nat): New variable.
14271         (show_fbsd_nat_debug): New function.
14272         (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
14273         (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
14274
14275 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
14276
14277         * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
14278         * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
14279         prototype.
14280         * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
14281         (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
14282         method.
14283
14284 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
14285
14286         * common/gdb_vecs.c (free_char_ptr_vec): Remove.
14287         * common/gdb_vecs.h (free_char_ptr_vec): Remove.
14288
14289 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
14290
14291         * charset.c (struct charset_vector): New.
14292         (charsets): Change type to charset_vector.
14293         (find_charset_names): Adjust.
14294         (add_one): Adjust.
14295         (_initialize_charset): Adjust.
14296
14297 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
14298
14299         * progspace.h (struct program_space) <deleted_solibs>: Change
14300         type to std::vector<std::string>.
14301         * progspace.c (clear_program_space_solib_cache): Adjust.
14302         * breakpoint.c (print_solib_event): Adjust.
14303         (check_status_catch_solib): Adjust.
14304         * solib.c (update_solib_list): Adjust.
14305         * ui-out.h (class ui_out) <field_string>: New overload.
14306         * ui-out.c (ui_out::field_string): New overload.
14307
14308 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
14309
14310         * progspace.h (struct program_space): Add constructor and
14311         destructor, initialize fields.
14312         (add_program_space): Remove.
14313         * progspace.c (add_program_space): Rename to...
14314         (program_space::program_space): ... this.
14315         (release_program_space): Rename to...
14316         (program_space::~program_space): ... this.
14317         (delete_program_space): Use delete to delete program_space.
14318         (initialize_progspace): Use new to allocate program_space.
14319         * inferior.c (add_inferior_with_spaces): Likewise.
14320         (clone_inferior_command): Likewise.
14321         * infrun.c (follow_fork_inferior): Likewise.
14322         (handle_vfork_child_exec_or_exit): Likewise.
14323
14324 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
14325
14326         * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
14327         (delim_string_to_char_ptr_vec): Return std::vector of
14328         gdb::unique_xmalloc_ptr.
14329         (dirnames_to_char_ptr_vec_append): Take std::vector of
14330         gdb::unique_xmalloc_ptr.
14331         (dirnames_to_char_ptr_vec): Return std::vector of
14332         gdb::unique_xmalloc_ptr.
14333         * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
14334         Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
14335         (delim_string_to_char_ptr_vec): Return an std::vector of
14336         gdb::unique_xmalloc_ptr, adjust the code.
14337         (dirnames_to_char_ptr_vec_append): Take an std::vector of
14338         gdb::unique_xmalloc_ptr, adjust the code.
14339         (dirnames_to_char_ptr_vec): Return an std::vector of
14340         gdb::unique_xmalloc_ptr, adjust the code.
14341         * auto-load.c (auto_load_safe_path_vec): Change type to
14342         std::vector of gdb::unique_xmalloc_ptr.
14343         (auto_load_expand_dir_vars): Return an std::vector of
14344         gdb::unique_xmalloc_ptr, adjust the code.
14345         (auto_load_safe_path_vec_update): Adjust.
14346         (filename_is_in_auto_load_safe_path_vec): Adjust.
14347         (auto_load_objfile_script_1): Adjust.
14348         * build-id.c (build_id_to_debug_bfd): Adjust.
14349         * linux-thread-db.c (thread_db_load_search): Adjust.
14350         * source.c (add_path): Adjust.
14351         (openp): Adjust.
14352         * symfile.c (find_separate_debug_file): Adjust.
14353         * utils.c (do_free_char_ptr_vec): Remove.
14354         (make_cleanup_free_char_ptr_vec): Remove.
14355
14356 2018-03-01  Sergio Durigan Junior  <sergiodj@redhat.com>
14357
14358         PR gdb/22907
14359         * common/pathstuff.c: Conditionally include "<windows.h>".
14360
14361 2018-03-01  Georg Sauthoff  <mail@georg.so>
14362
14363         PR gdb/22888
14364         * gcore.in: Quote variables and switch interpreter to bash.
14365
14366 2018-03-01  Tom Tromey  <tom@tromey.com>
14367
14368         * dwarf2read.c (alloc_discriminant_info): Fix default_index
14369         assertion.  Add assertion for discriminant_index.
14370         (quirk_rust_enum): Use correct base type name in univariant case.
14371
14372 2018-03-01  Simon Marchi  <simon.marchi@ericsson.com>
14373
14374         * record.c (get_call_history_modifiers): Return a
14375         record_print_flags.
14376         (cmd_record_call_history): Adjust.
14377         * record-btrace.c (record_btrace_call_history): Adjust.
14378         (record_btrace_call_history_range): Adjust.
14379         (record_btrace_call_history_from): Adjust.
14380         * target-debug.h (target_debug_print_record_print_flags): New.
14381         * target-delegates.c: Re-generate.
14382         * target.c (target_call_history): Change flags type.
14383         (target_call_history_from): Likewise.
14384         (target_call_history_range): Likewise.
14385         * target.h (struct target_ops) <target_call_history>: Likewise.
14386         (target_call_history_from): Likewise.
14387         (target_call_history_range): Likewise.
14388
14389 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
14390             Simon Marchi  <simon.marchi@polymtl.ca>
14391
14392         * common/common-utils.c: Include "sys/stat.h".
14393         (is_regular_file): Move here from "source.c"; change return
14394         type to "bool".
14395         * common/common-utils.h (is_regular_file): New prototype.
14396         * common/pathstuff.c (contains_dir_separator): New function.
14397         * common/pathstuff.h (contains_dir_separator): New prototype.
14398         * source.c: Don't include "sys/stat.h".
14399         (is_regular_file): Move to "common/common-utils.c".
14400
14401 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
14402
14403         * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
14404         (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
14405         * auto-load.c: Include "common/pathstuff.h".
14406         * common/common-def.h (current_directory): Move here.
14407         * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
14408         function.
14409         * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
14410         prototype.
14411         * common/pathstuff.c: New file.
14412         * common/pathstuff.h: New file.
14413         * compile/compile.c: Include "common/pathstuff.h".
14414         * defs.h (current_directory): Move to "common/common-defs.h".
14415         * dwarf2read.c: Include "common/pathstuff.h".
14416         * exec.c: Likewise.
14417         * guile/scm-safe-call.c: Likewise.
14418         * linux-thread-db.c: Likewise.
14419         * main.c: Likewise.
14420         * nto-tdep.c: Likewise.
14421         * objfiles.c: Likewise.
14422         * source.c: Likewise.
14423         * symtab.c: Likewise.
14424         * utils.c: Include "common/pathstuff.h".
14425         (gdb_realpath): Move to "common/pathstuff.c".
14426         (gdb_realpath_keepfile): Likewise.
14427         (gdb_abspath): Likewise.
14428         * utils.h (gdb_realpath): Move to "common/pathstuff.h".
14429         (gdb_realpath_keepfile): Likewise.
14430         (gdb_abspath): Likewise.
14431
14432 2018-02-28  John Baldwin  <jhb@FreeBSD.org>
14433
14434         * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
14435         wildcard process pid for super_resume for kernels with a
14436         specific bug.
14437
14438 2018-02-27  Phil Muldoon  <pmuldoon@redhat.com>
14439
14440         * compile/compile.c (get_args): Add additional comments
14441         explaining function.
14442
14443 2018-02-27  Simon Marchi  <simon.marchi@polymtl.ca>
14444             Tom Tromey  <tom@tromey.com>
14445
14446         * target.h (memory_write_request_s): Remove typedef.  Don't define
14447         VEC.
14448         (target_write_memory_blocks): Change argument to std::vector.
14449         (struct memory_write_request): Add constructor.
14450         * target-memory.c (compare_block_starting_address): Return bool.
14451         Change argument types.
14452         (claim_memory): Change arguments to use std::vector.
14453         (split_regular_and_flash_blocks, blocks_to_erase)
14454         (compute_garbled_blocks): Likewise.
14455         (cleanup_request_data, cleanup_write_requests_vector): Remove.
14456         (target_write_memory_blocks): Change argument to std::vector.
14457         * symfile.c (struct load_section_data): Add constructor and
14458         destructor.  Use std::vector for "requests".
14459         (struct load_progress_data): Add initializers.
14460         (load_section_callback): Update.  Use "new".
14461         (clear_memory_write_data): Remove.
14462         (generic_load): Update.
14463
14464 2018-02-27  Alan Hayward  <alan.hayward@arm.com>
14465
14466         * arch/aarch64.h: Use common/tdesc.h.
14467
14468 2018-02-26  Maciej W. Rozycki  <macro@mips.com>
14469
14470         * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
14471         architecture with a 64-bit ABI.
14472
14473 2018-02-26  Maciej W. Rozycki  <macro@mips.com>
14474
14475         * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
14476         ahead of target description loading.
14477
14478 2018-02-26  Tom Tromey  <tom@tromey.com>
14479
14480         * stack.c (backtrace_command_1): Update.
14481         * python/python-internal.h (gdbpy_apply_frame_filter): Change type
14482         of "flags".
14483         * python/py-framefilter.c (py_print_frame)
14484         (gdbpy_apply_frame_filter): Change type of "flags".
14485         * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
14486         of "flags".
14487         (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
14488         (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
14489         * extension.h (enum frame_filter_flag): Rename from
14490         frame_filter_flags.
14491         (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
14492         (apply_ext_lang_frame_filter): Change type of "flags".
14493         * extension.c (apply_ext_lang_frame_filter): Change type of
14494         "flags".
14495         * extension-priv.h (struct extension_language_ops)
14496         <apply_frame_filter>: Change type of "flags".
14497
14498 2018-02-26  Tom Tromey  <tom@tromey.com>
14499
14500         PR python/16497:
14501         * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag.  Fix
14502         off-by-one in py_end computation.
14503         * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
14504         PRINT_MORE_FRAMES.
14505         * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
14506         constant.
14507
14508 2018-02-26  Tom Tromey  <tom@tromey.com>
14509
14510         * dwarf2read.c (struct variant_field): New.
14511         (struct nextfield) <variant>: New field.
14512         (dwarf2_add_field): Handle DW_TAG_variant_part.
14513         (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
14514         discriminated union.
14515         (read_structure_type): Handle DW_TAG_variant_part.
14516         (handle_struct_member_die): New function, extracted from
14517         process_structure_scope.  Handle DW_TAG_variant.
14518         (process_structure_scope): Handle discriminated unions.  Call
14519         handle_struct_member_die.
14520
14521 2018-02-26  Tom Tromey  <tom@tromey.com>
14522
14523         * rust-lang.h (rust_last_path_segment): Declare.
14524         * rust-lang.c (rust_last_path_segment): Now public.  Change
14525         contract.
14526         (struct disr_info): Remove.
14527         (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
14528         (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
14529         (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
14530         (rust_enum_p, rust_enum_variant): New function.
14531         (rust_underscore_fields): Remove "offset" parameter.
14532         (rust_print_enum): New function.
14533         (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
14534         <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
14535         (rust_print_struct_def): Add "for_rust_enum" parameter.  Handle
14536         enums.
14537         (rust_internal_print_type): New function, from rust_print_type.
14538         Remove enum code.
14539         (rust_print_type): Call rust_internal_print_type.
14540         (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
14541         Update enum handling.
14542         * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
14543         (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
14544         (rust_union_quirks): New functions.
14545         (process_full_comp_unit, process_full_type_unit): Call
14546         rust_union_quirks.
14547         (process_structure_scope): Update rust_unions if necessary.
14548
14549 2018-02-26  Tom Tromey  <tom@tromey.com>
14550
14551         * value.h (value_union_variant): Declare.
14552         * valops.c (value_union_variant): New function.
14553         * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
14554         (struct discriminant_info): New.
14555         (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
14556         enumerator.
14557         (struct main_type) <flag_discriminated_union>: New field.
14558
14559 2018-02-26  Tom Tromey  <tom@tromey.com>
14560
14561         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
14562         unittests/unpack-selftests.c.
14563         * unittests/unpack-selftests.c: New file.
14564         * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
14565
14566 2018-02-26  Yao Qi  <yao.qi@linaro.org>
14567
14568         * dwarf2read.c (struct partial_die_info) <read>: New method.
14569         (read_partial_die): Remove the declaration.
14570         (load_partial_dies): Update.
14571         (partial_die_info::partial_die_info):
14572         (read_partial_die): Change it to partial_die_info::read.
14573
14574 2018-02-26  Yao Qi  <yao.qi@linaro.org>
14575
14576         * dwarf2read.c (struct partial_die_info) <fixup>: New method.
14577         (fixup_partial_die): Remove declaration.
14578         (scan_partial_symbols): Update.
14579         (partial_die_parent_scope): Likewise.
14580         (partial_die_full_name): Likewise.
14581         (fixup_partial_die): Change it to partial_die_info::fixup.
14582
14583 2018-02-26  Yao Qi  <yao.qi@linaro.org>
14584
14585         * dwarf2read.c (read_partial_die): Update the declaration.
14586         (load_partial_dies): Caller update.
14587         (read_partial_die): Remove one argument abbrev_len.
14588
14589 2018-02-26  Yao Qi  <yao.qi@linaro.org>
14590
14591         * dwarf2read.c (struct partial_die_info): Add ctor, delete
14592         assignment operator.
14593         (load_partial_dies): Use ctor and copy ctor.
14594         (read_partial_die): Update.
14595         (dwarf2_cu::find_partial_die): Use ctor.
14596
14597 2018-02-26  Yao Qi  <yao.qi@linaro.org>
14598
14599         * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
14600         (find_partial_die_in_comp_unit): Change it to
14601         dwarf2_cu::find_partial_die.
14602         (find_partial_die): Update.
14603
14604 2018-02-26  Yao Qi  <yao.qi@linaro.org>
14605
14606         * dwarf2read.c (read_partial_die): Remove the code checking abbrev
14607         is NULL.
14608
14609 2018-02-26  Yao Qi  <yao.qi@linaro.org>
14610
14611         * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
14612
14613 2018-02-26  Alan Hayward  <alan.hayward@arm.com>
14614
14615         * arch/amd64.h: Use common/tdesc.h.
14616         * arch/i386.c: Likewise.
14617         * arch/i386.h: Likewise.
14618         * arch/tic6x.c: Likewise.
14619         * arch/tdesc.h: Move file from here...
14620         * common/tdesc.h: ...to here.
14621         * features/aarch64-core.c: Regenerate.
14622         * features/aarch64-fpu.c: Regenerate.
14623         * features/i386/32bit-avx.c: Regenerate.
14624         * features/i386/32bit-avx512.c: Regenerate.
14625         * features/i386/32bit-core.c: Regenerate.
14626         * features/i386/32bit-linux.c: Regenerate.
14627         * features/i386/32bit-mpx.c: Regenerate.
14628         * features/i386/32bit-pkeys.c: Regenerate.
14629         * features/i386/32bit-sse.c: Regenerate.
14630         * features/i386/64bit-avx.c: Regenerate.
14631         * features/i386/64bit-avx512.c: Regenerate.
14632         * features/i386/64bit-core.c: Regenerate.
14633         * features/i386/64bit-linux.c: Regenerate.
14634         * features/i386/64bit-mpx.c: Regenerate.
14635         * features/i386/64bit-pkeys.c: Regenerate.
14636         * features/i386/64bit-segments.c: Regenerate.
14637         * features/i386/64bit-sse.c: Regenerate.
14638         * features/i386/x32-core.c: Regenerate.
14639         * features/tic6x-c6xp.c: Regenerate.
14640         * features/tic6x-core.c: Regenerate.
14641         * features/tic6x-gp.c: Regenerate.
14642         * target-descriptions.c: Use common/tdesc.h.
14643         * target-descriptions.h: Likewise.
14644
14645 2018-02-24  Tom Tromey  <tom@tromey.com>
14646
14647         * linux-thread-db.c (try_thread_db_load_from_pdir_1)
14648         (try_thread_db_load_from_dir, thread_db_load_search): Use
14649         std::string.
14650         (info_auto_load_libthread_db_compare): Return bool.  Change
14651         argument types.
14652         (info_auto_load_libthread_db): Use std::vector, std::string.
14653         Remove cleanups.
14654
14655 2018-02-24  Tom Tromey  <tom@tromey.com>
14656
14657         * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
14658         std::string.
14659         * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
14660         std::string*.
14661         * gdbarch.c: Rebuild.
14662         * gdbarch.h: Rebuild.
14663         * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
14664         * arch-utils.h (default_fast_tracepoint_valid_at): Update.
14665         * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
14666         std::string*.
14667
14668 2018-02-23  Simon Marchi  <simon.marchi@polymtl.ca>
14669
14670         * gdbtypes.h (sect_offset): Change type to uint64_t.
14671         (sect_offset_str): New function.
14672         * dwarf2read.c (create_addrmap_from_aranges): Use
14673         sect_offset_str.
14674         (error_check_comp_unit_head): Likewise.
14675         (create_debug_type_hash_table): Likewise.
14676         (read_cutu_die_from_dwo): Likewise.
14677         (init_cutu_and_read_dies): Likewise.
14678         (init_cutu_and_read_dies_no_follow): Likewise.
14679         (process_psymtab_comp_unit_reader): Likewise.
14680         (partial_die_parent_scope): Likewise.
14681         (peek_die_abbrev): Likewise.
14682         (process_queue): Likewise.
14683         (dwarf2_physname): Likewise.
14684         (read_namespace_alias): Likewise.
14685         (read_import_statement): Likewise.
14686         (create_dwo_cu_reader): Likewise.
14687         (create_cus_hash_table): Likewise.
14688         (lookup_dwo_cutu): Likewise.
14689         (inherit_abstract_dies): Likewise.
14690         (read_func_scope): Likewise.
14691         (read_call_site_scope): Likewise.
14692         (dwarf2_add_member_fn): Likewise.
14693         (read_common_block): Likewise.
14694         (read_module_type): Likewise.
14695         (read_typedef): Likewise.
14696         (read_subrange_type): Likewise.
14697         (load_partial_dies): Likewise.
14698         (read_partial_die): Likewise.
14699         (find_partial_die): Likewise.
14700         (read_str_index): Likewise.
14701         (dwarf2_string_attr): Likewise.
14702         (build_error_marker_type): Likewise.
14703         (lookup_die_type): Likewise.
14704         (dump_die_shallow): Likewise.
14705         (follow_die_ref): Likewise.
14706         (dwarf2_fetch_die_loc_sect_off): Likewise.
14707         (dwarf2_fetch_constant_bytes): Likewise.
14708         (follow_die_sig): Likewise.
14709         (get_signatured_type): Likewise.
14710         (get_DW_AT_signature_type): Likewise.
14711         (dwarf2_find_containing_comp_unit): Likewise.
14712         (set_die_type): Likewise.
14713
14714 2018-02-21  John Baldwin  <jhb@FreeBSD.org>
14715
14716         * arch/aarch64.c: Include "common-defs.h".
14717         * arch/amd64.c: Likewise.
14718         * arch/i386.c: Likewise.
14719
14720 2018-02-21  Tom Tromey  <tom@tromey.com>
14721
14722         * value.h: (extract_field_op): Update.
14723         * eval.c (extract_field_op): Return a const char *.
14724         * expression.h (parse_expression_for_completion): Update.
14725         * completer.c (complete_expression): Update.
14726         (add_struct_fields): Make fieldname const.
14727         * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
14728         (mark_completion_tag, parse_exp_in_context_1): Update.
14729         (parse_expression_for_completion): Change "name" to
14730         unique_xmalloc_ptr*.
14731
14732 2018-02-21  Tom Tromey  <tom@tromey.com>
14733
14734         * infcall.c (call_function_by_hand_dummy): Use std::vector.
14735
14736 2018-02-21  Yao Qi  <yao.qi@linaro.org>
14737
14738         * avr-tdep.c (avr_read_pc): Change parameter type to
14739         readable_regcache.
14740         * gdbarch.sh (read_pc): Likewise.
14741         * gdbarch.c: Re-generated.
14742         * gdbarch.h: Re-generated.
14743         * hppa-tdep.c (hppa_read_pc): Change parameter type to
14744         readable_regcache.
14745         * ia64-tdep.c (ia64_read_pc): Likewise.
14746         * mips-tdep.c (mips_read_pc): Likewise.
14747         * spu-tdep.c (spu_read_pc): Likewise.
14748
14749 2018-02-21  Yao Qi  <yao.qi@linaro.org>
14750
14751         * Makefile.in (COMMON_SFILES): Add regcache-dump.c
14752         * regcache-dump.c: New file.
14753         * regcache.c: Move register_dump to regcache-dump.c.
14754         (maintenance_print_registers): Likewise.
14755         (maintenance_print_raw_registers): Likewise.
14756         (maintenance_print_cooked_registers): Likewise.
14757         (maintenance_print_register_groups): Likewise.
14758         (maintenance_print_remote_registers): Likewise.
14759         (_initialize_regcache): Likewise.
14760         * regcache.h (register_dump): Moved from regcache.c.
14761
14762 2018-02-21  Yao Qi  <yao.qi@linaro.org>
14763
14764         * regcache.c (regcache::regcache): Update.
14765         (regcache::invalidate): Move it to detached_regcache::invalidate.
14766         (get_thread_arch_aspace_regcache): Update.
14767         (regcache::raw_update): Update.
14768         (regcache::cooked_read): Remove some code.
14769         (regcache::cooked_read_value): Likewise.
14770         (regcache::raw_write): Remove assert on m_readonly_p.
14771         (regcache::raw_supply_integer): Move it to
14772         detached_regcache::raw_supply_integer.
14773         (regcache::raw_supply_zeroed): Likewise.
14774         * regcache.h (detached_regcache) <raw_supply_integer>: New
14775         declaration.
14776         <raw_supply_zeroed, invalidate>: Likewise.
14777         (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
14778         <invalidate>: Likewise.
14779         <m_readonly_p>: Removed.
14780
14781 2018-02-21  Yao Qi  <yao.qi@linaro.org>
14782
14783         * infcmd.c (get_return_value): Let stop_regs point to
14784         get_current_regcache.
14785         * regcache.c (regcache::regcache): Remove.
14786         (register_dump_reg_buffer): New class.
14787         (regcache_print): Adjust.
14788         * regcache.h (regcache): Remove constructors.
14789
14790 2018-02-21  Yao Qi  <yao.qi@linaro.org>
14791
14792         * regcache.c (class register_dump): New class.
14793         (register_dump_regcache, register_dump_none): New class.
14794         (register_dump_remote, register_dump_groups): New class.
14795         (regcache_print): Update.
14796         * regcache.h (regcache_dump_what): Move it to regcache.c.
14797         (regcache) <dump>: Remove.
14798
14799 2018-02-21  Yao Qi  <yao.qi@linaro.org>
14800
14801         * jit.c (struct jit_unwind_private) <regcache>: Change its type to
14802          reg_buffer_rw *.
14803         (jit_unwind_reg_set_impl): Call raw_supply.
14804         (jit_frame_sniffer): Use reg_buffer_rw.
14805         * record-full.c (record_full_core_regbuf): Change its type.
14806         (record_full_core_open_1): Use reg_buffer_rw.
14807         (record_full_close): Likewise.
14808         (record_full_core_fetch_registers): Use regcache->raw_supply.
14809         (record_full_core_store_registers): Likewise.
14810         * regcache.c (regcache::get_register_status): Move it to
14811         reg_buffer.
14812         (regcache_raw_set_cached_value): Remove.
14813         (regcache::raw_set_cached_value): Remove.
14814         (regcache::raw_write): Call raw_supply.
14815         (regcache::raw_supply): Move it to reg_buffer_rw.
14816         * regcache.h (regcache_raw_set_cached_value): Remove.
14817         (reg_buffer_rw): New class.
14818
14819 2018-02-21  Yao Qi  <yao.qi@linaro.org>
14820
14821         * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
14822         readonly_detached_regcache.
14823         (dummy_frame_prev_register): Use regcache->cooked_read.
14824         * frame.c (frame_save_as_regcache): Change return type.
14825         (frame_pop): Update.
14826         * frame.h (frame_save_as_regcache): Update declaration.
14827         * inferior.h (get_infcall_suspend_state_regcache): Update
14828         declaration.
14829         * infrun.c (infcall_suspend_state) <registers>: use
14830         readonly_detached_regcache.
14831         (save_infcall_suspend_state): Don't use regcache_dup.
14832         (get_infcall_suspend_state_regcache): Change return type.
14833         * linux-fork.c (struct fork_info) <savedregs>: Change to
14834         readonly_detached_regcache.
14835         <pc>: New field.
14836         (fork_save_infrun_state): Don't use regcache_dup.
14837         (info_checkpoints_command): Adjust.
14838         * mi/mi-main.c (register_changed_p): Update declaration.
14839         (mi_cmd_data_list_changed_registers): Use
14840         readonly_detached_regcache.
14841         (register_changed_p): Change parameter type to
14842         readonly_detached_regcache.
14843         * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
14844         readonly_detached_regcache.
14845         (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
14846         * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
14847         New.
14848         (regcache::save): Move it to reg_buffer.
14849         (regcache::restore): Change parameter type.
14850         (regcache_dup): Remove.
14851         * regcache.h (reg_buffer) <save>: New method.
14852         (readonly_detached_regcache): New class.
14853         * spu-tdep.c (spu2ppu_cache) <regcache>: Use
14854         readonly_detached_regcache.
14855         (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
14856
14857 2018-02-21  Yao Qi  <yao.qi@linaro.org>
14858
14859         * frame.c (frame_save_as_regcache): Use regcache method save.
14860         (frame_pop): Use regcache method restore.
14861         * infrun.c (restore_infcall_suspend_state): Likewise.
14862         * linux-fork.c (fork_load_infrun_state): Likewise.
14863         * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
14864         save.
14865         * regcache.c (regcache_save): Remove.
14866         (regcache::restore): More asserts.
14867         (regcache_cpy): Remove.
14868         * regcache.h (regcache_save): Remove the declaration.
14869         (regcache::restore): Move from private to public.
14870         Remove the friend declaration of regcache_cpy.
14871         (regcache_cpy): Remove declaration.
14872
14873 2018-02-21  Yao Qi  <yao.qi@linaro.org>
14874
14875         * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
14876         parameter type to 'readable_regcache *'.
14877         * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
14878         * arm-tdep.c (arm_neon_quad_read): Likewise.
14879         (arm_pseudo_read): Likewise.
14880         * avr-tdep.c (avr_pseudo_register_read): Likewise.
14881         * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
14882         * frv-tdep.c (frv_pseudo_register_read): Likewise.
14883         * gdbarch.c: Re-generated.
14884         * gdbarch.h: Re-generated.
14885         * gdbarch.sh (pseudo_register_read): Change parameter type to
14886         'readable_regcache *'.
14887         (pseudo_register_read_value): Likewise.
14888         * h8300-tdep.c (pseudo_from_raw_register): Likewise.
14889         (h8300_pseudo_register_read): Likewise.
14890         * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
14891         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
14892         (i386_pseudo_register_read_into_value): Likewise.
14893         (i386_pseudo_register_read_value): Likewise.
14894         * i386-tdep.h (i386_pseudo_register_read_into_value): Update
14895         declaration.
14896         * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
14897         * m32c-tdep.c (m32c_raw_read): Likewise.
14898         (m32c_read_flg): Likewise.
14899         (m32c_banked_register): Likewise.
14900         (m32c_banked_read): Likewise.
14901         (m32c_sb_read): Likewise.
14902         (m32c_part_read): Likewise.
14903         (m32c_cat_read): Likewise.
14904         (m32c_r3r2r1r0_read): Likewise.
14905         (m32c_pseudo_register_read): Likewise.
14906         * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
14907         * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
14908         (mep_pseudo_cr64_read): Likewise.
14909         (mep_pseudo_register_read): Likewise.
14910         * mips-tdep.c (mips_pseudo_register_read): Likewise.
14911         * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
14912         * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
14913         * regcache.c (regcache::raw_read): Move it to readable_regcache.
14914         (regcache::cooked_read): Likewise.
14915         (regcache::cooked_read_value): Likewise.
14916         (regcache_cooked_read_signed):
14917         (regcache::cooked_read): Likewise.
14918         * regcache.h (readable_regcache): New class.
14919         (regcache): Inherit readable_regcache.  Move some methods to
14920         readable_regcache.
14921         * rl78-tdep.c (rl78_pseudo_register_read): Change
14922         parameter type to 'readable_regcache *'.
14923         * rs6000-tdep.c (do_regcache_raw_read): Remove.
14924         (e500_pseudo_register_read): Change parameter type to
14925         'readable_regcache *'.
14926         (dfp_pseudo_register_read): Likewise.
14927         (vsx_pseudo_register_read): Likewise.
14928         (efpr_pseudo_register_read): Likewise.
14929         * s390-tdep.c (s390_pseudo_register_read): Likewise.
14930         * sh-tdep.c (sh_pseudo_register_read): Likewise.
14931         * sh64-tdep.c (pseudo_register_read_portions): Likewise.
14932         (sh64_pseudo_register_read): Likewise.
14933         * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
14934         * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
14935         * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
14936         (spu_pseudo_register_read): Likewise.
14937         * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
14938         (xtensa_pseudo_register_read): Likewise.
14939
14940 2018-02-21  Yao Qi  <yao.qi@linaro.org>
14941
14942         * regcache.c (regcache::regcache): Call reg_buffer ctor.
14943         (regcache::arch): Move it to reg_buffer::arch.
14944         (regcache::register_buffer): Likewise.
14945         (regcache::assert_regnum): Likewise.
14946         (regcache::num_raw_registers): Likewise.
14947         * regcache.h (reg_buffer): New class.
14948         (regcache): Inherit reg_buffer.
14949
14950 2018-02-20  Simon Marchi  <simon.marchi@ericsson.com>
14951
14952         * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
14953         gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
14954
14955 2018-02-20  Markus Metzger  <markus.t.metzger@intel.com>
14956
14957         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
14958
14959 2018-02-19  Alan Hayward  <alan.hayward@arm.com>
14960
14961         * Makefile.in: (COMMON_SFILES): Add common/*.c files.
14962         (SFILES): Remove common/*.c files.
14963         (COMMON_OBS): Remove some *.o files built from common/*.c files.
14964         * common/common.host: Add common reference.
14965         * configure.ac: Likewise.
14966         * configure: Regenerate.
14967
14968 2018-02-16  Yao Qi  <yao.qi@linaro.org>
14969
14970         * block.c (block_namespace_info): Inherit allocate_on_obstack.
14971         (block_initialize_namespace): Use new.
14972         * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
14973         (dwarf2_free_objfile): Use delete.
14974         * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
14975         (copy_type_recursive): Use new.
14976         * gdb_obstack.h (allocate_on_obstack): New.
14977
14978 2018-02-15  Yao Qi  <yao.qi@linaro.org>
14979
14980         PR gdb/22849
14981         * inferior.c (exit_inferior_1): Reset inf->control.
14982
14983 2018-02-15  Joel Brobecker  <brobecker@adacore.com>
14984
14985         * ada-lang.c (ada_to_fixed_value_create): Delete advance
14986         declaration.
14987
14988 2018-02-14  Pedro Alves  <palves@redhat.com>
14989
14990         * frame-unwind.c (frame_unwind_try_unwinder): Always call
14991         frame_cleanup_after_sniffer on exception.
14992
14993 2018-02-14  Tom Tromey  <tom@tromey.com>
14994
14995         * solist.h (struct target_so_ops) <bfd_open>: Make pathname
14996         const.
14997         (solib_bfd_open): Make pathname const.
14998         * solib.c (solib_bfd_open): Make pathname const.
14999         * solib-spu.c (spu_bfd_fopen): Make name const.
15000         (spu_bfd_open): Make pathname const.
15001         * solib-darwin.c (darwin_bfd_open): Make pathname const.
15002         * solib-aix.c (solib_aix_bfd_open): Make pathname const.
15003
15004 2018-02-14  Tom Tromey  <tom@tromey.com>
15005
15006         * symfile.c (symfile_bfd_open): Update.
15007         * source.h (openp, source_full_path_of, find_and_open_source):
15008         Change argument type to unique_xmalloc_ptr.
15009         * source.c (openp): Take a unique_xmalloc_ptr.
15010         (source_full_path_of, find_and_open_source): Likewise.
15011         (open_source_file, symtab_to_fullname): Update.
15012         * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
15013         unique_xmalloc_ptr.
15014         * solib.c (solib_find_1): Use unique_xmalloc_ptr.
15015         (exec_file_find): Update.
15016         * psymtab.c (psymtab_to_fullname): Update.
15017         * nto-tdep.h (nto_find_and_open_solib): Update.
15018         * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
15019         unique_xmalloc_ptr.
15020         * exec.c (exec_file_attach): Update.
15021         * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
15022         * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
15023
15024 2018-02-14  Tom Tromey  <tom@tromey.com>
15025
15026         * solib.c: Include source.h.
15027         * nto-tdep.c: Include source.h.
15028         * mi/mi-cmd-env.c: Include source.h.
15029         * infcmd.c: Include source.h.
15030         * exec.c: Include source.h.
15031         * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
15032         (add_path, directory_switch, source_path, init_source_path): Move
15033         declarations...
15034         * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
15035         (add_path, directory_switch, source_path, init_source_path):
15036         ...here.
15037
15038 2018-02-14  Tom Tromey  <tom@tromey.com>
15039
15040         * solist.h (exec_file_find, solib_find): Return
15041         unique_xmalloc_ptr.
15042         (solib_bfd_fopen): Take a const char *.
15043         * solib.c (solib_find_1): Return unique_xmalloc_ptr.
15044         (exec_file_find, solib_find): Likewise.
15045         (solib_bfd_fopen): Do not take ownership of "pathname".
15046         (solib_bfd_open): Use unique_xmalloc_ptr.
15047         * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
15048         * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
15049         * infrun.c (follow_exec): Use unique_xmalloc_ptr.
15050         * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
15051
15052 2018-02-14  Joel Brobecker  <brobecker@adacore.com>
15053
15054         * ada-lang.c (name_match_type_from_name): Remove reference to
15055         ada_name_for_lookup in function's documentation.
15056         * ada-lang.h (ada_name_for_lookup): Delete declaration.
15057
15058 2018-02-13  Simon Marchi  <simon.marchi@polymtl.ca>
15059
15060         * defs.h (enum openp_flags): New enum.
15061         (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
15062         Move to enum openp_flags.
15063         (openp_flags): New enum flags.
15064         (openp): Change parameter type to openp_flags.
15065         * source.c (openp): Change parameter type to openp_flags.
15066         * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
15067         * dwarf2read.c (try_open_dwop_file): Use openp_flags.
15068
15069 2018-02-13  Simon Marchi  <simon.marchi@polymtl.ca>
15070
15071         * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
15072         per-command.
15073
15074 2018-02-12  Andrew Burgess  <andrew.burgess@embecosm.com>
15075
15076         * dwarf2read.c (dwarf2_release_queue): Delete function, move body
15077         into...
15078         (class dwarf2_queue_guard): ...the destructor of this new class.
15079         (dw2_do_instantiate_symtab): Create instance of the new class
15080         dwarf2_queue_guard, remove cleanup.
15081
15082 2018-02-09  Tom Tromey  <tom@tromey.com>
15083
15084         * source.c (find_source_lines): Don't reference past the end of
15085         the vector.
15086
15087 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
15088
15089         * remote.c (remote_btrace_maybe_reopen): Change error message.
15090         * btrace.c (btrace_enable): Likewise.
15091         (parse_xml_btrace): Likewise.
15092         (parse_xml_btrace_conf): Likewise.
15093
15094 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
15095
15096         * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
15097         (linux_enable_pt, linux_enable_bts): Call
15098         diagnose_perf_event_open_fail.
15099
15100 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
15101
15102         * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
15103         Remove parameter and change return type.  Update callers.  Move it.
15104         (linux_enable_bts, linux_enable_pt): Improve error message.
15105         (linux_enable_pt): Remove zero buffer size check.
15106         (linux_enable_btrace): Improve error messages.  Remove NULL return
15107         check.
15108
15109 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
15110
15111         * btrace.c (btrace_enable): Remove target_supports_btrace call.
15112         * nat/linux-btrace.c (perf_event_pt_event_type): Move.
15113         (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
15114         (linux_supports_pt, linux_supports_btrace): Remove.
15115         (linux_enable_bts): Call cpu_supports_bts.
15116         * nat/linux-btrace.h (linux_supports_btrace): Remove.
15117         * remote.c (remote_supports_btrace): Remove.
15118         (init_remote_ops): Remove remote_supports_btrace.
15119         * target-delegates.c: Regenerated.
15120         * target.c (target_supports_btrace): Remove.
15121         * target.h (target_ops) <to_supports_btrace>: Remove
15122         (target_supports_btrace): Remove.
15123         * x86-linux-nat.c (x86_linux_create_target): Remove
15124         linux_supports_btrace.
15125
15126 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
15127
15128         * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
15129         btrace failed.
15130         * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
15131         exception and use message in own exception.
15132
15133 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
15134
15135         * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
15136         (perf_event_pt_event_type): Use gdb_file_up.
15137         (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
15138         scoped_fd, and scoped_mmap.
15139
15140 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
15141
15142         * common/scoped_mmap.h: New.
15143         * unittests/scoped_mmap-selftest.c: New.
15144         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
15145         unittests/scoped_mmap-selftest.c.
15146
15147 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
15148
15149         * common/scoped_fd.h: New.
15150         * unittests/scoped_fd-selftest.c: New.
15151         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
15152         unittests/scoped_fd-selftest.c.
15153
15154 2018-02-09  Tom Tromey  <tom@tromey.com>
15155
15156         * auto-load.c (auto_load_section_scripts): Use
15157         gdb::unique_xmalloc_ptr.
15158
15159 2018-02-09  Tom Tromey  <tom@tromey.com>
15160
15161         * auto-load.c (execute_script_contents): Use std::string.
15162
15163 2018-02-09  Joel Brobecker  <brobecker@adacore.com>
15164
15165         * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
15166         Python function, rather than a new command.
15167
15168 2018-02-08  Tom Tromey  <tom@tromey.com>
15169
15170         * solib.c (solib_find_1): Use std::string.
15171         (solib_bfd_fopen): Use unique_xmalloc_ptr.
15172
15173 2018-02-08  Tom Tromey  <tom@tromey.com>
15174
15175         * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
15176
15177 2018-02-08  Tom Tromey  <tom@tromey.com>
15178
15179         * source.c (find_source_lines): Use gdb::def_vector.
15180
15181 2018-02-08  Tom Tromey  <tom@tromey.com>
15182
15183         * macrocmd.c (struct temporary_macro_definition): New.
15184         (macro_define_command): Use temporary_macro_definition.  Remove
15185         cleanups.
15186         (free_macro_definition_ptr): Remove.
15187
15188 2018-02-08  Tom Tromey  <tom@tromey.com>
15189
15190         * macroexp.c (maybe_expand): Use std::string.
15191
15192 2018-02-08  Tom Tromey  <tom@tromey.com>
15193
15194         * macroexp.c (struct macro_buffer): Add initializers for some
15195         members.
15196         (init_buffer, init_shared_buffer, free_buffer)
15197         (free_buffer_return_text): Remove.
15198         (macro_buffer): New constructors.
15199         (~macro_buffer): New destructor.
15200         (macro_buffer::set_shared): New method.
15201         (macro_buffer::resize_buffer, macro_buffer::appendc)
15202         (macro_buffer::appendmem): Now methods, not free functions.
15203         (set_token, append_tokens_without_splicing, stringify)
15204         (macro_stringify): Update.
15205         (gather_arguments): Change return type.  Remove argc_p argument,
15206         add args_ptr argument.  Use std::vector.
15207         (substitute_args): Remove argc argument.  Accept std::vector.
15208         (expand): Update.  Use std::vector.
15209         (scan, macro_expand, macro_expand_next): Update.
15210
15211 2018-02-08  Tom Tromey  <tom@tromey.com>
15212
15213         * symtab.c (default_collect_symbol_completion_matches_break_on):
15214         Use unique_xmalloc_ptr.
15215         * macroscope.h: (sal_macro_scope, user_macro_scope)
15216         (default_macro_scope): Return unique_xmalloc_ptr.
15217         * macroscope.c (sal_macro_scope, user_macro_scope)
15218         (default_macro_scope): Return unique_xmalloc_ptr.
15219         * macroexp.h (macro_expand, macro_expand_once): Return
15220         unique_xmalloc_ptr.
15221         * macroexp.c (macro_expand, macro_expand_once): Return
15222         unique_xmalloc_ptr.
15223         * macrocmd.c (macro_expand_command, macro_expand_once_command)
15224         (info_macro_command, info_macros_command): Use
15225         unique_xmalloc_ptr.
15226         * compile/compile-c-support.c (write_macro_definitions): Use
15227         unique_xmalloc_ptr.
15228         * c-exp.y (c_parse): Use unique_xmalloc_ptr.
15229
15230 2018-02-07  Simon Marchi  <simon.marchi@ericsson.com>
15231
15232         * value.c (value_static_field): Assign field type instead of
15233         containing type when returning an optimized out value.
15234
15235 2018-02-06  Yao Qi  <yao.qi@linaro.org>
15236
15237         * ft32-tdep.c (ft32_read_pc): Remove.
15238         (ft32_write_pc): Remove.
15239         (ft32_gdbarch_init): Update.
15240         * m32r-tdep.c (m32r_read_pc): Remove.
15241         (m32r_gdbarch_init): Update.
15242         * mep-tdep.c (mep_read_pc): Remove.
15243         (mep_gdbarch_init): Update.
15244         * microblaze-tdep.c (microblaze_write_pc): Remove.
15245         (microblaze_gdbarch_init): Update.
15246         * mn10300-tdep.c (mn10300_read_pc): Remove.
15247         (mn10300_write_pc): Remove.
15248         (mn10300_gdbarch_init): Update.
15249         * moxie-tdep.c (moxie_read_pc): Remove.
15250         (moxie_write_pc): Remove.
15251         (moxie_gdbarch_init): Update.
15252
15253 2018-02-06  Yao Qi  <yao.qi@linaro.org>
15254
15255         * expprint.c (print_subexp_standard): Handle
15256         OP_F77_UNDETERMINED_ARGLIST.
15257         (dump_subexp_body_standard): Likewise.
15258
15259 2018-02-05  Alan Hayward  <alan.hayward@arm.com>
15260
15261         * target-descriptions.c (tdesc_element_visitor) Add empty
15262         implementations.
15263         (tdesc_type): Move make_gdb_type from here.
15264         (tdesc_type_builtin): Likewise.
15265         (tdesc_type_vector): Likewise.
15266         (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
15267         (make_gdb_type_struct): Move from tdesc_type_with_fields.
15268         (make_gdb_type_union): Likewise.
15269         (make_gdb_type_flags): Likewise.
15270         (make_gdb_type_enum): Likewise.
15271         (make_gdb_type): New function.
15272         (tdesc_register_type): Use static make_gdb_type.
15273
15274 2018-02-05  Ruslan Kabatsayev <b7.10110111@gmail.com>
15275
15276         * infcmd.c (default_print_one_register_info): Align natural-format
15277         column values consistently one under another.
15278         (pad_to_column): New function.
15279
15280 2018-02-05  Joel Brobecker  <brobecker@adacore.com>
15281
15282         * dwarf2read.c (dwarf2_physname): Move commment.
15283
15284 2018-02-01  Leszek Swirski  <leszeks@google.com>
15285
15286         * varobj.c (varobj_formatted_print_options): Allow recursive
15287         pretty printing if pretty printing is enabled.
15288
15289 2018-02-01  Leszek Swirski  <leszeks@google.com>
15290
15291         * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
15292         names after a structop as a filename.
15293
15294 2018-02-01  Yao Qi  <yao.qi@linaro.org>
15295
15296         * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
15297         (arm_record_coproc_data_proc): Likewise.
15298
15299 2018-02-01  Yao Qi  <yao.qi@linaro.org>
15300
15301         * arm-tdep.c (arm_record_extension_space): Change ret to signed.
15302
15303 2018-01-31  Nikola Prica  <nikola.prica@rt-rk.com>
15304
15305         * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
15306         assign shifted lr_reg to fdata->lr_register when lr_reg is set.
15307
15308 2018-01-31  Pedro Alves  <palves@redhat.com>
15309
15310         * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
15311         * inflow.c (child_terminal_save_inferior): Wrap reference to
15312         tcgetpgrp in HAVE_TERMIOS_H.
15313         (child_interrupt, child_pass_ctrlc): Wrap references to signal in
15314         _WIN32.
15315         * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
15316         always iterate over all inferiors.
15317         (gdbsim_cntrl_c): Adjust.
15318         * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
15319
15320 2018-01-31  Joel Brobecker  <brobecker@adacore.com>
15321
15322         * gdbtypes.c (lookup_array_range_type): Make sure the array's
15323         index type is objfile-owned if the element type is as well.
15324
15325 2018-01-31  Joel Brobecker  <brobecker@adacore.com>
15326
15327         GDB 8.1 released.
15328
15329 2018-01-30  Philipp Rudo  <prudo@linux.vnet.ibm.com>
15330
15331         * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
15332         "features/s390x-linux64.c".
15333         (_initialize_s390_linux_tdep): Remove initialization of tdescs
15334         s390_linux32 and s390x_linux64.
15335         (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
15336         default tdesc.
15337         * s390-tdep.c: Include "features/s390-linux32.c" and
15338         "features/s390x-linux64.c".
15339         (s390_tdesc_valid): Add check for tdesc_has_registers.
15340         (s390_gdbarch_init): Make sure there is always a valid tdesc.
15341         (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
15342         tdesc_s390x_linux64.
15343         * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
15344         tdesc_s390x_linux64 to...
15345         * s390-tdep.h: ...here.
15346
15347 2018-01-30  Pedro Alves  <palves@redhat.com>
15348
15349         PR gdb/13211
15350         * config.in, configure: Regenerate.
15351         * configure.ac: Check for getpgid.
15352         * go32-nat.c (go32_pass_ctrlc): New.
15353         (go32_target): Install it.
15354         * inf-child.c (inf_child_target): Install
15355         child_terminal_save_inferior, child_pass_ctrlc and
15356         child_interrupt.
15357         * inf-ptrace.c (inf_ptrace_interrupt): Delete.
15358         (inf_ptrace_target): No longer install it.
15359         * infcmd.c (interrupt_target_1): Adjust.
15360         * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
15361         (child_interrupt): Declare.
15362         (inferior::terminal_state): New.
15363         * inflow.c (struct terminal_info): Update comments.
15364         (inferior_process_group): Delete.
15365         (terminal_is_ours): Delete.
15366         (gdb_tty_state): New.
15367         (child_terminal_init): Adjust.
15368         (is_gdb_terminal, sharing_input_terminal_1)
15369         (sharing_input_terminal): New functions.
15370         (child_terminal_inferior): Adjust.  Use sharing_input_terminal.
15371         Set the process's actual process group in the foreground if
15372         possible.  Handle is_ours_for_output/is_ours distinction.  Don't
15373         mark terminal as the inferior's if not sharing GDB's terminal.
15374         Don't check attach_flag.
15375         (child_terminal_ours_for_output, child_terminal_ours): Adjust to
15376         pass down a target_terminal_state.
15377         (child_terminal_save_inferior): New, factored out from ...
15378         (child_terminal_ours_1): ... this.  Handle
15379         target_terminal_state::is_ours_for_output.
15380         (child_interrupt, child_pass_ctrlc): New.
15381         (inflow_inferior_exit): Clear the inferior's terminal_state.
15382         (copy_terminal_info): Copy the inferior's terminal state.
15383         (_initialize_inflow): Remove reference to terminal_is_ours.
15384         * inflow.h (inferior_process_group): Delete.
15385         * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
15386         * procfs.c (procfs_target): Don't install procfs_interrupt.
15387         (procfs_interrupt): Delete.
15388         * remote.c (remote_serial_quit_handler): Adjust.
15389         (remote_interrupt): Remove ptid parameter.  Adjust.
15390         * target-delegates.c: Regenerate.
15391         * target.c: Include "terminal.h".
15392         (target_terminal::terminal_state): Rename to ...
15393         (target_terminal::m_terminal_state): ... this.
15394         (target_terminal::init): Adjust.
15395         (target_terminal::inferior): Adjust to per-inferior
15396         terminal_state.
15397         (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
15398         (target_terminal::ours, target_terminal::ours_for_output): Use
15399         target_terminal_is_ours_kind.
15400         (target_interrupt): Remove ptid parameter.  Adjust.
15401         (default_target_pass_ctrlc): Adjust.
15402         * target.h (target_ops::to_terminal_save_inferior): New field.
15403         (target_ops::to_interrupt): Remove ptid_t parameter.
15404         (target_interrupt): Remove ptid_t parameter.  Update comment.
15405         (target_pass_ctrlc): Update comment.
15406         * target/target.h (target_terminal_state): New scoped enum,
15407         factored out of ...
15408         (target_terminal::terminal_state): ... here.
15409         (target_terminal::inferior): Update comments.
15410         (target_terminal::restore_inferior): New.
15411         (target_terminal::is_inferior, target_terminal::is_ours)
15412         (target_terminal::is_ours_for_output): Adjust.
15413         (target_terminal::scoped_restore_terminal_state): Adjust to
15414         rename, and call restore_inferior() instead of inferior().
15415         (target_terminal::scoped_restore_terminal_state::m_state): Change
15416         type.
15417         (target_terminal::terminal_state): Rename to ...
15418         (target_terminal::m_terminal_state): ... this and change type.
15419
15420 2018-01-30  Pedro Alves  <palves@redhat.com>
15421
15422         * linux-nat.c (wait_for_signal): New function.
15423         (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
15424         directly.
15425         (async_terminal_is_ours)
15426         (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
15427         (linux_nat_add_target): Don't override
15428         to_terminal_inferior/to_terminal_ours.
15429
15430 2018-01-29  Sergio Durigan Junior  <sergiodj@redhat.com>
15431
15432         * remote.c (remote_follow_fork): Don't call "detach_inferior".
15433
15434 2018-01-28  Simon Marchi  <simon.marchi@ericsson.com>
15435
15436         * dwarf2read.c (free_dwo_files): Add forward-declaration.
15437         (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
15438         dwarf2_per_objfile_free here.
15439         (dwarf2_per_objfile_free): Remove.
15440         (_initialize_dwarf2_read): Don't register
15441         dwarf2_per_objfile_free as a registry cleanup.
15442
15443 2018-01-27  Eli Zaretskii  <eliz@gnu.org>
15444
15445         Avoid compilation errors in MinGW native builds
15446
15447         The error is triggered by including python-internal.h, and the
15448         error message is:
15449
15450              In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
15451                       from build-gnulib/import/math.h:27,
15452                       from d:/usr/Python26/include/pyport.h:235,
15453                       from d:/usr/Python26/include/Python.h:58,
15454                       from python/python-internal.h:94,
15455                       from python/py-arch.c:24:
15456              d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
15457         using ::hypot;
15458                 ^~~~~
15459
15460         This happens because Python headers define 'hypot' to expand t
15461         '_hypot' in the Windows builds.
15462         * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
15463         'hypoth'.  This avoids a compilation error.
15464
15465 2018-01-26  Alan Hayward  <alan.hayward@arm.com>
15466
15467         * MAINTAINERS (Write After Approval): Fix ordering.
15468
15469 2018-01-26  Alan Hayward  <alan.hayward@arm.com>
15470
15471         * MAINTAINERS (Write After Approval): Add Alan Hayward.
15472
15473 2018-01-26  Alan Modra  <amodra@gmail.com>
15474
15475         * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
15476         (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
15477         Remove nop.  Make const.  Comment.
15478         (powerpc32_plt_stub_so_2): New.
15479         (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
15480         Correct count.  Update uses.
15481         (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
15482         Move common code reading PLT entry word.  Correct
15483         powerpc32_plt_stub PLT address calculation.
15484         * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
15485         (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
15486         (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
15487         (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
15488         (ppc64_standard_linkage8): Likewise.
15489         * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
15490         Correct insns description.
15491         * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
15492
15493 2018-01-24  Pedro Alves  <palves@redhat.com>
15494
15495         GCC PR libstdc++/83906
15496         * gdbtypes.c (operator==(const dynamic_prop &,
15497         const dynamic_prop &)): New.
15498         (operator==(const range_bounds &, const range_bounds &)): New.
15499         (check_types_equal): Use them instead of memcmp.
15500         * gdbtypes.h (operator==(const dynamic_prop &,
15501         const dynamic_prop &)): Declare.
15502         (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
15503         (operator==(const range_bounds &, const range_bounds &)): Declare.
15504         (operator!=(const range_bounds &, const range_bounds &)): Declare.
15505
15506 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
15507
15508         * s390-linux-tdep.c (s390_record_address_mask)
15509         (s390_record_calc_disp_common, s390_record_calc_disp)
15510         (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
15511         (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
15512         (s390_process_record): Move to s390-tdep.c.
15513         (s390_linux_init_abi_any): Adjust.
15514         * s390-tdep.c (s390_record_address_mask)
15515         (s390_record_calc_disp_common, s390_record_calc_disp)
15516         (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
15517         (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
15518         (s390_process_record): Moved from s390-linux-tdep.c
15519         (s390_gdbarch_init): Adjust.
15520
15521 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
15522
15523         * s390-linux-nat.c (s390-tdep.h): New include.
15524         * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
15525         (HFILES_NO_SRCDIR): Add s390-tdep.h.
15526         (ALLDEPFILES): Add s390-tdep.c.
15527         * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
15528         * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
15529         * s390-tdep.h: ...this.  New file.
15530         * s390-linux-tdep.c (s390-tdep.h): New include.
15531         (_initialize_s390_tdep): Rename to...
15532         (_initialize_s390_linux_tdep): ...this and adjust.
15533         (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
15534         (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
15535         s390-tdep.h.
15536         (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
15537         (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
15538         (s390_is_partial_instruction, s390_software_single_step)
15539         (is_non_branch_ril, s390_displaced_step_copy_insn)
15540         (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
15541         (s390_prologue_data, s390_addr, s390_store, s390_load)
15542         (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
15543         (s390_register_call_saved, s390_guess_tracepoint_registers)
15544         (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
15545         (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
15546         (s390_pseudo_register_name, s390_pseudo_register_type)
15547         (s390_pseudo_register_read, s390_pseudo_register_write)
15548         (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
15549         (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
15550         (s390_addr_bits_remove, s390_address_class_type_flags)
15551         (s390_address_class_type_flags_to_name)
15552         (s390_address_class_name_to_type_flags, s390_effective_inner_type)
15553         (s390_function_arg_float, s390_function_arg_vector)
15554         (is_power_of_two, s390_function_arg_integer, s390_arg_state)
15555         (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
15556         (s390_frame_align, s390_register_return_value, s390_return_value)
15557         (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
15558         (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
15559         (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
15560         (s390_trad_frame_prev_register, s390_unwind_cache)
15561         (s390_prologue_frame_unwind_cache)
15562         (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
15563         (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
15564         (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
15565         (s390_stub_frame_this_id, s390_stub_frame_prev_register)
15566         (s390_stub_frame_sniffer, s390_stub_frame_unwind)
15567         (s390_frame_base_address, s390_local_base_address)
15568         (s390_frame_base, s390_gcc_target_options)
15569         (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
15570         (s390_validate_reg_range, s390_tdesc_valid)
15571         (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
15572         * s390-tdep.c: ...this.  New file.
15573
15574 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
15575
15576         * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
15577         (s390_process_record, s390_gdbarch_tdep_alloc)
15578         (s390_linux_init_abi_any): Use/set new hook.
15579
15580 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
15581
15582         * s390-linux-tdep.c (osabi.h): New include.
15583         (s390_linux_init_abi_31, s390_linux_init_abi_64)
15584         (s390_linux_init_abi_any): New functions.
15585         (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
15586
15587 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
15588
15589         * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
15590         tdesc_has_registers check
15591
15592 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
15593
15594         * s390-linux-tdep.c (s390_tdesc_valid): New function.
15595         (s390_validate_reg_range): New macro.
15596         (s390_gdbarch_init): Adjust.
15597
15598 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
15599
15600         * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
15601         (s390_gdbarch_tdep_alloc): Adjust.
15602         (s390_gdbarch_init): Adjust.
15603
15604 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
15605
15606         * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
15607         <have_tdb>: Change type to bool.
15608         (s390_gdbarch_tdep_alloc): Adjust.
15609         (s390_gdbarch_init): Adjust.
15610
15611 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
15612
15613         * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
15614         (gdbarch_tdep) <have_upper, have_vx>: New fields.
15615         (s390_gdbarch_tdep_alloc): New function.
15616         (s390_gdbarch_init): Allocate tdep at start and use its fields
15617         instead of separate variables.
15618
15619 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
15620
15621         * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
15622         when looking for cached gdbarch and add comment for remaining.
15623
15624 2018-01-22  Pedro Alves  <palves@redhat.com>
15625             Sergio Durigan Junior  <sergiodj@redhat.com>
15626
15627         * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
15628         case.
15629
15630 2018-01-22  Maciej W. Rozycki  <macro@mips.com>
15631
15632         * MAINTAINERS: Update my company e-mail address.
15633
15634 2018-01-22  Yao Qi  <yao.qi@linaro.org>
15635
15636         * regcache.c (cooked_write_test): New function.
15637         (_initialize_regcache): Register the test.
15638
15639 2018-01-22  Yao Qi  <yao.qi@linaro.org>
15640
15641         * ia64-tdep.c (ia64_pseudo_register_read): Call
15642         regcache->cooked_read instead of regcache_cooked_read_unsigned.
15643         * m32c-tdep.c (m32c_cat_read): Likewise.
15644         (m32c_r3r2r1r0_read): Likewise.
15645         * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
15646         * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
15647
15648 2018-01-22  Yao Qi  <yao.qi@linaro.org>
15649
15650         * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
15651         method raw_read instead of regcache_raw_read.
15652         * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
15653         * arm-tdep.c (arm_neon_quad_read): Likewise.
15654         * avr-tdep.c (avr_pseudo_register_read): Likewise.
15655         * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
15656         * frv-tdep.c (frv_pseudo_register_read): Likewise.
15657         * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
15658         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
15659         (i386_pseudo_register_read_into_value): Likewise.
15660         * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
15661         * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
15662         * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
15663         * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
15664         * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
15665         * sparc-tdep.c (sparc32_pseudo_register_read):  Likewise.
15666         * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
15667         * spu-tdep.c (spu_pseudo_register_read_spu):  Likewise.
15668         * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
15669
15670 2018-01-22  Yao Qi  <yao.qi@linaro.org>
15671
15672         * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
15673         * configure.tgt: Remove target mt.
15674         * mt-tdep.c: Remove.
15675         * regcache.c (cooked_read_test): Remove the check for mt.
15676
15677 2018-01-22  Yao Qi  <yao.qi@linaro.org>
15678
15679         * jit.c (jit_frame_prev_register): Call regcache::cooked_read
15680         instead of gdbarch_pseudo_register_read_value.
15681
15682 2018-01-22  Joel Brobecker  <brobecker@adacore.com>
15683
15684         * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
15685         language is Ada.
15686
15687 2018-01-22  Joel Brobecker  <brobecker@adacore.com>
15688
15689         * linespec.c (create_sals_line_offset): Remove code that preserved
15690         the symtab_and_line's line number.
15691
15692 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
15693
15694         * varobj.c (varobj_create): Don't set valid_block when creating a
15695         floating varobj.
15696
15697 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
15698
15699         * varobj.c (varobj_create): Remove out of date comment.
15700
15701 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
15702
15703         PR mi/20395
15704         * ada-exp.y (write_var_from_sym): Pass extra parameter when
15705         updating innermost block.
15706         * parse.c (innermost_block_tracker::update): Take extra type
15707         parameter, and check types match before updating innermost block.
15708         (write_dollar_variable): Update innermost block for registers.
15709         * parser-defs.h (enum innermost_block_tracker_type): New enum.
15710         (innermost_block_tracker::innermost_block_tracker): Initialise
15711         m_types member.
15712         (innermost_block_tracker::reset): Take type parameter.
15713         (innermost_block_tracker::update): Take type parameter, and pass
15714         type through as needed.
15715         (innermost_block_tracker::m_types): New member.
15716         * varobj.c (varobj_create): Pass type when reseting innermost
15717         block.
15718
15719 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
15720
15721         * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
15722         * ada-lang.c (resolve_subexp): Likewise.
15723         * breakpoint.c (set_breakpoint_condition) Likewise.
15724         (watch_command_1) Likewise.
15725         * c-exp.y (variable): Likewise.
15726         * d-exp.y (PrimaryExpression): Likewise.
15727         * f-exp.y (variable): Likewise.
15728         * go-exp.y (variable): Likewise.
15729         * m2-exp.y (variable): Likewise.
15730         * objfiles.c (objfile::~objfile): Likewise.
15731         * p-exp.y (variable): Likewise.
15732         * parse.c (innermost_block): Change type.
15733         * parser-defs.h (class innermost_block_tracker): New.
15734         (innermost_block): Change to innermost_block_tracker.
15735         * printcmd.c (display_command): Switch to innermost_block API.
15736         (do_one_display): Likewise.
15737         * rust-exp.y (do_one_display): Likewise.
15738         * symfile.c (clear_symtab_users): Likewise.
15739         * varobj.c (varobj_create): Switch to innermost_block API, replace
15740         use of innermost_block with block stored on varobj object.
15741
15742 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
15743
15744         * expression.h (innermost_block): Remove declaration.
15745         * varobj.c: Add 'parser-defs.h' include.
15746
15747 2018-01-19  Tom Tromey  <tom@tromey.com>
15748
15749         * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
15750         symbols in the static and global blocks.
15751
15752 2018-01-19  James Clarke  <jrtc27@jrtc27.com>
15753
15754         * nat/linux-ptrace.c: Remove unnecessary reinclusion of
15755         gdb_ptrace.h, and move including gdb_wait.h ...
15756         * nat/linux-ptrace.h: ... to here.
15757
15758 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
15759
15760         * inf-ptrace.c (inf_ptrace_detach): Adjust call to
15761         inf_ptrace_detach_success.
15762         (inf_ptrace_detach_success): Add inferior parameter, use it
15763         instead of inferior_ptid, pass it to detach_inferior.
15764         * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
15765         parameter.
15766         * inferior.c (detach_inferior): Add overload that takes an
15767         inferior object.
15768         * inferior.h (detach_inferior): Likewise.
15769         * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
15770         use inferior_ptid, adjust call to inf_ptrace_detach_success.
15771         * linux-thread-db.c (thread_db_detach): Use inf parameter.
15772
15773 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
15774
15775         * target.h (struct target_ops) <to_detach>: Add inferior
15776         parameter.
15777         (target_detach): Likewise.
15778         * target.c (dispose_inferior): Pass inferior down.
15779         (target_detach): Pass inferior down.  Assert that it is equal to
15780         the current inferior.
15781         * aix-thread.c (aix_thread_detach): Pass inferior down.
15782         * corefile.c (core_file_command): Pass current_inferior() down.
15783         * corelow.c (core_detach): Add inferior parameter.
15784         * darwin-nat.c (darwin_detach): Likewise.
15785         * gnu-nat.c (gnu_detach): Likewise.
15786         * inf-ptrace.c (inf_ptrace_detach): Likewise.
15787         * infcmd.c (detach_command): Pass current_inferior() down to
15788         target_detach.
15789         * infrun.c (follow_fork_inferior): Pass parent_inf to
15790         target_detach.
15791         (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
15792         target_detach.
15793         * linux-nat.c (linux_nat_detach): Add inferior parameter.
15794         * linux-thread-db.c (thread_db_detach): Likewise.
15795         * nto-procfs.c (procfs_detach): Likewise.
15796         * procfs.c (procfs_detach): Likewise.
15797         * record.c (record_detach): Likewise.
15798         * record.h (struct inferior): Forward-declare.
15799         (record_detach): Add inferior parameter.
15800         * remote-sim.c (gdbsim_detach): Likewise.
15801         * remote.c (remote_detach_1): Likewise.
15802         (remote_detach): Likewise.
15803         (extended_remote_detach): Likewise.
15804         * sol-thread.c (sol_thread_detach): Likewise.
15805         * target-debug.h (target_debug_print_inferior_p): New macro.
15806         * target-delegates.c: Re-generate.
15807         * top.c (kill_or_detach): Pass inferior down to target_detach.
15808         * windows-nat.c (windows_detach): Add inferior parameter.
15809
15810 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
15811
15812         * target.h (struct target_ops) <to_detach>: Remove args
15813         parameter.
15814         (target_detach): Likewise.
15815         * target.c (dispose_inferior): Adjust.
15816         (target_detach): Remove args parameter, adjust.
15817         * aix-thread.c (aix_thread_detach): Adjust.
15818         * corefile.c (core_file_command): Adjust.
15819         * corelow.c (core_detach): Adjust.
15820         * darwin-nat.c (darwin_detach): Adjust.
15821         * gnu-nat.c (gnu_detach): Adjust.
15822         * inf-ptrace.c (inf_ptrace_detach): Adjust.
15823         * infcmd.c (detach_command): Adjust
15824         * infrun.c (follow_fork_inferior): Adjust.
15825         (handle_vfork_child_exec_or_exit): Adjust.
15826         * linux-fork.c (linux_fork_detach): Remove args parameter.
15827         * linux-fork.h (linux_fork_detach): Likewise.
15828         * linux-nat.c (linux_nat_detach): Likewise, and adjust.
15829         * linux-thread-db.c (thread_db_detach): Likewise.
15830         * nto-procfs.c (procfs_detach): Likewise.
15831         * procfs.c (procfs_detach): Likewise.
15832         (do_detach): Remove signo parameter.
15833         * record.c (record_detach): Remove args parameter.
15834         * record.h (record_detach): Likewise.
15835         * remote-sim.c (gdbsim_detach): Likewise.
15836         * remote.c (remote_detach_1): Likewise.
15837         (remote_detach): Likewise.
15838         (extended_remote_detach): Likewise.
15839         * sol-thread.c (sol_thread_detach): Likewise.
15840         * target-delegates.c: Re-generate.
15841         * top.c (struct qt_args) <args>: Remove field.
15842         (kill_or_detach): Don't pass args.
15843         (quit_force): Don't set args.
15844         * windows-nat.c (windows_detach): Remove args parameter.
15845
15846 2018-01-19  Yao Qi  <yao.qi@linaro.org>
15847
15848         * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
15849         (arm_linux_init_abi): Install it.
15850
15851 2018-01-19  Yao Qi  <yao.qi@linaro.org>
15852
15853         * osabi.c (gdb_osabi_names): Extend the regexp for
15854         arm-linux-gnueabihf.
15855
15856 2018-01-18  Yao Qi  <yao.qi@linaro.org>
15857
15858         * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
15859         m_abbrevs.
15860         (abbrev_table::add_abbrev): Update.
15861         (abbrev_table::lookup_abbrev): Update.
15862
15863 2018-01-18  Yao Qi  <yao.qi@linaro.org>
15864
15865         * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
15866
15867 2018-01-17  Sergio Durigan Junior  <sergiodj@redhat.com>
15868
15869         * compile/compile.c (compile_to_object): Convert "triplet_rx"
15870         to "std::string".
15871
15872 2018-01-17  Tom Tromey  <tom@tromey.com>
15873
15874         * dwarf2read.c (symbolp): Remove typedef.  Don't instantiate VEC.
15875
15876 2018-01-17  Tom Tromey  <tom@tromey.com>
15877
15878         * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
15879         * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
15880         (create_array_type_with_stride): Update.
15881         * dwarf2read.c (set_die_type): Update.
15882
15883 2018-01-17  Tom Tromey  <tom@tromey.com>
15884
15885         * dwarf2read.c (delayed_method_info): Remove typedef.
15886         (dwarf2_cu::method_info): Now a std::vector.
15887         (add_to_method_list): Update.
15888         (free_delayed_list): Remove.
15889         (compute_delayed_physnames): Update.
15890         (process_full_comp_unit, process_full_type_unit): Clear the method
15891         list.  Remove cleanups.
15892         (psymtab_include_file_name): Add name_holder parameter.  Use
15893         unique_xmalloc_ptr.
15894         (dwarf_decode_lines): Update.
15895
15896 2018-01-17  Tom Tromey  <tom@tromey.com>
15897             Simon Marchi  <simon.marchi@ericsson.com>
15898
15899         * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
15900         (dwarf2_per_objfile::free_cached_comp_units)
15901         (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
15902         (init_cutu_and_read_dies_no_follow): Update.
15903         (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
15904         (dwarf2_cu::~dwarf2_cu): New.
15905         (free_heap_comp_unit, free_stack_comp_unit): Remove.
15906         (age_cached_comp_units, free_one_cached_comp_unit): Update.
15907
15908 2018-01-17  Tom Tromey  <tom@tromey.com>
15909             Simon Marchi  <simon.marchi@ericsson.com>
15910
15911         * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
15912         (struct die_reader_specs) <abbrev_table>: New member.
15913         (struct abbrev_table): Add constructor.
15914         <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
15915         <abbrev_obstack>: Now an auto_obstack.
15916         (abbrev_table_up): New typedef.
15917         (init_cu_die_reader): Add abbrev_table parameter.
15918         (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
15919         Add result_dwo_abbrev_table.
15920         (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
15921         (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
15922         Update.
15923         (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
15924         parameter.
15925         (skip_children): Update.
15926         (abbrev_table::alloc_abbrev): Rename from
15927         abbrev_table_alloc_abbrev.
15928         (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
15929         (abbrev_table::lookup_abbrev): Rename from
15930         abbrev_table_lookup_abbrev.
15931         (abbrev_table_read_table): Return abbrev_table_up.
15932         (abbrev_table_free, abbrev_table_free_cleanup)
15933         (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
15934         (load_partial_dies): Update.
15935
15936 2018-01-17  Tom Tromey  <tom@tromey.com>
15937
15938         * dwarf2read.c (dwarf2_compute_name): Update comment.
15939         (read_func_scope, read_variable): Update.
15940         (new_symbol): Remove.
15941         (new_symbol_full): Rename to new_symbol.
15942
15943 2018-01-17  Mike Gulick  <mgulick@mathworks.com>
15944
15945         PR gdb/16577
15946         * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
15947         a warning instead of throwing an error, set section size to 0 and return
15948         NULL.
15949         * gdb_bfd.h (gdb_bfd_map_section): Update description.
15950
15951 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
15952
15953         * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
15954         std::string.
15955         (linux_ptrace_attach_fail_reason_string): Likewise.
15956         * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
15957         Likewise.
15958         (linux_ptrace_attach_fail_reason_string): Likewise.
15959         * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
15960
15961 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
15962
15963         * linux-nat.c (linux_nat_attach): Remove xstrdup.
15964
15965 2018-01-17  Eldar Abusalimov  <eldar.abusalimov@jetbrains.com>
15966
15967         PR gdb/21559
15968         * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
15969         checking for fs_base/gs_base fields in struct user_regs_struct.
15970         * configure: Regenerate.
15971
15972 2018-01-17  Yao Qi  <yao.qi@linaro.org>
15973
15974         * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
15975         function.
15976         (aarch64_linux_init_abi): Install it to gdbarch hook
15977         gcc_target_options.
15978
15979 2018-01-15  Pedro Alves  <palves@redhat.com>
15980
15981         * common/signals-state-save-restore.c
15982         (save_original_signals_state): Fix typos.
15983
15984 2017-01-12  Tom Tromey  <tom@tromey.com>
15985             Sergio Durigan Junior  <sergiodj@redhat.com>
15986
15987         * Makefile.in (install-only): Install gdb-add-index.
15988
15989 2018-01-12  John Baldwin  <jhb@FreeBSD.org>
15990
15991         * fbsd-tdep.c (KVE_PROTECTION): Correct value.
15992
15993 2018-01-12  Andreas Arnez  <arnez@linux.vnet.ibm.com>
15994
15995         * infrun.c (keep_going_pass_signal): Clear step-over info when
15996         insert_breakpoints fails.
15997
15998 2018-01-11  Pedro Alves  <palves@redhat.com>
15999
16000         PR gdb/22583
16001         * infrun.c (resume): Rename to ...
16002         (resume_1): ... this.
16003         (resume): Reimplement as wrapper around resume_1.
16004
16005 2018-01-11  Pedro Alves  <palves@redhat.com>
16006
16007         PR remote/22597
16008         * remote.c (remote_parse_stop_reply): Default to the last-set
16009         general thread instead of to 'magic_null_ptid'.
16010
16011 2018-01-10  Pedro Alves  <palves@redhat.com>
16012
16013         * language.h (language_get_symbol_name_matcher): Rename ...
16014         (get_symbol_name_matcher): ... this.
16015         * language.c (language_get_symbol_name_matcher): Ditto.
16016         * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
16017         callers adjusted.
16018
16019 2018-01-10  Pedro Alves  <palves@redhat.com>
16020
16021         PR gdb/22670
16022         * dwarf2read.c
16023         (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
16024         Adjust to use language_get_symbol_name_matcher instead of
16025         language_defn::la_get_symbol_name_matcher.
16026         * language.c (language_get_symbol_name_matcher): If in Ada mode
16027         and the lookup name is a verbatim match, return Ada's matcher.
16028         * language.h (language_get_symbol_name_matcher): Adjust comment.
16029         (ada_lookup_name_info::verbatim_p):: New method.
16030
16031 2018-01-10  Pedro Alves  <palves@redhat.com>
16032
16033         PR gdb/22670
16034         * ada-lang.c (ada_collect_symbol_completion_matches): If the
16035         minsym's language is language_auto or language_cplus, pass down
16036         language_ada instead.
16037         * symtab.c (compare_symbol_name): Don't frob symbol language here.
16038
16039 2018-01-10  Pedro Alves  <palves@redhat.com>
16040
16041         PR gdb/22670
16042         * minsyms.c (linkage_name_str): New function.
16043         (iterate_over_minimal_symbols): Use it.
16044
16045 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
16046
16047         * NEWS: Document that 'info proc' now works on FreeBSD.
16048
16049 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
16050
16051         * configure.ac: Check for kinfo_getfile in libutil.
16052         * configure: Regenerate.
16053         * config.in: Regenerate.
16054         * fbsd-nat.c: Include "fbsd-tdep.h".
16055         (fbsd_fetch_cmdline): New.
16056         (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
16057         rather than calling error.
16058         (fbsd_info_proc): New.
16059         (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
16060         (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
16061         (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
16062
16063 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
16064
16065         * fbsd-nat.c (struct free_deleter): Remove.
16066         (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
16067
16068 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
16069
16070         * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
16071         NULL for an empty pathname.
16072
16073 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
16074
16075         * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
16076         (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
16077         (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
16078         (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
16079         (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
16080         (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
16081         (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
16082         (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
16083         (kinfo_proc_layout_32, kinfo_proc_layout_i386)
16084         (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
16085         (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
16086         (fbsd_core_fetch_timeval, fbsd_print_sigset)
16087         (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
16088         (fbsd_init_abi):  Install gdbarch "core_info_proc" method.
16089         * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
16090
16091 2018-01-08  Samuel Thibault  <samuel.thibault@ens-lyon.org>
16092
16093         * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
16094         (gnu_xfer_auxv): New function.
16095         (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
16096         TARGET_OBJECT_AUXV.
16097
16098 2018-01-08  Yao Qi  <yao.qi@linaro.org>
16099             Simon Marchi  <simon.marchi@ericsson.com>
16100
16101         * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
16102         common/selftest.c.
16103         (COMMON_OBS): Remove selftest.o.
16104         * configure.ac: Append selftest-arch.c and common/selftest.c to
16105         CONFIG_SRCS.  Append selftest-arch.o and selftest.o to COMMON_OBS.
16106         * configure: Re-generated.
16107         * maint.c (maintenance_selftest): Wrap selftests::run_tests with
16108         GDB_SELF_TEST.
16109         (maintenance_info_selftests): Likewise.
16110
16111 2018-01-08  Xavier Roirand  <roirand@adacore.com>
16112
16113         * ada-valprint.c (val_print_packed_array_elements): Use
16114         proper number of elements when printing an array indexed
16115         by an enumeration type.
16116
16117 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
16118
16119         * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
16120         (dw2_get_file_names_reader): Adjust.
16121         (lookup_dwo_signatured_type): Adjust.
16122         (lookup_dwp_signatured_type): Adjust.
16123         (lookup_signatured_type): Adjust.
16124         (create_type_unit_group): Adjust.
16125         (get_type_unit_group): Adjust.
16126         (process_psymtab_comp_unit_reader): Adjust.
16127         (build_type_psymtabs_reader): Adjust.
16128         (scan_partial_symbols): Adjust.
16129         (add_partial_symbol): Adjust.
16130         (add_partial_subprogram): Adjust.
16131         (peek_die_abbrev): Adjust.
16132         (fixup_go_packaging): Adjust.
16133         (process_imported_unit_die): Adjust.
16134         (dwarf2_compute_name): Adjust.
16135         (dwarf2_physname): Adjust.
16136         (read_import_statement): Adjust.
16137         (handle_DW_AT_stmt_list): Adjust.
16138         (read_file_scope): Adjust.
16139         (read_func_scope): Adjust.
16140         (read_lexical_block_scope): Adjust.
16141         (read_call_site_scope): Adjust.
16142         (read_variable): Adjust.
16143         (dwarf2_rnglists_process): Adjust.
16144         (dwarf2_ranges_process): Adjust.
16145         (dwarf2_ranges_read): Adjust.
16146         (dwarf2_get_pc_bounds): Adjust.
16147         (dwarf2_record_block_ranges): Adjust.
16148         (dwarf2_add_field): Adjust.
16149         (dwarf2_add_member_fn): Adjust.
16150         (read_structure_type): Adjust.
16151         (process_structure_scope): Adjust.
16152         (read_enumeration_type): Adjust.
16153         (read_array_type): Adjust.
16154         (mark_common_block_symbol_computed): Adjust.
16155         (read_common_block): Adjust.
16156         (read_namespace_type): Adjust.
16157         (read_namespace): Adjust.
16158         (read_module_type): Adjust.
16159         (read_tag_pointer_type): Adjust.
16160         (read_tag_ptr_to_member_type): Adjust.
16161         (read_tag_string_type): Adjust.
16162         (read_subroutine_type): Adjust.
16163         (read_typedef): Adjust.
16164         (read_base_type): Adjust.
16165         (attr_to_dynamic_prop): Adjust.
16166         (read_subrange_type): Adjust.
16167         (read_unspecified_type): Adjust.
16168         (dwarf2_read_abbrevs): Adjust.
16169         (load_partial_dies): Adjust.
16170         (read_partial_die): Adjust.
16171         (find_partial_die): Adjust.
16172         (guess_partial_die_structure_name): Adjust.
16173         (fixup_partial_die): Adjust.
16174         (read_attribute_value): Adjust.
16175         (read_addr_index): Adjust.
16176         (read_addr_index_from_leb128): Adjust.
16177         (read_str_index): Adjust.
16178         (dwarf2_string_attr): Adjust.
16179         (get_debug_line_section): Adjust.
16180         (dwarf_decode_line_header): Adjust.
16181         (lnp_state_machine::check_line_address): Adjust.
16182         (dwarf_decode_lines_1): Adjust.
16183         (dwarf_decode_lines): Adjust.
16184         (dwarf2_start_symtab): Adjust.
16185         (var_decode_location): Adjust.
16186         (new_symbol_full): Adjust.
16187         (dwarf2_const_value_data): Adjust.
16188         (dwarf2_const_value_attr): Adjust.
16189         (dwarf2_const_value): Adjust.
16190         (die_type): Adjust.
16191         (die_containing_type): Adjust.
16192         (build_error_marker_type): Adjust.
16193         (lookup_die_type): Adjust.
16194         (guess_full_die_structure_name): Adjust.
16195         (anonymous_struct_prefix): Adjust.
16196         (determine_prefix): Adjust.
16197         (dwarf2_name): Adjust.
16198         (follow_die_ref_or_sig): Adjust.
16199         (follow_die_offset): Adjust.
16200         (follow_die_ref): Adjust.
16201         (follow_die_sig_1): Adjust.
16202         (follow_die_sig): Adjust.
16203         (get_signatured_type): Adjust.
16204         (get_DW_AT_signature_type): Adjust.
16205         (decode_locdesc): Adjust.
16206         (dwarf_decode_macros): Adjust.
16207         (cu_debug_loc_section): Adjust.
16208         (fill_in_loclist_baton): Adjust.
16209         (dwarf2_symbol_mark_computed): Adjust.
16210         (init_one_comp_unit): Don't assign
16211         dwarf2_cu::dwarf2_per_objfile.
16212         (set_die_type): Adjust.
16213
16214 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
16215
16216         * dwarf2read.c (struct mapped_debug_names): Add constructor.
16217         <dwarf2_per_objfile>: New field.
16218         (dwarf2_per_objfile): Remove global.
16219         (get_dwarf2_per_objfile): New function.
16220         (set_dwarf2_per_objfile): New function.
16221         (dwarf2_build_psymtabs_hard): Change objfile parameter to
16222         dwarf2_per_objfile.
16223         (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
16224         (read_abbrev_offset): Likewise.
16225         (read_indirect_string): Likewise.
16226         (read_indirect_line_string): Likewise.
16227         (read_indirect_string_at_offset): Likewise.
16228         (read_indirect_string_from_dwz): Likewise.
16229         (dwarf2_find_containing_comp_unit): Change objfile parameter to
16230         dwarf2_per_objfile.
16231         (age_cached_comp_units): Add dwarf2_per_objfile parameter.
16232         (create_all_comp_units): Change objfile parameter to
16233         dwarf2_per_objfile.
16234         (create_all_type_units): Likewise.
16235         (process_queue): Add dwarf2_per_objfile parameter.
16236         (read_and_check_comp_unit_head): Likewise.
16237         (lookup_dwo_unit_in_dwp): Likewise.
16238         (get_dwp_file): Likewise.
16239         (process_cu_includes): Likewise.
16240         (struct free_dwo_file_cleanup_data): New struct.
16241         (dwarf2_has_info): Use get_dwarf2_per_objfile and
16242         set_dwarf2_per_objfile.
16243         (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
16244         (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
16245         context, adjust calls.
16246         (dw2_instantiate_symtab): Likewise.
16247         (dw2_get_cutu): Add dwarf2_per_objfile parameter.
16248         (dw2_get_cu): Likewise.
16249         (create_cu_from_index_list): Change objfile parameter to
16250         dwarf2_per_objfile.
16251         (create_cus_from_index_list): Get dwarf2_per_objfile from
16252         context, adjust calls.
16253         (create_cus_from_index): Likewise.
16254         (create_signatured_type_table_from_index): Change objfile
16255         parameter to dwarf2_per_objfile.
16256         (create_signatured_type_table_from_debug_names): Change objfile
16257         parameter to dwarf2_per_objfile.
16258         (create_addrmap_from_index): Likewise.
16259         (create_addrmap_from_aranges): Likewise.
16260         (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
16261         (dw2_setup): Remove.
16262         (dw2_get_file_names_reader): Get dwarf2_per_objfile from
16263         context.
16264         (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
16265         get_dwarf2_per_objfile.
16266         (dw2_forget_cached_source_info): Likewise.
16267         (dw2_map_symtabs_matching_filename): Likewise.
16268         (struct dw2_symtab_iterator) <index>: Remove.
16269         <dwarf2_per_objfile>: New field.
16270         (dw2_symtab_iter_init): Replace index parameter with
16271         dwarf2_per_objfile.
16272         (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
16273         (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
16274         (dw2_print_stats): Likewise.
16275         (dw2_dump): Likewise.
16276         (dw2_expand_symtabs_for_function): Likewise.
16277         (dw2_expand_all_symtabs): Likewise.
16278         (dw2_expand_symtabs_with_fullname): Likewise.
16279         (dw2_expand_marked_cus): Replace index and objfile parameters
16280         with dwarf2_per_objfile.
16281         (dw_expand_symtabs_matching_file_matcher): Add
16282         dwarf2_per_objfile parameter and adjust calls.
16283         (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
16284         adjust calls.
16285         (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
16286         (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
16287         adjust calls.
16288         (create_cus_from_debug_names_list): Replace objfile parameter
16289         with dwarf2_per_objfile and adjust calls.
16290         (create_cus_from_debug_names): Likewise.
16291         (dwarf2_read_debug_names): Likewise.
16292         (mapped_debug_names::namei_to_name): Adjust call.
16293         (dw2_debug_names_iterator::next): Likewise.
16294         (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
16295         (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
16296         (dw2_debug_names_dump): Likewise.
16297         (dw2_debug_names_expand_symtabs_for_function): Likewise.
16298         (dw2_debug_names_expand_symtabs_matching): Likewise.
16299         (dwarf2_initialize_objfile): Likewise.
16300         (dwarf2_build_psymtabs): Likewise.
16301         (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
16302         this_cu.
16303         (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
16304         (read_and_check_comp_unit_head): Likewise.
16305         (read_abbrev_offset): Likewise.
16306         (create_debug_type_hash_table): Likewise.
16307         (create_debug_types_hash_table): Likewise.
16308         (create_all_type_units): Replace objfile parameter with
16309         dwarf2_per_objfile.
16310         (add_type_unit): Add dwarf2_per_objfile parameter.
16311         (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
16312         with dwarf2_per_objfile.
16313         (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
16314         (lookup_dwp_signatured_type): Likewise.
16315         (lookup_signatured_type): Likewise.
16316         (read_cutu_die_from_dwo): Likewise.
16317         (init_tu_and_read_dwo_dies): Likewise.
16318         (init_cutu_and_read_dies): Likewise.
16319         (init_cutu_and_read_dies_no_follow): Likewise.
16320         (allocate_type_unit_groups_table): Add objfile parameter.
16321         (create_type_unit_group): Use dwarf2_per_objfile from cu.
16322         (get_type_unit_group): Likewise.
16323         (process_psymtab_comp_unit): Update call.
16324         (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
16325         (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
16326         (print_tu_stats): Likewise.
16327         (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
16328         in void* parameter.
16329         (build_type_psymtabs): Change objfile parameter to
16330         dwarf2_per_objfile.
16331         (process_skeletonless_type_unit): Use dwarf2_per_objfile
16332         passed in void* parameter.
16333         (process_skeletonless_type_units): Change objfile parameter to
16334         dwarf2_per_objfile.
16335         (set_partial_user): Likewise.
16336         (dwarf2_build_psymtabs_hard): Likewise.
16337         (read_comp_units_from_section): Likewise.
16338         (create_all_comp_units): Likewise.
16339         (scan_partial_symbols): Update calls.
16340         (add_partial_symbol): Likewise.
16341         (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
16342         (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
16343         (process_queue): Add dwarf2_per_objfile parameter.
16344         (get_compunit_symtab): Use dwarf2_per_objfile from cu.
16345         (compute_compunit_symtab_includes): Likewise.
16346         (process_cu_includes): Add dwarf2_per_objfile parameter.
16347         (process_full_comp_unit): Use dwarf2_per_objfile from cu.
16348         (process_full_type_unit): Likewise.
16349         (process_imported_unit_die): Update call.
16350         (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
16351         (read_file_scope): Likewise.
16352         (allocate_dwo_file_hash_table): Add objfile parameter.
16353         (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
16354         (create_cus_hash_table): Likewise.
16355         (create_dwp_hash_table): Likewise.
16356         (create_dwo_unit_in_dwp_v1): Likewise.
16357         (create_dwp_v2_section): Likewise.
16358         (create_dwo_unit_in_dwp_v2): Likewise.
16359         (lookup_dwo_unit_in_dwp): Likewise.
16360         (try_open_dwop_file): Likewise.
16361         (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
16362         (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
16363         cleanup to include a reference to dwarf2_per_objfile.
16364         (open_dwp_file): Add dwarf2_per_objfile parameter.
16365         (open_and_init_dwp_file): Likewise.
16366         (get_dwp_file): Likewise.
16367         (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
16368         (queue_and_load_all_dwo_tus): Update call.
16369         (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
16370         data.
16371         (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
16372         (dwarf2_ranges_process): Likewise.
16373         (dwarf2_get_pc_bounds): Likewise.
16374         (mark_common_block_symbol_computed): Likewise.
16375         (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
16376         (dwarf2_read_abbrevs): Update call.
16377         (read_partial_die): Use dwarf2_per_objfile from cu.
16378         (find_partial_die): Likewise.
16379         (fixup_partial_die): Likewise.
16380         (read_attribute_value): Likewise.
16381         (read_indirect_string_at_offset_from): Add objfile parameter.
16382         (read_indirect_string_at_offset): Add dwarf2_per_objfile
16383         parameter.
16384         (read_indirect_string_from_dwz): Add objfile parameter.
16385         (read_indirect_string): Add objfile parameter.
16386         (read_addr_index_1): Add dwarf2_per_objfile parameter.
16387         (read_addr_index): Use dwarf2_per_objfile from cu.
16388         (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
16389         call dw2_setup.
16390         (read_str_index): Use dwarf2_per_objfile from cu.
16391         (get_debug_line_section): Likewise.
16392         (read_formatted_entries): Add dwarf2_per_objfile parameter.
16393         (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
16394         (new_symbol_full): Use dwarf2_per_objfile from cu.
16395         (build_error_marker_type): Likewise.
16396         (lookup_die_type): Likewise.
16397         (determine_prefix): Likewise.
16398         (follow_die_offset): Likewise.
16399         (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
16400         (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
16401         (dwarf2_fetch_die_type_sect_off): Likewise.
16402         (dwarf2_get_die_type): Likewise.
16403         (follow_die_sig_1): Use dwarf2_per_objfile from cu.
16404         (get_signatured_type): Likewise.
16405         (get_DW_AT_signature_type): Likewise.
16406         (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
16407         (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
16408         (cu_debug_loc_section): Likewise.
16409         (fill_in_loclist_baton): Likewise.
16410         (dwarf2_symbol_mark_computed): Likewise.
16411         (dwarf2_find_containing_comp_unit): Change objfile parameter to
16412         dwarf2_per_objfile.
16413         (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
16414         parameter.
16415         (age_cached_comp_units): Add dwarf2_per_objfile parameter.
16416         (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
16417         (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
16418         (set_die_type): Use dwarf2_free_objfile from cu.
16419         (get_die_type_at_offset): Likewise.
16420         (dwarf2_per_objfile_free): Don't assign global variable.
16421         (debug_names) <constructor>: Add dwarf2_per_objfile
16422         parameter, update m_debugstrlookup construction.
16423         (debug_names::debug_str_lookup): Add dwarf2_per_objfile
16424         parameter.
16425         <m_dwarf2_per_objfile>: New field.
16426         <lookup>: Use m_dwarf2_per_objfile.
16427         (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
16428         (psyms_seen_size): Likewise.
16429         (write_gdbindex): Replace objfile parameter with
16430         dwarf2_per_objfile.
16431         (write_debug_names): Likewise.
16432         (write_psymtabs_to_index): Likewise.
16433         (save_gdb_index_command): Use get_dwarf2_per_objfile, update
16434         calls.
16435
16436 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
16437
16438         * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
16439         <dwarf2_per_objfile>: New field.
16440         (struct dwarf2_per_cu_data) <objfile>: Remove.
16441         <dwarf2_per_objfile>: New field.
16442         (create_cu_from_index_list): Assign dwarf2_per_objfile instead
16443         of objfile.
16444         (create_signatured_type_table_from_index): Likewise.
16445         (create_debug_type_hash_table): Likewise.
16446         (fill_in_sig_entry_from_dwo_entry): Likewise.
16447         (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
16448         (create_type_unit_group): Assign dwarf2_per_objfile instead of
16449         objfile.
16450         (create_partial_symtab): Access objfile through
16451         dwarf2_per_objfile.
16452         (process_psymtab_comp_unit_reader): Likewise.
16453         (read_comp_units_from_section): Likewise.
16454         (scan_partial_symbols): Likewise.
16455         (add_partial_symbol): Likewise.
16456         (add_partial_subprogram): Likewise.
16457         (peek_die_abbrev): Likewise.
16458         (fixup_go_packaging): Likewise.
16459         (process_full_comp_unit): Likewise.
16460         (process_full_type_unit): Likewise.
16461         (process_imported_unit_die): Likewise.
16462         (dwarf2_compute_name): Likewise.
16463         (dwarf2_physname): Likewise.
16464         (read_import_statement): Likewise.
16465         (create_cus_hash_table): Assign dwarf2_physname instead of
16466         objfile.
16467         (read_func_scope): Access objfile through dwarf2_per_objfile.
16468         (read_lexical_block_scope): Likewise.
16469         (read_call_site_scope): Likewise.
16470         (read_variable): Likewise.
16471         (dwarf2_rnglists_process): Likewise.
16472         (dwarf2_ranges_process): Likewise.
16473         (dwarf2_ranges_read): Likewise.
16474         (dwarf2_record_block_ranges): Likewise.
16475         (dwarf2_add_field): Likewise.
16476         (dwarf2_add_member_fn): Likewise.
16477         (read_structure_type): Likewise.
16478         (process_structure_scope): Likewise.
16479         (read_enumeration_type): Likewise.
16480         (read_array_type): Likewise.
16481         (read_common_block): Likewise.
16482         (read_namespace_type): Likewise.
16483         (read_namespace): Likewise.
16484         (read_module_type): Likewise.
16485         (read_tag_pointer_type): Likewise.
16486         (read_tag_ptr_to_member_type): Likewise.
16487         (read_tag_string_type): Likewise.
16488         (read_subroutine_type): Likewise.
16489         (read_typedef): Likewise.
16490         (read_base_type): Likewise.
16491         (attr_to_dynamic_prop): Likewise.
16492         (read_subrange_type): Likewise.
16493         (read_unspecified_type): Likewise.
16494         (load_partial_dies): Likewise.
16495         (read_partial_die): Likewise.
16496         (find_partial_die): Likewise.
16497         (guess_partial_die_structure_name): Likewise.
16498         (fixup_partial_die): Likewise.
16499         (read_attribute_value): Likewise.
16500         (read_addr_index_from_leb128): Likewise.
16501         (dwarf2_read_addr_index): Likewise.
16502         (dwarf2_string_attr): Likewise.
16503         (lnp_state_machine::check_line_address): Likewise.
16504         (dwarf_decode_lines_1): Likewise.
16505         (dwarf_decode_lines): Likewise.
16506         (dwarf2_start_symtab): Likewise.
16507         (var_decode_location): Likewise.
16508         (new_symbol_full): Likewise.
16509         (dwarf2_const_value_data): Likewise.
16510         (dwarf2_const_value_attr): Likewise.
16511         (dwarf2_const_value): Likewise.
16512         (die_type): Likewise.
16513         (die_containing_type): Likewise.
16514         (lookup_die_type): Likewise.
16515         (guess_full_die_structure_name): Likewise.
16516         (anonymous_struct_prefix): Likewise.
16517         (dwarf2_name): Likewise.
16518         (follow_die_ref_or_sig): Likewise.
16519         (follow_die_offset): Likewise.
16520         (follow_die_ref): Likewise.
16521         (dwarf2_fetch_die_loc_sect_off): Likewise.
16522         (dwarf2_fetch_constant_bytes): Likewise.
16523         (dwarf2_fetch_die_type_sect_off): Likewise.
16524         (dwarf2_get_die_type): Likewise.
16525         (follow_die_sig): Likewise.
16526         (decode_locdesc): Likewise.
16527         (dwarf2_per_cu_objfile): Likewise.
16528         (dwarf2_per_cu_text_offset): Likewise.
16529         (init_one_comp_unit): Assign dwarf2_per_objfile instead of
16530         objfile.
16531         (set_die_type): Access objfile through
16532         dwarf2_per_objfile.
16533
16534 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
16535
16536         * valprint.c (converted_character_d): Remove typedef.
16537         (DEF_VEC_O (converted_character_d)): Remove.
16538         (count_next_character): Use std::vector.
16539         (print_converted_chars_to_obstack): Likewise.
16540         (generic_printstr): Likewise.
16541
16542 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
16543
16544         * xml-support.h (struct gdb_xml_value): Add constructor.
16545         <value>: Change type to unique_xmalloc_ptr.
16546         (gdb_xml_value_s): Remove typedef.
16547         (DEF_VEC_O (gdb_xml_value_s)): Remove.
16548         (gdb_xml_element_start_handler): Change parameter type to
16549         std::vector.
16550         (xml_find_attribute): Likewise.
16551         * xml-support.c (xml_find_attribute): Change parameter type to
16552         std::vector and adjust.
16553         (gdb_xml_values_cleanup): Remove.
16554         (gdb_xml_parser::start_element): Adjust to std::vector.
16555         (xinclude_start_include): Change paraeter type to std::vector
16556         and adjust.
16557         * btrace.c (check_xml_btrace_version): Likewise.
16558         (parse_xml_btrace_block): Likewise.
16559         (parse_xml_btrace_pt_config_cpu): Likewise.
16560         (parse_xml_btrace_pt): Likewise.
16561         (parse_xml_btrace_conf_bts): Likewise.
16562         (parse_xml_btrace_conf_pt): Likewise.
16563         * memory-map.c (memory_map_start_memory): Likewise.
16564         (memory_map_start_property): Likewise.
16565         * osdata.c (osdata_start_osdata): Likewise.
16566         (osdata_start_item): Likewise.
16567         (osdata_start_column): Likewise.
16568         * remote.c (start_thread): Likewise.
16569         * solib-aix.c (library_list_start_library): Likewise.
16570         (library_list_start_list): Likewise.
16571         * solib-svr4.c (library_list_start_library): Likewise.
16572         (svr4_library_list_start_list): Likewise.
16573         * solib-target.c (library_list_start_segment): Likewise.
16574         (library_list_start_section): Likewise.
16575         (library_list_start_library): Likewise.
16576         (library_list_start_list): Likewise.
16577         * tracepoint.c (traceframe_info_start_memory): Likewise.
16578         (traceframe_info_start_tvar): Likewise.
16579         * xml-syscall.c (syscall_start_syscall): Likewise.
16580         * xml-tdesc.c (tdesc_start_target): Likewise.
16581         (tdesc_start_feature): Likewise.
16582         (tdesc_start_reg): Likewise.
16583         (tdesc_start_union): Likewise.
16584         (tdesc_start_struct): Likewise.
16585         (tdesc_start_flags): Likewise.
16586         (tdesc_start_enum): Likewise.
16587         (tdesc_start_field): Likewise.
16588         (tdesc_start_enum_value): Likewise.
16589         (tdesc_start_vector): Likewise.
16590
16591 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
16592
16593         * extension.h (struct xmethod_worker) <clone>: Remove.
16594         * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
16595         Remove.
16596         (python_xmethod_worker::clone): Remove.
16597         * valops.c (find_overload_match): Use std::move instead of
16598         clone.
16599
16600 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
16601
16602         * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
16603         (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
16604         <free_xmethod_worker_data>: Remove.
16605         <get_matching_xmethod_workers>: Chance VEC to std::vector.
16606         <get_xmethod_arg_types>: Remove.
16607         <get_xmethod_result_type>: Remove.
16608         <invoke_xmethod>: Remove.
16609         * extension.c (new_xmethod_worker): Remove.
16610         (clone_xmethod_worker): Remove.
16611         (get_matching_xmethod_workers): Return void, pass std::vector by
16612         pointer.
16613         (get_xmethod_arg_types): Rename to...
16614         (xmethod_worker::get_arg_types): ... this, and adjust.
16615         (get_xmethod_result_type): Rename to...
16616         (xmethod_worker::get_result_type): ... this, and adjust.
16617         (invoke_xmethod): Remove.
16618         (free_xmethod_worker): Remove.
16619         (free_xmethod_worker_vec): Remove.
16620         * extension.h (enum ext_lang_rc): Move here from
16621         extension-priv.h.
16622         (struct xmethod_worker): Add constructor and destructor.
16623         <data>: Remove.
16624         <value>: Remove.
16625         <invoke, clone, do_get_result_type, do_get_arg_types>: New
16626         virtual pure methods.
16627         <get_arg_types, get_result_type>: New methods.
16628         (xmethod_worker_ptr): Remove typedef.
16629         (DEF_VEC_P (xmethod_worker_ptr)): Remove.
16630         (xmethod_worker_vec): Remove typedef.
16631         (xmethod_worker_up): New typedef.
16632         (invoke_xmethod): Remove.
16633         (clone_xmethod_worker): Remove.
16634         (free_xmethod_worker): Remove.
16635         (free_xmethod_worker_vec): Remove.
16636         (get_xmethod_arg_types): Remove.
16637         (get_xmethod_result_type): Remove.
16638         * valops.c (find_method_list): Use std::vector, don't use
16639         intermediate vector.
16640         (value_find_oload_method_list): Use std::vector.
16641         (find_overload_match): Use std::vector.
16642         (find_oload_champ): Use std::vector.
16643         * value.c (value_free): Use operator delete.
16644         (value_of_xmethod): Rename to...
16645         (value_from_xmethod): ... this.  Don't assign
16646         xmethod_worker::value, take rvalue-reference.
16647         (result_type_of_xmethod): Adjust.
16648         (call_xmethod): Adjust.
16649         * value.h: Include extension.h.
16650         (struct xmethod_worker): Don't forward-declare.
16651         (value_of_xmethod): Rename to...
16652         (value_from_xmethod): ... this, take rvalue-reference.
16653         * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
16654         (struct python_xmethod_worker): ... this, add constructor and
16655         destructor.
16656         <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
16657         (gdbpy_free_xmethod_worker_data): Rename to...
16658         (python_xmethod_worker::~python_xmethod_worker): ... this and
16659         adjust.
16660         (gdbpy_clone_xmethod_worker_data): Rename to...
16661         (python_xmethod_worker::clone): ... this and adjust.
16662         (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
16663         temporary vector.
16664         (gdbpy_get_xmethod_arg_types): Rename to...
16665         (python_xmethod_worker::do_get_arg_types): ... this and adjust.
16666         (gdbpy_get_xmethod_result_type): Rename to...
16667         (python_xmethod_worker::do_get_result_type): ... this and
16668         adjust.
16669         (gdbpy_invoke_xmethod): Rename to...
16670         (python_xmethod_worker::invoke): ... this and adjust.
16671         (new_python_xmethod_worker): Rename to...
16672         (python_xmethod_worker::python_xmethod_worker): ... this and
16673         adjust.
16674         * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
16675         Remove.
16676         (gdbpy_free_xmethod_worker_data): Remove.
16677         (gdbpy_get_matching_xmethod_workers): Use std::vector.
16678         (gdbpy_get_xmethod_arg_types): Remove.
16679         (gdbpy_get_xmethod_result_type): Remove.
16680         (gdbpy_invoke_xmethod): Remove.
16681         * python/python.c (python_extension_ops): Remove obsolete
16682         callbacks.
16683
16684 2018-01-05  Pedro Alves  <palves@redhat.com>
16685
16686         PR gdb/18653
16687         * common/signals-state-save-restore.c
16688         (save_original_signals_state): New parameter 'quiet'.  Warn if we
16689         find a custom handler preinstalled, instead of internal erroring.
16690         But only warn if !quiet.
16691         * common/signals-state-save-restore.h
16692         (save_original_signals_state): New parameter 'quiet'.
16693         * main.c (captured_main_1): Move save_original_signals_state call
16694         after option handling, and pass QUIET.
16695
16696 2018-01-05  Pedro Alves  <palves@redhat.com>
16697
16698         * spu-tdep.c (spu_catch_start): Pass
16699         symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
16700
16701 2018-01-05  Pedro Alves  <palves@redhat.com>
16702
16703         PR gdb/22670
16704         * ada-lang.c (literal_symbol_name_matcher): New function.
16705         (ada_get_symbol_name_matcher): Use it for
16706         symbol_name_match_type::SEARCH_NAME.
16707         * block.c (block_lookup_symbol): New parameter 'match_type'.  Pass
16708         it down instead of assuming symbol_name_match_type::FULL.
16709         * block.h (block_lookup_symbol): New parameter 'match_type'.
16710         * c-valprint.c (print_unpacked_pointer): Use
16711         lookup_symbol_search_name instead of lookup_symbol.
16712         * compile/compile-object-load.c (get_out_value_type): Pass down
16713         symbol_name_match_type::SEARCH_NAME.
16714         * cp-namespace.c (cp_basic_lookup_symbol): Pass down
16715         symbol_name_match_type::FULL.
16716         * cp-support.c (cp_get_symbol_name_matcher): Handle
16717         symbol_name_match_type::SEARCH_NAME.
16718         * infrun.c (insert_exception_resume_breakpoint): Use
16719         lookup_symbol_search_name.
16720         * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
16721         * psymtab.c (maintenance_check_psymtabs): Use
16722         symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
16723         * stack.c (print_frame_args): Use lookup_symbol_search_name and
16724         SYMBOL_SEARCH_NAME.
16725         * symtab.c (lookup_local_symbol): Don't demangle the lookup name
16726         if symbol_name_match_type::SEARCH_NAME.
16727         (lookup_symbol_in_language): Pass down
16728         symbol_name_match_type::FULL.
16729         (lookup_symbol_search_name): New.
16730         (lookup_language_this): Pass down
16731         symbol_name_match_type::SEARCH_NAME.
16732         (lookup_symbol_aux, lookup_local_symbol): New parameter
16733         'match_type'.  Pass it down.
16734         * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
16735         (lookup_symbol_search_name): New declaration.
16736         (lookup_symbol_in_block): New 'match_type' parameter.
16737
16738 2018-01-05  Pedro Alves  <palves@redhat.com>
16739
16740         PR gdb/22670
16741         * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
16742         ada_lookup_symbol.
16743         (ada_lookup_symbol): Reimplement in terms of
16744         ada_lookup_symbol_list, bits factored out from
16745         ada_lookup_encoded_symbol.
16746
16747 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
16748
16749         * ada-exp.y (write_object_renaming): When subscripting an array
16750         using a symbol as the index, pass the block in call to
16751         ada_lookup_encoded_symbol when looking that symbol up.
16752
16753 2018-01-05  Jerome Guitton  <guitton@adacore.com>
16754
16755         * ada-lang.c (ada_array_length): Use ada_index_type instead of
16756         TYPE_INDEX_TYPE.
16757
16758 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
16759
16760         * ada-lang.c (ada_to_fixed_value_create): Add handling of
16761         the case where VALUE_LVAL (val0) is not lval_memory.
16762
16763 2018-01-05  Xavier Roirand  <roirand@adacore.com>
16764
16765         * ada-valprint.c (print_optional_low_bound): Handle
16766         character-indexed array printing like boolean-indexed array
16767         printing.
16768
16769 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
16770
16771         * NEWS: Create a new section for the next release branch.
16772         Rename the section of the current branch, now that it has
16773         been cut.
16774
16775 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
16776
16777         GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
16778         * version.in: Bump version to 8.1.50.DATE-git.
16779
16780 2018-01-03  Xavier Roirand  <roirand@adacore.com>
16781
16782         * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
16783         Add field.
16784         * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
16785         Add field.
16786         (default_exception_support_info) <catch_handlers_sym>: Add field.
16787         (exception_support_info_fallback) <catch_handlers_sym>: Add field.
16788         (ada_exception_name_addr_1): Add "catch handlers" handling.
16789         (ada_exception_catchpoint_cond_string) <ex>: New parameter.
16790         Update all callers.
16791         (create_excep_cond_exprs) <ex>: Add parameter.
16792         (re_set_exception): Update create_excep_cond_exprs call.
16793         (print_it_exception, print_one_exception, print_mention_exception)
16794         (print_recreate_exception): Add "catch handler" handling.
16795         (allocate_location_catch_handlers, re_set_catch_handlers)
16796         (check_status_catch_handlers, print_it_catch_handlers)
16797         (print_one_catch_handlers, print_mention_catch_handlers)
16798         (print_recreate_catch_handlers): New function.
16799         (catch_handlers_breakpoint_ops): New variable.
16800         (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
16801         Add parameter.  Add "catch handler" handling.
16802         (ada_exception_sym_name, ada_exception_breakpoint_ops):
16803         Add "catch handler" handling.
16804         (ada_exception_catchpoint_cond_string): Add "catch handler"
16805         handling.
16806         (create_ada_exception_catchpoint): Update create_excep_cond_exprs
16807         call.
16808         (catch_ada_handlers_command): New function.
16809         (initialize_ada_catchpoint_ops): Initialize "catch handlers"
16810         operations structure.
16811         (_initialize_ada_language): Add "catch handlers" command entry.
16812         * NEWS: Document "catch handlers" feature.
16813
16814 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
16815
16816         * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
16817         account when creating the array type of the slice.
16818         (ada_value_slice): Likewise.
16819
16820 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
16821
16822         * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
16823         New enum value.
16824         (create_array_type_with_stride): Add byte_stride_prop parameter.
16825         * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
16826         New parameter.  Update all callers in this file.
16827         (array_type_has_dynamic_stride): New function.
16828         (is_dynamic_type_internal, resolve_dynamic_array): Add handling
16829         of arrays with dynamic byte strides.
16830         * dwarf2read.c (read_array_type): Add support for dynamic
16831         DW_AT_byte_stride attributes.
16832
16833 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
16834
16835         * dwarf2read.c (read_unspecified_type): Treat
16836         DW_TAG_enumeration_type DIEs from Ada units as stubs.
16837
16838 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
16839
16840         Update copyright year range in all GDB files.
16841
16842 2018-01-01, 18  Joel Brobecker  <brobecker@adacore.com>
16843
16844         * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
16845         and gdb/testsuite/gdb.base/step-line.c.
16846
16847 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
16848
16849         * copyright.py (main): Dump the contents of
16850         MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
16851         even if BY_HAND is empty.
16852
16853 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
16854
16855         * top.c (print_gdb_version): Update Copyright year in version
16856         message.
16857
16858 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
16859
16860         * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
16861
16862 For older changes see ChangeLog-2017.
16863 \f
16864 Local Variables:
16865 mode: change-log
16866 left-margin: 8
16867 fill-column: 74
16868 version-control: never
16869 coding: utf-8
16870 End: